Blender, characters and the Y-up axis ...?

Lately I’ve been toying around with the idea of getting my personal projects over to Blender for animation again.

Blender of course has a z-up coordinate system so models are rotated on import or have an added null as corractional transform. Mostly I’ve seen the method with the correctional null or a simple rotate geometry in Blender itself (if possible).

I’m asking mostly character specific. For any static geometry I would not have problems with a rotation correction. It doesn’t feel right but with static geometry … sure. Fine. What about characters and things like root motion, though?

So with all the current animation systems in Mecanim in place - how good does this still hold up?
Does anyone here have experience they can share on how good this system works, especially later in production?
Are there problems that you run into with Unity that make things difficult or problematic with Blender’s FBX export on skinned characters specifically?

Or if you are super successful with it - how many problems did you have to figure out before everything went smooth?

When I export fbx files from Blender, I chose “Z forward” (instead of -Zforward), and make sure Y is up. Then everything works out, and I don’t have to flip or fix anything. I don’t animate in Blender, but I do export rigged models for use in UMA, and it works fine.

1 Like

Thanks :slight_smile:
I’ve started working through Nathan Vegdahl’s Humane Rigging course over the last few days. Let’s see how it goes. :smile:

I’m doing animation-heavy projects completely in Blender.

I haven’t run into any problems with Z-up vs. Y-up so far. Skinned meshes are imported into Unity with the correct orientation and animations are working fine. The local bone axes are often pretty random, but so long as animations play, ¯_(ツ)_/¯

I’m not using root motion (and the model preview does show the model on its side when in the inspector, animation tab, motion group I assign my model’s root bone to the “Root Motion Node,” but I don’t know if this is a blocker).

Exporting by hand got tedious really fast. Especially if I wanted to export only some objects in the scene (like, not all the WGT_XXX meshes from Rigify) and had to select them one-by-one each time to use the ‘Selected Objects Only’ option. So I wrote a Python script (actor-export.py) that exports only the objects I want with the correct settings every time. I run it via a shell script:

#!/bin/sh

if [ ./.Models/Spotlight.blend -nt ./Spotlight.fbx ]
then
  blender \
    ./.Models/Spotlight.blend \
    --python ../../../../Blender/actor-export.py \
    --background \
    -- \
    ./Spotlight.fbx \
    Mounting \
    Case \
    Shades
fi

To manage animations, I used Blender’s library linking feature. Like, I have “Character.blend” and “ClimbingAnimations.bkend”, “FightingAnimations.blend” etc. linking to that file without duplicating the meshes/rigs. Also very useful to created paired animations (i.e. “Character.blend” + “Horse.blend” linked into “RidingAnimations.blend”).

Exporting animations with linked+proxied armatures kept breaking across different Blender versions, so I wrote a script that fixes it once and for all: its opens the original “Character.blend,” appends (in memory) all animations from the animation .blend file, creats a dummy mesh to export, then exports only the dummy mesh + animations, finally closes without saving (animation-export.py) :slight_smile:

#!/bin/sh

if [ ./.Models/RidingAnimations.blend -nt ./RidingAnimations.Character.fbx ]
then
  blender \
    ../../Actors/Character/.Models/Character.Rigify.blend \
    --background \
    --enable-autoexec \
    --python ../../../Blender/animation-export.py \
    -- \
    ./.Models/RidingAnimations.blend \
    *-Character \
    ./RidingAnimations.Character.fbx
fi

With the scripts in place, I’m very happy with the Blender workflow. The edit-export-test cycle is extremely fast (since I only export/import the 5 or so animations in an animation library).

1 Like