hit2501 Posted March 20, 2015 Share Posted March 20, 2015 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 Quote Link to comment Share on other sites More sharing options...
RaananW Posted March 20, 2015 Share Posted March 20, 2015 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. Quote Link to comment Share on other sites More sharing options...
hit2501 Posted March 20, 2015 Author Share Posted March 20, 2015 Thanks RaananW,I found the "framepersecond:30" lines in the .babylon file, I changed all to: "framepersecond:60" but nothing happen, am I doing something wrong? Quote Link to comment Share on other sites More sharing options...
gryff Posted March 20, 2015 Share Posted March 20, 2015 Hit, you can change the "speed" of the animation.So for an animated rig the last parameter in code below (1) is the animation speed.myScene.beginAnimation(mySkeleton, 1, 532, true, 1);cheers, gryff Quote Link to comment Share on other sites More sharing options...
hit2501 Posted March 20, 2015 Author Share Posted March 20, 2015 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 Quote Link to comment Share on other sites More sharing options...
gryff Posted March 20, 2015 Share Posted March 20, 2015 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 Quote Link to comment Share on other sites More sharing options...
hit2501 Posted March 20, 2015 Author Share Posted March 20, 2015 I love you sir. Thank you very much gryff its something that will help me a lot Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted March 23, 2015 Share Posted March 23, 2015 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...) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 23, 2015 Share Posted March 23, 2015 would love to fix it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.