One problem for fog & light, And another for tiled textu
One problem for fog & light, And another for tiled textu
Hi~
First of all, please excuse my short English.
My project recently encountered the annoying two problems and i don't have any clues to solve this problems with my narrow knowledge of 3D graphics. So, please give some idea what might cause these problems.
First pictures for two problems.
This picture shows two problems.
First, The red circle on top of the picture shows the tiling texture problem. My team decided to tiling texture on the very large plane instead using 1 on 1 texture with the plane, because of the problem of the texture quality. You know that one texture for the very big plane really hurts the quality of the texture.
Seemed the tiling texture can cover the problem but, as bonus i got the strangle lines between each tile. Any SUGGESTION TO SOLVE THIS?
Second, the red circle on right bottom of the picture shows the saw tooth shape on the boundary between Mount Model and Plane. I tried to fix this by relocating the mountain model, but i only succeeded to remove the saw tooth shape by giving some distances between plane and mountain. However, the distance was noticeable when i move the camera degree to the plane to almost 10 degree. I WANT TO PLACE THE MOUNTAIN RIGHT ON THE PLANE WITHOUT THIS PROBLEM. Any idea to solve this?
Finally, the last problem. Sorry about it is getting long.
Please see the below two pictures.
Ha.. This is really annoying one. I put the light on the scene, as you can see on the first picture. But when i rotate my camera little bit, the light effect suddenly disappears, like the second picture. The fog effect also has same symptoms. Any idea why this happens?
Thanks~
First of all, please excuse my short English.
My project recently encountered the annoying two problems and i don't have any clues to solve this problems with my narrow knowledge of 3D graphics. So, please give some idea what might cause these problems.
First pictures for two problems.
This picture shows two problems.
First, The red circle on top of the picture shows the tiling texture problem. My team decided to tiling texture on the very large plane instead using 1 on 1 texture with the plane, because of the problem of the texture quality. You know that one texture for the very big plane really hurts the quality of the texture.
Seemed the tiling texture can cover the problem but, as bonus i got the strangle lines between each tile. Any SUGGESTION TO SOLVE THIS?
Second, the red circle on right bottom of the picture shows the saw tooth shape on the boundary between Mount Model and Plane. I tried to fix this by relocating the mountain model, but i only succeeded to remove the saw tooth shape by giving some distances between plane and mountain. However, the distance was noticeable when i move the camera degree to the plane to almost 10 degree. I WANT TO PLACE THE MOUNTAIN RIGHT ON THE PLANE WITHOUT THIS PROBLEM. Any idea to solve this?
Finally, the last problem. Sorry about it is getting long.
Please see the below two pictures.
Ha.. This is really annoying one. I put the light on the scene, as you can see on the first picture. But when i rotate my camera little bit, the light effect suddenly disappears, like the second picture. The fog effect also has same symptoms. Any idea why this happens?
Thanks~
Let's Take Over the World ~!!
The second problem is most definitely z-buffer related. Usually you can work around this by increasing the near plane value and decreasing the far plane value. this will get you better z-resolution and the jaggies will go away.
If you can't or don't want to do that, you might check the z-buffer depth. I think the default behavior for Irrlicht 1.2 on D3D drivers was to use a 24-bit. I think the SVN version will try 32, 24 and 16. I think the z-depth is 16-bit on the OpenGL driver. Someone should probably chime in here...
Travis
If you can't or don't want to do that, you might check the z-buffer depth. I think the default behavior for Irrlicht 1.2 on D3D drivers was to use a 24-bit. I think the SVN version will try 32, 24 and 16. I think the z-depth is 16-bit on the OpenGL driver. Someone should probably chime in here...
Travis
Last edited by vitek on Thu Jan 18, 2007 8:37 am, edited 1 time in total.
-
- Posts: 97
- Joined: Sat Oct 14, 2006 10:51 am
- Location: Australia,melbourne
Thanks, vitek. I think you are definitely right. When I goes to the close range to the object on the main plane, the saw tooth shape disappears, which i noticed already. I will start digging in the Z-buffer related thing. Thanks for your advice!
a_haouchar, he he. Thanks~. Yeh, it took some times.
a_haouchar, he he. Thanks~. Yeh, it took some times.
Let's Take Over the World ~!!
-
- Posts: 49
- Joined: Sun Dec 10, 2006 6:23 pm
tilling error
Now I am not too sure about this answer but it worth a shot to put in my $0.02.
It could be that the texture is either to large or to small, that while tilling it creates such lines. Possible fix could be to either change the tilling scale or the original textures size.
Crazy Idea Fix: you could also try multi layerd textures with different alph values to mask the lines. They may blend in . . . however I doubt it.
It probrally is a z-buffer problem you are encountering with the teeth marks on your mountains.
I would like to know the solution you come up with for all of these issues.
I would also LOVE to play your game!!!!
It could be that the texture is either to large or to small, that while tilling it creates such lines. Possible fix could be to either change the tilling scale or the original textures size.
Crazy Idea Fix: you could also try multi layerd textures with different alph values to mask the lines. They may blend in . . . however I doubt it.
It probrally is a z-buffer problem you are encountering with the teeth marks on your mountains.
I would like to know the solution you come up with for all of these issues.
I would also LOVE to play your game!!!!
the firsth problem might be related to mipmaping. Try to turn mipmap off when creating texture to see.
before driver->getTexture("filename") use driver->setTextureCreationFlag(ETCF_CREATE_MIP_MAPS, fasle)
similar problems happen when you have one texture consisting of tilles. When Irrlicht create mipmaps it resize texture and tilles blend borders of each other.
If you want to use mipmaping the usual workaround is to use tilles which are few pixels smaller than normal and space between them is filed with pixels of same color as ones at the edge of tile. You may call it offset. But this usuali doesn't solve problem entirely.
Another way is to arange tiles that they face similar tiles as much as possible. Yet that is not allways possible.
...so far I did not find definitive solution to this problem.
If you are not using too much diferent tiles, you may try to asign diferent terrain tiles not only diferent texture coordinates but diferent material. In such case you could load texture tiles from individual texture files eliminating mipmap problem. You need to use several meshbuffers of course.
Not sure but second promlem can be solved also by increasing scale of objects. Let say you hill is 1x1x1 units big. Increasing to 10x10x10 might help. Of course you need to scale everithing else too. As already mentioned it is Z buffer problem.
before driver->getTexture("filename") use driver->setTextureCreationFlag(ETCF_CREATE_MIP_MAPS, fasle)
similar problems happen when you have one texture consisting of tilles. When Irrlicht create mipmaps it resize texture and tilles blend borders of each other.
If you want to use mipmaping the usual workaround is to use tilles which are few pixels smaller than normal and space between them is filed with pixels of same color as ones at the edge of tile. You may call it offset. But this usuali doesn't solve problem entirely.
Another way is to arange tiles that they face similar tiles as much as possible. Yet that is not allways possible.
...so far I did not find definitive solution to this problem.
If you are not using too much diferent tiles, you may try to asign diferent terrain tiles not only diferent texture coordinates but diferent material. In such case you could load texture tiles from individual texture files eliminating mipmap problem. You need to use several meshbuffers of course.
Not sure but second promlem can be solved also by increasing scale of objects. Let say you hill is 1x1x1 units big. Increasing to 10x10x10 might help. Of course you need to scale everithing else too. As already mentioned it is Z buffer problem.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Of course Irrlicht has support for it. Check SMaterial. You can choose any combination of bilinear, trilinear, and anisotropic filtering. Check the MeshViewer. It has a listbox where you can set those filter settings for the viewed mesh.vitek wrote:The texturing issue might be solved by enabling anisotropic filtering. I don't believe that Irrlicht provides methods for changing this.
Sorry guys about my very late response, because of about 10 hours time difference caused by different time zone.
harukiblue, Thanks for your advice~. I will send message, if i solves these problems.
And vitek, you were right. i enabled AnisotropicFilter for the all Meshes and seemed it disappeared.
hmmm.. but seems, turning AnisotropicFilter is not the perfect solution, because when i use IrrEdit to edit
Scene, sometimes, i can see the lines.
arras, thanks for your adivce~, too. i will try to test Mipmap and others you suggested.
hybrid, good~ IrrEdit also has the option's checking box. i loaded all Meshes on the field using *.irr file, thus
i replaced all strings related to anisotropic filtering to TRUE in the file~ and~ as i got some imporvement~
Thanks for your info~
harukiblue, Thanks for your advice~. I will send message, if i solves these problems.
And vitek, you were right. i enabled AnisotropicFilter for the all Meshes and seemed it disappeared.
hmmm.. but seems, turning AnisotropicFilter is not the perfect solution, because when i use IrrEdit to edit
Scene, sometimes, i can see the lines.
arras, thanks for your adivce~, too. i will try to test Mipmap and others you suggested.
hybrid, good~ IrrEdit also has the option's checking box. i loaded all Meshes on the field using *.irr file, thus
i replaced all strings related to anisotropic filtering to TRUE in the file~ and~ as i got some imporvement~
Thanks for your info~
Let's Take Over the World ~!!
The third problem sounds like something to do with render states, and will be pretty difficult to find
My guess is you're using the OpenGL renderer, and the problem is caused by the material being rendered before the plane (render order changes depending on camera position and angle). The trees are the most likely suspect.
Does it happen without the trees, and if so, which materials are you using for the plane and the trees?
My guess is you're using the OpenGL renderer, and the problem is caused by the material being rendered before the plane (render order changes depending on camera position and angle). The trees are the most likely suspect.
Does it happen without the trees, and if so, which materials are you using for the plane and the trees?
bitplane, i am using Direct9, and i tested the scene without all trees. However, i could see same problem in my game. II also changed the plane's material for several other types which take the light effect, and any of those couldn't improve the problem. One thing i noticed was that the problem never happens in IrrEdit with Direct9. Well, only difference between my game and IrrEdit that i can not figure out is the CAMERA. I am using Customized camera for my game, where IrrEdit using Maya kind camera. You gave me a core reason of this problem.. rendering order.. hmm. I kind of remember this part when I was trying to build my new camera class's OnPostRender method. Maybe, i should check the part. Thank you for your help~
Let's Take Over the World ~!!