[osg-users] Smoothing camera movements from HMD's input

Fuesz, Matthew matthew.fuesz at lmco.com
Tue Sep 30 11:57:24 PDT 2008

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

matthew.fuesz at lmco.com



From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] 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 <jimblist at gmail.com> wrote:

>In order to solve this problem, I was thinking about creating an
>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
See examples/osganimate.
osg-users mailing list
osg-users at lists.openscenegraph.org


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080930/01689d96/attachment-0003.htm>

More information about the osg-users mailing list