Re: [osgPlugins] osgShadow LiSPSM culling problem
Hi Garret,
I have not worked on Lispsm for long time but description of your problem may suggest that my method of obtaining main camera and its projection matrix may not work as it used to or your setup uses unusual multi channel master / slave configuration that was not tested so far. I am obtaining main view camera in several places in the code using this construct:
_cv->getRenderStage()->getCamera()
you may check if its still returning the right camera by adding asserts checking its projection matrix (getProjectionMatrixAsFrustum and check if near/far/left/right/top/bottom values are correct).
One of the older problems with main camera was use of COMPUTE_NEAR_FAR flag. You may try turning it off and see if it affects your results.
If above does not help, I will ask you to create simple applet to show your problem and I may try to debug it in spare time.
Cheers,
Wojtek Lewandowski
2012/8/17 Garrett Cope
<garrett.cope.ctr-V57KVV444psrI1il2JP8mg@public.gmane.orgs.edu>Hi,
I'm working with the osgShadow LiSPSM implementation as that seems to be the one that people have had the most success with. The shadows are great, but are being clipped vertically as the shadowing object moves near the left or right edge of the window.
I've seen similar issues in other threads, but have tried the following previously suggested solutions with no result:
- Using one directional light angled at the geometry
- Tried various values for minLightMargin
- Set distant MaxFarPlane
If I comment out the clipping function in MinimalShadowMap everything works as expected, but of course I need to clip the shadows for it to be feasible.
The problem seems to be with the calculation of the CullVisitor's projection matrix used for clipping, but I have yet to find out where this is being calculated so I can see what the problem might be. I'm hoping Wojtek or someone more familiar with this plugin can point me in the right direction.
...
Thank you!
Cheers,
Garrett
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49305#49305
_______________________________________________
osg-users mailing list
osg-users-ZwoEplunGu08BSWDSat3fA@public.gmane.orgcenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
<div>
<p>Hi Garret,</p>
<div><br></div>
<div>I have not worked on Lispsm for long time but description of your problem may suggest that my method of obtaining main camera and its projection matrix may not work as it used to or your setup uses unusual multi channel master / slave configuration that was not tested so far. I am obtaining main view camera in several places in the code using this construct:</div>
<div><br></div>
<div>_cv->getRenderStage()->getCamera()</div>
<div><br></div>
<div>you may check if its still returning the right camera by adding asserts checking its projection matrix (getProjectionMatrixAsFrustum and check if near/far/left/right/top/bottom values are correct). </div>
<div><br></div>
<div>One of the older problems with main camera was use of COMPUTE_NEAR_FAR flag. You may try turning it off and see if it affects your results.</div>
<div><br></div>
<div>If above does not help, I will ask you to create simple applet to show your problem and I may try to debug it in spare time.</div>
<div><br></div>
<div>Cheers,</div>
<div>Wojtek Lewandowski</div>
<div><br></div>
<div>
<br><div><br></div>
<div><br></div>
<div>
<br><br><div class="gmail_quote">2012/8/17 Garrett Cope <span dir="ltr"><<a href="mailto:garrett.cope.ctr@..." target="_blank">garrett.cope.ctr@...s.edu</a>></span><br><blockquote class="gmail_quote">Hi,<br><br>
I'm working with the osgShadow LiSPSM implementation as that seems to be the one that people have had the most success with. The shadows are great, but are being clipped vertically as the shadowing object moves near the left or right edge of the window.<br><br>
I've seen similar issues in other threads, but have tried the following previously suggested solutions with no result:<br><br>
- Using one directional light angled at the geometry<br>
- Tried various values for minLightMargin<br>
- Set distant MaxFarPlane<br><br>
If I comment out the clipping function in MinimalShadowMap everything works as expected, but of course I need to clip the shadows for it to be feasible.<br><br>
The problem seems to be with the calculation of the CullVisitor's projection matrix used for clipping, but I have yet to find out where this is being calculated so I can see what the problem might be. I'm hoping Wojtek or someone more familiar with this plugin can point me in the right direction.<br>
...<br><br>
Thank you!<br><br>
Cheers,<br>
Garrett<br><br>
------------------<br>
Read this topic online here:<br><a href="http://forum.openscenegraph.org/viewtopic.php?p=49305#49305" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=49305#49305</a><br><br><br><br><br><br>
_______________________________________________<br>
osg-users mailing list<br><a href="mailto:osg-users@...">osg-users@...cenegraph.org</a><br><a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div>