Jump to content

Set fps with "PlayAnimationAction" or decrease time between keyframes in Blender


hit2501
 Share

Recommended Posts

Hello.

 

Can anybody help me. How can I change the frames per second if I use PlayAnimationAction to play an animation imported from blender?

 

Or if its easier how can I reduce playing time of a blender animation to third before exporting to Babylon? 

(I can do it manually but the problem is now I have 370 frames)

 

Thanks in advance :)

Link to comment
Share on other sites

Hi,

The animation object has a framePerSecond variable. This is probably what you are looking for.

I'm not sure how to do it with a blender-exported scene, but you can always find the animation registered in your scene and change the value. The scene loader is actually looking for this value so it must be in your .babylon file.

Link to comment
Share on other sites

Thanks gryff but Im using playAnimationAction instead beginAnimation with lines like:

 

new BABYLON.PlayAnimationAction(BABYLON.ActionManager.NothingTrigger, Curtains001, 0, 360, 0),

 

Is there any parameter I can use to set de fps?

 

ps: its a no bones animation

Link to comment
Share on other sites

Hit, I thought you might use the ExecuteCodeAction to call your own function that would allow the use of beginAnimation.

 

However, you could look at changing things in Blender. As you say above:

 

how can I reduce playing time of a blender animation to third before exporting to Babylon?

 

1. In Blender have the Action Editor open and select all your key frames

 

2. With your mouse over the Action Editor, S (for scale) then .3333 (for a three times speed change.)

 

You can also try "thinning" your key frames before you scale them as above using the Simplify F-Curves addon as outlined in this video

 

Simplify Animation Curves

 

cheers gryff :)

Link to comment
Share on other sites

Just to add my two cents. Some weeks ago I did a few tests with animations and I discovered that even when specifing frame rate, animations don't really play at required fps.

Will try to find the PG I did at that time (not sure I still have a link...)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...