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.

DarkBASIC Professional Discussion / logarithmic keyframe interpolation?

Author
Message
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Jan 2011 23:51
Hey guys!

Is there any way to change the way DBP interpolates the keyframes of an object from linear interpolation to a logarithmic interpolation? In CharacterFX it's possible to put sub-keyframes between the main keyframes using logarithmic scaling, but you still have minor linear patterns in DBP, and it takes a ton of work and uses quite a lot of space.


Thanks,

TheComet

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 4th Jan 2011 12:06
I don't think it's possible using DBP but you might be able to 'fake it' using enhanced animations...

If I'm understanding you correctly that is, you can edit the speed of an objects animation on the fly as well as set the exact point along the path of the animation using a floating point variable. You can do that 'per limb' or for the whole object too.

BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 4th Jan 2011 13:31
I use a lot of non-linear effects in my game system. I pre-calculate them and hold them in arrays to speed things up. I don't have any issues with using a linear gradient from one keyframe to the next using this method, to the end user it's invisible.

I use 100 keyframes for my effects, but you could use much more if required as it's just numbers. I store mine as values from 0.0 to 1.0 and convert as necessary.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 4th Jan 2011 22:58
Good suggestion, I'll go with that My game so happens to use a similar system, so implementing that should be easy.

Thanks!

TheComet

Login to post a reply

Server time is: 2026-07-19 03:41:59
Your offset time is: 2026-07-19 03:41:59