Hi Wojciech,

I understand where you are coming from, unfortunately its a pretty
complex topic and one that really needs you to submerge yourself in it
to be able to really understand the issues - it really isn't a topic
that you can dip you toe in and out of.  Right now I have another
large task that it is pretty well consuming almost all my time and
intellectual capacity, I'm afraid there is little left for diving into
other meaty topics.

The best I can do is point you in the direction of work I've done in
the past that comes closest to view dependant render texture work -
and that's in the form of the OverlayNode's
VIEW_DEPENDENT_PERSPECTIVE_OVERLAY.  The code in
src/osgSim/OverlayNode.cpp does do some scene traversal to compute a
right bound between the view frustum and the scene.  The code isn't
yet producing great results all the time though so it looks like their
or corner cases I haven't accounted for yet, or just some bugs lurking
that I have found.

As I'm so short on time I can't really dive any deeper than this, good luck,

Robert.

On Jan 26, 2008 12:37 PM, Wojciech Lewandowski <[EMAIL PROTECTED]> wrote:
> Hi Robert,
>
> I am struggling with building decent ShadowMapping approach for flight sim
> application. Due to performance requirements I am hesistant to use multipass
> PSSM and I am trying to implement (one extra pass only) some kind of
> perspective shadow mapping derived algorithm. I went through Trapezoidal,
> Smallest Bounds, LisPSM. Effective computation of minimal shadow scene
> bounds  + LisPSM gave me fairly good results. But this apprach fails when I
> have badly conditioned database. Few huge drawables that are spread over
> whole terrain kill effectivness of minimal bounds computation. They have
> such big bounds that minimal bound computaion simply does not help at all,
> and I end up using camera frustum as shadow bounds.
>
> So now I am contemplating addition of one prerender pass (ie second extra
> pass ;-( ). This pass would be used for computation of minimal bounds of
> visible scene portion based on an depths rendered to texture. Problem is I
> would like to make this depth analysis pass before actual ShadowMap, Scene
> camera and TexGen setups are done during cull phase. In other words I would
> like to have the chance to do scene prerender culling and rendering before
> final scene culling and rendering. Is this possible ? Any suggestion for OSG
> examples to browse ?
>
> Currently my ShadowMap algorithm looks like this (its exactly the same
> control flow as in osgShadow::ShadowMap)
>
>         My Shadow Map technique Cull
>                 Cull Scene Receiving Shadows for final Screen output render 
> stage
>                 Find Light source casting shadows
>                 Compute Bounds of Scene Receiving Shadow visible portion
>                 Setup Shadow Map camera View and Perspective matrices
>                         ( based on Scene Bounds and Light source )
>
>                 Cull Scene Casting Shadows for Shadow Map prerender stage
>                 Add shadow coordinates TexGen to final Screen output render 
> stage
>         End My Shadow Map technique Cull
>
>         Rendering of RenderStages is executed in following order
>                 Shadow Map prerender stage
>                 Final Screen render stage
>
>
> What I would like to achieve looks like this
>
>         My next Shadow Map technique Cull
>                 Cull Scene Receiving Shadows for final Screen output
>                 Find Light source casting shadows
>
>                 Depth Analysis prerender pass
>                         Cull & Render scene producing Depth texture
>                         ( view and projection are the same as in Scene 
> Receiving Shadow pass,
>                     target texture resolution 8x-4x smaller than screen)
>
>                 Compute Bounds of Scene Receiving Shadows based on image 
> produced in Depth
> Analysis pass
>                 Setup Shadow Map camera View and Perspective matrices
>                 Cull Scene Casting Shadows for Shadow Map prerender
>                 Setup shadow coordinates TexGen for final Screen output
>         End My next Shadow Map technique Cull
>
>         Rendering of RenderStages is executed in following order
>                 Shadow Map prerender stage
>                 Final Screen render stage
>
>
> Cheers,
> Wojtek
>
> P.S. When I sort all the issues I could contribute some of this work
> (Minimal Bounds Shadow map, LisPSM) to osgShadow portfolio if you are
> interested.
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to