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 / Animations won't play!

Author
Message
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 3rd Jul 2009 06:03
I don\'t know why my animations arn\'t playing...

Heres my code:



Any help would be appreciated.
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 3rd Jul 2009 06:14 Edited at: 3rd Jul 2009 06:16
Well I'm pretty sure dbAppendObject only loads the object itself no animations or something along those lines, so just try dbLoadObject.

Nevermind... I don't know


Use Google first... it's not rocket surgery!
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 3rd Jul 2009 06:23
Nah dbAppend object:

Quote: "
This command will append all animation data from an X file into the specified X file object. The new animation data will begin from the start frame specified up to the length of the files animation data. Ensure that the 3D object being appended uses the same limb names as the original object, otherwise the load will fail. The parameters should be specified using integer values.

Syntax
void dbAppendObject ( char* szFilename, int iObject, int iStartFrame )
"
Jonas
19
Years of Service
User Offline
Joined: 10th Aug 2005
Location: What day is it?
Posted: 3rd Jul 2009 09:06
Perhaps this will work better for you?



If that works then it's because you're restarting the animation to the first frame every loop.

I'd test it before posting but I broked my compiler.... sorry.
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 3rd Jul 2009 12:07
Your code doesn't work because when your doing:

Quote: "

"


it overwrites(i think) the animation data that is already in the file and the iID paramater has to be the object you are trying to animate, not a new id.
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 3rd Jul 2009 14:13
The append commands will work fine, provided that the base model is exactly the same, down to the last vertex and bone structure.

The trick is to append the new animation to the frame AFTER the LAST frame of the source.

here is a snippet of some animation data I used a while ago to get a model into a scene quickly and animating :



Ignore the OOP terminology in those examples, its just pasted from where I had it, but the "this->sz_xxx" would be replace with "media\\modelpath\\modelname" ... also those numbers that are being appended are specific to the model that you are appending. Its something that you either should know from making the model, or would easily be able to find out either from where you got the model, or in a model animation viewer(you can write one yourself in a couple of minutes- all you need to do is display some stats about an object using inbuilt GDK commands)

If it ain't broke.... DONT FIX IT !!!
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 4th Jul 2009 09:40
I tried that, but it still isn't working

Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 4th Jul 2009 12:18
Your code is appending the FIRST frame of each model's animation to the FIRST frame of the base model, EACH TIME, so each one of your append commands is overwriting the previous animation....

Read my post above again, it explains this....

for example you need to append H-GI-Idle.x to H-GI-Static.x, starting at H-GI-Static.x LAST FRAME..., then H-GI-Attack.x to H-GI-Static.x and so on... your enumerations, PLAYER_IDLE - are supposed to be the frames of animation, an enum will mean that PLAYER_IDLE has a constant value.

Your variables "PLAYER" is also uninitialised, its loading an object using that value, but its not been given a value...

If it ain't broke.... DONT FIX IT !!!
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 4th Jul 2009 15:06
How do I find out how many frames in an animation?
prasoc
16
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 4th Jul 2009 17:51
dbTotalObjectFrames(int id);

ta-dah!


Your signature has been erased by a mod
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 4th Jul 2009 18:12
haha

#ifdef _in_programming_heaven_
MakeAnAwesomeGame(lots of badies, lots of guns, lots of stuff to do, BIG level)
#endif
tFighterPilot
15
Years of Service
User Offline
Joined: 9th Jul 2009
Location:
Posted: 9th Jul 2009 21:33
Hello, I'm also unable to see animations in the program I created. I exported it in 3D Studio Max with Panda DirectX exporter. I can see the animation just fine in the directX model viewer. When I load it to the program, I can see the model, but not the animation. Here's the code

tFighterPilot
15
Years of Service
User Offline
Joined: 9th Jul 2009
Location:
Posted: 10th Jul 2009 10:54
The thread didn't come to the top. Probably some bug because it's my first post...

Login to post a reply

Server time is: 2024-11-25 06:57:19
Your offset time is: 2024-11-25 06:57:19