Hi,

Christiansen, Brad wrote:
Hi,

Just 'resubmitting' my issue with a more simple question to see if
anyone has any ideas.

What are the rules with viewport inheritance?
- My understanding is: If a camera has a viewport set, this is used when rendering the cameras
sub-graph. If it is not set, it uses the parent cameras viewport.

- What I am seeing:
My pre-render camera (rendering to a texture) has a viewport set but its
sub-graph is being rendered using its parent cameras viewport. I have
double checked that the viewport is set during the cull traversal. The
pre-render cameras viewport is placed on the stack, and set on the
RenderStage used to render the camera, yet it is still rendered using
the parents viewport.

- My question/s:
What could cause this to occur? i.e. when is a local viewport ignored
and 'overridden' by a parents viewport.

What should I look at to debug this? I am not sure what to check after
seeing the Renderstage apparently setup correctly.

sorry, I can't answer all your questions.

I don't think this goes as deep as renderstage. Have a look at View and Viewer and check the handling of slaves. Check where addSlave adds the View and then check where the list of views is used.


I am completely stumped now and this is proving a bit of a show-stopper
for me. Any suggestions on what to look at would be greatly appreciated.

I'm still not sure why you want to use a slave? I remember something you said about shadows, but don't understand why shadows should differ between slave/not slave. Pre-render should work fine with just an RTT camera placed somewhere in the graph and in this case you can set everything manually.

jp



Cheers,

Brad

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Christiansen, Brad
Sent: Tuesday, 12 January 2010 10:59 AM
To: OpenSceneGraph Users
Subject: [osg-users] Viewport inheritance and RTT

Hi,

I have a scene setup with a texture attached to a camera which is setup
for pre-rendering.
In my scene I set the viewport for the RTT camera to the dimensions of
the texture. Despite having done this, the viewport for the RTT camera
is being inherited from the main scenes camera, i.e. if the viewport of
the main camera is (0,0,8000,600) then only this section of the texture
is rendered, despite the viewport for the rtt camera being
(0,0,1024,1024).

I have stepped through the CullVistor with a debugger and have found
that the viewport does seem to be setup correctly by the cull visitor.

By the time I get to this section of the CullVisitor:

        switch(camera.getRenderOrder())
        {
            case osg::Camera::PRE_RENDER:
//In the following line the viewport for the camera and the rtts is
correct
getCurrentRenderBin()->getStage()->addPreRenderStage(rtts.get(),camera.g
etRenderOrderNum());
                break;
            default:
getCurrentRenderBin()->getStage()->addPostRenderStage(rtts.get(),camera.
getRenderOrderNum());
                break;
        }

the viewport seems to have been setup correctly. Both the rtts's
viewport and the cameras viewport is (0,0,1024,1024), but when it is
rendered this is not the viewport that is used.

I am not quite sure where to go from here. Does anyone have any
suggestions on what I may have done wrong or what area I should debug
next?

I am using version 2.9.5 of OSG.

Cheers,

Brad



DISCLAIMER:-------------------------------------------------------------
--------------
This e-mail transmission and any documents, files and previous e-mail
messages
attached to it are private and confidential. They may contain
proprietary or copyright
material or information that is subject to legal professional privilege.
They are for
the use of the intended recipient only.  Any unauthorised viewing, use,
disclosure,
copying, alteration, storage or distribution of, or reliance on, this
message is
strictly prohibited. No part may be reproduced, adapted or transmitted
without the
written permission of the owner. If you have received this transmission
in error, or
are not an authorised recipient, please immediately notify the sender by
return email,
delete this message and all copies from your e-mail system, and destroy
any printed
copies. Receipt by anyone other than the intended recipient should not
be deemed a
waiver of any privilege or protection. Thales Australia does not warrant
or represent
that this e-mail or any documents, files and previous e-mail messages
attached are
error or virus free.
------------------------------------------------------------------------
--------------

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



DISCLAIMER:---------------------------------------------------------------------------
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--------------------------------------------------------------------------------------

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


--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support.

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

Reply via email to