Jump to content

Import animation from Blender


Alek
 Share

Recommended Posts

I made a model in MakeHuman (with very low poly, 31 bones) and exported it with mhx2.

I then imported the model to blender.

The exported model with this configuration was exported with Blender exporter v. 4.5. I then loaded it with BABYLON.SceneLoader.ImportMesh function to my scene and it looked fine.

Then with MakeWalk i attached bvh file and created simple animation. The animation looks fine in blender.

I exported it again with Blender exporter v.4.5 and tried to play animation but I can't see my mesh. 

I think I applied all advices found in other topics (material alpha, texture transparency, MakeHuman settings). 

I copied my blend file and export result here:

https://www.dropbox.com/sh/1a2v5g1goiaqi8t/AABWpzbQRDgev7Pn3aeEKqCLa?dl=0

Could anyone help me to figure out where the problem is? 

Link to comment
Share on other sites

Hi Alek, welcome to the forum :)

I downloaded your files and took a look at them. I had to get the textures for the .blend file from the zip file then save it and reload it. You might want to consider "packing" the textures into the .blend file.

Then:

1. I checked you had lights and a camera - you had both but the camera position was not great so i set it up a little differently.

2. I put the armature in the "rest position".

3. I added a plane that is 20x20 Blender and BJS units. Showed me your export from MH1.1 was done with the scale units set at "decimeters" and the model is huge.  Use "metres".

4. Exported the .babylon file and and loaded it into the BJS sandbox - image below.

All I got was the plane. So I turned on the debug tools and checked the two boxes inside the light blue rectangle and:

1. The bounding boxes are drawn - so something it there.

2. The clickable labels turn red when clicked and a kind of mesh outline appears - so again something is there. But unchecking those boxes - all we have is the plane.

I also saved the file with the armature in "pose position" and used my local server to test if the animation is running - it appears to be - but no visible meshes:(

I will investigate further. I installed MH1.1 last week, so I will build my own animated guy see if I get the same problems.

I will be back.

cheers, gryff :)

 

sandbox1.png

Link to comment
Share on other sites

Thaks  gryff  for quick reply.

Actually I don't need to use latest MakeHuman version. I just want to start with preparing a blender human (skeleton) animation that is prepared for babylon exporter. I've seen somewhere on the forum your links to a basketball player and dancing woman. They look great. Could you please upload somewhere ANY example (blend file) with such animation? I'm really interested if you get into similar problems. Maybe it is something wrong with my blender configuration.

Thanks, Alek

Link to comment
Share on other sites

Quote

Could you please upload somewhere ANY example (blend file) with such animation? I'm really interested if you get into similar problems. 

Well Alek here are a couple of .blend files that use the basketball animation - I use Blender 2.76 and both files should have the textures packed into them

blendfiles.zip

The files originated in MH1.1 and MH1.02 - but both were exported from MH to Blender as .mhx2 files.

MH1.1 Export - the dude has no hair and the tshirt and jeans are a single mesh. See him in action here

MH1.02 Export - the dude has hair and the tshirt and jeans are separate meshes. See him in action here

In both cases, after importing the the mhx2 file into Blender, the MakeWalk plugin was used to add the animation from a .bvh file.

I added a standard Blender cube to indicate the scale of the figure.

I had no problems - so I have no idea why your file is misbehaving, though it must be something you did to a setting somewhere :(

cheers, gryff :)

 

Link to comment
Share on other sites

Thank you, these files are valuable for me and I will treat them as referrence now. 

Looks like something is wrong with my Blender installation. I use 2.77 version. I'm now uninstalling it and I will then downgrade to 2.76b and see if there is any improvement. I tried  just to export your file (MH 1.1 Export), but it doesn't display 100% correctly. You are using Exporter in the same version, same blend file so it must be some blender issue.

 

Link to comment
Share on other sites

Quote

I tried  just to export your file (MH 1.1 Export), but it doesn't display 100% correctly.

Can you post an image of the problem @Alek? So I can see what the issue is/might be?

cheers, gryff :)

Link to comment
Share on other sites

I exported it here https://www.dropbox.com/sh/1a2v5g1goiaqi8t/AADekrqGOzPya72dEae2j7V1a/dude_test111mhx2.babylon?dl=0 but then I decided to reinstall blender. It had a problem with arm

After reinstalling blender I exported your file, played it and it looked ok. I'm still struggling with importing my own object. My current attempt is here:

https://www.dropbox.com/sh/tr1iur82v2um2av/AAAk__L6Ca9eDSJS2MagYDYka?dl=0

Could you please upload mhx2 and bvh files (musn't of course be these ones- any working for you)?

Link to comment
Share on other sites

Forget the bvh file for now @Alek.

I looked at your file and I have it working.

Two things to do in your blend file (v02) :

1. With the animation - DELETE frame 0 from your animation (I do it in the Dopesheet with Action Editor)

2. Select the mesh that you are using for the body ( the "Proxy 741" mesh). Go to its material, and down to the area labelled "Transparency" and check the box. Now choose "Raytrace" and set the "Alpha" value to 1.000.

Try exporting that.

cheers, gryff :)

Link to comment
Share on other sites

@gryff to the rescue once again!  The quality or lack thereof now seems to be related to the input: (.bvh file / cmu skeleton / makewalk process)  At the end, the shoulders / arms look quite poor.

I think 53 bone "Game engine" rig seems like a better choice (awesome root bone).  Deleting finger bones / weight painting all influence to the hand bone in Blender is simple enough (yeah, I weight paint now).   With all the finger bones deleted, there are only 23  (almost good enough for mobile / webGL 1.0).   FYI, I have got a utility which does the conversion of Blender Pose Libraries into shape keys in TOB 5.0.  Pose Libraries wt this utility are how I am transferring MH expressions to shape keys. 

Selection_194.png

I have also experimented with fingers as shape keys.  They can look terrible during deforming, but if you do it fast, less then 200 millis, no one will notice.  You could in theory:

  • export from MH the Game Engine rig
  • After import, append a finger pose library, saved in a .blend
  • click the conversion button, then delete the finger bones & spray paint new weights.

Not that I can make any promises as to when Tower of Babel 5.0 / Queued Interpolation extension will be available, but I wanted it to be known just how much time I am investing in Pose Libraries.  Think investing in cmu, like making it IK capable, might be a waste.  Carnegie Mellon did great work when they were getting paid by the defense department for Arpabet.  This mocap stuff looks like undergrad lab experiments by comparison.

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