if you look at the implementation of osgShadow, in particular the
osg::ShadowMap class you will see how to render the scene from the light's
point of view for the purpose of creating a depth map. The depth map is
then later used when rendering the main view, for superimposing a shadow.

Warning: the default behavior turns on backface culling and only enables
the back faces for rendering. This may not be what you want - but it's easy
enough to change.


2012/12/12 Peterakos <[email protected]>

> Hello.
>
> Lets say there is cessna as a child in LightSource group.
> LightSource has 1 light.
>
> What i want to do is to get the depth map from light's point of view.
> How can i do this ?
>
> I am thinking of placing a Camera as a child in LightSource.
> This camera will look at exactly the same direction as the light and
> will also has the same position.
> Is this the right way to do it ?
>
> ( I know how to make camera render to texture)
>
> Thank you for your time.
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to