Snouto Posted May 31, 2018 Share Posted May 31, 2018 (edited) 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 http://doc.babylonjs.com/resources/blender#animation 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? Cheers! blend_anim.mov Edited May 31, 2018 by Snouto added blender video Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted May 31, 2018 Share Posted May 31, 2018 I haven't the answer, but at least your animation case will be later added to the doc [edit] And in the zip archive from the doc', you have an example about how to load the master static scene and then the animated one. Snouto 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted May 31, 2018 Share Posted May 31, 2018 Hello! 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: https://www.babylonjs-playground.com/#C70EQC 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 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted May 31, 2018 Share Posted May 31, 2018 (OK, so for the doc' I have to see further in the process, to know how to access and control differents animations on differents meshes with different lengths) GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted May 31, 2018 Share Posted May 31, 2018 FYI, For a Blender animation: position, rotation, & scale are saved. If you only want rotation, you can manually edit out position & scale in the .babylon. This is probably the problem. Quote Link to comment Share on other sites More sharing options...
Snouto Posted May 31, 2018 Author Share Posted May 31, 2018 Thanks for the replies chaps, I'll have a look at your suggestions and come back with any further questions. @JCPalmer thanks for the tip, seems a bit... steampunk.... but I'll defo take a look at that Quote Link to comment Share on other sites More sharing options...
Snouto Posted June 1, 2018 Author Share Posted June 1, 2018 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. blender.mov Here's a PG using the exported BJS file. Notice how it just aint right, yo. https://www.babylonjs-playground.com/#02YH29 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! Cheers test.blend Quote Link to comment Share on other sites More sharing options...
Snouto Posted June 1, 2018 Author Share Posted June 1, 2018 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. JCPalmer 1 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted June 1, 2018 Share Posted June 1, 2018 As soon as I found time for that, I will try to make a scene example with helipcoter-blade-type animation (aka animating a child object). GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.