Dad72 Posted October 10, 2015 Share Posted October 10, 2015 Hello, How Morpher type of animation is recovered with babylon? I create facial animations to give emotions to the character through the Morpher modifier, but I do not know how to trigger them by name (there it is no animation key, but names). scene.beginAnimation is what can do that? and how ? Or is there a different function to do this. Here in pictures: Looking at the image I would recover the animation 'MMM' which plays this frame 0 100 Thank you for help Quote Link to comment Share on other sites More sharing options...
gryff Posted October 10, 2015 Share Posted October 10, 2015 I take it the picture is a screen shot of 3DMax dad? I know JCP is working on something for Blender export (shape keys/morphs) - but I have no idea how those shape keys/ morphs would be included into BJS and, indeed, how they would be animated. An animation can certainly be created in Blender and I assume in 3DMax too. cheers, gryff Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 10, 2015 Author Share Posted October 10, 2015 Yes, the picture is a screen shot of 3ds max. So Babylon can not play that kind of animation? Because the animation is of vertex deformation, it should be save somewhere I guess. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 11, 2015 Share Posted October 11, 2015 Hello unfortunately morpher is not supported so far Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 11, 2015 Author Share Posted October 11, 2015 Is this a feature set for 2.3? My current project depends heavily on that. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 11, 2015 Share Posted October 11, 2015 Not for 2.3 (unless someone in the community wants to contribute) Quote Link to comment Share on other sites More sharing options...
MarianG Posted October 11, 2015 Share Posted October 11, 2015 Hi, dad72Maybe you can use joints instead of morphs, and then in BJS play with bones matrix.Something like that:BABYLON.SceneLoader.ImportMesh("", babylons_url, "name.babylon", scene, function(m, p, s) { for(var i in s[0].bones){ if(i!=0){ joint[i] = s[0].bones[i]; matrix[i] = s[0].bones[i].getLocalMatrix(); } } init_slider(); })function init_slider(){ var m = []; for(var i in joint){ m[i] = joint[i].getLocalMatrix().clone(); } $("#slider1").slider({step:0.1,min:0.5,max:2,value:1,slide:function(event,ui){ var scaleMatrix = BABYLON.Matrix.Compose(new BABYLON.Vector3(ui.value, ui.value, ui.value), BABYLON.Quaternion.Identity(), BABYLON.Vector3.Zero()); m[1].multiplyToRef(scaleMatrix, matrix[1]); joint[1].markAsDirty(); }});}And you can use multiple sliders, you can affect two bones in the same time, and you can rotate or translate bones too. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 11, 2015 Author Share Posted October 11, 2015 Hi bulisor,I have many models that uses Morpher, I'm not going to restart all the work done. But thank you for your proposal. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 23, 2015 Author Share Posted October 23, 2015 Hi, Maybe you can use joints instead of morphs, and then in BJS play with bones matrix. I think I will study this method. But I do not understand how to create morphs joints. Can I have more details on how to do this with bones?Can I from what I done with "morpher", add bones to make it work in babylon. (to keep what I did with "morpher" + "bones" for Babylon) It is unfortunate that Babylon does not yet have this type of functionality: The animations by vertex with "morpher". Thanks for help Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 25, 2015 Author Share Posted October 25, 2015 Anyone has any advice? Quote Link to comment Share on other sites More sharing options...
adam Posted October 25, 2015 Share Posted October 25, 2015 I'm also interested in this. I would rather use shape keys to make my character's eye blink than the way I am doing it now. WolfKodi 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 25, 2015 Author Share Posted October 25, 2015 If, for example, I get the status of my morphs and I create a "key" mouth close and I create a "key" mouth open. Is Babylon able to read this animation?The creation of bones is can not be necessary ? Quote Link to comment Share on other sites More sharing options...
WolfKodi Posted November 26, 2015 Share Posted November 26, 2015 JCPalmer have something written for Blender: http://www.html5gamedevs.com/topic/7459-boneless-deformationanimation-blender-shape-keys-exploratory/?hl=shapekeyI'm not sure if you can transfer Morph shapes from 3DS Max to Blender. 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.