Hi, ----- "Jean-Sébastien Guay" a écrit :
> Hello Mike, > > > I would like to create a 2D background (can this be done using the > main camera? If so how?) I would then like to have other multiple > cameras each rendering their own 3D sub scene with a transparent > background (how does each camera have a transparent background?) but > be able to position the output of the 3D cameras on the 2D background. > I was thinking adding all the 3D cameras as slaves to the parent but > then I wondered how can I translate the output of each camera on the > 2D background. Would I need to put a MatrixTransform above the > cameras? If I am adding the 3D cameras as slaves how can I put a > MatrixTransform above them? > > I would do each background by creating a textured quad that fills the > > view and rendered before everything else with depth write off. > > Then your idea of slave cameras is good, and for each of your slave > cameras you can specify an osg::Viewport that will give, in pixel > coordinates, where you want the camera to render inside the main > window > (the view's master camera will have its viewport set to fill the > window). > > Using RTT for this is overkill IMHO. For the 2D background, you can replicate the HUD example, and use setRenderOrder( PRE_RENDER ) instead of ( POST_RENDER ) when you draw your unit quad, and avoid clearing the color buffer for your 3D cameras. -Fred _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org