Blender is an open-source 3D modeling and animating platform. It is versatile and easy to use. We will be using Blender to import and create animated clothing for our character. You can also use Blender to export your character into pretty much any game engine, specifically Unity.
If you don’t already have Blender, let’s download it by going to the Blender website. Blender can be used for rigging, modeling and animating your character and other objects. The Blender interface can be intimidating at first glance, but once you understand it you can unleash the power of its many tools for developers.
Go ahead and open Blender. The standard layout is five windows, like the example above. We need to change from Blender Render to Blender Cycles. On the top bar to the right, you will see a tab where you can change your current view to Cycles.
Importing Your Character
Along with modeling your character from scratch, Blender allows you to import different types of file extensions. We used MakeHuman to create a ready-made character. You can learn more about MakeHuman in my previous tutorial. Go to File > Import, and then choose your character’s file type.
All About the Mesh
Every character or object contains a mesh. This is a universal part of an object which is understood by editing and game platforms. To be exact, a mesh is a collection of vertices, edges, and faces that describe the shape of a 3D object, according to Wikibooks. It is important to note that any object with a large number of vertices will slow down an animation or gameplay. Once you import your character, you can view your vertex count on the top bar.
Editing Our Mesh
There are a couple of different ways to create clothing for your character. For the sake of this tutorial, it is important to save your original character in Blender. After we edit the mesh you cannot change it, so save two files: one with your original character, and the other with your character with clothes—for example, Tom_with_a_Cool_suit, etc.
After importing your character, go into Edit Mode. When you are in Edit Mode, your vertices will appear black. In this mode, you can choose, resize and delete vertices on the mesh. To edit your mesh, you will use the point, line and box editing/vertex mode as highlighted above. You must hold Shift to choose multiple vertices.
To highlight the clothes, we will need to press C in Edit Mode. A circle will appear. You can make the circle larger or smaller by using the wheel on your mouse. To highlight, scroll over the vertices with the left mouse button held down. Be careful with clicking the right mouse button as it will delete your chosen vertices in the circle range. You will be using the right and left mouse buttons to do all of your detailed work around the neck and arms.
A shortcut to choose a large area on both sides of your mesh is to go into Grid View (see the sample below). The allows you to quickly make pants and shirts. Be aware that if you choose a very large area, you might mistakenly choose an unwanted section of the mesh. Therefore double check before you separate the mesh.
Separating the Mesh
Once you have outlined the outfit that you want, we need to separate it from the rest of your character. While your vertices are selected, click P on the screen while in Edit Mode. A box will appear. Choose Separate from Selection. If you look under the Hierarchy, you will see a replica of your body, for example, Chest001. Go to Object Mode and select this new object, and you will see it outlined on your character. Let’s rename it; if it’s a shirt, name it accordingly.
Once you separate the mesh, you can edit it to your liking. By pressing A and selecting all of the vertices, you can change the size and shape by using your toggle keys. In my case, I wanted my character to wear a skirt, so I created a shirt and then used the Line Vertex Mode to drag down the shirt.
Adding a Texture
To make clothes look like clothes, we need to add a realistic texture to them. There are tons of textures you can find online. For example, for leather, search for a leather texture. Then save it in a folder you can access with your character.
In Edit Mode, go to Material in your bottom right window. Make sure that you have selected the piece of clothing you would like edited. Click Add, as in the sample below. Browse for your texture, choose the texture, and rename. Hit Assign.
Adding a Modifier
At times, we would like to change the look of our clothing. For example, we would like a jacket to be thicker than the jeans or a cape to look heavier. We can achieve this by adding a Solidify Modifier. Go to Tools > Add Modifier and choose Solidify Modifier. You can then edit the number. The higher the number, the thicker the material. Try not to go overboard.
Quick Tools & Shortcuts
- Press A to select all.
- Press F12 for a quick render.
- Use the Grid View for faster editing.
Adding animation to your fabric is not as difficult as it sounds. Blender allows you to add a Cloth physic to your objects. Before we begin, we will need to add a pinning group. If we don’t add a pinning group (which holds up the fabric), the cloth will fall straight to the ground.
In Edit Mode, choose the Vertices Point menu as highlighted below. Depending on your clothing, you will need to choose points where you need the fabric to hold up. If you created a cape, choose points where the fabric meets the shoulders. In my skirt sample below, you can see I chose points by the waist.
To create a pinning group, choose multiple points in your fabric by holding select and right-clicking the points. Then go into Vertex Groups, click Add, and name it PinGroup. You will see it added into your Hierarchy.
Go back to Physics, and you will now see pinning underneath the Damping section. Click it and choose PinGroup. Go back to Object Mode and click Play. You will slowly see your fabric move.
Now we will need to do two things. The first is to add a Wind Field, and the second is to add Collision to your character, as you may notice the fabric is probably going through it.
Tip: To make it easier to see, it may be a good idea to make other parts invisible by clicking the Eye in the Hierarchy.
Select your character’s body in the Hierarchy, or by going to Object Mode and clicking the body in the viewport. Go to Physics and choose Collision.
Let’s add a Wind effect. Go to the bottom bar and choose Add > Field > Wind. Move the object in front of your character and hit Play. If you don’t like the wind effect, you can change it in the physics menu under Wind.
The more you use Blender and the tools provided above, the easier it will be. Remember that you can edit any vertex on your character.
Congratulations! You have now created clothing for your character.