Re: [osg-users] LOS materail query

2015-08-26 Thread Mike Greene
OK, fixed that - loaded an .ive file and was able to get correct looking texture coordinates. In a .ive file with embedded textures, is there a textureName? Probably not - not really important. But the code does say that there is one image in the texture. But doing the getImage(0) does not

Re: [osg-users] UpdateCallback

2015-08-26 Thread Julie Green
Stupid me finally got it. Code: osg::Geometry surface = new osg::Geometry(); surface-setVertexArray(vertexArray); surface-setDataVariance(osg::Object::DYNAMIC); surface-setUpdateCallback(new UpdateSurfaceCallback()); What i don't understand is how to get elements of vertex array in operator

Re: [osg-users] Animating Textures

2015-08-26 Thread Sebastian Messerschmidt
As always I'd suggest shaders, as fixed function pipeline has been deprecated 10 years ago ;-) You could use the osg_SimulationTime uniform to modify the uv-coordinates based on the time passed. Else you will need to modify the texture matrix each frame (like in the suggested callback) Cheers

Re: [osg-users] Animating Textures

2015-08-26 Thread sam
Nevermind! As always, simply searching OSG popped up what I needed. Thanks! On Wed, Aug 26, 2015 at 3:10 PM, sam brko...@gmail.com wrote: I can appreciate your stance on going to shaders, and I completely agree. I'd like to quickly prototype this up and swapping to shaders will,

[osg-users] Animating Textures

2015-08-26 Thread sam
Hi All, I have individual nodes that have textures on them that animate; That's to say the texture moves not the actual mesh. I've been trying to figure out how to accomplish this in OSG. Is there a way to define a texture matrix that does movement? The only other way I can think of is

Re: [osg-users] Animating Textures

2015-08-26 Thread sam
I can appreciate your stance on going to shaders, and I completely agree. I'd like to quickly prototype this up and swapping to shaders will, unfortunately, take me a little bit. Is there an example of modifying the texture matrix? Also would I be better of attaching an update callback to the

Re: [osg-users] UpdateCallback

2015-08-26 Thread Robert Osfield
Hi Julie, On 26 August 2015 at 08:06, Julie Green larou...@mail.ru wrote: Stupid me finally got it. Code: osg::Geometry surface = new osg::Geometry(); surface-setVertexArray(vertexArray); surface-setDataVariance(osg::Object::DYNAMIC); surface-setUpdateCallback(new

Re: [osg-users] UpdateCallback

2015-08-26 Thread Julie Green
Yay! It works! Thank you so much. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64900#64900 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] LOS materail query

2015-08-26 Thread Robert Osfield
Hi Mike, The osgparticleeffects demo uses a ShapeDrawable for rendering the terrain, this keeps the code straight forward but it does mean there isn't an osg::Geometry for the vertices and tex coords to hang off as all the geometry data is created on the fly and embedded in a display list.

Re: [osg-users] Qt5 integration

2015-08-26 Thread John Vidar Larring
Hi James, While you attention is directed towards integrating Qt5 and OSG, have you considered the use case for offscreen rendering? In the osg::Viewer module, there are PixelBufferWin32 and PixelBufferX11 classes that implements the osg::GraphicsContext abstract class for offscreen pixelbuffer

Re: [osg-users] LOS materail query

2015-08-26 Thread Mike Greene
Yes, a null texture is the problem. I am using the osgparticleeffects example, as I know the object does have a texture. It is the example where you click on the terrain and at that point an explosion and smoke effect starts. But when printing out the coordinates of hit in the code above, they

Re: [osg-users] Qt5 integration

2015-08-26 Thread John Vidar Larring
Hi James, Thanks for your in depth answer. Please let me know it there's any way that I can contribute (E.g. testing on CentOS 6). Best regards, John -- *John Vidar Larring* *| Senior Developer* *ChyronHego Norge AS* *- *Sandakerveien 114a, 0484 Oslo, Norway Office. +47 2279 7030 -

Re: [osg-users] UpdateCallback

2015-08-26 Thread Julie Green
Code: void UpdateSurfaceCallback::operator()(osg::Node *node, osg::NodeVisitor *nv) { osg::Geometry* geometry = node-asGeometry(); osg::Array* vertices; if (geometry) { vertices = geometry-getVertexArray(); int N =

Re: [osg-users] UpdateCallback

2015-08-26 Thread Robert Osfield
On 26 August 2015 at 14:56, Julie Green larou...@mail.ru wrote: Oh, I forgot to set new vertex array. I would recommend reusing vertex arrays rather than creating new ones each frame. You will also need to call geometry-dirtyBound() to make sure the bounding volumes get updated to each frame

Re: [osg-users] UpdateCallback

2015-08-26 Thread Julie Green
Oh, I forgot to set new vertex array. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64906#64906 ___ osg-users mailing list osg-users@lists.openscenegraph.org