mandim Posted April 27, 2018 Share Posted April 27, 2018 Hi, I have an issue when using the blender exporter and two animations on two different meshes. In my .blend file I have created 2 animated meshes, 1) a sphere falling on a rectangle mesh and 2) a container ship that rotates around x-axis at 45d. These animations are baked before being exported. When I try to export, for some unexplained reason the scaling of the sphere is changing and becomes the same as the container ship. Moreover, when I drop the .babylon file in the sandbox, the sphere position is changing and is being merged with bottom of the container ship and the animations are somehow combined which is not expected. Could you please explain me what I'm doing wrong? The .blend file: https://www.dropbox.com/s/eqyv03wgmarjrxp/container_ship_sinking.blend?dl=0 The .babylon file: https://www.dropbox.com/s/789lx8gm3v7zrsc/container_ship_sinking.babylon?dl=0 Thank you in advance. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted April 27, 2018 Share Posted April 27, 2018 If you have actions on more than one mesh, you have to indicate when an animation only goes to one mesh / camera / light by putting the name of the object into the name of the, then a dash & the name of the BABYLON.AnimationRange you want, e.g. 'MyMesh-jump'. Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted April 27, 2018 Share Posted April 27, 2018 (edited) I'm not used to animations, but I've started to see how it's handled so as to enhanced create the doc' about the animation topic. However, one rule I think is correct is to export one .babylon file per animated object (on Blender, use a master scene for static environment, and use File > Link to get your references in a dedicated layer into your animation files), because it seems that the animations array exported is applied automatically to all objects inside the .babylon. Notice that I'm not sure about that, so maybe waiting for someone more comfortable with animations could be also a nice idea ? Edited April 27, 2018 by V!nc3r Oops, JCPalmer has answer in the same time :) Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted April 27, 2018 Share Posted April 27, 2018 Yeah, as soon as I posted, I noticed your name in recently in italics. Mouse hovering indicated 'typing'. Never saw that before. As far as having the 'set' with all the static objects in one blend / export & then one blend / export for each character, it is a good idea beyond just animation. It also allows easier editing / file versions, & more importantly eliminates the need to do ImportMesh. Use of ImportMesh clearly shows that you were not thinking ahead. If you need to pick out just one mesh of an export, then you are downloading the geometry for all meshes, which is a waste. You get the list of meshes with ImportMesh, but so what? If you specified only one mesh in the arg, then you already know the name. Just use Append & scene.getMeshByName(). Much better to create your exports so you can use Append. V!nc3r 1 Quote Link to comment Share on other sites More sharing options...
mandim Posted April 28, 2018 Author Share Posted April 28, 2018 Problem solved!! I have isolated the animated objects in 2 different .babylon files and now the animations are correct. Many thanks for your help guys... 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.