Animating a child mesh from Blender to BJS

Recommended Posts

Yo party dudes

Here I am, still at this damn project, still struggling with everyday issues (yo).

Latest in a long list of probably-easy-but-hard-for-me questions is regarding animation. To set the scene (arf!), lets assume I have a Blender file with an empty parent object. Inside are two child objects; helicopter_body, and helicopter_props. What I'd like to do is, in Blender, animate the _props object so it looks like the chopper blades are spinning. Then in BJS animate the parent and children.

Okay so once I have a simple prop rotation animation set in the dope sheet, if I export the scene and load in to BJS, what I see is that the position of the props is all kinds of wrong and the animation itself isn't working like I can see in Blender.

Q1: Is this possible? Can I have a parent object animated with BJS with one of the children running a Blender animation independently? If so, what could be going wrong? I tried applying position and rotation/scale but that didn't change much.

Q2: Also are there any obvious issues if I were to create a scene in C4D with animations (how's that exporter going btw?), export to FBX including animations, load the fbx in to blender then export to BJS? I can see in this page that you're saying every single animated object should be produced as a seperate babylon file.
Q3: why is that?
Q4: And would that mean I have to use several sceneloader.append calls to bring all the different models in to the base scene?



Edited by Snouto
added blender video

Share this post

Link to post
Share on other sites


q1: Yes it is possible.  A lot can go wrong and we need here a repro in the playground. Here is an example where I rotate the parent while the child has its own animation:

q2: cinema4D will be started after we finish exportation / importation in Maya. That being said, the way you describe should work. No need to separate animation into multiple files. There must be a misunderstanding here. You can have multiple objects each with its own animation in blender and export that to babylon file

Share this post

Link to post
Share on other sites

Okay so this is slightly off the original topic, but here's a very simple animation test. It was created in C4D, exported to FBX, imported in to Blender, then exported to BJS. In blender the animation appeared fine, but once in BJS it went sideways.

Here's the video of the scene in blender - you can see visually how the animation should behave. It's just two objects, each with a baked animation.


Here's a PG using the exported BJS file. Notice how it just aint right, yo.

It appears as though the keyframe animation of the cube trumps that of the sphere, to the extent that even if you comment out the animation of the cube in the PG code, the movement of the sphere mimics that of the cube's animation, which is clearly wrong.

I get the feeling this either isn't possible, or I'm doing something wildly incorrect here. Happy to hear your thoughts!




Share this post

Link to post
Share on other sites

Okay, never mind, regarding the previous post it was being caused by the animation export options not being checked. I found this post 

 by @JCPalmer which led me to try checking those new animation options, and wouldn't you just know it it worked instantly after that. JCP - you're alright with me. Good lad. 👍

So for the time being, at least I know I can do the C4D -> BJS route with animations kept intact. Yet even when setting the camera export options as I've just described in my original Helicopter scene, it still doesn't work properly. I must be doing something wrong in Blender, so I'll put this issue on hold until I'm working with a proper scene and if the problem arises again I'll necro the thread. 

Thanks again everyone.

Share this post

Link to post
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.