Support

  Tips & Techniques - Thinking Particles

Thinking Particles:
Thinking Particles Tornado
Download:
Project
Works with:
XL, Thinking Particles
Requires:
Version 8.1+
 


 
The Thinking Particles module for Cinema 4D R8 has added tremendous control and power over particle effects. But with this power and control comes some serious understanding of how to use some of the nodes. This tutorial will demonstrate how to use some of these complex nodes to create a tornado effect.
click to view Quicktime movie

 
Step 1: To begin with you will need to create two emitters, so create a Null Object (Objects=>Null Object) to control the position and alignment of the emitters. Rename this object to Emitters.

 
Create an XPresso Tag for the Emitters object, from within the Object Manager go to File=>New Expression=>Xpresso Expression. This will create a tag on the Emitters object and open up the Xpresso Editor.

 
Drag and drop the Emitters object into the Xpresso Editor to create a node for this object. Also create an output for Position and Global Matrix by clicking on the red outport box then going to Coordinates=>Position=>Position and Global Matrix.

 
Now create two PStorm nodes which can be found in the X-Pool by going to System Operators=>Thinking Particles=>TP Generator=>PStorm. Take note that all Thinking Particles operators are found in System Operators=>Thinking Particles directory.

 
Create an Emitter Alignment input for both of the PStorm nodes. Then connect the Position output of the Emitters node to the Emitter Position input of both PStorm nodes. Also connect the Global Matrix output to both Emitter Alignment inputs. Now both emitters, or PStorms, derive their position and alignment from a single null object.

 
Move the Emitters object to Y = 1000 and rotate it to P = -90.

 
Step 2: Since you are using two emitters to vary the formation of the tornado, you need to assign each PStorm to its own group. Create a Particle Birth output for both PStorms. Also create two PGroup nodes Thinking Particles=>TP Standard=>PGroup.

 
Connect both Particle Birth outputs to an individual PGroup node. From within Xpresso open the Thinking Particles Settings dialog to create the different groups (Custom=>Thinking Particles Settings).

 
In the Thinking Particles Settings dialog right click on the All text and Add three groups.

 
Rename the groups to the following names: Tornado Group, Tornado 1, and Tornado 2. Then place the Tornado 1 and Tornado 2 groups as children of the Tornado Group. Now you have the ability to affect the individual tornado groups or the tornado groups as a whole.

 
Drag and drop the Tornado 1 group on top of one of the PGroup nodes. Drag and drop the Tornado 2 group on the opposite PGroup node.

 
Step 3: With the emitters assigned to different groups, you now need to alter some of the properties of the PStorm nodes. Select the PStorm assigned to the Tornado 1 group. Change the following properties: Type to Rectangle, Count to 1500, Life to 150 F, Speed to 300, X Size to 400, and Y Size to 400.

 
Now select the PStorm connected to the Tornado 2 group. Input all of the same properties, except input 1000 for Count.

 
Since its kind of difficult to determine what particles are coming from what emitter you may want to change both groups color. In the Thinking Particles Settings dialog right + click on the Tornado 2 group and go to Settings.

 
Within the PGroup dialog change the Color to Green. The color you choose is not of great importance, just something so you can tell the difference between the two groups.

 
Step 4: Create a Null Object (Objects=>Null Object) and rename it to Motion.

 
Under the Coord. tab of the Motion object, input 400 for the P. Y field. Make sure the Time Slider is at frame 0 then right + click (PC) or Cmnd + click (MAC) on the R. H text and go to Animation=>Add Keyframe.

 
Go to frame 150 (you may have to specify the scene's length in the Project Settings). Input 10000 into the R. H field and then add a keyframe for that property.

 
Step 5: The object that was just animated will be the object that the particles inherit their motion from via the PMotionInheritance node. Add a Particle Geometry object to the scene (Plugins=>ThinkingParticles=>Particle Geometry).

 
Create two PMotionInheritance nodes (Thinking Particles=>TP Dynamic=>PMotionInheritance) and also two PPass nodes (Thinking Particles=>TP Initiator=>PPass). This will allow you to pass each particle group to a seperate PMotionInheritance node for the groups to inherit motion different than one another.

 
Now drag and drop the Motion object on top of both PMotionInheritance nodes. Also drag and drop the Tornado 1 group on top of one of the PPass nodes. Then drag and drop the Tornado 2 group on the remaining PPass. Connect both PPass nodes to an individual PMotionInheritance node.

 
Select the PMotionInheritance node connected to the Tornado 1 group. Change Type to Cylinder and its Radius to 300 to match the size of the emitter. Also change the Cylinder Axis to Y and the Cylinder Height to 500.

 
You should notice that all of the gradients for the PMotionInheritance node are now active. Change the second knot of the Distance Gradient to a light gray (R = 200, G = 200, and B = 200).

 
The Cylinder Gradient controls the length of the Cylinder. The left edge of the gradient controls the center of the Cylinder and the right edge controls the caps of the Cylinder. With this you will add some variation to the shape of the particles. You're going to want to add three more knots on the Cylinder Gradient. Change two of the knots to a darker gray (R = 100, G = 100, and B = 100). Change the other three knots to absolute white. Adjust the knots as shown.

 
For the Scale Gradient you are going to want to add one knot. Change the knot on the left edge of the gradient to absolute black, and the second knot to absolute white. Your gradient should resemble the one shown.

 
Step 6: Now select the other PMotionInheritance node, which is connected to the Tornado 2 group. Change the Inheritance to 90%, Type to Cylinder, Radius to 300, Cylinder Axis to Y, and Cylinder Height to 500.

 
For the Distance Gradient you are going to want to change the knot on the left edge to a lighter gray (R = 185, G = 185, and B = 185). You will also want to change the knot on the right edge to a darker gray (R = 70, G = 70, and B = 70).

 
The Cylinder Gradient is going to be somewhat similar to the Cylinder Gradient on the other PMotionInheritance node. Add three knots to the Cylinder Gradient and change two of the knots to a dark gray (R = 80, G = 80, and B = 80). Change the other three knots to absolute white. Position the knots as shown. Leave the Scale Gradient as is.

 
Note: You do not have to use the exact settings as specified with the gradients, feel free to experiment with different settings.

 
Step 7: Since tornados hit the ground and cause dirt to fly up, you will now simulate that. Create a Plane to act as the floor (Objects=>Primitive=>Plane).

 
Increase the Width of the Plane to 2500 along with the Height to 2500. Rename the Plane to Floor.

 
Create a PPass node (Thinking Particles=>TP Initiator=>PPass) and then drag and drop the Tornado Group on top of this PPass node. You will also need to create a PGetData node (Thinking Particles=>TP Helper=>PGetData). Connect the Particle output of the PPass node to the Particle input of the PGetData node.

 
To save some time your going to want to create the nodes that you will be using for this expression. Create a Vector2Reals node (Xpresso=>Adapter=>Vector2Reals), a Compare node (Xpresso=>Logic=>Compare), a PDie node (Thinking Particles=>TP Standard=>PDie), a PStorm node (Thinking Particles=>TP Generator=>PStorm), and also a node for the Floor object.

 
The PGetData node gets all the information of the particle group that is assigned to it. For this expression you only need to get the particles positions, so create a Position output for the PGetData node. Then connect the Position output to the Input of the Vector2Reals node.

 
Now you are going to want to compare the Y position of the particles to the Y Position of the Floor object. Create a Position. Y output for the Floor node. Connect the Position. Y output to the Input 2 of the Compare node. Then connect the Y output of the Vector2Reals node to the Input 1 of the Compare node.

 
Select the Compare node and under the Node Properties change the Function to <= (Less Than or Equal to). Now when the Y position of the particles is less than or equal to the Y position of the Floor object, the Compare node will output a value of True.

 
When the particles hit the Floor object you want the tornado particles to die and new particles to be generated to simulate dirt. Create On inputs for the PDie and PStorm nodes then connect the Output of the Compare node to both On inputs.

 
In order to kill the tornado particles, a particle group must be assigned to the PDie node so it knows what group to kill. Connect the Particle output of the Tornado Group PPass node to the Particle input of the PDie node. Also connect the Position output of the PGetData node to the Emitter Position input of the PStorm node.

 
Step 8: Select the PStorm node and input the following settings: Birth Type to Shot, Shot to 10, Life to 20 F, Life Variation to 50%, Speed to 250, Speed Variation to 90%, X FOV to 180, and Y FOV to 180.

 
This PStorm does not have a specified alignment, so create a Null Object and rename it to Alignment. Create a node for the Alignment object then create a Global Matrix output for the newly created node.

 
Now create an Emitter Alignment input for the PStorm node. Connect the Global Matrix output of the Alignment node to the Emitter Alignment input of the PStorm node. Select the Alignment object and rotate it 90 degrees on the P axis.

 
Step 9: The last thing to do for this expression is to assign the particles to their own group. In the Thinking Particles Settings dialog add a group under the All group. Right click on the new group and go to Settings. Rename the group to Dirt and change its Color to a brownish color.

 
Create a PGroup node (Thinking Particles=>TP Standard=>PGroup) and also create a Particle Birth output for the PStorm node. Connect the Particle Birth output to the Particle input of the PGroup node.

 
Drag and drop the Dirt group on top of the PGroup node.

 
Step 10: The last thing that needs to be done with this expression is to have the particles follow a null object. Create a Null Object and rename it to Follow. Create a node for the Follow object and also create a PPositionFollow node (Thinking Particles=>TP Dynamic=>PPositionFollow).

 
Select the PPositionFollow node and change the Type to Spring and Spring Speed to 10%. Also create a Follow Position input for the node.

 
Now create a Global Position output for the Follow node. Connect the Global Position output to the Follow Position input of the PPositionFollow node. Also connect the Particle output of the Tornado Group PPass node to the Particle input of the PPositionFollow node.

 
If you begin moving the Follow onject on the X or Z axes, the bottom of the tornado should follow it. In the project file that you can download, it has another expression on the Follow object which moves the Emitters and Motion objects once the Follow object moves beyond + or - 500 in the X and Z axes.


© 2009 All rights reserved. For the personal and/or professional use of Cinema 4D users only. Reprint without permission is strictly prohibited.

© 2010 All rights reserved
Copyright Information |
Privacy Policy | Terms of Use