michael.zhang Posted May 25, 2011 Share Posted May 25, 2011 Hello, For some reason, the visibility of the ocean flickers, as I move the camera around the world. Attached are two pictures. The first is what it should always look like. The second shows what happens if I move the camera ever so slightly to the "sweet spot", that makes the ocean vanish. Moving just a sliver further will make the ocean appear again. So basically, the area that the camera is viewing.. is practically identical, short of an ever so minor rotation. Any ideas what's going on? Link to comment
michael.zhang Posted May 25, 2011 Author Share Posted May 25, 2011 Here is another screenshot. The black part beneath is a piece of the terrain. Link to comment
binstream Posted May 26, 2011 Share Posted May 26, 2011 What are your near/far clipping values? Link to comment
michael.zhang Posted May 26, 2011 Author Share Posted May 26, 2011 What are your near/far clipping values? See camera settings in attached image. Link to comment
ulf.schroeter Posted May 26, 2011 Share Posted May 26, 2011 Try to reproduce artifact with some more reasonable near/far settings of 0.5 to 10000.0. Your current near/far settings might be too aggressive. Link to comment
michael.zhang Posted May 26, 2011 Author Share Posted May 26, 2011 Try to reproduce artifact with some more reasonable near/far settings of 0.5 to 10000.0. Your current near/far settings might be too aggressive. Hey Ulf, You're right. Higher near clip values gets rid of the problem. Though, this means I must not understand something about near clipping. As I understood it, it means the smaller the number, the closer to the camera an object could be to be captured in the view frustum. How does a aggressively low near clip value cause these issues? Thanks Link to comment
ulf.schroeter Posted May 26, 2011 Share Posted May 26, 2011 As I understood it, it means the smaller the number, the closer to the camera an object could be to be captured in the view frustum. How does a aggressively low near clip value cause these issues? Have a look at Learning to love your Z-buffer article for detailed explanation. Most important conclusion: "Always put zNear as far from the eye as you can tolerate" unless you have a more general solution like logarithmic z-buffer Link to comment
michael.zhang Posted May 26, 2011 Author Share Posted May 26, 2011 Have a look at Learning to love your Z-buffer article for detailed explanation. Most important conclusion: "Always put zNear as far from the eye as you can tolerate" unless you have a more general solution like logarithmic z-buffer Wow, great explanation, thanks Ulf! :) Beginners frequently place zNear at a very short distance because they don't want polygons close to the eye to be clipped against the near plane - and because it isn't obvious why you'd want to do anything else. Very true! Seems like Logarithmic Z-Buffer is a win-win solution, perhaps Unigine should implement it? Link to comment
ulf.schroeter Posted May 26, 2011 Share Posted May 26, 2011 Seems like Logarithmic Z-Buffer is a win-win solution, perhaps Unigine should implement it? already suggested, as it would eliminate all kind of nasty z-fighting artifacts especially in large outdoor sceens. It requires additional shader instructions, but could be made optional based on shader quality settings. Link to comment
Recommended Posts