[osg-users] LiSPSM and main camera nearFarRatio?

Jean-Sébastien Guay jean-sebastien.guay at cm-labs.com
Mon Sep 29 12:28:11 PDT 2008

Hi all, Hi Wojtek,

I've been working on deploying the new LiSPSM in our simulators. While 
fixing a totally unrelated problem today (when viewing from inside the 
cockpit, the cockpit geometry was being clipped), I added some 
parameters to control the nearFarRatio on a camera.

I have no idea why, but this seems to have an effect on shadows. More 
specifically, the shadows are being clipped. The default nearFarRatio is 
0.0005, and when I set it just a bit lower, 0.00049, the shadow of the 
boom (arm) of our crane (when viewed from the cockpit) is clipped. The 
more I decrease the nearFarRatio, the more the shadows are clipped.

I have looked a bit into the code, but since it's not my code, I may 
have a hard time finding out what is causing this. Off the top of your 
head, what might cause this? And what would you suggest to fix it 
(meaning, be able to control the nearFarRatio of my main camera and 
maintain correct shadows)?

For reference, I have set minLightMargin to 100, and maxFarPlane to 5000.

Thanks in advance,

Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com

More information about the osg-users mailing list