-
Notifications
You must be signed in to change notification settings - Fork 2
Unity‐Chan Map Model (oBody) Tutorial
This tutorial assumes that you've done at least the costume creation tutorial.
The other tutorials in the series are recommended, but not required. Note that screenshots shown here will include the tail added in this tutorial.
Previously in the costume tutorial, we defined a uBody, which is the model used for a costume in close-ups.

This tutorial will cover how to make an oBody, which is the model type used on the battle map.
oBody models are lower-detailed versions of the costumes - they have less geometry and lower resolution textures, since they won't really be seen up close.
By the end of this section, we'll have something that looks like this in Blender.
We will be making some destructive changes to the costume, so you should make a copy of the project.
Go to File -> Save as and name the new Blender file something like unity chan obody.
Make sure you're in Object mode, and select the Hoodie.
Go to the modifier tab, and add the modifier called Decimate
Use / to focus on the Hoodie, press and hold Z, and select and release on wireframe mode.
Now, try lowering the Ratio for the Decimate modifier. Scroll down a bit so you can see the Face Count at the bottom of the modifier.
Notice how lower the number, the fewer edges there are in the wireframe.
Press and hold Z, and switch back to Material Preview.
We will try to find the lowest face count that doesn't break the shape of the Hoodie.
For example, 0 is clearly too low.
For me, I decided on around 0.0345. Face count is 580 - a considerable reduction from 9000.
Note that the zipper is slightly detached from the Hoodie now. This will likely not be visible at normal map distances, so it's fine to leave it.
oBodies use a different shader than uBodies. So, let's rename the materials so they won't collide in Unity.
Going to the material tab,
Rename the Hoodie and HoodieZip materials to have an _oBody ending.
For MtSkin, rename it to MtoSkin. This ensures that skin color can be set correctly for different characters. (Technically, any name that starts with MtoSkin will do. For those with Ghidra and are curious, check 7101fbd60c and 7101fbbf7c for the details.)
Now, we will continue decimating the other parts of the costume, and renaming their materials.
Also, we can delete ShadowMesh as oBodies don't need that.

You can also delete the Shorts since oBodies are never viewed from a low angle.
After adding the Decimate modifier and tweaking their values, I got something like this.
If you named your objects the same and kept the same meshes as I did throughout the tutorial series, you can refer to this settings for Decimate on each mesh object. Feel free to choose your own values.
Arm Wrap: 0.05
Bootes: 0.05
Choker: 0.1
Hoodie: 0.0345
Leg Brace: 0.01
Shirt: 0.05
Stockings: 0.05
Straps: 0.02
Tale: 0.02
uBody_Base0AF_c000_Skin: 0.15
Note that you do not need to apply these modifiers for their effect to applied to the export. Keeping them un-applied will also allow you to tweak their settings later if you aren't happy.
You can export with our usual settings, but be careful not to override your uBody.
It's important that you name it with something ending in obody so the template's import settings automatically apply some settings needed for Engage to use it as an oBody model.
I named mine unity_chan_costume_obody.
If you look at the file size for the custom in your operating system's explorer, you might see that the new model is much smaller in size.
(Note that the game's artists usually do a better job of making the model even smaller, but we're just automating the process in Blender.)
By the end of this section, you'll have something like this in Unity.
Now, drag your new model into the Sample Scene.
Move it to side a bit by dragging on the arrows, so it doesn't overlap with anything else in your scene. If you don't see the arrows when unity_chan_costume_obody is selected, double check you have the Move Tool chosen in the top bar.
Now is a good chance to check that you renamed all of your oBody materials. If you did, the model should look grey. If you missed a material and something is in color, go back and rename it as needed.
Now is also a chance to check if there's an Animator component attached to this object.
If you don't, make sure you export the model from Blender with a filename ending in oBody, and re-import the model.
Note that if you check on the uBody version of this costume (which you worked on earlier), you will notice that it doesn't have an animator. That is expected - the uBody doesn't need an animator, but the oBody does.
Let's continue by creating a set of textures for our oBody. They do not need to be the same resolution as our uBody textures since they will never be seen up close. We can base them off our existing textures.
First, locate your Textures folder in the Project tab.
With it selected, choose Edit -> Duplicate.
You should end up with a new folder called Textures 1.
Rename it to Textures oBody by pressing Enter and typing a new name.
With the folder selected, choose Edit -> Select All.
With that, all textures should be selected. Depending on how many textures are in your project, it might not be exactly 21, but you will see (Number) Texture 2Ds Import Settings in the Inspector.
Scroll down until you see this section in the inspector.
For Max Size, choose 128, then click Apply.
You will see some loading, and then the textures will be lower resolution now.
Let's start with the Arm Wrap for the oBody.
Select the Arm Wrap, and scroll down to show the Material settings.
oBody materials should use the CharaBmap shader.
Note that you can use the little slider in the bottom right in the folder view to change between list and icon mode. Choose the mode you prefer.
Now, you can drag-and-drop your oBody textures from the oBody folder into this material. Note that there is no normal map for the CharaBmap shader. Make sure to to set the Color to FFFFFF.
Continue doing the same for all the other materials.
For MtoSkin, set the color to FFFCC9 to match Engage defaults.
You should end up with something like this now.
Unlike the uBodies, oBodies do not need the Update When Offscreen option checked.
If you've done the Spring Bones tutorial, you can also apply the spring bones the same way to the oBody, as many map models also have physics.
Open up the Share folder and its children, and make the folders needed to have this path:
Assets/Share/Addressables/Unit/Model/oBody/Unity0AF/c000/Prefabs
Drag-and-drop your oBody into this folder.
Then mark it addressable. Its name should be oBody_Unity0AF_c000, and the Addressable path should be Unit/Model/oBody/Unity0AF/c000/Prefabs/oBody_Unity0AF_c000.
As a minor cleanup, if you moved your oBody in the Scene View before dragging it to make a prefab, it inherited any position or rotation.
Double-click on the new prefab you made, and select the root.
In my case, the positions were not zeroed out.
Click on the three dots, and choose reset.
You will see the prefab move to the origin.
If you don't do this, you will end up with a funny map model that isn't centered on a tile. (Don't ask me how I know...)
How I know

Build your project with the usual Divine Dragon build steps.
For the AssetTable.xml, we need to add a line that tells the game to use this oBody costume on the map.
Copy and paste this line under your current UnityChan costume line.
<Param Out="" PresetName="" Mode="1" Conditions="AID_UnityChanSunnySideUp;女装;!チキ;!竜化;" BodyModel="oBody_Unity0AF_c000" DressModel="" MaskColor100R="0" MaskColor100G="0" MaskColor100B="0" MaskColor075R="0" MaskColor075G="0" MaskColor075B="0" MaskColor050R="0" MaskColor050G="0" MaskColor050B="0" MaskColor025R="0" MaskColor025G="0" MaskColor025B="0" HeadModel="" HairModel="" HairR="0" HairG="0" HairB="0" GradR="0" GradG="0" GradB="0" SkinR="0" SkinG="0" SkinB="0" ToonR="0" ToonG="0" ToonB="0" RideModel="" RideDressModel="" LeftHand="" RightHand="" Trail="" Magic="" Acc1.Locator="" Acc1.Model="" Acc2.Locator="" Acc2.Model="" Acc3.Locator="" Acc3.Model="" Acc4.Locator="" Acc4.Model="" Acc5.Locator="" Acc5.Model="" Acc6.Locator="" Acc6.Model="" Acc7.Locator="" Acc7.Model="" Acc8.Locator="" Acc8.Model="" BodyAnim="" InfoAnim="" TalkAnim="" DemoAnim="" HubAnim="" ScaleAll="0" ScaleHead="0" ScaleNeck="0" ScaleTorso="0" ScaleShoulders="0" ScaleArms="0" ScaleHands="0" ScaleLegs="0" ScaleFeet="0" VolumeArms="0" VolumeLegs="0" VolumeBust="0" VolumeAbdomen="0" VolumeTorso="0" VolumeScaleArms="0" VolumeScaleLegs="0" MapScaleAll="0" MapScaleHead="0" MapScaleWing="0" Voice="" FootStep="Human_M" Material="" Comment="Unity-chan tutorial costume" />
Mode="1" signifies this is a map model, and BodyModel="oBody_Unity0AF_c000" points to the oBody we just created.
The conditions remain the same.
Save your changes.
If you have female Alear, equip the costume on her, and also equip it on another female character of your choice.
And load up for a test!
The costume looks good on Etie, but if you have Alear as one of her personal classes you will probably be thinking, what's up with Alear being "bald"?
In her default classes, her hair is provided by her oBody, but our costume overrides that.
Thus, Alear's hair needs to be set by giving her a HeadModel of either oHair_h051 (her default hair) or oHair_h051h (ponytail).
You can do so by adding this XML line. For this example, I chose to give her a ponytail.
<Param Out="" PresetName="" Mode="1" Conditions="MPID_Lueur;AID_UnityChanSunnySideUp;女装;!チキ;!竜化;" BodyModel="oBody_Unity0AF_c000" DressModel="" MaskColor100R="0" MaskColor100G="0" MaskColor100B="0" MaskColor075R="0" MaskColor075G="0" MaskColor075B="0" MaskColor050R="0" MaskColor050G="0" MaskColor050B="0" MaskColor025R="0" MaskColor025G="0" MaskColor025B="0" HeadModel="oHair_h051h" HairModel="" HairR="0" HairG="0" HairB="0" GradR="0" GradG="0" GradB="0" SkinR="0" SkinG="0" SkinB="0" ToonR="0" ToonG="0" ToonB="0" RideModel="" RideDressModel="" LeftHand="" RightHand="" Trail="" Magic="" Acc1.Locator="" Acc1.Model="" Acc2.Locator="" Acc2.Model="" Acc3.Locator="" Acc3.Model="" Acc4.Locator="" Acc4.Model="" Acc5.Locator="" Acc5.Model="" Acc6.Locator="" Acc6.Model="" Acc7.Locator="" Acc7.Model="" Acc8.Locator="" Acc8.Model="" BodyAnim="" InfoAnim="" TalkAnim="" DemoAnim="" HubAnim="" ScaleAll="0" ScaleHead="0" ScaleNeck="0" ScaleTorso="0" ScaleShoulders="0" ScaleArms="0" ScaleHands="0" ScaleLegs="0" ScaleFeet="0" VolumeArms="0" VolumeLegs="0" VolumeBust="0" VolumeAbdomen="0" VolumeTorso="0" VolumeScaleArms="0" VolumeScaleLegs="0" MapScaleAll="0" MapScaleHead="0" MapScaleWing="0" Voice="" FootStep="Human_M" Material="" Comment="Unity-chan tutorial costume, for Alear" />
After a reload,
Alear is no longer bald!
If you find the Unity-chan costume to be a bit too bright whiteon the map, you can turn down the Hoodie and Arm Wrap Material albedo to be a more grey color.
Editing the prefab directly, I set E6E6E6.
And back in game:
You now have an oBody!
This is the end of the Map Model (oBody) tutorial.
For the curious:
How much can you decimate your oBody model and still have it look OK on the map?
While we reused the bones from the uBody, in reality oBodies have far fewer bones. Can you remake the oBody using the right boneset?
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