Jump to content

Blender Export for BJS Morph Targets/Skeletal Animation and General Help Request


lagauche
 Share

Recommended Posts

Hi All,

Asking these questions now could save me weeks of trial and error. Any advice would be much appreciated.

Essentially, I am creating a humanoid dancer whose animations I will need realtime control over, at least in terms of sequencing them. I'm using Blender to create the humanoid, but the animation part can either be done in Blender or directly in BJS.

I've already started going through the forum to learn what works and does not work with Blender exporting so I will try to not ask too many questions that already have answers (I might fail at this).

Here are questions that I think will help guide me to make smart choices:

* I think it's important to note that I only need to import my mesh (and potentially the armature/animation, if I go that route). I do not need to import any textures, cameras, lights or environment.

The Morph Target Option

1. If I use BJS Morph Targets should I export my humanoid mesh in various positions so that I end up with say 8 OBJ or Babylon files for import?

2. If I use Morph Targets is there any benefit to using the Babylon export format over using OBJ, glTF or any other format?

3. Hopefully I can pose my mesh with rigify armature and then delete it so that I'm not unnecessarily importing the armature as well since I'm just doing Morph Targets with this option, but if anyone has experience with this, any advice would be much appreciated?

The armature (with Rigify) Option

4. Are there any new features with BJS 3.0/3.1 I should know about (that aren't documented fully yet) if I go the skeletal armature route?

5. Is the Babylon export format the best way to import my mesh with armature?

Last two questions (and thanks for bearing with me)

6. The Blender Babylon exporter gives an error when I don't have a camera in my Blender scene. Is there any reason I need to include a camera? I'm planning on setting that up in BJS of course.

7. I've done some preliminary tests on exporting just my mesh (it has multiple sub objects, but no armature) from Blender with the Babylon exporter and sometimes I see a series of errors. Picture attached. If anyone has experience and is familiar with these errors any words of wisdom would be appreciated. I will work on trying to make (if possible for my needs) my total mesh just one mesh instead of having multiple parts to simplify my tests.

I realize I'm asking a lot here so please feel free to respond to 1 or more questions or none, if you are busy : )

 

Blender Export Error.jpg

Link to comment
Share on other sites

Morph:

1. No, use shapekeys & one export.

2. Using .babylon exporter, exports shapekeys as morph targets.  Do not know what other formats do with shapekeys, nor what the loader does for those formats.

3. Doubt you can use morph to replace skeleton poses.  Also morph target copy an entire set of vertices.  Can be very big file.

Link to comment
Share on other sites

Hey @JCPalmer

Thank you! This all super super helpful.

Regarding 3. Are you suggesting I pose my mesh with the skeleton and then export the shapekeys with the skeleton still there, since you mentioned I might not be able to do one without the other? (I have to get the humanoid into position with the skeleton as the first step no matter what I assume.)

File size doesn't matter since this is for a performative art installation so I will run everything locally! It can be gigabytes - doesn't matter : )

 

Link to comment
Share on other sites

Hello,

#5. Babylon export with Armature?

Just surfacing from a deep dive on that last week... here are the few things to know.

To your question, yes The .babylon exporter ver 5.4.2 -> is awesome. 

https://github.com/BabylonJS/Exporters/tree/master/Blender

But you will need to understand it works -> as a subset <- of all blender capabilities.

So reasonably -> it is a trial and error approach to determine what the exporters can do. Please post your successes as methodology to follow.

There are others export options:

glTF -> it is also very cool (especially the binary JSON compression!!! .gltf && .glb)

- but perhaps maturing (not sure yet).

 

Third is the really cool concept of exporting blender to .ts! Tower of Babel. 

Deep dive is here: https://github.com/BabylonJS/Extensions/tree/master/QueuedInterpolation/Blender

 

For armature animation -> I chose .blender for the time being, as it seems well done(mature). 

1) But you should be aware of BLENDERFIXES.

BLENDERFIX: Often we need to adjust methodology in blender -> so that the data is good for babylon import.

2) EXAMPLE:

APPLY RTS: ROTATION, Translation, and SCALE -> or else your animations will spaghettify!

The best blend-recipe I've found is this:

Object Mode, Select all Meshes (and armatures), Ctrl + A -> Apply RTS... (not easy to remember always).

3) It helps to use the SkeletonViewer to view bones...

and also there is now a helpful message in Blender export where .babylon will cancel export instead of sending out spaghetti. : )

If you get the ... 'this will never work on this mesh' message, use the recipe above. :) 

Thx to adam and JCP...

Also interested in Morph Targets. Thx. +1.

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