-
Notifications
You must be signed in to change notification settings - Fork 2
Unity‐chan Costume Tutorial
In this tutorial, we will fit the Unity-Chan! Sunny Side Up model for use on female characters.
By the end of this tutorial, this what we will have in-game as a Cobalt mod.
You will need to have these programs installed.
- Blender, for the 3D modeling portion.
- Robust Weight Transfer, a Blender plugin, for the 3D modeling portion.
- Unity, for the building portion.
- An Engage female base body.
- The Unity Chan costume files.
Open the Engage female base body file by double-clicking on it.
This is what it should look like right after it opens in Blender.
You can move the camera by doing (this).
In the upper right corner, you should see a (box). Click on it to quickly change directions.
Drag-and-drop the unity chan FBX you downloaded into Blender.
You should see a dialog box that looks like this. Click Import FBX.
You will notice that it drops right on top of the base body, but none of the clothing fits very well. We will fit the pieces one at a time.
We will start by hiding all the clothing other than the shirt. To hide an object, click the Eye icon next to the object in the viewer.
Your viewport should look like this now, with only the body and the shirt showing.
The shirt isn't a great fit right now. It's a floating over the base body, and is a bit big.
First, make sure the hoodie is selected by left clicking on it. Now, click the -Y in the upper right corner until you're looking at her straight on.
In Blender, we can move objects by pressing the G key, and then moving the mouse. To remember this, we can think of G as standing for Grab.
Now, press the G key and move it down a bit so it's on the body. Click to confirm the movement. You will notice that it's tricky to move things in a straight line.
Use the Esc key to cancel this movement. If you already clicked the left mouse button, use Control/Command Z to undo this placement. Let's try a better way to move the shirt.
This time, press the G key, followed by the Z key. You will see something like this. If you move the mouse now, the movement will be constrained to the Z axis (up and down). The same feature is available with Y and Z for the corresponding axes.
The scene should look something like this now.
Move the costume down and left click to confirm the placement.
Let's check how well the costume is fitting now. Use the (mouse option) and the (upper right box option) to observe the fit.
While it's in a better position, it seems a bit big right now still.
In Blender, we can scale objects by pressing the S key, and then moving the mouse. To remember this, we can think of S as standing for Scale.
With the shirt still selected, press the S key and move your mouse. You will notice that it is getting smaller, but is also moving in a strange way. That is because the origin point for this object is somewhere down near the ground. Undo your scaling if you applied it.
In the menu, choose (the option for this)(Origin to Geometry). This will move the origin to a more sensible place.
Now try using the S key again, and scale the shirt to fit better. You can also move it with G if you need to.
The shirt should look something like this now. Don't worry that the shirt isn't perfectly covering her torso, because the hoodie covers the rest of the upper body.
Use the eye icon and hide the shirt and show the hoodie and the zipper.
The hoodie isn't a great fit right now. It's a floating over the base body, and is a bit big in certain parts.
Select the hoodie the G key to move the costume into a better place. However, notice that the zipper didn't move along with the costume. This is because they are two separate objects.
Undo the move. We can shift click the two objects to move them together at the same time.
Try this now by first clicking on the Zipper, and then shift clicking on the Hoodie. Now, use the G key to move.
The two objects now move together.
However, since we will be continuing to work with these two objects, we will join them so that they are one object.
To do that, we select the two items and then join them with control-J.
The order we select objects can change the results of certain operations, including join.
To see the difference, we will try joining two ways.
First select Hoodie, then shift click and select Zipper. Notice the colors here: Hoodie is orange, and zipper is yellow and higlighted in blue. Now, press control-J. The objects are joined and only the Zipper object remains.
Now undo the join with control-z. This time, select the Zipper first, and then select the Hoodie. Notice the colors here and how they are different from last time. Join the objects, and you will be left with Hoodie.
We will proceed with this join as calling this object Hoodie makes more sense.
You should end up with something like this.
Adjust Hoodie to be in a better position with G.
Notice that the base body is clipping out a bit in the rear. However, if we try to move the hoodie to fix this, other parts will now clip, so just moving it isn't enough to make it fit better - we will need to edit the shape of the hoodie to better match the base body.
In the upper left corner, there is a button that looks like (this). Object mode is used to manipulate objects as a whole, and edit mode is used to edit the vertices that make up the object.
Make sure that the hoodie is selected, and click on Object Mode, then select Edit mode.
The view will look like this now. If it doesn't, double check that you weren't selecting the base body when switching to object mode.
The same G key we used to move the hoodie can be used to move the hoodie vertices as well.
Select a vertex like this (it doesn't need to be this precise one, any in the area will be OK) and then use G to move it. Notice that now the shape of the hoodie has changed. Click to confirm the movement.
This is a step in the right direction, but there are many vertices and it would take a lot of time to move each one of the individually.
Undo this change for now.
In the upper (bar), there is a tool called (proportional something). Click on it. Now, select the same vertex as before by clicking on it, and move it again with G. Scroll your mouse wheel, and you will see a circle changing sizes. This is the sphere of influence for the proportional something. You can try moving it around to get a feel for it.
Once you find a good place, click to confirm it.
Your costume should look something like this now. Use the camera controls to take a look at our work.
Notice that while we fixed one side of the hoodie, the other side is still sticking out. While we could use the same method we did just above, there is a better way.
Undo this change for now.
The Unity-chan costume was created in a way that is mirrored, meaning the left and right sides are symmetrical with the same vertices, just flipped.
Use (this button) to turn on symmetry.
Now, we can try to fix the clipping again. Click on one on the vertices with proportional editing on, and use the G key.
You will notice that the opposite side moves together now.
Place it in a position like this and confirm it.
The sides here are a little loose.
While we could move a few vertices at a time with the proportional editing tool to get this to fit better, this time we will select multiple vertices to move together.
You can select multiple vertices by drawing a box around a few of vertices. If this doesn't work for you, check that you have the (tool) selected on the left hand side.
With a few vertices selected, use the G key to move the vertices into place like this.
Try to get your hoodie looking something like this.
Now, turn on the shirt again. You may notice that it clips out of the hoodie in some places. To edit the mesh for an object, you must first chose Object mode, then click the piece you want, then click edit mode.
Using the techniques we went over above, get the costume fitting something like this and to your liking.
It should look something like this now.
By the end of this section, we will be able to play an animation with our costume on the character to check how well it is fitting.
First, we need to select the bones for body. Then, click the Data button (it looks like a little green person). Then, choose Pose position.
After this, go and choose Action Editor, and in this dropdown, choose (animation name).
Now, by scrubbing the Timeline in the action editor, we can see the character moving.
And, we will see that the costume is not moving with the body, but is just floating in place.
So, although the body moves, the clothing pieces does not.
A few things are needed before clothing pieces will move with the body.
Here's some explanation about what will be happening next, but you can skip ahead if you just want to get things working.
Click on the Skin object, and then the blue wrench. These are the modifiers. Notice that there is a modifier here Armature. It tells the skin object that it should react to the bones in Object if they move.
Now click on the green triangle with squares. These are the vertex groups. Notice that the if you flip open the bones, you will see the same names as list of names in the vertex group. Click on the skin, then switch to Weight Paint mode. You will see the body turns blue. Now, click on [vertex group name]. Notice how those areas light up in a gradient of colors. These are the vertices that will move with that bone.
If you check the weight painting for the Hoodie or Shirt, you will see that it has none.
These two pieces - the modifier, and the weight paint are both required for our costume to move.
Select the Hoodie and go to the modifier tab, and add the modifier. Do the same for the shirt.
We now have the armatures set up.
We will reuse the weights that the body has.
First, we need to set the body back to Rest pose.
Find the SENT tab and click it, then open Robust Weight Transfer.
For the source, choose skin.
Then, select the Hoodie and click Transfer Weights.
Do the same for the shirt.
Now, select the bones again and choose pose mode.
The costume now moves with the body.
If you go to weight paint mode, you will see that the hoodie now has weight painting as well.
Now,
Introduce the command/control click, cut the pants from the model, try to get it to fit, then weight transfer again.
Unity setup.
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