Final Result
Dynamics simulations can be a powerful tool when trying to generate realistic looking effects that would be very difficult to achieve manually. In this tutorial you will learn how to use nDynamics’ passive colliders and ncloth objects, in conjunction with fields like air and gravity, to easily simulate realistic dynamic objects such as a windy flag or a water container.
Step 1
Go to “Create > Polygon Primitives > Plane”.
Step 2
Create a plane that matches the size of a flag and rotate it by ’90′ degrees.
Step 3
Open the Attributes Editor for the plane, name it, and increase the “Subdivisions Width” to ’30′, and the “Subdivisions Height” to ’50′.
Step 4
Your plane should now look like this:
Step 5
Go to “Create > Polygon Primitives > Cylinder”
Step 6
Position the cylinder, and scale it to match the size of a flag pole.
Step 7
Select all the top faces of the pole.
Step 8
With the faces still selected, got to “Polygons > Edit Mesh > Extrude”.
Step 9
Extrude those faces until you get a nice pole shape.
Step 10
Select the top vertex of the pole.
Step 11
Use the move tool to position the vertex.
Step 12
Go to “Window > Rendering Editors > Hypershade”.
Step 13
With “Create mental ray Nodes” active, create a new “mia_material_x”.
Step 14
Open the Attributes Editor of the material you just created, name it, select the preset called “Copper”, and adjust the “Diffuse” and “Reflection” colors accordingly.
Step 15
Apply the material to the pole.
Step 16
Go to “Window > Rendering Editors > Hypershade” again.
Step 17
With “Create mental ray Nodes active”, create a new “mia_material_x”.
Step 18
Go to the Attributes Editor of the material, name it, and decrease the “Reflectivity” value to ’0′.
Step 19
Click on the checkerboard button, to the right of the “Diffuse” color value, to open the “File” browser window.
Step 20
The Attributes Editor should now change. Select the image you want to use to texture the flag.
Step 21
Apply the material to the flag, and with the flag selected go to “Create UV´s > Planar Mapping”.
Step 22
Select the option highlighted below so you can see if the texture looks good.
Step 23
If your texture looks bad like mine, go to “Create UV´s > Planar Mapping (settings)”.
Step 24
This will open a new window where you can change the projection axis to whatever works for your scene, and then click “Project”.
Step 25
Your flag should now display the texture correctly.
Step 26
Select the flag, and in the “nDynamics” menu, go to “nMesh > Create nCloth”.
Step 27
Increase the number of frames of the animation.
Step 28
If you play the animation now, you will see that the flag just falls down. This is because the flag is not attached to the pole.
Step 29
Rewind the animation.
Step 30
Select the flag, and in the “Window” menu, go to “Show > Isolate Select > View Selected”.
Step 31
You should now only see the flag, which will make it easier to work with.
Step 32
Select all of the vertexes that you want to be attached to the pole.
Step 33
In the “nDynamics” menu, go to “nConstraint > Transform”.
Step 34
Select the flag, and in the “Window” menu go to “Show > Isolate Select > View Selected” this will make everything visible again.
Step 35
Select the pole.
Step 36
In the “nDynamics” menu, go to “nMesh > Create Passive Collider”.
Step 37
If you play the animation, you should now see the flag hanging from the pole. This is realistic, but an unmoving flag is not very dynamic, so let’s add some wind.
Step 38
Go to the Attributes Editor of the flag´s “nucleus1”, and in the “Gravity and Wind” section, change the following values:
Air Density = 10.000
Wind Speed = 8.000
Wind Direction = – 1.000 z axis
Step 39
If you play the animation now, it should look pretty good. All you need to do is smooth the polygons by pressing ’3′ on the keyboard (with the flag selected).
Step 40
Perfect! We are done with the first section of this tutorial, just don´t forget to save your scene!
0 comments:
Post a Comment