Last saturday we gave our Bolibompa-dragon a new outfit. It was delivered in a dragon-egg (try out the app and find out what that is) and it was a bathing outfit with mask and snorkel and some other parts.
Our process of making clothes is quite complex and involves several steps.
- Designing a 2d reference image, e.g. how do we like our snorkel to look like.
- Making a 3d model – a mesh – with a 3d modelling program.
- UV unwrap it (In order to attach a texture to it)
- Attach it to the dragons rig.
- Weight-painting (Define how different bones in the rig affect parts of the mesh… e.g. the feet bones should not affect the head movement….)
- Make sure that it works together with all the dragon animations. E.g. When the dragon in one of the animations moves the arms, the clothes most follow that movement without bleeding.
- Import the clothes to Unity and see how it looks.
For step 2 and 3 we used used Blender. That’s an open source 3d modelling program.
Let’s take a deeper look at the first steps:
The image shows the software Blender opened with our dragon and in the process of creating the mask and snorkel. The pink 2d image shows the reference image created in step 1.
A big challenge when creating the model is to give it enough details but keeping the number of vertices down. We are always aiming at support low end devices and hence can not have too complex 3d models. But this is also in line of the chosen graphical design.
Step 3, the UV unwrapping is about applying a 2d texture to the 3d model by mapping the 3d model to a 2d plane:
In uv unwrapping you define ”seems” in the 3d model. The seems defines how the 3d model is flatten onto a 2d plane.
In the uv map you can scale up parts to be more detailed, and you can also group the parts. E.g the mask’s front is at the top in the uv map. Behing the uv map we see the texture that we used… The mask and snorkel is mostly pink but some parts are grey.
For step 4 and 5 we use another 3d program called Maya. (The reason for this is that the 3d model of the dragon was initially done together with belonging animations in that program.)
I won’t go into details for these step but the clothes must be attached to the rig (skeleton) for the dragon. It’s also important to define how the different bones in the rig affect the clothes.The image shows the dragon in an animation:
In step 6, it’s important to make sure that the all the animations look good with the clothes. One basic thing is that the clothes must be of certain thickness because otherwise the dragon will bleed through (you see the body of the dragon instead of the t-shirt) when the dragon is breathing…
Finally last step 7, import model into Unity and we got a dragon with a bathing outfit:
Keep looking for new dragon eggs with other clothes!