Jump to content

3DS Max exported animation is distorted


spritefire
 Share

Recommended Posts

As the topic states. 

I'm new to babylonjs (had been using threejs for a year now) and decided to give it a go after watching the MVA videos (which were great!).

I have read through the forums and noticed limitations to vertices having maximum 4 bone influences and I have gone over the model and looked in the skin weight table and can't find any vertices that have over 4 influences (although its possible I may have missed because there is 5000 vertices. 
I have noticed lots of different answers concerning similar issues and blender but none with 3ds max.
The file exports ok and there are no errors. The bones animate fine its just the skin itself stretches like bouncing. 

Using Max2Babylon 0.14.1 and does the same on both 3ds max 2014 and 2015. 

post-12583-0-93329900-1421168934.png

Link to comment
Share on other sites

Some of the guys here have been doing some great work on the 3ds max exporter as it's had a few problems with bipeds. I'm not sure it's 100% at the moment though. From my experience here are a few things to try:

 

1) Remove your root bone (often Bip001) from the skin modifier

2) Ensure your root bone is centered on 0,0,0 without any transformations

3) Try v10 of the exporter (this is the only one I've managed to get working with my animations so far) - https://www.dropbox.com/s/lr94at0s4hhfb1b/Max2Babylon-0.10.0.zip?dl=0

 

EDIT:

Also 3ds max offers an option to set the 4-bone limit ( so no need to bother checking the weights table):

Go to - skin modifier/advanced parameters/Bone affect limit

Link to comment
Share on other sites

  • 11 months later...

I have the same problem using 3ds max 2015 and the latest exporter.

Skeleton based animations are disorted like shown on spritefires screenshot.

 

My test mesh is a player character rig wich has a body and a head mesh bound to the skeleton.

The plugin exports 1 skeleton for each mesh in this case, not sure if thats correct.

But the animation disortion happens even with a single mesh rig.

Link to comment
Share on other sites

  • 3 weeks later...

It seems that i have found the disortion problem after many many tests!
This is not a bug with the 3ds max exporter but with the support for zero keys on bones.

As example with the re-targeting process of human motion capture animations there is usually alot of zero keys on the bones.
But even many animations keyed by hand have those.

Such animation in babylon.js format would look somehow like this:

"animations": [{
            "name": "rotationQuaternion animation",
            "property": "rotationQuaternion",
            "dataType": 2,
            "loopBehavior": 1,
            "framePerSecond": 25,
            "keys": [{
                "frame": 0,
                "values": [-0.1998, -0.037, -0.0567, -0.9775]
            }, {
                "frame": 1,
                "values": [-0.1998, -0.037, -0.0569, -0.9775]
            }, {
                "frame": 9,
                "values": [-0.1998, -0.0364, -0.0683, -0.9768]
            }, {
                "frame": 41,
                "values": [-0.198, -0.0303, -0.1716, -0.9646]
            },


So with the animation above, babylon would play frame 9 as frame 3.
This results of course to a short playing disorted animation.

 

 

@spritefire   Was that animation you tried to import targeted from mocap data?

Link to comment
Share on other sites

4 minutes ago, Deltakosh said:

What do you suggest to fix it? 

Im such new to babylon... right now reading the animation code.

It seems other engines are solving this at loader stage by pushing the previous key in to gaps.
The 0 frame does always exists, i think that should be possible.

Link to comment
Share on other sites

3 minutes ago, Deltakosh said:

Actually it should already be the case :)

Yes i saw it... this is so weird.

Just did a further test, keyed some frames to that character by hand... and its again disorted.
Seems like this is something else.. now im out of ideas.. this was always loading fine in threejs.

But its not the 3ds exporter.. its somewhere in babylon. Because when i load as gltf it does the same.

Link to comment
Share on other sites

LOOOOOL!!!!!

I did another test and its 99% working now!

The real issue is with 3ds max deforming dummies...

So for everyone who hits that problem:

1. save the rig as fbx and make sure the convert dummies to bones option is selected
2. import the fbx back to 3ds max and make sure the option to not convert bones to dummies is enabled
3. export to babylon and it works

My character has a separate head and body mesh wich does not exactly fit together after export.

Is that maybe because it creates a skeleton for each?

 

Link to comment
Share on other sites

18 hours ago, hen said:

I was just trying to load that mesh in to the world and wondering why the bones are returned as mesh.

 

The same here. Please tell me why bones are returned as mesh. ....I have to delete them manualy from babylon file, because consume a lot of memory, 2 or 3mb more than usualy. Thanks.

Link to comment
Share on other sites

The latest exporter is working fine with me using 3ds max 2015. Maybe you are using a different version of the exporter? I do know that when I originally posted this I reverted back to an earlier version of the exporter and that fixed the issue. I'd double check to make sure you are using the correct/latest version. 

Link to comment
Share on other sites

4 minutes ago, spritefire said:

The latest exporter is working fine with me using 3ds max 2015. Maybe you are using a different version of the exporter? I do know that when I originally posted this I reverted back to an earlier version of the exporter and that fixed the issue. I'd double check to make sure you are using the correct/latest version. 

Interesting.. could you tell me wich version you use?
Does yours export bones as meshes?

Link to comment
Share on other sites

Using Max2Babylon-0.25

Not sure if meshes, however I access the bones through babylon's skeleton property. ie

BABYLON.SceneLoader.ImportMesh("", "", "man.babylon", scene, function (newMeshes, particleSystems, skeleton) {
		
	scene.meshMan = newMeshes[0];
	scene.skeleton = skeleton[0];
	scene.clearColor = new BABYLON.Color4(0,0,0,0);
		
});

	scene.beginAnimation(scene.skeleton, 10, 20, false, 0.8);

 

Link to comment
Share on other sites

@Deltakosh

 If I check  "Do not export" , nothing export :))

@spritefire

You are right. And I'm using Max2Babylon-0.25 on 3DsMax 2015, and meshes and skeletons works fine, but if i look at the mesh array length, it contain meshes and all bones too.

Link to comment
Share on other sites

Hi again. Now I have another little problem with 3DSMax exporter. I think it's my fault, but I want to be sure.

I have a house with 19.192 verts and 32.474 polys in 3DSMax, and when I export it has 39758 vertices and 32474 faces. Could u tell me what I'm doing wrong?  

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