[osg-users] Cameras hierarchy

Guy guy at dvp.co.il
Tue Nov 3 06:14:40 PST 2009


Hi all,

 

 I'm having a difficulty understanding whats goes wrong with my scene
setting.

I tried merge between the osghud example and the osgdistortion example.

 

The result I expected was to have object in the background which
responds to the mouse movement, HUD in front of it, and the entire image
distorted.

 

So initially I had a graph build like that

 

          Root

  

           Distortion Group

 

                      HUDed scene

 

Which equals

 

                                                                 Root

 

          DistortedTextureDisplayCamera
RTT Camera

                                                               

                       GridGeometry
PostRenderCamera                         Scene

                    

 
Hud geometry

 

This didn't work. I couldn't see the HUD.

Later I changed it to

 

 
Root

 

          DistortedTextureDisplayCamera                     RTT Cameta
order 1               RTT Cameta order 1

                                                               

                       GridGeometry
Hud geometry                         Scene

 

This configuration did get the right result.

 

Later on I tried, just for the test to render a scene

 

                                                                 Root

 

          DistortedTextureDisplayCamera
RTT Camera

                                                               

                       GridGeometry
Camera

 

 
Scene

                   

This is exactly the osgdistortion example with the adding of a camera
above the scene. This camera has all the default settings, which means
it does nothing, but I couldn't see anything.

 

Can you please explain why the first and the last graphs didn't give the
expected results? Isn't it possible to add cameras under RTT camera?

I had similar problems with depth partitioning and shadows. Does it mean
that when using RTT, these solutions have to be rearranged completely in
the aspect of the camera hierarchy?

 

Thanks,

 Guy.

 

            

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20091103/03b5db5a/attachment.htm>


More information about the osg-users mailing list