Difference between revisions of "Creating a cape using Blender"

From Nexus Mods Wiki
Jump to: navigation, search
m
(Undo revision 733 by Scallywag38 (talk))
 
Line 1: Line 1:
 
==Overview==
 
==Overview==
This tutorial will explain how to easily create a cape in Blender using the Cloth modifier. This technique can be used to create other hanging clothes like curtains, tablecloths, flags, <font style='color:black; background-color:Lime;'>etc</font>.
+
This tutorial will explain how to easily create a cape in Blender using the Cloth modifier. This technique can be used to create other hanging clothes like curtains, tablecloths, flags, etc.
  
This tutorial assumes that you have a basic knowledge of Blender. If that is not the case I recommend you to read and practice with these tutorials [http://en.<font style='color:black; background-color:Lime;'>wikibooks</font>.<font style='color:black; background-color:Lime;'>org</font>/<font style='color:black; background-color:Lime;'><font style='color:black; background-color:Lime;'>wiki</font></font>/<font style='color:black; background-color:Lime;'>Blender_3D</font>:<font style='color:black; background-color:Lime;'>_Noob_to_Pro</font> Blender <font style='color:black; background-color:Lime;'>3D</font>: <font style='color:black; background-color:Lime;'>Noob</font> to Pro]
+
This tutorial assumes that you have a basic knowledge of Blender. If that is not the case I recommend you to read and practice with these tutorials [http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro Blender 3D: Noob to Pro]
  
 
== Required tools ==
 
== Required tools ==
* [http://<font style='color:black; background-color:Lime;'>www</font>.blender.<font style='color:black; background-color:Lime;'>org</font>/ Blender]
+
* [http://www.blender.org/ Blender]
  
 
== Creating a cape ==
 
== Creating a cape ==
Line 19: Line 19:
  
 
=== Add a plane ===
 
=== Add a plane ===
[[File:<font style='color:black; background-color:Lime;'>Cape_1</font>.<font style='color:black; background-color:Lime;'>jpg</font>|right|thumb|Add a plane]]  
+
[[File:Cape_1.jpg|right|thumb|Add a plane]]  
  
 
The first step is to add a plane (option ''Add->Mesh->Plane'') then modify its shape a little making its bottom wider than the top and place it horizontally with respect to the character, adjusting the points where the cape is going to be linked to the body (or to the clothes or neck of the character) as shown in the picture.
 
The first step is to add a plane (option ''Add->Mesh->Plane'') then modify its shape a little making its bottom wider than the top and place it horizontally with respect to the character, adjusting the points where the cape is going to be linked to the body (or to the clothes or neck of the character) as shown in the picture.
  
 
=== Subdivide the plane ===
 
=== Subdivide the plane ===
[[File:<font style='color:black; background-color:Lime;'>Cape_2</font>.<font style='color:black; background-color:Lime;'>jpg</font>|right|thumb|Subdivide the plane]]  
+
[[File:Cape_2.jpg|right|thumb|Subdivide the plane]]  
  
 
Next step is to subdivide the plane several times. You can either use the W key and select the ''Subdivide Multi'' option giving it a high value like 15, or in ''Edit Mode'' select the menu option ''Mesh -> Edges -> Subdivide'' and repeat the process 3 or 4 times.  
 
Next step is to subdivide the plane several times. You can either use the W key and select the ''Subdivide Multi'' option giving it a high value like 15, or in ''Edit Mode'' select the menu option ''Mesh -> Edges -> Subdivide'' and repeat the process 3 or 4 times.  
  
 
'''''Note:'''''
 
'''''Note:'''''
It is important that the cape has several vertices as it will fold and curve along them when applying the animation. So, if you are going to use modifiers that increment the number of vertices, as the <font style='color:black; background-color:Lime;'>Subsurf</font> modifier, it is best to use them before adding the Cloth modifier. Then Blender will take those extra vertices into account when modifying the cloth shape.
+
It is important that the cape has several vertices as it will fold and curve along them when applying the animation. So, if you are going to use modifiers that increment the number of vertices, as the Subsurf modifier, it is best to use them before adding the Cloth modifier. Then Blender will take those extra vertices into account when modifying the cloth shape.
  
 
=== Create a vertex group ===
 
=== Create a vertex group ===
[[File:<font style='color:black; background-color:Lime;'>Cape_3</font>.<font style='color:black; background-color:Lime;'>jpg</font>|right|thumb|Create a vertex group]]
+
[[File:Cape_3.jpg|right|thumb|Create a vertex group]]
  
 
Now you have to create a vertex group. This group is to include all the vertices of the cape that won't move from their place, i. e. the points of the cape that are fixed to the cloth or the neck of the character.
 
Now you have to create a vertex group. This group is to include all the vertices of the cape that won't move from their place, i. e. the points of the cape that are fixed to the cloth or the neck of the character.
Line 40: Line 40:
 
Once you've selected the vertices go to the ''Vertex Groups'' area, at the bottom left part, and  
 
Once you've selected the vertices go to the ''Vertex Groups'' area, at the bottom left part, and  
 
do the following:
 
do the following:
# Click on ''New'' and give a name to the group you've just created (<font style='color:black; background-color:Lime;'><font style='color:black; background-color:Lime;'>Capa</font></font>, in the example).  
+
# Click on ''New'' and give a name to the group you've just created (Capa, in the example).  
 
# Put the Weight of the group to 1.000, so these vertices won't move.  
 
# Put the Weight of the group to 1.000, so these vertices won't move.  
 
# Click on the ''Assign'' button to assign the selected vertices to the vertex group you've created.
 
# Click on the ''Assign'' button to assign the selected vertices to the vertex group you've created.
Line 49: Line 49:
  
 
=== Add the Cloth modifier ===
 
=== Add the Cloth modifier ===
[[File:<font style='color:black; background-color:Lime;'>Cape_4</font>.<font style='color:black; background-color:Lime;'>jpg</font>|right|thumb|Cloth modifier]]
+
[[File:Cape_4.jpg|right|thumb|Cloth modifier]]
  
Press the Object button (<font style='color:black; background-color:Lime;'>F7</font>) and then press the ''Physics buttons'' as shown in the picture.
+
Press the Object button (F7) and then press the ''Physics buttons'' as shown in the picture.
  
 
Select the ''Cloth'' tab and press the ''Cloth'' button. From now on Blender will see the plane as a piece of cloth and will animate it as such.
 
Select the ''Cloth'' tab and press the ''Cloth'' button. From now on Blender will see the plane as a piece of cloth and will animate it as such.
  
Press the ''Pinning of cloth'' button and in the <font style='color:black; background-color:Lime;'>dropdown</font> list select the vertex group you created previously (<font style='color:black; background-color:Lime;'><font style='color:black; background-color:Lime;'>Capa</font></font> in the example).
+
Press the ''Pinning of cloth'' button and in the dropdown list select the vertex group you created previously (Capa in the example).
  
 
'''''Notes:'''''
 
'''''Notes:'''''
In the <font style='color:black; background-color:Lime;'>dropdown</font> list ''Material preset'' you can select different cloth types that have their physics already set in Blender (Cotton, Silk, Denim, Rubber, Leather) or choose Custom and set your own values to the variables that control the physics of the cape.
+
In the dropdown list ''Material preset'' you can select different cloth types that have their physics already set in Blender (Cotton, Silk, Denim, Rubber, Leather) or choose Custom and set your own values to the variables that control the physics of the cape.
  
 
In the three  ''Gravity'' values you can set the forces that have to act on your cape along each of the three spatial axes. by default the values are set to those of the terrestrial gravity  (x = 0, y = 0, z = - 9,81), but you can change them (to simulate the action of wind for example).
 
In the three  ''Gravity'' values you can set the forces that have to act on your cape along each of the three spatial axes. by default the values are set to those of the terrestrial gravity  (x = 0, y = 0, z = - 9,81), but you can change them (to simulate the action of wind for example).
  
 
=== Run the animation ===
 
=== Run the animation ===
[[File:<font style='color:black; background-color:Lime;'>Cape_5</font>.<font style='color:black; background-color:Lime;'>jpg</font>|right|thumb|Run the animation]]
+
[[File:Cape_5.jpg|right|thumb|Run the animation]]
  
 
Go to the ''Collision'' tab and press the ''Enable collisions'' button.
 
Go to the ''Collision'' tab and press the ''Enable collisions'' button.
Line 72: Line 72:
  
 
=== Add collision objects ===
 
=== Add collision objects ===
[[File:<font style='color:black; background-color:Lime;'>Cape_6</font>.<font style='color:black; background-color:Lime;'>jpg</font>|right|thumb|Add collision objects]]
+
[[File:Cape_6.jpg|right|thumb|Add collision objects]]
  
With what we've done until <font style='color:black; background-color:Lime;'>now</font> the cape won't collide with the body of the character but will go though it. To make it collide with the body or clothes do the following:
+
With what we've done until niow the cape won't collide with the body of the character but will go though it. To make it collide with the body or clothes do the following:
 
# Set the body and the cape at the same Blender layer. If they are in different layers the collision won't work.
 
# Set the body and the cape at the same Blender layer. If they are in different layers the collision won't work.
 
# Assure that none of the vertices of the cape are inside the body or clothes before the animation begins or the collision won't work properly.
 
# Assure that none of the vertices of the cape are inside the body or clothes before the animation begins or the collision won't work properly.
Line 82: Line 82:
  
 
=== Choose an animation frame ===
 
=== Choose an animation frame ===
[[File:<font style='color:black; background-color:Lime;'>Cape_7</font>.<font style='color:black; background-color:Lime;'>jpg</font>|right|thumb|Choose an animation frame ]]
+
[[File:Cape_7.jpg|right|thumb|Choose an animation frame ]]
  
 
Choose the frame of the animation in which the cape has the shape you like the best. Once you've run the animation by pressing the Bake button Blender stores each frame and you can see them one by one changing the value of the current frame in the box encircled in the example picture. In the example I've chosen frame 56.
 
Choose the frame of the animation in which the cape has the shape you like the best. Once you've run the animation by pressing the Bake button Blender stores each frame and you can see them one by one changing the value of the current frame in the box encircled in the example picture. In the example I've chosen frame 56.
  
 
=== Freeze the shape of the cape ===
 
=== Freeze the shape of the cape ===
[[File:<font style='color:black; background-color:Lime;'>Cape_8</font>.<font style='color:black; background-color:Lime;'>jpg</font>|right|thumb|Freeze the shape of the cape]]
+
[[File:Cape_8.jpg|right|thumb|Freeze the shape of the cape]]
  
Once you've decided <font style='color:black; background-color:Lime;'>what</font> frame has the shape that you want to keep it is time to freeze the changes. until now you could repeat the process almost from the beginning and see how each change affects the animation of the cape but once you freeze the shape you won't be able to test that again so it is advisable that you save what you've done in a Blender file as a backup and work on a new copy.
+
Once you've decided waht frame has the shape that you want to keep it is time to freeze the changes. until now you could repeat the process almost from the beginning and see how each change affects the animation of the cape but once you freeze the shape you won't be able to test that again so it is advisable that you save what you've done in a Blender file as a backup and work on a new copy.
  
To freeze the shape of the cape in Object Mode press the button ''Editing (<font style='color:black; background-color:Lime;'>F9</font>)'' and on the ''Modifiers'' tab you'll see the ''Cloth'' modifier. While being in the frame you've chosen press the ''Apply'' button that is at the right side of the Cloth modifier. Once done the cape will have the shape you've chosen and won't look as a plane <font style='color:black; background-color:Lime;'>anymore</font>.
+
To freeze the shape of the cape in Object Mode press the button ''Editting (F9)'' and on the ''Modifiers'' tab you'll see the ''Cloth'' modifier. While being in the frame you've chosen press the ''Apply'' button that is at the right side of the Cloth modifier. Once done the cape will have the shape you've chosen and won't look as a plane anymore.
  
From here you can work with the cape as you would do with any other object in Blender (reduce polygons, assign weights, add materials, <font style='color:black; background-color:Lime;'>etc</font>) and then export it as a <font style='color:black; background-color:Lime;'>nif</font> file to use it in your game.
+
From here you can work with the cape as you would do with any other object in Blender (reduce polygons, assign weights, add materials, etc) and then export it as a nif file to use it in your game.
  
 
==References==
 
==References==
* [http://<font style='color:black; background-color:Lime;'>www</font>.<font style='color:black; background-color:Lime;'>clandlan</font>.<font style='color:black; background-color:Lime;'>org</font>/<font style='color:black; background-color:Lime;'>teswiki</font>/index.<font style='color:black; background-color:Lime;'>php</font>/Oblivion:<font style='color:black; background-color:Lime;'>Tutorial_hacer_una_capa_en_Blender</font> Tutorial para <font style='color:black; background-color:Lime;'>crear</font> <font style='color:black; background-color:Lime;'>una</font> <font style='color:black; background-color:Lime;'><font style='color:black; background-color:Lime;'>capa</font></font> en Blender]
+
* [http://www.clandlan.org/teswiki/index.php/Oblivion:Tutorial_hacer_una_capa_en_Blender Tutorial para crear una capa en Blender]
 
   
 
   
 
[[Category:Modelling]]
 
[[Category:Modelling]]
 
[[Category:Blender]]
 
[[Category:Blender]]
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]

Latest revision as of 22:23, 20 January 2011

Overview

This tutorial will explain how to easily create a cape in Blender using the Cloth modifier. This technique can be used to create other hanging clothes like curtains, tablecloths, flags, etc.

This tutorial assumes that you have a basic knowledge of Blender. If that is not the case I recommend you to read and practice with these tutorials Blender 3D: Noob to Pro

Required tools

Creating a cape

The steps involved in creating a cape are:

  1. Add a plane
  2. Subdivide the plane
  3. Create a vertex group
  4. Add the Cloth modifier
  5. Run the animation
  6. Add collision objects
  7. Choose an animation frame
  8. Freeze the shape of the cape

Add a plane

Add a plane

The first step is to add a plane (option Add->Mesh->Plane) then modify its shape a little making its bottom wider than the top and place it horizontally with respect to the character, adjusting the points where the cape is going to be linked to the body (or to the clothes or neck of the character) as shown in the picture.

Subdivide the plane

Subdivide the plane

Next step is to subdivide the plane several times. You can either use the W key and select the Subdivide Multi option giving it a high value like 15, or in Edit Mode select the menu option Mesh -> Edges -> Subdivide and repeat the process 3 or 4 times.

Note: It is important that the cape has several vertices as it will fold and curve along them when applying the animation. So, if you are going to use modifiers that increment the number of vertices, as the Subsurf modifier, it is best to use them before adding the Cloth modifier. Then Blender will take those extra vertices into account when modifying the cloth shape.

Create a vertex group

Create a vertex group

Now you have to create a vertex group. This group is to include all the vertices of the cape that won't move from their place, i. e. the points of the cape that are fixed to the cloth or the neck of the character.

In Edit mode select those vertices. If you want the cape to create folds near the neck, select alternate vertices like in the example picture. Doing it this way the cape won't look too rigid.

Once you've selected the vertices go to the Vertex Groups area, at the bottom left part, and do the following:

  1. Click on New and give a name to the group you've just created (Capa, in the example).
  2. Put the Weight of the group to 1.000, so these vertices won't move.
  3. Click on the Assign button to assign the selected vertices to the vertex group you've created.

Note: Another way of doing the same is to assign all the vertices of the plane to the vertex group you've created and give them an initial weight of 0. Then go into Weight Paint mode and paint different weights to different places of the cape, painting with a weight of 1 the places where the cape doesn't have to move, a weight of 0 to the places where you want the cape to move freely and intermediate weights to the places where the cape moves but not too much.

Add the Cloth modifier

Cloth modifier

Press the Object button (F7) and then press the Physics buttons as shown in the picture.

Select the Cloth tab and press the Cloth button. From now on Blender will see the plane as a piece of cloth and will animate it as such.

Press the Pinning of cloth button and in the dropdown list select the vertex group you created previously (Capa in the example).

Notes: In the dropdown list Material preset you can select different cloth types that have their physics already set in Blender (Cotton, Silk, Denim, Rubber, Leather) or choose Custom and set your own values to the variables that control the physics of the cape.

In the three Gravity values you can set the forces that have to act on your cape along each of the three spatial axes. by default the values are set to those of the terrestrial gravity (x = 0, y = 0, z = - 9,81), but you can change them (to simulate the action of wind for example).

Run the animation

Run the animation

Go to the Collision tab and press the Enable collisions button.

Next press the Bake button and see how the cape animates.

You can modify any of the parameters you've set on the previous steps, press the Bake button again and see how they affect the movement of the cape and repeat the process several times until finding the configuration you prefer.

Add collision objects

Add collision objects

With what we've done until niow the cape won't collide with the body of the character but will go though it. To make it collide with the body or clothes do the following:

  1. Set the body and the cape at the same Blender layer. If they are in different layers the collision won't work.
  2. Assure that none of the vertices of the cape are inside the body or clothes before the animation begins or the collision won't work properly.
  3. Select the body and clothes and on the Collision tab that appears on the example picture press the Collision button.

Select the cape again and press the Bake button on the Cloth tab and you'll see that now the cape doesn't go through the body and clothes but collides with them. Take into account that when adding collision objects Blender makes more calculations and that will make the animation to play slower.

Choose an animation frame

Choose an animation frame

Choose the frame of the animation in which the cape has the shape you like the best. Once you've run the animation by pressing the Bake button Blender stores each frame and you can see them one by one changing the value of the current frame in the box encircled in the example picture. In the example I've chosen frame 56.

Freeze the shape of the cape

Freeze the shape of the cape

Once you've decided waht frame has the shape that you want to keep it is time to freeze the changes. until now you could repeat the process almost from the beginning and see how each change affects the animation of the cape but once you freeze the shape you won't be able to test that again so it is advisable that you save what you've done in a Blender file as a backup and work on a new copy.

To freeze the shape of the cape in Object Mode press the button Editting (F9) and on the Modifiers tab you'll see the Cloth modifier. While being in the frame you've chosen press the Apply button that is at the right side of the Cloth modifier. Once done the cape will have the shape you've chosen and won't look as a plane anymore.

From here you can work with the cape as you would do with any other object in Blender (reduce polygons, assign weights, add materials, etc) and then export it as a nif file to use it in your game.

References