Re: [osg-users] Retrieve Wold matrix while animating

2013-02-01 Thread Peterakos
Hello. I try to obtain the world matrices using getWorldMatrices. The graph is : Group Group MatrixTransform The object uses the following matrix as Matrix Transform: 1 0 0 0 0 1 0 0 0 0 1 2.5 0 0 0 1 But i still get 3 identity matrices. When i add the object in scene, its

Re: [osg-users] Retrieve Wold matrix while animating

2013-01-30 Thread Peterakos
Hello. Thank you for your answer, but there is a problem. In the first pass algorithm, the value osg_ViewMatrixInverse is wrong. It corresponds to the main camera instead of the RTT camera i use. The variable gl_ModelViewMatrix is correct though. Any idea of what i can do to pass the correct

Re: [osg-users] Retrieve Wold matrix while animating

2013-01-30 Thread Sergey Polischuk
Hi you can create your own uniform and assign correct value each frame from correct camera or, if in cull callback, you can get current camera from cullvisitor and ask view matrix there. Cheers. 31.01.2013, 00:08, Peterakos hay...@gmail.com: Hello. Thank you for your answer, but there is a

[osg-users] Retrieve Wold matrix while animating

2013-01-22 Thread Peterakos
Hello. I try to create a multi pass algorithm and i am stuck. I use my own view and projection matrix for an absoluted positioned camera. But i cant figure out how to handle the World matrix. Glsl gives me gl_ModelViewMatrix but i need only the model matrix for the current vertex being processed.

Re: [osg-users] Retrieve Wold matrix while animating

2013-01-22 Thread Sergey Polischuk
Hi most straightforward way is to use gl_ModelViewMatrix * osg_ViewMatrixInverse Cheers. 22.01.2013, 13:16, Peterakos hay...@gmail.com: Hello. I try to create a multi pass algorithm and i am stuck. I use my own view and projection matrix for an absoluted positioned camera. But i cant