Hi Frederic, With your background image I'd recommend placing an the background image into the scene graph itself, and just set its render bin to a negative number so its drawn first. The subgraph to render it would simply be an osg::Camera at the top of the subgraph to set the view and project matrices to a HUD and then a full screen texture quad. The osgdistortion and osghud example should help you along this route. This would avoid you having to play games with the depth buffer.
W.r.t shadows on invisible objects, I don't even know what you might intended by this, in what way are they invisible? How would you intend a shadow to be drapped over them? Robert. On 7/2/07, Frédéric SPEISSER <[EMAIL PROTECTED]> wrote:
Hi all, Firstly, congratulations for 2.0 ! Secondly, two questions : 1. I'm using the osgViewer::Viewer. I'm rendering a scene with a background image, so i do a _viewer->getCamera()->setClearMask(GL_DEPTH_BUFFER_BIT); before _viewer->frame(); In order to maintain my background image at each frame. Now I want to add shadows to my scene, so i'm using the shadows map technique (seen in osgDepthShadow example), but due to _viewer->getCamera()->setClearMask(GL_DEPTH_BUFFER_BIT); I see also the rendering of the view of the camera associated with the shadow map, so I have two view of my scene in the same window, one from the camera, and another from the light source (the camera ssociated with the shadow map). How can I solve my problem ? That's to say how can I use osgDepthShadow example with a background image ? 2. I would like to have shadows on invisible objects. Is that possible since shadow map using a texture ? Thank you per advance. Frédéric. _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
