Model Setup - LunaCapra/CrewBoom GitHub Wiki
Bones
Certain bones are required to be named in a specific way.
Case matters.
-
The skeleton/root of all bones: This must be named
root
.
In Blender, this is the armature object that looks like this:
-
The left and right hand: These must be named
handl
andhandr
respectively. -
The left and right foot: These must be named
footl
andfootr
respectively. -
The lower left and right leg: Must be called
leg2l
andleg2r
respectively. -
The head: This must be named
head
.
[!WARNING] The editor will not rename bones automatically.
There will however be a warning if any bones are not named correctly.
Blinking/BlendShapes
Using Blender
You can add Blend Shapes (also known as Shape Keys) under the Object Data Tab of your mesh.
You can view this tab by clicking an icon like this:
[!WARNING] Only the first Blend Shape found will be used for blinking.
This will be the Blend Shape after
You can edit the Blend Shape by selecting it (important!), then going into edit mode and adjusting your character to look like they are blinking.
Example:
[!TIP] In the game, the Blend Shape will only ever be fully active or fully disabled.
This allows for creating a face textured with closed eyes and swapping it for the normal face with the Blend Shape.
This method provides more freedom but is more complicated.
[!TIP] If your model looks broken or dark in-game when blinking, enable Legacy Blend Shape Normals under the model tab in Unity and build the character bundle again.
Exporting your model
Using Blender
[!NOTE] If your character has blend shapes, make sure the mesh has no other modifiers in its Modifier Tab (
) other than the Armature Deform modifier.
- Make sure your model has its transforms applied (meaning its scale is a uniform 1, 1, 1).
The default shortcut for this is selecting your entire model, pressingCTRL + A
and selectingAll Transforms
. - Select your skeleton, mesh and everything else you want to include in your model.
- Export your model as an FBX file using the menu under
File > Export > FBX (.fbx)
- Set the export settings to the following (If the settings are not visible initially, click the
icon in the top right of the export window):
- Under "Include", enable only
Selected Objects
under "Limit to" and selectArmature
,Mesh
andOther
for "Object Types"
- Under "Transform", set "Apply Scalings" to
FBX All
, "Forward" toY Forward
and "Up" toZ up
- Under "Armature", make sure to disable
Add Leaf Bones
- Disable "Bake Animation"
You can save these export settings as a preset using the plus icon next to the operator presets dropdown at the top of the settings.
- Under "Include", enable only
Once these settings have been applied you can navigate to the folder your Unity project is in, go to assets and export your model with the Export FBX
button.
Unity Avatar
[!WARNING] The avatar of your model must be set to the type Humanoid and have the associated bones assigned.
You can set this up by selecting your model and navigating to the Rig tab in the inspector.
Make sure to also configure the avatar definition properly with the Configure button.
[!NOTE] The editor will warn you if the avatar is not human.