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 / Small model problem..

Author
Message
blargmob
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location:
Posted: 14th Feb 2008 04:08
Howdy,

For my game models, I'm using the ones that came with the GDK, in the media folder. Anyway, I load a file such as "H-Zombie-Move.x", or just any walking animation to use. Then, I loop the animation in my program. However it doesn't loop smoothly. When the animation reaches its end and it starts up again, there is a stutter with the model because the last frame and the first frame don't match. How do achieve a normal, smooth animation?

"I used to have a handle on life, but it broke."
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 14th Feb 2008 14:51 Edited at: 14th Feb 2008 14:51
Look into:
dbSetObjectInterpolation : void dbSetObjectInterpolation ( int iObject, int iInterpolation )

Your mod has been erased by a signature
blargmob
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location:
Posted: 14th Feb 2008 18:20
That doesn't work, I've tried. Unless I'm not setting the iInterpolation correctly.

"I used to have a handle on life, but it broke."
blargmob
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location:
Posted: 14th Feb 2008 23:59
Could it be possible that the animation should be made so that it loops correctly? In which case these anims are faulty?

"I used to have a handle on life, but it broke."
blargmob
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location:
Posted: 15th Feb 2008 22:40 Edited at: 15th Feb 2008 22:41
Anybody? I've tried dbSetObjectInterpolation(object, 1) and that does nothing...

"I used to have a handle on life, but it broke."
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 17th Feb 2008 14:57
Ok - Make a model viewer - REMEMBER animations are not "Fixed" they are transitional.

You can set a start frame of 2.5 for example.

Make a model viewer that loads/displays model, and allows you to step thorugh animations by various increments/decrements (forward back...

Like a PRO Video machine that can play movies forward and backwards at any speed.

You may find that looping from 1.8 to 5.6 gives much smoother results then say from 1 thru 6.

Also - Use timer based animation - not the loopy thing.

Expriment with how much of the animation should happen per second.. divide by 1000, then multiply result * timeelapsed

(TimeElapsed = NewTimer - OldTimer)

Note - if time elapsed = 0 I do nothing nor store this because eventually I'll get at least a milli second. Other people use a OS time function to get finer resolution of the clock - I'm not that anal about it.


Good Luck! (respond for more detail if your still stuck - so I get email - but I won't write the model viewer for you - but I may have some old one kicking around I use - but its home brew and not elegant - but explains things a little)

Shoot - here - Attached is a zip of mine - you'll need to look at the code - I have hardcoded "Models" - I never bothered with a loader dialog window - just get the dir right, and learn the key presses.

Hope this helps - NO it's not DarkGDK - but same principles apply.

Attachments

Login to view attachments
blargmob
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location:
Posted: 18th Feb 2008 03:43
Ahh, thank you so much. I got it to work by simply setting the starting and ending frames!

"I used to have a handle on life, but it broke."
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 18th Feb 2008 14:11
Excellent! Glad to have helped you get the wiggle and stuttering out of the animation!

Login to post a reply

Server time is: 2024-10-08 11:34:04
Your offset time is: 2024-10-08 11:34:04