Jump to content

Cannot convert Mixamo to Babylon


ozRocker
 Share

Recommended Posts

No matter what I try I cannot get "skeleton" information in my converted Babylon file from an animated Mixamo character.  Apparently converting FBX to Babylon will omit animation because of FBX licensing restrictions.  When I try and convert a Mixamo DAE I get an error.  If I import the Mixamo DAE to Blender and then export to a Blender DAE I don't get the skeleton information in the Babylon file.  Also, I can't add the Babylon add-on to Blender 2.73.  Adding the ZIP file does nothing.  Putting the files in scripts/addons does nothing.  I have tried so many things and still can't get any animation happening from my Mixamo character.  Anyone else having issues with this?

Link to comment
Share on other sites

yes.  I have a fresh install of Blender 2.73.  When I follow that tutorial nothing happens.  The plugin isn't recognised if I copy them into the add-ons folder.  If I install from ZIP it does nothing either.  I'm also asking on the Mixamo forum to see if anyone has successfully converted a DAE or FBX animation from Mixamo into Babylon.js format

Link to comment
Share on other sites

Also, I can't add the Babylon add-on to Blender 2.73.  Adding the ZIP file does nothing.  Putting the files in scripts/addons does nothing.

 

Hi ozrocker - welcome to the forum :)

 

I just downloaded Blender 2.73 and installed the Blender Exporter. Here is the procedure I use:

 

1. Download the zip file from github and unzip it. It contains a lot of stuff - just note where they Blender Exporter is.

2. With Blender installed (in your case v2.73) run Blender then

3. File->User Preferences->Addons Tab

4. Click the "Install From File..." button and navigate to where the Exporter file is (io_export_babylon.py)

5. When installed activate it by putting a tick in check box then click the "Save User Settings" button

 

Did the install today in Blender 2.73 - just like that. Works fine

 

If the Blender Exporter gets updated and you want to install the new version then

 

1. File->User Preferences->Addons Tab ->Import-Export button(on left)

2. Now search for the "Import-Export Babylon.js" (in main part of the window)

3. Click the little arrow on left to maximize the info about Import-Export Babylon.js

4. Uncheck the text box on the right then hit the "Remove" button.

 

Now install the new version as described above.

 

I always use this method - I don't mess around with copying files to Blender directories.

 

cheers, gryff :)

Link to comment
Share on other sites

Morning ozrocker. Glad the installation worked. I've not had a lot of success with .dae files. The Mixamo .dae animations have "end" bones and they have twenty bones just for the hands.

 

Can you give us more detail about the animation? Is it one of the Mixamo free ones? And what model mesh are you using - a specific one or just something you are using for a test?

 

cheers, gryff :)

Link to comment
Share on other sites

I was using a model I created myself.  I tried using a Mixamo character with walking/running animation and Gangnam style dance but I get these javascript errors 

 

 BJS - [01:24:00]: Unable to compile effect: default
babylon.1.14.js:3 BJS - [01:24:00]: Defines: #define EMISSIVE
 
#define LIGHT0
#define HEMILIGHT0
#define UV1
#define BONES
#define BonesPerMesh 66
 
babylon.1.14.js:3 BJS - [01:24:00]: Error: ERROR: too many uniforms
Link to comment
Share on other sites

The compilation error means that there are too many bones for your GPU :( You have to reduce the number of bones per mesh. One option could be to split the mesh

 

@Gryff: do you mind updating the readme.md with your instructions ?

http://blogs.msdn.com/b/eternalcoding/archive/2013/06/28/babylon-js-how-to-load-a-babylon-file-produced-with-blender.aspx

Link to comment
Share on other sites

I've uploaded the compressed DAE that I'm trying to get working with Babylon.js.  Its a 6MB ZIP of my mate Luke doing push-ups and sit-ups.  I can load it in Blender without any problems. However its very small, so I have to scale it up.  When I convert it to a Babylon.js file and run it in the browser it warps severely.  Any ideas what I'm doing wrong here? http://www.punkoffice.com/files/luke_workout.zip

Link to comment
Share on other sites

Ok oz, I have your blend file but was it the file you used to export to babylon? You are right the armature is very small - but I see no indications that you tried to scale it. Anyway I used it regardless.

 

First though I did some clean up so that the scene was easier to work with.

 

1. Switched the view type to "Ortho" and then 3d window view to "Front".

2. Selected the Armature, and Properties Panel-> Armature Tab->Display->Xray. The bones now show through the mesh.

 

Here is my work flow.to fix the animation - all done in Blender's "Object" mode.

 

1. Select the figure mesh then Alt + P ->Clear Parent. This separates the mesh from the armature. The mesh is on its back and to the right of the origin.

2. With the mesh still selected - Rotate it on the X-axis by 90 degrees.

3. Still with the mesh selected Object->Apply->Rotation. The mesh will now be in the vertical position.

 

4. The armature is still at the Origin, Select it, then Properties Panel->Armature->Skeleton->Rest Position.

5. Now Scale the Armature by 100

6. With the armature still selected Object->Apply->Scale. The Armature and the Mesh should now be lined up to the right of the origin.

 

7. Select the Mesh and then the Armature and then CTRL + P ->With Automatic Weights. Both Armature and Mesh should be back at the origin. Blender might give you a warning about being unable to assign some bones to vertices. The last bone on each hand (index4) and all the bones that are "xxxx_End" are outside the mesh. Ignore the message

 

7a. Properties Panel->Armature->Pose Position.***

 

8 Play the animation to ensure everything looks correct.

 

9.Export to BJS.

 

Here is the end result that I get. I trimmed the animation down to 180 frames - just the "press up" animation - to reduce the file size (which is still 25Mb!). Your mesh has 100,000 tris and 50,000 verts (is it from a 3D scan?). That is a lot.

 

Press Up

 

Takes a few seconds to load.

 

cheers, gryff :)

 

*** Edit: The things you do automatically :rolleyes:

Link to comment
Share on other sites

Sick!! You got it working! :)  Thanks mate.  I'll give it a go later today.  I didn't include my scaling efforts in the Blender file in case I did it incorrectly.  I left it as is.  The mesh and texture is the result of a 3D scan from my photogrammetry rig.  The final results are usually around a million faces but I decimated it down to 100k.  I've tried loading the code you wrote on the iPhone 6+ iOS 8.1.2 Safari and Chrome browser and it just stays on the loading screen.  I know iOS 8.1.2 can handle webGL but it is still quite buggy.  Is it possible to run Babylon.js on an iPhone browser (or any mobile browser)?

Link to comment
Share on other sites

 Is it possible to run Babylon.js on an iPhone browser (or any mobile browser)?

 

Oz:  well the Babylon Christmas Village I created I have seen loaded onto a Samsung S3 & S4 and an IPad - though you cannot move around as it does not include any code for touch screens. Now I have to say in all those cases the phone was downloading the files through a wireless router connection with a download speed of 30+Mb/s . You might want to try the Village (6MB including all textures) and no heavy animations - so it is lighter.

 

I might add that decimation and animation are not the "best of friends"  :o

 

cheers, gryff :)

Link to comment
Share on other sites

Oz, did you try the workflow I posted above for your hipoly guy?

 

As for the IPhone try this creation of mine:

 

Blue Lady

 

The camera does not move so no Touch issues. The figure is relatively low poly but the animation is 918 frames. Load is 7Mb plus textures (not big) and audio.

 

cheers, gryff :)

Link to comment
Share on other sites

Most of our official scenes works on iPhone/iPad like Espilit for instance. Switch the camera on the right using the control panel to double virtual joysticks to move inside it using your 2 thumbs.

Babylon.js has been made to be compatible with mobile through a specific shaders architecture & touch support via hand.js

David

Link to comment
Share on other sites

gryff, your instructions worked!! :D One thing that stumped me is that my animation wouldn't run after all the steps, then I realised I forgot to change the skeleton back to "Pose Position".  My new animated person is here http://www.punkoffice.com/babylon/luke2.html

 

I ran it through the iPhone with web console output via Xcode and the reason it was loading forever is because of the "Too many uniforms" error.  However BonesPerMesh was set to 34.  I would be over the moon if I could get this working on an iDevice but its looking doubtful :/ 

Link to comment
Share on other sites

My new animated person is here http://www.punkoffic...ylon/luke2.html

 

Arghhh oz. Does not work for me  :(  I get this error:

SyntaxError: JSON.parse: end of data when ',' or ']' was expected at line 40 column 327666 of the JSON data

Want to send me your fixed .blend file so I can have a look at it ? Not going to give up just yet :)

 

Did you try the Blue Lady.Much lower poly count - but 918 frames of animation?

 

cheers, gryff :)

 

Update: Seems to be working now in both Chrome and Firefox - though not 100%guaranteed. Not sure what the problem is - maybe too many tabs open and I don't wait long enough. And I see you have the full animation - so the file size is probably much greater than the 25Mb one I produced :o 

Link to comment
Share on other sites

The filesize is now 27MB so its not much bigger. I'm trying to add shadows and its not coming out too well.  I think the high-poly count and lack of soft shadowing is producing some weird affects.

http://www.punkoffice.com/babylon/luke.html

 

What I'm trying to do is find out is if Babylon.js is suitable for animated photogrammetry-made humans.  The only framework that I've gotten this working with so far is Unity 5, which you can see here http://www.punkoffice.com/luke/ (use left/right arrow keys to rotate)

 

My shadows are set up like this

var shadowGenerator = new BABYLON.ShadowGenerator(4096, light);var mesh = newScene.meshes[0]; shadowGenerator.getShadowMap().renderList.push(mesh); shadowGenerator.useVarianceShadowMap = true; shadowGenerator.usePoissonSampling = true; mesh.receiveShadows = true; ground.receiveShadows = true;

(using directional light as light source)

Link to comment
Share on other sites

Yes it does look odd, oz. Mind you the Unity piece looked like there was a green shading on his thighs and legs

 

I'm no expert on the use of shadows - so you might want to post the issue on a new thread, with an appropriate title, that might attract the right people.

 

That said, two comments:

 

1. The size (4096) of the shadow map in your code is huge. The default export from Blender is 512 and the example on the BJS Playground is 1024.

 

2. This code seems odd:

var mesh = newScene.meshes[0];...mesh.receiveShadows = true; 

I assume that mesh is your animated figure - why is it receiving shadows ? Surely that mesh and the light are creating the shadow?

 

cheers, gryff :)

Link to comment
Share on other sites

The green shading is actually from the original photos.  I have a green floor in the photostudio and it somehow reflected onto the legs slightly.

 

The mesh is meant to be receiving shadows as well as casting shadows.  There are times (like during sit-ups) where shadows should end up on the face and torso cos of the raised forearms blocking the light.

 

I'll make a new thread about this issue.  Thanks for your help getting the Mixamo conversion working :)  I don't know how to mark this thread as "answered", but I consider the conversion issue now solved.

Link to comment
Share on other sites

  • 2 years later...

Thanks for the post @shen :) It has been a long time since I used Mixamo (before I started using BJS) and all the models I rigged and downloaded had 66 bones. Now I want rigs with around 30 bones. So my workflow is to use Clear Parent, modify the rig, then reparent using automatic weights. This saves me having to spend time redoing the weight painting - not a task I like doing :o

I've never had any problems of any kind separating mesh and rig then re-parenting them :)

Here is an example - a free model that I got from Mixamo - called "Zed" - you may recognize him. Originally 66 bones in the dae file that I downloaded - now reduced to 30 .I,applied the scale and rotation( both were necessary),  re-parented and then a free Carnegie Mellon University (.bvh) animation was added to the modified rig using the MakeHuman plugin "MakeWalk"

Zed Basketball

When I am modifying the rig - I lock/make unselectable the mesh.

cheers, gryff :)

 

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