Re: [osg-users] Extracting modelview matrix from main loop

2009-05-20 Thread dimi christop

Hi,
thanks for the reply. 
I have implemented all sorts of particle functionality (tris, lines, quads) 
already therefore 
I prefer to port the code (if possible) initially as is  and enhence it further 
after that.
Any idea how to get the modelview matrix?

Thanks
Dimi




- Original Message 
From: Robert Osfield robert.osfi...@gmail.com
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Tuesday, May 19, 2009 4:52:42 PM
Subject: Re: [osg-users] Extracting modelview matrix from main loop

Hi Dimi,

How about just using rendering the particle system as points and use
osg::PointSprite to create screen align quads?  This would avoid the
for local transforms completely.

Robert.

On Tue, May 19, 2009 at 1:03 PM, dimi christop dimi_chris...@yahoo.com wrote:

 Hi,
 I am trying to port my old OGL Performer, Particle system code.
 How do I extract the modelview matrix in the main loop for a specific node?
 Essentially i am interrested in aquiring the modelview matrix at a specific 
 node in the scene graph in order
 to transform the particle quads to be screen aligned.

 Thanks
 Dimi



 ___
 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


Re: [osg-users] Extracting modelview matrix from main loop

2009-05-20 Thread Robert Osfield
On Wed, May 20, 2009 at 9:07 AM, dimi christop dimi_chris...@yahoo.com wrote:
 thanks for the reply.
 I have implemented all sorts of particle functionality (tris, lines, quads) 
 already therefore
 I prefer to port the code (if possible) initially as is  and enhence it 
 further after that.
 Any idea how to get the modelview matrix?

From the CullVisitor you just do cullvistor-getModelViewMatrix()
which passes back a pointer to a RefMatrix (which is just a Matrix
with reference counting.)

You can get the CullVisitor by dynmaically casting the NodeVistor
passed in to the Node::traverse() method or the node callback.   Have
a search through OSG sources to see example of this being done.

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


[osg-users] Extracting modelview matrix from main loop

2009-05-19 Thread dimi christop

Hi,
I am trying to port my old OGL Performer, Particle system code.
How do I extract the modelview matrix in the main loop for a specific node?
Essentially i am interrested in aquiring the modelview matrix at a specific 
node in the scene graph in order
to transform the particle quads to be screen aligned.

Thanks
Dimi


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


Re: [osg-users] Extracting modelview matrix from main loop

2009-05-19 Thread Paul Martz
You can use AutoTransform for billboard-like effects.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of dimi
christop
Sent: Tuesday, May 19, 2009 6:04 AM
To: OpenSceneGraph Users
Subject: [osg-users] Extracting modelview matrix from main loop


Hi,
I am trying to port my old OGL Performer, Particle system code.
How do I extract the modelview matrix in the main loop for a specific node?
Essentially i am interrested in aquiring the modelview matrix at a specific
node in the scene graph in order to transform the particle quads to be
screen aligned.

Thanks
Dimi


  
___
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


Re: [osg-users] Extracting modelview matrix from main loop

2009-05-19 Thread Robert Osfield
On Tue, May 19, 2009 at 2:49 PM, Paul Martz pma...@skew-matrix.com wrote:
 You can use AutoTransform for billboard-like effects.

Bit you wouldn't want to use an AutoTransform for each particle...
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Extracting modelview matrix from main loop

2009-05-19 Thread Robert Osfield
Hi Dimi,

How about just using rendering the particle system as points and use
osg::PointSprite to create screen align quads?  This would avoid the
for local transforms completely.

Robert.

On Tue, May 19, 2009 at 1:03 PM, dimi christop dimi_chris...@yahoo.com wrote:

 Hi,
 I am trying to port my old OGL Performer, Particle system code.
 How do I extract the modelview matrix in the main loop for a specific node?
 Essentially i am interrested in aquiring the modelview matrix at a specific 
 node in the scene graph in order
 to transform the particle quads to be screen aligned.

 Thanks
 Dimi



 ___
 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