Sign in to follow this  
DrEvil

Extrapolation

Recommended Posts

I'm handling networking for my place of employment, and am currently setting up some extrapolation in order to predict things like positions and rotations over time. We're using quaternions for our rotation representations and I'm not quite sure how to extrapolate them. Does anyone have any articles or resources on how one might extrapolate quaternion rotation smoothly? Thanks J

Share this post


Link to post
Share on other sites
Google seems to turn up no shortage of equations. Problem is, rarely does it turn up useful articles for people like me who don't have strong math skills and aren't sure about how to convert it to code.

I guess what I'm really looking for is code. Trying to save some time and get on with things.

Thanks

Share this post


Link to post
Share on other sites
SLERPing will actually serve you fairly decently not only for interpolation, but for extrapolation... just use an interpolation parameter > 1. (Although in most games, extrapolating rotation is pretty much useless, as angular velocity changes unpredictably and often.)

Share this post


Link to post
Share on other sites
Never heard of that NickGeorgia, time to google again. :)

Sneftel: from what I've seen in most game SDKs rotations are extrapolated. If it's useless what do you recommend for smoothing rotations on objects and such?

Share this post


Link to post
Share on other sites
Personally, I would recommend only extrapolating position. Of course, I'm thinking from the perspective of an FPS meant to work across relatively low-latency links; your situation may be different. In any case, SLERP-based extrapolation isn't difficult to implement, so you may as well throw it in there and see if it makes things better or worse.

Share this post


Link to post
Share on other sites
It is FPS related. Are you suggesting that for an FPS just send the rotation updates and on the clients set them to the value when recieved? Surely there would be some noticable snapping wouldn't there? Admittedly I haven't tried this yet, so far just got the position extrapolating nicely.

edit: I can see your point though. Considering the jerky nature of say a players aim in an FPS game, interpolating their rotation might cause more problems. hmm

Share this post


Link to post
Share on other sites
Ah, hm, I had misunderstood your application; I had thought you were talking about extrapolation to cover dropped update packets. Yes, for this sort of thing, you can use SLERPing to smoothly update the rotation.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this