[osg-users] osgAnimation: Jump to animation

2012-03-06 Thread Martin Haffner
Hi, I have a little question about osgAnimation. When I want to start an animation from the beginning I make this call: Code: animationManager-playAnimation( myAnimation ); Lets say I want to play animation myAnimation, but this time starting at second N (for example 3) and NOT from the

Re: [osg-users] osgAnimation: Jump to animation

2012-03-06 Thread Martin Haffner
Laurens Voerman wrote: Hi Martin, It's not very pritty, but from reading the code I think this will work: animationManager-playAnimation( myAnimation ); myAnimation-setStartTime(myAnimation-getStartTime() -3.0); Regards, Laurens. -- Post generated by Mail2Forum

[osg-users] osgconv with fbx

2012-01-25 Thread Martin Haffner
Hi, I wanted to convert a .fbx file to an .osgb, but unfortunately I always get an error: Warning: Could not find plugin to read objects from file Per3D05MaleAnimatedTx3.fbx. Error no data loaded. I check my osgPlugins-3.1.0 folder and it does not contain any osgdb_fbx.so file. Are there any

[osg-users] How to get osg::State?

2012-01-24 Thread Martin Haffner
Hi, I am constantly getting this console output when I run my osg application: Warning: detected OpenGL error 'invalid value' at after RenderBin::draw(..) I wanted to try to find the source for this error by calling osg::State::setCheckForGLErrors(osg:State::ONCE_PER_ATTRIBUTE); but

Re: [osg-users] How to get osg::State?

2012-01-24 Thread Martin Haffner
I just hacked the State constructor and now I get this message:. Warning: detected OpenGL error 'invalid value' at Geometry::drawImplementation() after vertex arrays setup. Ok, so now I know there is an openGL error in the middle of the Geometry::drawImplementation() method. Is there an

Re: [osg-users] World to Screen Space

2011-12-08 Thread Martin Haffner
Hi, Thanks, but your link does not help me that much. They are using the same code I use and still the code does not work;( Cheers, Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44286#44286

[osg-users] World to Screen Space

2011-12-07 Thread Martin Haffner
Hi, I want to transform a point from world space to screen space with this code: Camera* cam = ... Matrix viewMat = cam-getViewMatrix(); Matrix projMat = cam-getProjectionMatrix(); Viewport* vp = cam-getViewport(); Matrix vpMat = vp-computeWindowMatrix(); Vec3 ls1SS = ls1WSPos * viewMat

[osg-users] How to set DOFTransform?

2011-09-19 Thread Martin Haffner
Hi, I have a wheel model (an .obj) that needs an DOF in the middle of the wheel (to make the wheel spin). I know the position of the DOF and I know the 3 axis of the DOF (x axis goes up, y goes in the depth and z to the left. So basically just the normal osg coordinate system rotated around y

Re: [osg-users] Loading .obj/.flt

2011-09-15 Thread Martin Haffner
Hi, thanks for your answer. noRotation works, but for some reason he always makes tri strips, which I want to avoid. I tried this: Code: osgDB::ReaderWriter::ReaderWriter::Options* options = new osgDB::ReaderWriter::ReaderWriter::Options; options-setOptionString(noRotation

[osg-users] Loading .obj/.flt

2011-09-14 Thread Martin Haffner
Hi, I have a .obj file which describes a car. I load this .obj with osgDB::readNodeFile(myFile.obj), do some operations and finally write the root node with osgDB::writeNodeFile(output.flt). Now I noticed that the .obj Y and Z coordinates are swapped in the .flt file. Is there a way to

[osg-users] Render into texture from 2 Cameras

2011-08-05 Thread Martin Haffner
Hi, I made an application with a camera that rendered into a texture and everything worked. Now I want to render into the texture from 2 Cameras. I want cam1 to render into the left side, and cam1 render into the right side into the texture. Basically this is my code: Code: cam1 = new

[osg-users] Shadows are messed up when I add a second camera

2011-08-04 Thread Martin Haffner
Hi, I have a big scene graph with terrain, cars etc. and shadows. In addition to the normal camera I need a second camera, that renders the scene into a texture. So I created a camera node, attached the render target texture and added the camera node to the root of the scene graph. Additionally

Re: [osg-users] NodeCallback

2011-08-03 Thread Martin Haffner
Jason Daly wrote: Correct. Also, note that there are four different places to attach Camera::DrawCallbacks (Initial, PreDraw, PostDraw, and Final). Which one you use will depend on what you're doing in the callback. For example, a FinalDrawCallback is a good place to capture the image

Re: [osg-users] NodeCallback

2011-08-02 Thread Martin Haffner
Hi, Guys, you are great! Thanks to both of you for your good explanations! :D Another little question: I guess a Camera::DrawCallback is a callback that gets added to a osg::Camera and that gets called (operator()) every time the camera renders the scene? Thank you! Cheers, Martin

[osg-users] NodeCallback

2011-08-01 Thread Martin Haffner
Hi, I have problems with understanding the use of a NodeCallback. Can anyone explain me what a Nodecallback is doing? Another concrete question: I have some code with a class that derives from osg::Nodecallback. This class implements operator(): Code: class CameraUpdateCallback : public

[osg-users] How read articles on osghelp.com

2011-07-27 Thread Martin Haffner
Hi, During the search for OSG tutorials (since the documentation is rather bad) I found this site: http://www.osghelp.com/news.php Unfortunately I can't read them, since they require you to be registered. But I never found the registration button. Where the hell can I register myself to read

Re: [osg-users] How read articles on osghelp.com

2011-07-27 Thread Martin Haffner
Hi, Well, this sucks... Why they don't just make the tutorials available for now? I have already read the book you have mentioned, but a lot of topics are only covered briefly. I still did not get the Camera/Viewer system in OSG. It is very daunting (just look at the graph:

[osg-users] osgconv does not work anymore

2011-05-18 Thread Martin Haffner
Hi, I used osgconv and osgviewer for a long time, but suddenly it stopped working. This is the output when I try to use osgconv: osgconv part0001_002.flt foo.osrg Warning: dynamic library '/usr/local/lib/osgPlugins-2.9.5/osgdb_openflight.so' exists, but an error occurred while trying to

Re: [osg-users] osgconv does not work anymore

2011-05-18 Thread Martin Haffner
Hi Robert, Thanks for your fast reply! Yes, I guess that would solve the problem. Unfortunately I need the 32 Bit Version of OSG, because I have a program that needs to be compiled into a 32 Bit Executable (because it depends on some libs that are only available in 32 Bit). I compile this

Re: [osg-users] Compile osg in 32 Bit

2011-05-06 Thread Martin Haffner
Hi, Unfortunately there is no file flags.make in my OpenSceneGraph folder:/ Thank you! Cheers, Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39088#39088 ___ osg-users mailing list

[osg-users] Compile osg in 32 Bit

2011-05-05 Thread Martin Haffner
Hi, I have a 64 Bit Linux (OpenSuse) and want to compile osg to 32 Bit executables/libraries. It seems like if I run the standard installation I only get 64 Bit executables and shared objects. I know you can force the compiler to create 32 bit binaries per flag -m32 but I don't know how to

Re: [osg-users] Compile osg in 32 Bit

2011-05-05 Thread Martin Haffner
Hi, Well, and how do I tell CMake to generate a makefile that uses the -m32 flag? Thank you! Cheers, Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39036#39036 ___ osg-users mailing list

Re: [osg-users] Compile osg in 32 Bit

2011-05-05 Thread Martin Haffner
Hi, Ok, I modified the CMAKE_CXX_FLAGS line in CMakeCache.txt to this line: CMAKE_CXX_FLAGS:STRING=-m32 Then I call CMake and it also generates a Makefile. I searched in the whole Makefile but there is no m32 flag! Did I miss something? Thank you! Cheers, Martin -- Read this

Re: [osg-users] Replacement of subtrees

2011-04-12 Thread Martin Haffner
Thanks for your answer! Well, the last 3 children of the LOD node are Geodes where each of the Geode contains about 30 to 70 Drawables. They represent a triangulated road on 3 LOD (high, mid, low poly count). When the user edits the road I have to retessellate and create new vertices. Thus I

[osg-users] Replacement of subtrees

2011-04-11 Thread Martin Haffner
Hello, I have a scenegraph with an LOD node which has 5 children: The first child is a Geode and 1 Drawable. The second child a group node with many matrix transform children where each matrix transform node has one child of type ProxyNode. The children 3 to 5 are Geode's which contain several

[osg-users] osg and Qt

2011-04-05 Thread Martin Haffner
Hello, I want to use openscenegraph to render into a Qt QWidget. Has anyone of you ever successfully tried this or know a ressource/tutorial how this can be done? Thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38214#38214

[osg-users] LOD Node

2011-04-03 Thread Martin Haffner
Hello, I have a question about the LOD node: Lets say I have 2 Geods and add them to a LOD node: Code: osg :: ref_ptr osg :: LOD lod = new osg :: LOD ; lod-addChild(geode1, 0.0f, 5.0 f); lod-addChild(geode2, 5.0f, FLT_MAX ); The values 0.0f, 5.0f and FLT_MAX are all camera distances, but I

Re: [osg-users] LOD Node

2011-04-03 Thread Martin Haffner
Thanks for your fast reply! Ok, lets say I have 2 matrix transform nodes. One makes a huge translate to the right (x axis) and the other a huge translation fo the left. Each matrix transform node has one geode as a child, which renders a tree. If I add these 2 matrix transform to a LOD node

Re: [osg-users] LOD Node

2011-04-03 Thread Martin Haffner
The question I am asking this: I have a long road (lets say 3km) and I want to divide the road in segments (say 200m per segment). Now I want to use LOD for the segments. For example if the camera is close to segment 2, segment 2 should be rendered with high poly count. The adjacent segments 1

Re: [osg-users] LOD Node

2011-04-03 Thread Martin Haffner
I see. One more little question: I have a lot of objects (for example trees) along a road segment. Sure, I could give each tree an LOD node (one LOD node for each tree) but I guess it would be smarter if I did use the same LOD node for the segment. As I said I want to make a LOD node for each

Re: [osg-users] LOD Node

2011-04-03 Thread Martin Haffner
I think I know what you mean. You said a LOD node is meant to be used with roughly the same geometry and I feared it would be a problem to add the geometry of a road segment and all the trees under the same node since the tree bounding spheres differ a lot from the road segment bounding sphere.

[osg-users] Disappearing Quads (Texcoords)

2011-01-25 Thread Martin Haffner
Hi, I am drawing some quads on a virtual plane to simulate raindrops on a windshield. The drops are basically just alpha blended quads. The effect is placed in front of the camera. It works really well, but unfortunately all my rain drops are sometimes disappearing when I look into certain