Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / [DarkGDK 1.0] dbSetObjectInterpolation doesn't work

Author
Message
Mr Bigglesworth
11
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 7th Aug 2012 18:30
Hey guys, I am using DarkGDK 1.0 with the latest update, I am using dbSetObjectFrame(...) to animate and I wanted to smooth the animations, but if I use dbSetObjectInterpolation, the object freezes and won't animate. I was wondering if you guys knew if the command actually works or if it is just broken, or if I could interpolate the frames a different way (shader?).

Simple example of how I thought it was used:
Matty H
11
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 7th Aug 2012 21:21
It's been a while since I used it but it did work. You may be using it wrong, you may need to place the interpolation command in your loop and increase the value each time(0->100).

Mr Bigglesworth
11
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 7th Aug 2012 22:31
Thanks Matty, I figured out GDK adds interpolation if you use floating point numbers as frames, ex: dSetObjectFrame(Object, frame+0.5f);
Matty H
11
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 8th Aug 2012 01:42
I'm pretty sure that is something different.

You can use dbSetObjectInterpolation() to interpolate between two frames that are not next to each other. It gives you smooth transitions from the end of any animation to the start of any animation, it looks much better and is worth implementing into your animation system.

I think you set the object frame to the start of the new animation and then set the interpolation at gradually increasing values 0->100, up in tens or whatever. Once you get to 100 then carry on with the new animation as normal.

Hope that helps.

Mr Bigglesworth
11
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 8th Aug 2012 02:36
Ohhhh I see, that is pretty nifty, thanks

Login to post a reply

Server time is: 2019-10-18 21:49:31
Your offset time is: 2019-10-18 21:49:31