Hi,
I developed two methods to compute convex hull of visible scene portion:
A: one based on cull stage
I scan render leaves generated by main camera cull traversal and compute
minimal convex hull around them
B: second based on draw stage
I prerender the scene to small resolution depth texture (64x64) and
compute convex hull around valid points stored in this texture
then I compute intersection of this convex scene hull with main camera
frustum and coarse light (shadow) camera frustum. This produces my minimal
scene bound polytope which I then use to further narrow shadow camera
projection.
Prerender based approach is somewhat radical but produces really good
results with my LispSM. Cull based approach is more precise but works well
only with fairly small drawables (ie when their bounding boxes are much
smaller than frustum).
I don't know how useful it may be for you. We make flight sim renderer so my
work was mostly oriented towards elipsoid based large terrain / directional
light case. But if you do something similar then we may exchange some
experiences.
I do plan on contributing some of this work with LispSM but will need to
finish it first ;-).
Cheers,
Wojtek
----- Original Message -----
From: "Jean-Sébastien Guay" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "OpenSceneGraph Users"
<[email protected]>
Sent: Tuesday, February 12, 2008 2:54 PM
Subject: Re: [osg-users] osgShadow one shot shadow map
> Hello Wojtek,
>
>> Actually most of the time was spent
>> on algorithms finding minimal shadowed scene bounds under OSG. It was a
>> key
>> to good shadow mapping results.
>
> Well, that's what I'm working on right now too! If you are planning on
> contributing this sometime, would it be possible for you to help me with
> this? It would save me lots of time.
>
> I have something that works pretty well, but only if the camera
> manipulator is a Trackball Manipulator (for the getCenter() method) - I
> essentially get the smallest of either the scene bound or the camera view
> volume.
>
> If I could have something that works well in more cases, it would be very
> useful.
>
> Thanks in advance,
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay [EMAIL PROTECTED]
> http://www.cm-labs.com/
> http://whitestar02.webhop.org/
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org