Jump to content

Unneeded merging of animations from Blender


alexoy
 Share

Recommended Posts

Hi,

I try for a long time to create animations in Blender. In my case I have multiple meshes in one scene which mush have different independent animations. Bad result I get - both meshes share the same location/rotation/scale of their animations.

PG demo: https://playground.babylonjs.com/#1EZI56

You can see that both meshes move and rotate together, like it is one mesh. However in Blender I try to make them independent, and inside Blender they really move like independent meshes - green box only rotates and red torus only moves. But when imported in BJS - they start to share position and rotation. I attach my .blend file here. I tried applying standard animations, tried Dope Sheet -> Action Editor to create different actions, but the same result.

Is it possible to create different independent animations for different meshes in one scene? If yes - could you guide me step by step?

 

Thanks!

demo.blend

Link to comment
Share on other sites

Hi Alexoy!  Umm... I have no solutions, but I did some tests (I'm not experienced in Blender or its exporter-to-BJS).

https://playground.babylonjs.com/#1EZI56#1

I started by gathering your BabylonJS import data and pasted it to http://jsonviewer.stack.hu/

That allows me to put the JSON data into a drill-able tree, where I can see/tour it better.

After I did that, I could easily see that the Torus and the Cube EACH have 3 animations installed... one for position, one for rotation, and one for scale.

View the JS console for the above PG.  In lines 39-72, I display the .animations array for both items, and then I hack their .animation arrays to remove the unwanted animations.

But, mesh.animations array is just a storage tank for animation objects.  Just because I removed the unwanted 4 animations (2 from cube animation tank, and 2 from torus anim tank)... that doesn't mean they stop animating.  :)  So, it was a worthless attempt.  Besides, we don't want to 'delete' the 2 extra animations on each mesh.  We want them NOT INCLUDED when the export from Blender happens, right?

Ok, that's all the info I have so far.  Something in Blender, or something in the exporter... is not doing what you wish.  Too many animations are being installed on each mesh.

Let's hope others have solutions.  @JCPalmer is one of the big dogs of the exporter system, so I'll invite him to comment, if he wishes.  Another super-cool forum user and Blender fan is @V!nc3r.  He/She is spearheading a "Better Blender Exporting docs" campaign/project:  http://www.html5gamedevs.com/topic/36596-blender-exporter-doc-needs-feedback/

Let's hope for more/better comments/ideas.  Stay tuned.

Link to comment
Share on other sites

@babbleon, amazing, it works! How did you know? :) have I missed it somewhere in docs?

Is it Blender or BJS-exporter specific? If the second - just to clarify, is it correct, that BJS-exporter takes exactly for an action name, splits it by "-" (lets take we get actionNameArray), searches for a mesh with the name actionNameArray[0] and inserts this animation to the according mesh? Without mesh found animation will be common?!

Link to comment
Share on other sites

I am just very, very talented! ;)

Nah, I had this problem before and really struggled with it myself.

I probably found it here though I think it's mentioned elsewhere: 

I suspect this is Blender exporter specific, but I don't know this for a fact... so better to ask @JCPalmer.

Pleased it helped you, it does need to be in the docs, but I think this has been noted for adding here.

 

 

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