Hi Jeremy,

One more question, how are you switching between scene graphs ( switch
node, node masks, add/remove child)?

If your Camera nodes are using ABSOLUTE reference frame, then I believe
disabling culling on its parent nodes is the best solution. If you look at
the Group::computeBound method, you will notice it ignores child transforms
with ABSOLUTE reference frame when computing the bounding sphere. What
might be happening is that when you switch to the Camera scene, the group
node containing the camera is culling based off a non-representative
bounding sphere.

Also, if you happen to be using node masks to turn scene graphs on/off,
then you might need to manually call dirtyBound() on the nodes. The
Node::setNodeMask method does not automatically call dirtyBound(), and this
has caused culling issues for me before.

Cheers,
Farshid



On Tue, May 28, 2013 at 11:29 AM, Jeremy Moles <[email protected]> wrote:

> On 05/28/2013 01:20 PM, Farshid Lashkari wrote:
>
>> Hi Jeremy,
>>
>> This sound very similar to an issue I've encountered before. Does your
>> RTT Camera object use a RELATIVE or ABSOLUTE reference frame? Also, are you
>> applying any ComputeBoundingSphereCallbacks to you scene or override the
>> "computeBound" method of any nodes?
>>
>>  ABSOLUTE.
>
> And no, I'm not applying any BoundingSphere callbacks...
>
>> Cheers,
>> Farshid
>>
>>
>>
>>
>> On Mon, May 27, 2013 at 11:07 AM, Jeremy Moles <[email protected]<mailto:
>> [email protected]>> wrote:
>>
>>     Hello everyone! I'm running into a problem in my application where
>>     I'm trying to switch between two different subgraphs as the result
>>     of some event (key press or similar). The first of these two
>>     objects is a standard subgraph with nothing too sophisticated
>>     going on. The second of these is a RTT "stack" of Camera objects.
>>
>>     The problem manifests in that if I switch FROM the standard graph
>>     (just a random grouping of models) to the RTT Camera stack, the
>>     bounds of the previous node are used for the RTT Camera. This
>>     means that while the same scene rendered within my RTT stack is
>>     fine as long as you don't adjust the view matrix, as soon as you
>>     move the scene around it begins to get culled. I can remedy this
>>     problem by disabling culling on the main viewer camera when my RTT
>>     stack is "in effect", but I feel like I'm doing something wrong...
>>     the reason I think this is because I can add the RTT stack to my
>>     scene as the FIRST scene (and never toggle it to anything else)
>>     and the culling occurs correctly. The problem only manifests when
>>     I switch from the RTT stack to a standard node AND THE BACK to the
>>     RTT scene.
>>
>>     Has anyone tried anything like this in the past? Does anyone have
>>     any hints? :)
>>     ______________________________**_________________
>>     osg-users mailing list
>>     osg-users@lists.**openscenegraph.org<[email protected]>
>>     
>> <mailto:osg-users@lists.**openscenegraph.org<[email protected]>
>> >
>>     http://lists.openscenegraph.**org/listinfo.cgi/osg-users-**
>> openscenegraph.org<http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org>
>>
>>
>>
>>
>>
>> ______________________________**_________________
>> osg-users mailing list
>> osg-users@lists.**openscenegraph.org <[email protected]>
>> http://lists.openscenegraph.**org/listinfo.cgi/osg-users-**
>> openscenegraph.org<http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org>
>>
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to