Jump to content

Animation morphing with 3ds max to Babylon


Dad72
 Share

Recommended Posts

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:
 

post-5292-0-99096200-1444486134.jpg

 

Looking at the image I would recover the animation 'MMM' which plays this frame 0 100

 

Thank you for help

 

 

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

Hi, dad72

Maybe 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.

Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
Share on other sites

  • 1 month later...

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...