benoit-1842 Posted November 20, 2014 Share Posted November 20, 2014 So I have build (with the help of Gryff) a generic animated 3d model with Blender and that works well with babylon.js. I want to be able to change the animation content on the fly in my browser.... Is it possible to change the animation data with new ones.... The data are coming from a bvh file... Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted November 20, 2014 Author Share Posted November 20, 2014 In a way I want to know where's the "keys" of my animation and be able to replace it with a bvh file... Thanx, Benoit Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 21, 2014 Share Posted November 21, 2014 Yes you can. Every animated entity has a .animations property that contains every animation related to it. For instance, you can find skeleton.animations See this topic to get more info about animations:https://github.com/BabylonJS/Babylon.js/wiki/07-Animation Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted November 21, 2014 Author Share Posted November 21, 2014 So how can you change them ? Merci, Benoit gauthier Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted November 21, 2014 Author Share Posted November 21, 2014 So is it possible to change the animation keys on the fly ? Merci, Benoit Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted November 21, 2014 Author Share Posted November 21, 2014 The problem is how do you change them? In the babylon file the data seems to be in a Vector4(Quaternion) format, but the BVH data is Vector3. How does it get converted? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 22, 2014 Share Posted November 22, 2014 I assume that bhv contains euler angles. Thanks to latest version we now have a robust way to convert euler to quaternion with Quaternion.RotationYawPitchRoll method Then you just have to browse the .animations array and replace values Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted November 23, 2014 Author Share Posted November 23, 2014 Thanx I will check that. Where I can find info about that robust way to change from eulor to quaternion ? Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted November 24, 2014 Author Share Posted November 24, 2014 Here is the simple cylinder animation I have been working with 2 bone rig cylinder animation Open your console window and you will see the values of the animation printed out. So I can get to the values in the babylon file. Question is how are they replaced? Here are the blend, bvh, babylon and my index file for this animation set up. simple files The babylon file is not huge so easy to examine in a text editor (as is the bvh file) Thanx, Benoit Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted November 24, 2014 Author Share Posted November 24, 2014 I will say thanx a lot too to Gryff who's helping me the best he can with this project..... That guy is awesome..... Many thanx, Benoit GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 24, 2014 Share Posted November 24, 2014 I can't agree more about Gryff! 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.