Hi,

I can render my scene graph fine when declared under the master camera in my 
viewer.
What I am focused on is the Z far and near values, I must ensure they're good - 
I can inspect the view and projection matrix, render the viewing frustrum (as 
lines for instance), and observe that the Z far and near values are correctly 
set to enclose all objects in my scene. All good.

I then create a PRE_RENDER, RELATIVE_RF, FBO-bound slave camera, and move over 
my whole scene graph to a child of this slave camera. The master camera just 
has the slave camera as a child now, which itself references my original scene 
graph.

Finally I render the whole scene (viewer->frame()) and capture the contents of 
my framebuffer to an image file (using shaders) : it works fine.
However, I can't get to display the viewing frustrum as I did before. The 
slave's camera view/proj matrices have been set to identity in my setup, so my 
expectation is that the slave camera retains the same view and projection as 
the master camera, right?

Here, the projection part is okay, but not the depth range. The Z far and near 
values are way outplaced, very far away from the viewpoint (crazy values like 
1.0 to 10000.0 in my situation).
How can I get the frustrum's properties correctly?

Thank you!

Cheers,
Fred

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54358#54358





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to