FarClipDistance

nargil

01-04-2009 13:10:25

Is there a method to increase the cameras farclipdistance only for caelum rendering ? I need a smaller value for SSAO to work, and then clouds are cropped.

cdleonard

01-04-2009 13:48:33

It's difficult to increase far clip distance only for part of the scene: parts with different clip distances won't interact properly.

Some options:
- You could hack a RenderQueueListener based on CAELUM_RENDER_QUEUE_CLOUDS. This will work very poorly!
- You can scale the clouds to fit a smaller scene; while keeping the same effect.
- It might be possible to modify caelum clouds to ignore depth issues and always render as "infinitely far away". Not sure what that would take.
- Perhaps you could modify the SSAO compositor to only deal with depth values in a certain range. AFAIK SSAO does a render of the depth buffer; perhaps you could restrict the far clip distance in that render and ignore far-away objects for SSAO. Again; not sure what that would take.

Are you sure clouds are in fact the problem? What about terrain? You also need a large far clip distance for terrain so that hills will overlap in the correct order.

nargil

01-04-2009 15:54:02

Ok, thanks for the reply. I managed to adjust the ssao compositor for high far clip dist.
Here is a link to the solution. Even though not caelum related, maybe someone will find it useful here:
http://ogre3d.org/forums/viewtopic.php? ... 75#p335011