-
Notifications
You must be signed in to change notification settings - Fork 2
Unity‐chan Spring Bones Tutorial
We recommend following this tutorial after the Costume tutorial.
At the end of this tutorial, you will have a tail for the Unity-chan costume that moves around like this.
Required:
Blender Unity
Recall how we had some animations to test the Unity-chan model with in the costume tutorial. Animations like running and attacking are animations driving by keyframes on a timeline.
In the game, there is another type of animation that is physics-based. Things like hair and parts of clothes move and sway in the wind, and also react to character movement. Unlike the running animations for example, there aren't any keyframes associated with these physics. These types of simulations are driven by spring bones.
Spring bones exist as an interaction of two parts - bones like we saw in Blender previously, and a Unity component.
The bones and weight painting define which parts should be influenced by the physics, and the components provide instructions to the game on how they should move.
We'll be starting in Unity first. Using the Dumper (guide to come), dump Merrin's uBody into your project. The full path is:
Data/StreamingAssets/aa/Switch/fe_assets_unit/model/ubody/cav2cf/c452/prefabs/ubody_cav2cf_c452.bundle
Once her model is dumped, you should be able to find it here:
With your Sample Scene open, drag-and-drop Merrin's uBody prefab into the scene like this, then use the eye button to hide any other models in the scene.
Then, press the Play button in the middle of the top bar.
After a bit of loading, the Editor will jump to the Game tab.
Click on the Scene tab again to jump back to looking at Merrin's uBody.
You should see something like this. Notice how the tail is swaying and so is the cravat (or whatever the white ruffled cloth on her chest is called).
merrin.example.mov
Stop the playing by clicking play button again.
Now, open Merrin's uBody prefab by clicking on it in the Hierarchy, the clicking Prefab Open in the Inspector.
You should see a focused view like this now:
The list of items under c_trans are the bones that you saw in the animation section of the costume tutorial.
Find the object called c_mngtal_jnt and click on it. (This object would show up as a bone in Blender.)
Notice how a Spring Job Manager component shows up in the Inspector panel. If you scroll around in it, you can see some settings.
Now try selecting a few of the objects below c_mngtal_jnt one by one.
For example here is c_sprtal1_jnt selected.
and c_sprtal2_jnt selected.
And in the side panel, we see a component called Spring Bone.
It also has a lot settings that you can scroll to check out a bit.
The Spring Job Manager and Spring Bones work together to describe how the objects should be animated.
We'll be copying over the bones and the physics for the tail onto the Unity-chan costume.
We will export this model for use in Blender so we can borrow the bones.
While still in this focused Prefab mode, right click on the root object (uBody_Cav2CF_c452), and choose Export to FBX...
You should see a window like this pop up.
If you don't see the Apply Sommie's Recommended Defaults button, make sure to install the new version of the FBX exporter by doing (this).
If you see Apply Sommie's Recommended Defaults and it isn't greyed out, click it.
You can leave everything set at the defaults, and click Export.
With the uBody_Cav2CF_c452 still selected, go to UTJ -> Spring Bone Window.
You should see something like this:
Under Dynamics CSV, click the Save button.
You should see a window pop up that looks like this:
Click Mass Save Prefab CSVs. This should open a window in your Unity project.
You can make a New Folder called Merrin Physics, and save inside of there.
On the bottom bar, you should see a message saving that the file was saved.
If you look at the folder, you'll see a few CSV files were created there.
If you open it in a spreadsheet editor, c_mngtal_jnt_Dynamics.csv might look something like this
We will use this later to copy settings onto our Unity-chan tail.
We will borrow Merin's tail physics for Unity.
Use dumper to dump Merin
Use export FBX to get an FBX of merin.
Import into Blender
Cut off the bones to transfer onto base engage body.
weight transfer the tail
export CSV from merin
import back onto unity chan
test in game
shadowmesh
setting up our own bones for the ribbon pieces
remarks on oBody: spring bones also work on obody.
Lythos, the Engage modding Wiki • Resources • Getting Started • Cobalt Wiki * Discord Server
Getting Started
Modding guides
- Game data
- Models and Unity
- Animations
- Audio
-
Maps
- Dumping Vanilla Maps
- Playable Area
- MapSetting
-
Terrain
- Terrainpaint
- Props
- CameraSet
- Exporting
-
LightSet
- Lightmaps & Environmental Lighting
- PostProcessSet
- Post-Battle Exploration
- HubRoot
- HubCollision
Documentation