Jump to content

Exporting animations from Blender to a .babylon file. Objects not where expected.

Recommended Posts

I'm not sure if this should be posted in  https://forum.babylonjs.com/ or  https://www.html5gamedevs.com/ so I'm posting on both.
I have seen several posts and solutions to similar questions with the blender to babylon exporter (exporter V6.2.0, blender version 2.8)
I've exported many animations from 3DS Max, but I'm fairly new to blender.
I'm studying the Action editor, but obviously I'm not understanding something very fundamental.
Basically, the issue is that the position of objects is different between the animation in blender and the .babylon
I've read that you need to check "Only  Currently Assigned Actions" or put a hyphen in the Action name.
Autolaunch animations for each object.
Apply transforms to each object. Set the location to where the object should be rotated about.
Parent the objects to each other. Don't parent empties because you can set an empty to "Auto launch animations"
All these things have helped tremendously. I'm still missing or not understanding something though. I've done my homework, but haven't figured it out. Any help would be greatly appreciated.
Here is the playground link showing the issue.
Here is a link to the .blend and .babylon files in dropbox
In the world tab, Only Currently Assigned Actions is checked.
Applied rotation and scale of parts. I set the location to where I want the part to rotate about.
I select the redCube (Axis 1). Frame 10 I insert a LRS key.  redCubeAction is created in the action editor
Scrub to frame 40. rotate the redCube by -45 degrees on the x axis. and insert another key.
The animation runs in blender and the .babylon as expected. All is good so far.
I didn't bake the animation. It doesn't seem to make a difference.
I select the blue cube (axis3) which is parented to the redCube. Click on New in the action editor. "Action" is created. I scrub to 50 and make  a LRS key with blueCube selected. I scrub to 80, rotate blueCube along the X axis by +45 degrees and make another key. The robot is kind of squat there. The blueCube is at the end of the Red cube as a good robot should be.
I play the animation in Blender and it runs as expected, but in the .babylon file, the blueCube is raised up a bit. 
Does anyone know why this happens and what I can do to prevent it?


robotBlenderForForum.blend robotAnimation.babylon

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.

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...