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.

FPSC Classic Models and Media / Problem Animating an entitiy (tried both search functions)

Author
Message
bruce3371
15
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 1st May 2012 02:58
A while ago I created a Grandfather Clock entity using Milkshape. I made 2 versions, one was animated (the clock's pendulum swaying to and fro), the other not.

I was able to successfully animate it in Milkshape, creating 13 frames of animation. I exported it successfully (I think) as an .x file. I used Entitiy Compiler to make it FPSC ready and edited the animation frames at the bottom of the .fpe file. Then I created a simple animation script to get it working in FPSC.

The problem is, when I test it in-game, all I get is the whole Clock model gittering really quickly, instead of just the pendulum gently swaying to and fro.

I've spent many hours trying to get it to work, but just can't for some reason.

Does anyone have any suggestions?

Ross tra damus
3D Media Maker
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Looking to Escape London
Posted: 1st May 2012 03:09
bruce3371

Did you have a seperate bone/joint for the structure of the Grandfather Clock (vertices assigned to this ) then another bone/joint 'from' that, for the base of the pendulum (vertices assigned to this )?

Or it could be that you have not set the right frames value in the FPE file.
bruce3371
15
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 1st May 2012 03:15 Edited at: 1st May 2012 03:16
I created a bone/joint for the pendulum, but not for the main body of the clock.

Should I have created bones/joints for both?

The thing is, the animation worked fine in Milkshape itself.

It had 13 frames of a single animation, so I edited the .fpe file like this;

;Animationinfo
animmax =1
anim0 =1,13

Is that right?

Flatlander
FPSC Tool Maker
19
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 1st May 2012 03:46
Hey Bruce, Out of curiosity, could you send the .x file to me as I want to check it in "animer." This is for a couple of reasons. If what I suspect happens I'll let you know what I was looking for. I don't need the texture. This program only loads the x file and looks at nothing else.

"A programmer is just a tool which converts caffeine into code . . . reminds me….. if I had one more brain cell, I could have a synapse! woo hoo, Sparky!

~I'm the Terry of the Flatlands.
bruce3371
15
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 1st May 2012 04:36
OK, .x file coming right up...

starmind 001
FPSC Reloaded Backer
18
Years of Service
User Offline
Joined: 23rd Sep 2007
Location:
Posted: 1st May 2012 06:37
Here you go for future reference on making animated models, you need to have a ROOT or MAIN bone at 0,0,0. This will stop the jitters and save you trouble later. Also by putting the base of your models on 0,0,0 you can keep it above ground in fpsc. As you can see in the pic below. Just in case you wanted it I did a quick fix and animation for you. In you fpe use anim2 = 1,11 for animation and anim3 = 12,13 for no movement. Enjoy!


bruce3371
15
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 1st May 2012 08:28
Thanks for the tips Starmind, I'll bear those in mind in future.

As for the clock, I tried you're new file, and edited the .fpe like you said, but still can't get it to work. Instead of the jitters, it just does nothing!

I'm obviously doing something wrong somewhere along the line, but right now, it's stupid o'clock in the morning, I'm tired, I've had no sleep and I'm cranky. So I'm going to have another go tomorrow (or rather, later today lol).

Ross tra damus
3D Media Maker
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Looking to Escape London
Posted: 1st May 2012 23:38
bruce3371

If I get the time I will try to get back to you with this one but for now it might be worth you taking a look at the following links below which should help you.

http://forum.thegamecreators.com/?m=forum_view&t=116184&b=24


http://forum.thegamecreators.com/?m=forum_view&t=131537&b=24
Ross tra damus
3D Media Maker
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Looking to Escape London
Posted: 2nd May 2012 01:28
bruce3371

One quick thing I should point out is that you should set up the animation details as follows (you can read about this in 'Disturbing 13's' guide in one of the links above post)

If your 'Milkshape' model has '13' fps then this is what the details in the FPE should look like.

;Animationinfo
animmax = 2
anim0 = 0,0
anim1 = 0,12 ........(you have to count the zero as frame 1)

Note - Please bare in mind that details above are for a 'looping' animation.

Here is the script I would use to get this to work correctly:

rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 2nd May 2012 02:01 Edited at: 2nd May 2012 02:02
Although you seem to have animation probs fixed would increase those frames at very least to 0-24 for one swing of pendulum. Since FPSC plays animation at 25fps your animation is going to be very fast, if you got a swing back and forth with only 13frames.
If you got one swing of the pendulum using 13frames you would need to increment-decrement the frames and not use anim=.
Having done a grandfather clock I found it best to have each swing and return last at least one second each, if your doing the whole swing back forth anim your going to need 0-49 frames.

Awesome! Its one of those threads.
bruce3371
15
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 2nd May 2012 03:42
@Ross tra damus

Thanks for the help and additional info about the .fpe file.

@rolfy

Thanks for the advice, I'll go back into Milkshape and edit the animation.

BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 2nd May 2012 07:51 Edited at: 2nd May 2012 07:53
Apologies, Bruce, for asking my question which sort of relates to yours.

I have a book that is animated. The FPE contains the following:

;Animationinfo
animmax = 2
anim1 = 0,50
anim2 = 51,100


My script is as follows:



We place the book on a table and walk up to it. Our problem is that the book opens when [ENTER] is pressed and when it reaches to the full open position, it jumps back to the beginning (closed position) and opens again, then jumps back to the closed position and opens again, etc. I had the "anim1" set for the "opening" of the book, and the "anim2" as the closing of the book. I figured with an animate object if I just have the animate=1 in the script, that would open the book only. Have I scripted this incorrectly for animated object? Or do I need to change the FPE to read like the following:

;Animationinfo
animmax = 3
anim0 = 0,0
anim1 = 0,50
anim2 = 51,100


Twitter: @NFoxMedia
Ross tra damus
3D Media Maker
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Looking to Escape London
Posted: 2nd May 2012 09:34
BlackFox
I suggest that you re-animate the book model with just 'x1' animation of the book 'opening' only (do not animate it to close).
Then export it with ('loop' option 'unticked').
Now just copy the FPSC 'dooruse' script and adapt it to show your hud and distance.
NOTE - The 'setframe=0,incframe=0,decframe=0, run the animation and will allow the animation to be 'reversed' (closing book).

With this use of model and script there is no need to have a two way animation.

If using Milkshape with '50' fps of animation (book opening only).
FPE Animation details:

;Animationinfo
animmax = 1
anim0 = 0,49 ........(you have to count the zero as frame 1)



I hope this helps.
rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 2nd May 2012 10:06 Edited at: 2nd May 2012 10:23
As Ross says you should increment the animation frames, but no need to reanimate your book:



Using:
;Animationinfo
animmax = 3
anim0 = 0,0
anim1 = 0,50
anim2 = 51,100

I take it frames 0,50 are 'open' and 51,100 are 'close'


This should run your open book anim you would want to maybe go on to use a timer if you want to show a 'close book' hud and then use incframe=2 with a keypress to close it or however you intend to do it.

Awesome! Its one of those threads.
bruce3371
15
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 2nd May 2012 17:38
Quote: "Apologies, Bruce, for asking my question which sort of relates to yours."


I've got no problem at all if other people want to ask questions about aniumating their models here as well

Maybe we could use this thread as a resource for anyone wanting to animate their models?

BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 2nd May 2012 17:49 Edited at: 2nd May 2012 17:51
Thanks, Bruce. I figured better to catch the animators here while you had them distracted with the clock.

Thanks Ross and Rolfy. Both your explanations clear things up and we have it working now. This is our first attempt at working with an animate object, and now that we have a better idea, Cathy will be making more of them.

The FPE contains the following:

;Animationinfo
animmax = 3
anim0 = 0,0
anim1 = 0,50
anim2 = 51,100

And the script:



So now the "open book hud" appears when the player is close enough to the book, press enter and the book opens. Press enter again will close the book.

I've added both your information to our notes for future reference. I knew it had to be the scripting side, but I was a bit unclear with the "incrframe/decframe" versus "animate=x".

Thanks again.


Twitter: @NFoxMedia

Login to post a reply

Server time is: 2026-07-05 00:00:39
Your offset time is: 2026-07-05 00:00:39