Re: [osg-users] Changing scenes on the fly

2010-02-23 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
I haven't done what you're wanting to do. I only support the case where I
have multiple scenes that I add before I enter the rendering loop. I then
switch to whatever one I want during the rendering. Obviously this is
trivial. Rendering more than one at the same time with the effect you want
is more problematic. Perhaps someone else could offer some input here.

Whatever you attach before the rendering traversal will get rendered. I
suppose you could load up all your osg files into nodes and then attach the
nodes you want to render on the fly, per your suggestion, and see what
happens. I don't know how you would fade between two scenes. Maybe use RTT
with FBOs and do linear interpolation between them or employ some sort of a
shader.?.?

Just some rambling thoughts...

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Bruce
Wheaton
Sent: Monday, February 22, 2010 6:20 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Changing scenes on the fly

Thanks, I have seen Switch nodes. Some wrinkles though - I need a  
dynamic system, and there may be multiples active at a time, for  
instance in between a cross-fade. But my main question still applies -  
should I load the .osg file and attach the whole graph downstream of  
the switch on the fly?

Bruce



On Feb 22, 2010, at 4:02 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/ 
MXDEC wrote:

 Bruce,

 I would recommend using the switch node osg::Switch to change  
 between
 scenegraphs. You can add the scenegraphs that the switch node can  
 render at
 any one time during setup and then select which one you want  
 rendered using
 the method setSingleChildOn.

 Hope this helps...
 -Shayne

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Bruce
 Wheaton
 Sent: Monday, February 22, 2010 11:33 AM
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] Changing scenes on the fly

 What's the recommended way to change scenes? I'll have a static setup
 of multiple cameras, then need to change what scene is being viewed.

 I feel that one big issue is the scale of the scene I want to load, so
 I guess I need a master PAT, which I may have to add, since I need to
 keep the setup up on a few different cameras.

 Is it best to switch the whole scene, or add the scene's top node as a
 child of my existing graph? I should add that I'll have multiple
 scenes, if for nothing else than to cross-fade between the two scenes.
 Am I answering my own question then? I need a master node, maybe a
 switch, a PAT for each scene, then load the scene and place it as a
 child of the PAT node?

 Let me guess - there's an example that shows this exact thing?

 Thanks,

 Bruce Wheaton
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Changing scenes on the fly

2010-02-22 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Bruce,

I would recommend using the switch node osg::Switch to change between
scenegraphs. You can add the scenegraphs that the switch node can render at
any one time during setup and then select which one you want rendered using
the method setSingleChildOn.

Hope this helps...
-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Bruce
Wheaton
Sent: Monday, February 22, 2010 11:33 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Changing scenes on the fly

What's the recommended way to change scenes? I'll have a static setup  
of multiple cameras, then need to change what scene is being viewed.

I feel that one big issue is the scale of the scene I want to load, so  
I guess I need a master PAT, which I may have to add, since I need to  
keep the setup up on a few different cameras.

Is it best to switch the whole scene, or add the scene's top node as a  
child of my existing graph? I should add that I'll have multiple  
scenes, if for nothing else than to cross-fade between the two scenes.  
Am I answering my own question then? I need a master node, maybe a  
switch, a PAT for each scene, then load the scene and place it as a  
child of the PAT node?

Let me guess - there's an example that shows this exact thing?

Thanks,

Bruce Wheaton
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Changing scenes on the fly

2010-02-22 Thread Bruce Wheaton
Thanks, I have seen Switch nodes. Some wrinkles though - I need a  
dynamic system, and there may be multiples active at a time, for  
instance in between a cross-fade. But my main question still applies -  
should I load the .osg file and attach the whole graph downstream of  
the switch on the fly?


Bruce



On Feb 22, 2010, at 4:02 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/ 
MXDEC wrote:



Bruce,

I would recommend using the switch node osg::Switch to change  
between
scenegraphs. You can add the scenegraphs that the switch node can  
render at
any one time during setup and then select which one you want  
rendered using

the method setSingleChildOn.

Hope this helps...
-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Bruce
Wheaton
Sent: Monday, February 22, 2010 11:33 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Changing scenes on the fly

What's the recommended way to change scenes? I'll have a static setup
of multiple cameras, then need to change what scene is being viewed.

I feel that one big issue is the scale of the scene I want to load, so
I guess I need a master PAT, which I may have to add, since I need to
keep the setup up on a few different cameras.

Is it best to switch the whole scene, or add the scene's top node as a
child of my existing graph? I should add that I'll have multiple
scenes, if for nothing else than to cross-fade between the two scenes.
Am I answering my own question then? I need a master node, maybe a
switch, a PAT for each scene, then load the scene and place it as a
child of the PAT node?

Let me guess - there's an example that shows this exact thing?

Thanks,

Bruce Wheaton
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org