distant objects in outdoor scenes look ugly
distant objects in outdoor scenes look ugly
Hi!
I made a little outdoor scene by using a 3ds terrain model (with OctTreeTriangleSelector, what worked pretty well), but I noticed that models added to the scene look very ugly from a distance. I guess this is due to the zbuffer resolution. Is there any trick to improve that, or will a future release of the engine focus on that problem?
Greetings,
Balu
I made a little outdoor scene by using a 3ds terrain model (with OctTreeTriangleSelector, what worked pretty well), but I noticed that models added to the scene look very ugly from a distance. I guess this is due to the zbuffer resolution. Is there any trick to improve that, or will a future release of the engine focus on that problem?
Greetings,
Balu
Well, I mean that hidden parts become visible in 'stripes'. For example, if I place the bsp file from the techdemo in the terrain and move away from it, internal parts become visible and the 'castle' appears like ripped apart and the line between terrain and 'castle' is not straight anymore. I guess the hidden pixels are sorted out by use of the zbuffer, and if you have a bigger distance, then the resolution of the zbuffer is too small to correctly sort out the pixels. So, I wonder what could be a solution for that.
Balu
Balu
Spartacus, you don't have to completely rely on the engine for every feature. You can implement it yourself.
You answer is on this page:
http://irrlicht.sourceforge.net/docu/cl ... eNode.html
You answer is on this page:
http://irrlicht.sourceforge.net/docu/cl ... eNode.html
Crud, how do I do this again?
With max distance you mean setFarValue? That I did already. It was set to 100000.0 instead of 2000.0 (default?). I guess the only satisfying solution would be the use of a stencil and to replace the bsp model depending on the distance (a kind of LOT).
I don't want to use fog, because my intention is to have a nice landscape rendered, with far view etc. As I haven't programmed stencils before, I have some work to do, or is there some support by the engine I haven't found yet?
Thanx for all the answers...
Balu
I don't want to use fog, because my intention is to have a nice landscape rendered, with far view etc. As I haven't programmed stencils before, I have some work to do, or is there some support by the engine I haven't found yet?
Thanx for all the answers...
Balu
When you use stencil, 24-bit depth buffer is used, otherwise 16 bits is used. Of course you can change default depth-buffer format to 24-bit.
For DX8 device you need to open CVideoDirectX8::initDriver function (CVideoDirectX8.cpp file, line 157) and replace D3DFMT_D16 with D3DFMT_D24X8:
For DX8 device you need to open CVideoDirectX8::initDriver function (CVideoDirectX8.cpp file, line 157) and replace D3DFMT_D16 with D3DFMT_D24X8:
Code: Select all
if (!StencilBuffer)
present.AutoDepthStencilFormat = D3DFMT_D16;
reason
i was wondering if anyone ever found out why setting the nearvalue fixes the problem of object becoming see-through as you move away from them.
setting the near value to a larger number is really only a hack because if you move far enough away the problem is still there, just not as noticible. there must be something causing this behaviour which can be fixed. if it is in the zbuffer then what can be done?
setting the near value to a larger number is really only a hack because if you move far enough away the problem is still there, just not as noticible. there must be something causing this behaviour which can be fixed. if it is in the zbuffer then what can be done?