[osg-users] ease motion with viewer camera
Hi, ok, just a few words to tell you what i am trying to do. have a 3D scene, to this point nothing special. On this 3D scene I draw (like we can do in Paint) a rectangle. I add a camera which has as child node this Geode. My greatest wishes, for now, is to make an ease motion from my viewer camera(V) to this geode camera(C). I had already take a look to the osgeasemotion example and try to do the same but the movement is not the one i expect. For the moment, before the movement, i creat one quaterion to precise the rotation my viewer camera should do to get the geode camera's one. I get the eye, center and up axes of each camera, and make the quat like this: Code: osg::Vec3 from = eyeV - centerC; osg::Vec3 to = eyeC - centerC; rot.makeRotate_original(from, to); Then i attach a nodeCallBack to my viewer camera which suppose to do the job, like this: Code: void operator()(osg::Node* node, osg::NodeVisitor* nv) { if(!_motion.valid()) return; if(isDone) return; else { osg::Camera* cam = dynamic_castosg::Camera*(node); if(!cam) { std::cout !cam std::endl; return; } double t = nv-getFrameStamp()-getSimulationTime(); if(_previous == 0.0f) _previous = t; _motion-update(t - _previous); _previous = t; float pas = _motion-getValue(); cam-setViewMatrix(osg::Matrix::inverse(osg::Matrix::rotate(rot*pas)*osg::Matrix::translate(trans*pas))); cam-setReferenceFrame(osg::Transform::ABSOLUTE_RF); if(_motion-getTime() == 2.0) { std::cout fini std::endl; _motion-reset(); _previous = 0.0; isDone = true; } traverse(node,nv); } } I am about to reach the good position but my camera don't look the good center. Is there anyone who could help me? Thank you! Regards, Stephane -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38502#38502 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Texture2D problem
Hi, I'm working on virtual camera distortion using the method describes in Model View Geometry and osgdistortion example. My problem is that I have some bad edges as you can see in the following screenshot. [Image: http://img686.imageshack.us/img686/305/testpp.jpg ] (http://img686.imageshack.us/i/testpp.jpg/) Uploaded with ImageShack.us (http://imageshack.us) How could I remove these gray pixels and force the view area to be only the distort texture? Thank you! Cheers, Stephane -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29201#29201 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] FBX Plugin
Hi, i am developing a soft with some animated characters. To animate these one, i created them on Maya and export it in .FBX format to keep movement notions. Then I import these models into a viewer and i got some problem - no movement at all. Is it normal? Is anybody else has the same problem? If not, what can i do to get back my animated characters in my viewer? (except making hard coding) I am working with osg's version 2.9.8 and Visual Studio 2008. ... Thank you! Cheers, Stephane -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26567#26567 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] FBX Plugin
I am using an osgViewer to see all the scene elements and the animated characters. Could the osgAnimationViewer can render statics elements and animated ones? ... Thank you! Cheers, Stephane -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26570#26570 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org