HI It might help if you tell us how you define Jitter as this can mean many things to different people
Gordon Tomlinson 3D Technology System Engineering Consultant Overwatch® An Operating Unit of Textron Systems __________________________________________________________ "WARNING: Documents that can be viewed, printed or retrieved from this E-Mail may contain technical data whose export is restricted by the Arms Export Control Act (Title 22, U.S.C., Sec 2751, et seq,) or the Export Administration Act of 1979, as amended, Title 50, U.S.C., App. 2401 et seq. and which may not be exported, released or disclosed to non-U.S. persons (i.e. persons who are not U.S. citizens or lawful permanent residents ["green card" holders]) inside or outside the United States, without first obtaining an export license. Violations of these export laws are subject to severe civil, criminal and administrative penalties." -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Arif Yetkin Sarı Sent: Monday, January 24, 2011 4:45 AM To: [email protected] Subject: [osg-users] Jitter problem - OSG & Nvidia Physx Hello everyone. We have been using OSG with nvidia physx for a driving simulation and we have jitter problem, where the cars and other objects in the scene (controlled by the physics) jitter annoyingly :). We believe that we update the scenegraph in a wrong way. In our code : There is a physx thread. There is an OSG library thread where we can add new entities, remove them, start rain effects, call an animation of a skeleton character etc. There is an OSG render loop thread, where osgviewer::...frame() is called. Our Nvidia physx thread produces new "x y z pitch head roll" values for the scene entities at 60Hz (or any other frequency we want). Physx thread calls the updateEntity() function of our OSG library thread. This function simply updates scene entities with matrixtransform::void setMatrix(const Matrix& mat). In other words, we move an object with this chunk of code: Code: osg::Matrixd mxT = createTransformMatrix(x,y,z,h,p,r); mt->setMatrix(mx); Here what we tried: 1-we fed OSG lib directly whenever a physx output is produced (every 16.6 ms or so - 60Hz): there is jitter. 2-we maintained a queue of frames on OSG lib, fed OSG at the end of each frame() : there is jitter. 3-we implemented a sampling mechanism on this queue, where OSG requests the interpolated frame from the queue for the current timestamp : there is jitter. 4-we saved a few minutes long log of the physx to a file (many frames). Started a dummy thread, and fed OSG from this log. : there is jitter. When OSG works with 60FPS, and physx thread is running at 60Hz, there seems to be quite low jitter (sometimes unnoticeable) . Thanks in advance for any hints or advices. Arif Yetkin ------------------------ http://www.youtube.com/watch?v=naX3hOkDx8w ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35912#35912 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

