How fast does your HMD tracker update its orientation, and how are you retrieving these values?
If you're not getting the values in realtime at least as fast as OSG is refreshing, then you would definitely have some jerky movements. And if you're not getting them this fast, then what are you interpolating between? If your HMD device is only operating at a fraction of the OSG update rate, then you need to be using predictive values, based on the last known trend deltas. You need to be careful here, as you are approaching territory where the view (OSG) lags noticeably behind the actual movement (HMD), which I would think would be rather undesirable. That is, the only way to interpolate between actual data is to wait after the fact; the only other alternative is to use predicted values to interpolate between until actual data is available - and this could also cause jerks, if the prediction period is too long, causing the actual position at the next timestep to be significantly different than the predicted one used for "smoothing". I find it highly unlikely that your hardware would be returning values at less than 60 Hz (the typical "target" framerate for graphical applications), and that it is probably capable of much higher data rates. Thus, through a combination of efficient access to this data stream (orientations) and possibly capping the OSG framerate (think v-sync), I would expect that your HW/SW combination would be able to maintain a smooth motion without any trouble or additional "smoothing". Matthew W. Fuesz Software Engineer Asc. Lockheed Martin STS 1210 Massillon Road Akron, OH 44315 [EMAIL PROTECTED] ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of alessandro terenzi Sent: Tuesday, September 30, 2008 1:53 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Smoothing camera movements from HMD's input Yes, indeed I have a PositionAttitudeTransform node that represent my virtual camera, and whose attitude is set by HMD's data and later used to set the camera's view matrix just before calling viewer.frame(). So I thuoght to 'animate' the attitude instead of just setting values from HMD' tracker. On Tue, Sep 30, 2008 at 7:12 PM, Jim Brooks <[EMAIL PROTECTED]> wrote: >In order to solve this problem, I was thinking about creating an animation >path (on the fly) from a previously stored orientation to current head >orientation. Is this the correct way to proceed? Or there is some other >technique to smooth the resulting camera movements? osg::AnimationPath interpolates across rotations and positions (for smoothing). See examples/osganimate. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org