Thinking Particles
Thinking Particles Programming Team Christian Losch, Philip Losch, Richard Kurz, Tilo Kühn, Thomas Kunert, David O’Reilly, Cathleen Poppe. Plugin Programming Sven Behne, Wilfried Behne, Michael Breitzke, Kiril Dinev, Per-Anders Edwards, David Farmer, Jamie Halmick, Richard Hintzenstern, Jan Eric Hoffmann, Eduardo Olivares, Nina Ivanova, Markus Jakubietz, Eric Sommerlade, Hendrik Steffen, Jens Uhlig, Michael Welter, Thomas Zeier. Product Manager Marco Tillmann. QA Manager Björn Marl.
MAXON Computer End User License Agreement NOTICE TO USER WITH THE INSTALLATION OF THINKING PARTICLES (THE “SOFTWARE”) A CONTRACT IS CONCLUDED BETWEEN YOU (“YOU” OR THE “USER”) AND MAXON COMPUTER GMBH ( THE “LICENSOR”), A COMPANY UNDER GERMAN LAW WITH RESIDENCE IN FRIEDRICHSDORF, GERMANY. WHEREAS BY USING AND/OR INSTALLING THE SOFTWARE YOU ACCEPT ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT. IN THE CASE OF NON-ACCEPTANCE OF THIS LICENSE YOU ARE NOT PERMITTED TO INSTALL THE SOFTWARE.
. Transfer (1) You may not rent, lease, sublicense or lend the Software or documentation.
which the date of the purchase according to the invoice is decisive). The Licensor is free to cure the defects by free repair or provision of a faultless update. (2) The Licensor and its suppliers do not and cannot warrant the performance and the results you may obtain by using the Software or documentation. The foregoing states the sole and exclusive remedies for the Licensor’s or its suppliers’ breach of warranty, except for the foregoing limited warranty.
12. Other (1) This contract includes all rights and obligations of the parties. There are no other agreements. Any changes or alterations of this agreement have to be performed in writing with reference to this agreement and have to be signed by both contracting parties. This also applies to the agreement on abolition of the written form. (2) This agreement is governed by German law. Place of jurisdiction is the competent court in Frankfurt am Main.
Contents Introduction........................................................................................................................................... 1 Overview................................................................................................................................................ 3 1 Settings ..............................................................................................................7 General tab ..........................................................
PFriction.......................................................................................................................................... 74 PGravity .......................................................................................................................................... 76 PMotionInheritance ........................................................................................................................ 78 PPositionFollow ...................................................
INTRODUCTION 1 THINKING PARTICLES Introduction Create amazing particle effects with Thinking Particles, the node-based particle system that gives you complete control over each and every particle. Thank you for purchasing Thinking Particles, the CINEMA 4D module that makes it easy to control every aspect of particle motion.
2 INTRODUCTION THINKING PARTICLES Web Resources Thousands of powerful resources are available on the web, including online tutorials, discussion lists, textures, models, galleries and information on 3D books. You’ll find links to a rich selection of these sites at www.maxon.net, MAXON’s homepage. One website that you may wish to bookmark is www.plugincafe.com, the home of CINEMA 4D plugins. Here you will find dozens of useful plugins, both free and commercial.
THINKING PARTICLES Overview Thinking Particles is a rulebased particle system that offers tremendous power and flexibility, but there is no doubt that it will take some time for you to understand how to use the package. For any particular job there will be many different approaches and a number of solutions. OVERVIEW 3 Here is a brief overview of Thinking Particles that should help to get you started. Please read this and then work through the tutorials – the time spent will be well worth it.
1 Settings
SETTINGS 7 THINKING PARTICLES Settings To take full advantage of the power of Thinking Particles you should always try to work with particle groups. Particle groups enable you to achieve extraordinary control over your particle effects. To unleash the power of Thinking Particles, you’ll frequently need to use particle groups. This is the place to create them. In addition, you can define global and local settings for the groups, including how a group’s particles are represented in the viewport.
8 SETTINGS THINKING PARTICLES Tree The number of particles in the currently selected branch of the particle tree. A branch is a hierarchical level within the Thinking Particles group system. See also ‘Particle Groups’, below. Group Shows the number of particles that currently belong to the selected group. See also ‘Particle Groups’, below. Max Particles Defines the maximum number of particles that can be generated.
SETTINGS 9 THINKING PARTICLES Particle Groups To get the most out of Thinking Particles it is important to plan ahead, consider how all your particles are going to interact and, above all, assign different sets of particles to different particle groups — this way you will build in flexibility, which can save a great deal of time should you decide to change things later. The Particle Groups pane is where you add and remove particle groups, sort them and edit their local settings.
10 SETTINGS THINKING PARTICLES In these settings, you can set a local value for the View Type and Show Object setting. For information on these two settings, see ‘View Type’, ‘Show Objects’ and ‘Force This Setting’ above. In addition, here you can rename the group and change the color used to display the particles in the viewport. This is useful when working with multiple groups. By assigning different colors to each group, you can soon tell which particles belong to which group directly in the viewport.
SETTINGS 11 THINKING PARTICLES To create a Particle Geometry object, from the main menu, choose Plugins > Thinking Particles > Particle Geometry. The object that you want to use as particles must be below a Particle Geometry object in the Object manager. When the Particle Geometry object is selected, its settings will be displayed in the Attribute manager (see above). Drag the name of any particle group from the Thinking Particles Settings and drop it into the Particle Group box.
2 Nodes
NODES 15 THINKING PARTICLES Nodes Nodes are the building blocks of your Thinking Particles effect. The nodes are arranged by group according to their function. Thinking Particles makes use of CINEMA 4D’s XPresso system. The XPresso Editor is the place to create and edit your Thinking Particles effects. Nodes are the building blocks of Thinking Particles effects.
16 NODES THINKING PARTICLES Output ports Index The index number of the particle passed. This is especially useful when creating particles in Shot mode. Suppose you want to set the position of the 30th particle created to the same position as a Null object. Use the node setup shown here and set the Compare node’s Function to ‘==’ and Input 2 to 30. Particle Count The number of particles passed by the node.
NODES 17 THINKING PARTICLES Attribute manager settings Choose which two groups of particles the node should output. GroupA, GroupB These boxes define which particle groups the node should output. Open the Thinking Particles Settings and, from there, drag the name of one of the particle groups and drop it into the GroupA box. Drag-and-drop the name of the other particle group into the GroupB box. Distance Type, Distance These settings allow you to check the distances between particles of the two groups.
18 NODES THINKING PARTICLES Position A, Position B The positions of the particles. Vector AB The vector between the particles in groups A and B.
NODES 19 THINKING PARTICLES TP Condition Group PAge Here we use PAge to pass only certain particles into a new particle group. For example, we could use Absolute with T1=30 and T2=45 so that only particles aged between 30 and 45 frames will be passed into the new group. This node enables you to check the age of particles or find out which particles have just been born, have just died or have just changed groups.
20 NODES THINKING PARTICLES Additional input ports Animation Time Since the node’s parameters can be keyframe animated, by default the CINEMA 4D time is used internally to ensure that the values are interpolated correctly. However, you can pass your own time value to this port. Its data type should be Time, which is a Real number in the simplest case. If no value is passed, CINEMA 4D’s time is used.
NODES 21 THINKING PARTICLES Threshold With the help of this value, you can use the PLight node to control actions based on the brightness of a light source at a particular position in 3D space (defined by the Position values). The node outputs a Bool value of either True or False depending on whether the light’s intensity exceeds the Threshold value at this position in 3D space.
22 NODES THINKING PARTICLES If no vector is present, a normal that points towards the light source will be generated automatically. The light will thus fall orthogonally (at right-angles) onto the virtual surface and will therefore be at its maximum brightness. Keep in mind that a normal pointing towards the light rays themselves, rather than at the light object, will cause the light to shine onto the backface of a surface.
NODES 23 THINKING PARTICLES TP Generator Group PBlurp The PBlurp node can morph one shape into another. This node breaks up an object into fragments, moves the fragments along a path, then reassembles (morphs) them to form a completely new object (the target object). For example, you can morph the 3D text ‘Thinking’ into ‘Particles’. Using the PBlurb node To morph one object into another using the PBlurb node: - Drag-and-drop two objects into the PBlurb node’s Objects list in the Attribute manager.
24 NODES THINKING PARTICLES Fragment Number The internal number of the fragment particle currently being generated. Fragment Particle Outputs the fragment particles that are currently moving between the objects. Using this port they can be assigned to individual particle groups or shapes. Remaining Count The object is fragmented gradually. This port outputs the number of fragments yet to be created. Remaining Number Outputs the internal numbers of all the remaining fragment particles.
NODES 25 THINKING PARTICLES You can use two or more objects. These can be completely different shapes if you wish and they can have a different number of polygons. The top-most object in the Objects list will be used as the starting shape for the effect. This object will then fragment and morph into the second object in the list, which in turn will fragment and morph into the third object (if present), and so on. A spline curve is used to control the path between the objects.
26 NODES THINKING PARTICLES From To This setting controls the direction in which the object decays into fragments. For example, a setting of -Y To +Y means the object will decay from the negative Yaxis in the direction of the positive Y–axis. The object’s axis system is used. Type Here you can control the shape and appearance of the fragments. You can use your own objects as fragments — connect the Fragment Particle port to a PShape node.
NODES 27 THINKING PARTICLES Thickness This parameter gives the fragments thickness by extruding them. The strength of the extrusion is defined as a percentage, where 100% corresponds to the object’s greatest dimension. Keep in mind that adding thickness to the fragments requires more surfaces to be created and hence more RAM. No Fragments This option hides the fragments (for some compositing tasks, it can be useful for the fragments to be invisible but for the holes to still appear in the object).
28 NODES THINKING PARTICLES FEDGE The edges of fragments. FBACK The backfaces of fragments. FREDGE The edges of the remaining parts of the object. FRBACK The surfaces that are underneath the fragments. If Remaining Type is set to Solid, these surfaces will become visible. If Remaining Type is set to Hollow, these surfaces form the insides of the object that is left behind. PBorn Here we want the particles to be emitted from the center of the cylinder’s top cap.
NODES 29 THINKING PARTICLES Attribute manager settings Choose how the particles are born. In Count mode, you define the maximum number of particles that may exist at any one time. Rate mode defines the number of particles born per second, Shot mode the number born per frame. Birth Type, Count, Rate, Shot There are three modes for creating particles: Count, Rate and Shot. Set Birth Type to the desired mode.
30 NODES THINKING PARTICLES Additional input ports Animation Time Since the node’s parameters can be keyframe animated, by default the CINEMA 4D time is used internally to ensure that the values are interpolated correctly. However, you can pass your own time value to this port. This should be of the data type Time, which is a Real number in the simplest case. If no value is passed, CINEMA 4D’s time is used. On A Bool value of True switches the node on; a value of False switches it off.
NODES 31 THINKING PARTICLES On The On input port takes a Bool value that enables (True) or disables (False) the node. The node is enabled automatically if you do not add this port. Output ports Birth Count Outputs all the particles created during the current frame. If you want to access all particles and not just the newly born ones, use a PPass node instead. Birth Num Outputs the number of particles born at the current frame.
32 NODES THINKING PARTICLES Draw Position These coordinates allow you to set to a certain degree how ‘deep’ the particles should be drawn. For example, suppose you are painting in the XZ view with the Y value for Draw Position set to 400. The particles will be drawn with a Y coordinate of 400 (with Type set to Spherical within 400 +/- Radius). Life Time, Life Variation The Life Time parameter defines how long particles live for before they die.
NODES 33 THINKING PARTICLES PFragment In this example a particle group will be fragmented the moment a light shines onto the group. Using this node, you can break particles into fragments, where each fragment may have a different shape from the original particle if you wish. An example would be fireworks, where an individual particle (perhaps a fireball) can be fragmented into many different shapes (in the case of fireworks, perhaps little ‘stars’).
34 NODES THINKING PARTICLES From To Controls the progress of the fragmentation, especially the starting point and therefore the direction. For example, a setting of -Y to +Y will fragment the object along the Y-axis starting with negative Y values. The axis system of each particle is used to determine this direction. When modifying the direction of the particles, such as by applying spin, this rotation will differ from the world or emitter axis.
NODES 35 THINKING PARTICLES Life Span, Variation This setting defines the life span for each fragment, rather like the life span of a standard CINEMA 4D particle. Each particle will die after exceeding its life span. You can vary the life span of each particle using the Variation parameter. Speed, Variation Defines the speed of each fragment relative to the original particle object. You can vary this speed for each particle using the Variation parameter.
36 NODES THINKING PARTICLES On A Bool value of True switches the node on; a value of False switches it off. Particle Connect this port to the particle stream that should be fragmented, such as to the Particle output port of a PPass node. Output ports Born Particle The particle stream that is available here is the particles that have been born at the current frame. So, if you connect this to a Particle input port of another node, the node will affect particles only as they are born.
NODES 37 THINKING PARTICLES PMatterWaves Controls the emission of particles using lights/textures. With this node, you can use lights or textures or both to control the emission of particles from object surfaces. Note that the node will only influence the particles at the time of their birth. Attribute manager settings Random Seed (Node Properties tab) This is a base value for random values generated for variations such as Life Variation and Speed Variation.
38 NODES THINKING PARTICLES Birth Type, Count, Rate, Shot In this part of the dialog you’ll find settings that control how many particles are emitted and where they are born. Count In this mode, the Count value defines the maximum number of particles that may exist at any one time. The Count value works closely together with the Life value. For example, if Life is set to 5 and Count is set to 100 particles, the number of particles will increase steadily to 100.
NODES 39 THINKING PARTICLES The picture or shader will be fitted to the object’s surface using the chosen UVW coordinates. Parts of the surface that receive a white color from the picture or shader will emit particles at the maximum rate, while parts of the surface that receive a black color will emit no particles at all. The Birth Gradient enables you to control how the birth of particles is affected by brightness values between the two extremes of black and white.
40 NODES THINKING PARTICLES Life Variation This value enables you to vary the lifetime of the particles that are emitted (all of the node’s variation values are based on the Random Seed value). Life Type, Life Texture, Life Gradient Constant The lifetime of the particles will NOT be affected by lights or textures. Texture This mode enables you to control the lifetime of the particles using a picture or 2D shader.
NODES 41 THINKING PARTICLES Speed These settings relate to the speed of the particles. Here you can set the speed of the particles. Speed Variation This value enables you to vary the speed of the particles that are emitted (all of the node’s variation values are based on the Random Seed value). Speed Type Constant The speed of the particles is independent of lights and textures. Texture This mode enables you to control the speed of the particles using a picture or 2D shader.
42 NODES THINKING PARTICLES Light You can control the speed of particles using one or more light sources. Parts of the object that are fully lit by this light will emit particles that have the maximum speed, while parts of the object that receive little or no illumination from this light will emit particles that have zero speed. As with the Texture mode, you can use a gradient to adjust how intermediate brightness values affect the speed.
NODES 43 THINKING PARTICLES The picture or shader will be fitted to the object’s surface using the chosen UVW coordinates. Parts of the surface that receive a white color from the picture or shader will emit particles of the maximum size, while parts of the surface that receive a black color will emit particles of zero size. The Size Gradient enables you to control how the size of the particles is affected by brightness values between the two extremes of black and white.
44 NODES THINKING PARTICLES Distance Variation This value enables you to vary the distance from the object’s surface at which the particles are born (the node’s variation values are based on the Random Seed value). Distance Type, Distance Texture, Distance Gradient Constant The distance from the surface at which the particles are emitted is independent of lights and textures. Texture This mode enables you to control the distance of the particles from the object using a picture or 2D shader.
NODES 45 THINKING PARTICLES Texture & Light In this mode, you can use lights and a picture or shader to control the distance. A surface will then only emit particles from the maximum distance away if it is fully illuminated by the lights and receives a white color from the texture or shader. Direction Use these settings if you want to use light or texture to control the direction of particles as they leave the object surface.
46 NODES THINKING PARTICLES The Direction Gradient enables you to control how the particles are affected by brightness values between the two extremes of black and white. The left edge of the gradient represents the parts of the picture or shader that are black, while the right edge represents the parts that are white. Light Direction You can use the direction of the light to control the particles. Drag the lights that you want to use into the Lights box.
NODES 47 THINKING PARTICLES PStorm The example shows how you might control a particle stream to start after a certain frame and be emitted from a certain position and direction (the null). This node creates a particle stream (an ‘emitter’). The emitter’s position and direction is controlled using the Emitter Position and Emitter Alignment input ports. By default, the emitter’s position is set at the world origin.
48 NODES THINKING PARTICLES Count In this mode, the Count value defines the maximum number of particles that may exist at any one time. The Count value works closely with the Life value. For example, if Life is set to 5 and Count to 100 particles, the number of particles will increase steadily to 100. As particles begin to die, new particles are emitted to keep the particle count at 100.
NODES 49 THINKING PARTICLES Distance, Distance Variation Usually, the particles are emitted from the position assigned to the node via the Emitter Position input port, which in most cases is the origin of an object that represents the emitter. Using the Distance parameter, you can offset the particle emission from this position along the Z-axis. This is especially useful when emitting multiple particle streams from the same object where you need the start the streams in different positions.
50 NODES THINKING PARTICLES On A Bool value of True switches the node on; a value of False switches it off. Emitter Alignment, Emitter Position Connect the PStorm node to an Object node to control the emitter via an object. Use these two ports to control the emitter’s position and rotation. Usually these ports should be connected to an Object node (see image above). You can then move and rotate this object in the viewport to move and rotate the emitter.
NODES 51 THINKING PARTICLES Birth Num Outputs the number of the last particle born at the current frame, starting from 0. This will normally be one less than Birth Count. Particle Birth The particle stream that is available here is the particles that have been born at the current frame. So, if you connect this up to a Particle input port of another node, the node will affect particles only as they are born.
52 NODES THINKING PARTICLES TP Standard Group PAlignment Here we take one group of particles and work out the normalized velocity vector (i.e. a vector with the same direction as the velocity but with a length of 1) using PGetData and Universal:Normal. Then we use this direction to affect the direction of another group of particles, so that particles of both groups travel in the same direction. You can control the direction the particles face using this node.
NODES 53 THINKING PARTICLES None The particles will not be aligned. Random The particles are aligned to targets chosen at random. The random alignment may be assigned once only to the particles, either at the moment they are born or the first time they are assigned to the random target by the node. The random targets will then be used throughout the life span of the particles — the alignment of the particles remains the same.
54 NODES THINKING PARTICLES On A Bool value of True switches the node on; a value of False switches it off. Particle Connect this port to the particle stream that should be aligned, such as to a PPass node’s Particle output port. PDie PDie kills particles. Here we are killing particles that are too slow (the length of the velocity vector defines the speed). This node sets the time at which particles will die. Attribute manager settings Choose the number of frames after which the particle will die.
NODES 55 THINKING PARTICLES PGroup This PGroup node assigns the particles to Group2 as soon as they are born. This node enables you to assign particles to a group. By default, particles are sent to the All group. This group is automatically created in the Thinking Particles Settings. Before you can assign particles to a different group using this node, the group itself must be created in the Thinking Particles Settings — look up ‘Particle groups’ in the index for details on how to do this.
56 NODES THINKING PARTICLES Attribute manager settings Here you can set the mass of particles and, optionally, specify how the mass changes over the life span of the particles. Mass, Variation The mass that will be assigned to the particles. The higher the value, the greater the resistance to changes (‘inertia’). You can vary the mass using Variation. Over Age, Age Gradient If Over Age is enabled, you can use the gradient to control the mass of particles based on their ages.
NODES 57 THINKING PARTICLES PRolling The Stretch input of the PRolling node elongates particles along their direction of travel. So, here we’re using the speed of the particles to control by how much they are stretched. With this node, you can achieve two different types of effect. You can use it to roll particles over a surface — the larger the particle, the longer each revolution takes. The second effect is to distort the size of the particles based on their speed.
58 NODES THINKING PARTICLES Source, Invert The Source value defines which axis will be used for the rolling. If the Invert option is enabled, the chosen axis is inverted to give the negative direction of the chosen axis. For example, if the option is enabled and Source is set to Z, the negative Z-axis will be used. Stretch This value is used as a factor for stretching the particles along their direction of travel. The effect depends on the speed of the particles. Using a value of 0.
NODES 59 THINKING PARTICLES Attribute manager settings Squash, stretch or uniformly scale particles using these parameters. The gradient enables you to change the scale according to the age of the particles. Scale, Variation All three axes of the particles will be scaled by this value. Use this to scale particles uniformly. You can vary the amount of scaling using the Variation parameter. X Scale, Y Scale, Z Scale If you want to scale the particles non-uniformly, set these values as desired.
60 NODES THINKING PARTICLES On A Bool value of True switches the node on; a value of False switches it off. Particle Connect this port to the stream of particles whose scale values you want to change, such as to the Particle output port of a PPass node. PSetData We pass a group of particles to PSetData and control their velocities with a Constant node, of type vector (giving both direction and speed). See the PBorn example for a more complex setup.
NODES 61 THINKING PARTICLES Group Here you can connect a ‘TP Group’ data type, which you can access from a PGetData node, for example. This will allow you to assign the particles coming into the node to a new group (the group defined by the Group input port). You cannot connect a PPass node directly to this port. Life Sets the new life span of the particles, in frames. Mass Defines the mass of the particles as a Real number (i.e. the value must be of the data type Real).
62 NODES THINKING PARTICLES Size The Size value is a scaling factor for the objects used as particles. The ratio of Size to Bounding Radius (see the PShape node for details on the Bounding Radius) gives the scaling factor: (Size/Bounding Radius)*size of the object=size of the particle object. So if you want the particle object to be exactly the same size as the original object, set Size to the same value as Bounding Radius. You can vary the size of each particle using the Size Variation parameter.
NODES 63 THINKING PARTICLES Attribute manager settings Among other things, these settings define which object is used as particles. Object Drag the name of the object whose shape you want to assign to the particles from the Object manager and drop it into this box. You can also drag and drop the object’s name directly onto the PShape node in the XPresso Editor.
64 NODES THINKING PARTICLES PSize This example shows how you can affect the size of a particle so its size will vary depending on its speed (the length of the velocity vector). The Math mode is included to produce a single value from the velocity vector and scale the speed down to a sensible value. You can set the size of particles using this node. Only uniform scaling is allowed. You cannot scale along individual axes, i.e. you cannot squash or stretch the particles using this node.
NODES 65 THINKING PARTICLES Additional input ports Animation Time Since the node’s parameters can be keyframe animated, by default the CINEMA 4D time is used internally to ensure that the values are interpolated correctly. However, you can pass your own time value to this port. This should be of the data type Time, which is a Real number in the simplest case. If no value is passed, CINEMA 4D’s time is used. On A Bool value of True switches the node on; a value of False switches it off.
66 NODES THINKING PARTICLES The parameter defines how many frames it takes until the particles fully use the new spin settings. Increasing the value means the particles will ease into the new spin more gradually, i.e. the transition will take longer. Time, Variation This value determines the rotation speed of the particles indirectly. It defines how long (in seconds) each particle will take to complete one revolution.
NODES 67 THINKING PARTICLES Direction Of Travel The particles will rotate about the axis that is parallel to the direction in which they are travelling. You can vary the rotation axis using the Variation parameter. User Defined The particles will rotate about the axis defined by the three Axis values. For example, a vector of 0;0;1 will cause the particles to spin about their Z-axes. You can vary the rotation axis using the Variation parameter.
68 NODES THINKING PARTICLES TP Dynamic Group PBubble We’re moving the particles up and down and increasing how far they move up and down over time (their Amplitude) using a Frame output. If you change the settings interactively, only newly born particles will be affected. This node will superimpose a sine wave function on the movement of the particles. The particles will thus be moved up and down perpendicular to their direction of travel.
NODES 69 THINKING PARTICLES Additional input ports Animation Time Since the node’s parameters can be keyframe animated, by default the CINEMA 4D time is used internally to ensure that the values are interpolated correctly. However, you can pass your own time value to this port. This should be of the data type Time, which is a Real number in the simplest case. If no value is passed, CINEMA 4D’s time is used. On A Bool value of True switches the node on; a value of False switches it off.
70 NODES THINKING PARTICLES Deflector Type, X Size, Y Size, Z Size, Radius You have a choice of four collision modes. In Object mode, the particles will collide with any of the object’s polygons. However, for faster collision detection, you may want to use a box or sphere shape that approximates the shape of the object. In these cases, set Deflector Type to Box or Sphere.
NODES 71 THINKING PARTICLES Bounce, Variation Bounce determines how much energy the particles retain after a collision. With a value of 0%, the energy of the particles will be absorbed completely. You can vary the Bounce value using the Variation parameter. Surface With hard surfaces and hard particles, the angle of incidence should normally be the same as the angle of reflection. However, this behavior changes when liquids are involved, so you can adjust this behavior using the Surface value.
72 NODES THINKING PARTICLES Event Only If this option is enabled, the node merely detects collisions, the velocity of the particles is not changed by the node. This is especially useful for ‘triggering’ events when particles collide with particular surfaces. Additional input ports Animation Time Since the node’s parameters can be keyframe animated, by default the CINEMA 4D time is used internally to ensure that the values are interpolated correctly. However, you can pass your own time value to this port.
NODES 73 THINKING PARTICLES PFreeze This example shows how to freeze a particle stream and at the same time turn off the generation of new particles. Here the NOT node has been used to stop the particle generation; we turn PFreeze on as we turn the particle stream off. This effect resembles a slow motion effect. You can slow down the motion of the particles, all the way to a complete freeze if you wish. You can also ‘thaw’ the particles to return them to their original motion.
74 NODES THINKING PARTICLES To create a knot, click in an empty area below the gradient and a knot of the color at that position will be added. To change the color of a knot, double-click it and choose the desired color using the system color dialog. To remove a knot, drag and drop it away from the gradient. The small diamonds on the gradient are bias handles and they pull the interpolation of the color knots from side to side for more control over how the gradient changes.
NODES 75 THINKING PARTICLES Spin Friction Spin Friction slows down the spin of the particles. The higher the value, the less time it takes until the particles stop spinning. Mass Dependence The friction will be calculated according to the mass of the particles. The higher the value, the more influence the mass has on the friction; particles with a high mass will be less affected by the friction than those with a low mass. This approximates the natural behavior of friction.
76 NODES THINKING PARTICLES PGravity We’re simulating real gravity here by changing the strength of the gravity as the particle stream gets close to a Gravity object. So you could, for example, deflect small meteorites around a heavy planet. Use the RangeMapper node to adjust how the distance affects the gravity strength. You can use this node to exert a force on particles similar to that of gravity or of a magnet. The mass and the size of the particles can be taken into account.
NODES 77 THINKING PARTICLES Strength This is the strength of the gravity force. The higher this value, the stronger the force of gravity exerted on the particles. Not only will the particles change their direction of movement, they will also accelerate. You can enter negative values, in which case particles will be pushed away from the object’s origin. Decay Controls the decay of the gravity force with increasing distance from the object’s origin.
78 NODES THINKING PARTICLES PMotionInheritance In this example the influence of the PMotion Inheritance node is animated over time. Using this node, particles can be influenced by the movement and the rotation speed of an object. Attribute manager settings You can influence particles based on an object’s motion. Object Drag the name of the object whose motion should influence the particles from the Object manager and drop it into this box.
NODES 79 THINKING PARTICLES Rotation Inheri., Variation Determines how strongly the object’s rotation affects the rotation of the particles. The particles will be rotated about their own axes. You can vary the Rotation Inheri. value using the Variation parameter. Direction Var. Adds variation to the direction in which the particles move, helping to create a more natural, less uniform effect.
80 NODES THINKING PARTICLES To create a knot, click in an empty area below the gradient and a knot of the color at that position will be added. To change the color of a knot, double-click it and choose the desired color using the system color dialog. To remove a knot, drag and drop it away from the gradient. The small diamonds on the gradient are bias handles and they pull the interpolation of the color knots from side to side for more control over how the gradient changes.
NODES 81 THINKING PARTICLES Attribute manager settings Choose which position the particles should fly towards. Type, Constant Speed, Spring Speed Particles can react in two ways. Set Type to the desired mode: Constant Speed or Spring. In Constant Speed mode, the Constant Speed value defines the speed of the particles. In Spring mode, the particles will react in an elastic way. High Spring Speed values lead to rapid acceleration for the particles in the direction of the goal, leading to overshooting.
82 NODES THINKING PARTICLES PRepulse&Bounce Quite simply, create two particle streams and assign them to groups. Now connect those groups to a PRepulse&Bounce node to cause the particle streams to interact realistically. This node is especially useful for enabling particles to collide with one another. In addition, the particles can be made to act like force fields that can attract or repel.
NODES 83 THINKING PARTICLES A setting of 100% results in a fully elastic collision — although the velocity will be redistributed, the energy remains the same. With a setting of 0%, all energy will be lost in the collision, causing the colliding particles to lose all their motion. Most objects will have a bounce elasticity somewhere between these two extreme values. Mass Dependent Mass can play an extremely important role in realistic collisions.
84 NODES THINKING PARTICLES Attribute manager settings Define the speed and direction of the particles. Change, Direction, Speed, Variation You can change the velocity of the particles using one of three modes. Speed&Direction In this mode, you can change both the speed and direction of the particles. Set the Speed and Direction values to the desired speed and direction of the particles. You can vary the Speed and Direction values using the Variation parameters.
NODES 85 THINKING PARTICLES Additional input ports Animation Time Since the node’s parameters can be keyframe animated, by default the CINEMA 4D time is used internally to ensure that the values are interpolated correctly. However, you can pass your own time value to this port. This should be of the data type Time, which is a Real number in the simplest case. If no value is passed, CINEMA 4D’s time is used. On A Bool value of True switches the node on; a value of False switches it off.
86 NODES THINKING PARTICLES Type Two types of wind field are available: Planar (2D) and Spherical (3D). With Type set to Planar, the force will be applied perpendicularly to the object’s XY plane (i.e. along its Z-axis). An arrowhead appears in the viewport to indicate the direction of the force. You can adjust the size of this arrowhead using the Icon Size setting on the Attribute manager’s Node Properties tab.
NODES 87 THINKING PARTICLES Icon Size (Node Properties tab) You can adjust the size of the arrowhead or sphere that represents the wind. This setting, on the Node Properties tab in the Attribute manager, controls the size of the arrowhead or sphere that represents the wind force in the viewport. Additional input ports Animation Time Since the node’s parameters can be keyframe animated, by default the CINEMA 4D time is used internally to ensure that the values are interpolated correctly.
88 NODES THINKING PARTICLES TP Helper Group PChronometer In this example the particles will get an increasing acceleration during the early frames of their life. The Time value of the PChronometer node is used as a multiplier. Using this node, you can create your own time values. This is especially useful when you want to manipulate time. For example, time can appear to run twice as fast for one node as for another. PChronometer works much like a stopwatch.
NODES 89 THINKING PARTICLES Additional input ports Animation Time Since the node’s parameters can be keyframe animated, by default the CINEMA 4D time is used internally to ensure that the values are interpolated correctly. However, you can pass your own time value to this port. This should be of the data type Time, which is a Real number in the simplest case. If no value is passed, CINEMA 4D’s time is used. On A Bool value of True switches the node on; a value of False switches it off.
90 NODES THINKING PARTICLES PGroup This is NOT the same node as the TP Standard PGroup node! In this example, the group of a particle stream is transferred to another particle stream. This node provides you with a port for outputting particle groups. It is especially useful for transferring particles directly from one group to another. Attribute manager settings Choose the particle group that the node should output.
NODES 91 THINKING PARTICLES Attribute manager settings The speed value represents the rotation speed. Speed This value represents the rotation speed, measured in change of angle per second. The value is in radians, where 2*Pi radians represents 360°. Therefore, a value of 2*Pi here will result in one complete revolution per second. Axis This defines the axis around which the particles rotate. For example, a value of (0;0;1) means that each particle will rotate about its Z-axis.
92 NODES THINKING PARTICLES Attribute manager settings Choose the object and whether the particles should be emitted from the object’s points, edges or polygons. Object Drag the name of the desired polygon object from the Object manager and drop it into this box. Type, Selection Use Type to choose whether the positions should be generated on the object’s points, edges or polygons (Type set to Face, Edges or Vertex respectively). In addition, you can restrict the positions to a frozen selection (i.e.
NODES 93 THINKING PARTICLES Position Outputs the random positions on the object. You can assign these values to particles by connecting this port to the Position port of a PSet Data node. PTimer After a certain time (set by the Compare node), PTimer will be switched on. It will remain on for the Time set in the Attribute manager and will therefore cause the particle stream to be affected by gravity during this time. So we could create something like a temporary force field.
94 NODES THINKING PARTICLES Additional input ports Animation Time Since the node’s parameters can be keyframe animated, by default the CINEMA 4D time is used internally to ensure that the values are interpolated correctly. However, you can pass your own time value to this port. This should be of the data type Time, which is a Real number in the simplest case. If no value is passed, CINEMA 4D’s time is used. Particle You can connect a particle stream to this port.
NODES 95 THINKING PARTICLES PVelocityConvert This example shows two ways to convert a vector and a scalar to another vector of the same direction as the first vector but with the scalar’s length; this can be useful when you want to construct a velocity vector with a known speed. The lower nodes show how you would do it without PVelocityConvert (first normalize the vector to a length of 1 and then multiply it with the scalar).
96 NODES THINKING PARTICLES PVolumePosition In contrast to the PSurfacePosition example, we’re now generating small, sphere-shaped particles within the volume of the larger sphere. Remember to use a Particle Geometry object to hold the smaller particle spheres and to set the Bounding Radius of the PShape node to a sensible value in relation to the size of the particle spheres.
NODES 97 THINKING PARTICLES Particle Connect this port to the stream of particles that should be emitted from inside or outside the object, such as to the Particle output port of a PPass node. Output ports Alignment Outputs the current alignment of the particles, as vectors. Normal Outputs the normals of the random positions. Using this information, you can set the velocity of each particle in such a way that the particles move perpendicularly to the surface.
3 Tutorials
THINKING PARTICLES TUTORIALS 101 Introduction When we need visual effects that immerse the audience in the action, Thinking Particles provides us with the fine control we need to make it look real. Creating advanced particle effects of big-screen quality can be an almost impossible task with conventional particle systems. For one, these systems offer us only limited control over particles.
102 TUTORIALS THINKING PARTICLES When we create a new node in the XPresso Editor, by default the node is displayed as a box with input ports (blue) on the left and output ports (red) on the right. This behavior can be changed in the XPresso preferences (Edit > Preferences > XPresso) so that we can have the inputs on the right and the output ports on the left and/or change the colors. These tutorials assume the default behavior.
TUTORIALS 103 THINKING PARTICLES Combining Thinking Particles with XPresso Thinking Particles builds on the XPresso system, so we’ll start with an example of how to combine the power of both systems. When creating advanced effects, for ultimate control over the particles we will often combine the Thinking Particles nodes with the XPresso nodes. For example, to restrict particle emission to a particular time period, we enlist the help of XPresso’s Time node, which reports the animation’s current time.
104 TUTORIALS THINKING PARTICLES Although we can add the tag to any type of object, the null object is an obvious choice since it is invisible in the render and thus won’t get in the way of our particles. Once we’ve added the tag to the null, the XPresso Editor opens automatically. This is where we’ll build our particle effect, in just the same way as we would a normal XPresso expression, only this time we have extra nodes to select from that are specialized for particle effects.
THINKING PARTICLES TUTORIALS 105 Connect the Compare node’s output port to the PStorm node’s On port. The Compare node outputs a Boolean value that switches on the emitter from frames 0 to 30 only. From frame 31 onwards, no new particles will be created. Let’s suppose for a moment that we would like particles to be emitted from frame 50 onwards as well as from frames 0 to 30.
106 TUTORIALS THINKING PARTICLES The direction of particle emission is also controlled by the object — particles are emitted in the direction of the object’s Z-axis. Although most of the time we’ll use objects to represent the position and rotation of emitters, keep in mind that we can also control the position and rotation by passing vectors and matrices from Constant nodes to the PStorm node.
TUTORIALS 107 THINKING PARTICLES Set X Size and Y Size both to 300. Set the PStorm node’s parameters to these values. In the animation toolbar, press the Play button. It’s high time we took a look at the fruits of our labor so far! What we see are the particles being emitted radially from the Null object’s origin. No new particles are created after frame 30. In the animation toolbar, press the Stop button.
108 TUTORIALS THINKING PARTICLES Command-click on a Mac if you have only one mouse button. In the Thinking Particles Settings dialog, Particle Groups pane (towards the bottom of the dialog), right-click on the name All to open its context menu. From this menu, select Add to create a new particle group. (Leave the Thinking Particles Settings dialog open since we’ll be using it throughout this tutorial.) Creating a group is a useful, organizational tool.
TUTORIALS 109 THINKING PARTICLES Select New Node > Thinking Particles > TP Standard > PShape. In the XPresso Editor, select the PGroup node by clicking its title bar. In the Attribute manager, ensure the Parameter page is visible. In the Thinking Particles Settings dialog, drag the name Group1 and drop it into the PGroup box on the Parameter page in the Attribute manager. By dropping Group1 into the PGroup box we are saying “When particles are born, assign them to Group1”.
110 TUTORIALS THINKING PARTICLES Select Plugins > Thinking Particles > Particle Geometry. This puts a Particle Geometry object into our scene. In the Attribute manager, ensure the Object page is visible. In the Thinking Particles Settings dialog, drag the name Group1 and drop it into the Particle Group box on the Object page in the Attribute manager. A Particle Geometry object represents a group of particles.
TUTORIALS 111 THINKING PARTICLES Select New Node > Thinking Particles > TP Initiator > PPass from the XPresso Editor context menu. To apply gravity to the particles we will create a PPass node and a PGravity node, then connect them. The PPass node will pass our particle group to the PGravity node. Since we have just the one particle group in our scene, gravity is applied to all the particles.
112 TUTORIALS THINKING PARTICLES In the Attribute manager, ensure the Parameter page is visible. In the Object manager, drag the name Null Object and drop it into the Object box on the Parameter page of the PGravity node in the Attribute manager. Using drag-and-drop, choosing which object will be affected by gravity is easy. Here we’ve used the same object to represent the gravity’s position and rotation as we used for the emitter.
TUTORIALS 113 THINKING PARTICLES Select New Node > Thinking Particles > TP Helper > PGetData from the XPresso Editor context menu. The PGetData node will output the position of each particle one by one as a vector. Later on, we’ll use this position to modify the effect of the gravity, so let’s add a few more nodes in preparation. Click the PGetData node’s outputs menu and select Position. In the Object manager, drag the Null Object and drop it into the XPresso Editor to create a new Null Object node.
114 TUTORIALS THINKING PARTICLES Now connect the new Null Object node’s Global Position port to the Math: Subtract node’s lower Input port. After connecting the Null Object node’s Global Position port to the Math node’s lower Input port, our XPresso Editor window should look similar to this.
TUTORIALS 115 THINKING PARTICLES Click on the graph (beneath Output Upper on the Parameter page) to create four points. The curve we will create in this graph will control the change from positive to negative values. The first two points will be locked to the right edge and left edge of the graph. The third and fourth points can be placed freely, it doesn’t matter where we put them right now. If we accidentally add too many points, we can drag the unwanted points out of the graph to delete them.
116 TUTORIALS THINKING PARTICLES In the XPresso Editor, connect the Range Mapper node’s input port to the Math: Subtract node’s output port. Although the Math node outputs a vector, the Range Mapper converts the vector to a floating point number that is the length of the vector, i.e. the particle’s distance from the center of gravity. This number is delimited by Output Lower and Output Upper. Click the PGravity node’s inputs menu and select Strength.
TUTORIALS 117 THINKING PARTICLES Using Thinking Particles with PyroCluster One of the best things about Thinking Particles is that we can combine its power with other parts of CINEMA 4D, including optional modules such as PyroCluster. In the previous tutorial we learned much about Thinking Particles, including how to employ the Particle Geometry object to use an object as particles. The Particle Geometry has further uses, one of these being to assign a PyroCluster material to an entire particle group.
118 TUTORIALS THINKING PARTICLES In the Object manager, click on the Sphere object and press the Backspace key to delete it. We don’t need the sphere in our scene. In the Material manager, select File > PyroCluster > PyroCluster – VolumeTracer. This material will be used to enable PyroCluster’s volumetric shading engine. Still in the Material manager, select File > PyroCluster > PyroCluster and name the new material Fire. This creates the material from which we will create the fire.
TUTORIALS 119 THINKING PARTICLES In the Attribute manager, on the Globals page, click on the Settings pop-up and select Fireball, confirming the dialog that subsequently appears. After we change the settings, a dialog will open asking us if we’re sure that we want to change them. This will give us a volume of smoky fire. In the Attribute manager, on the Shapes page, set Radius to 200. This is a suitable size to produce a pulsating fireball cloud.
120 TUTORIALS THINKING PARTICLES As another example, let’s turn the Atmospheric render mode back on and reduce the radius of the fire shapes to 20. This should render within a reasonable time and gives us small puffs of fire. Summary Using Thinking Particles with PyroCluster is easy. All we need to do is assign the PyroCluster material to a Particle Geometry object that represents the particles.
TUTORIALS 121 THINKING PARTICLES Deforming Particles With a Particle Geometry object set-up in our scene we can make particles deform at the drop of a hat. This tutorial builds on an earlier tutorial: Combining Thinking Particles with XPresso. You should complete that tutorial before beginning this one. In the previous tutorial we learned, among other things, that the Particle Geometry object enables us to use objects as particles or assign a PyroCluster material to the particles.
122 TUTORIALS THINKING PARTICLES In the animation toolbar, press the Play button. Each sphere is distorted as it moves. The distortion changes for each sphere depending on the sphere’s exact position. Now try adding a few more deformers such as Bulge and Twist. Summary To apply a deformation object to particles, all we need to do is make the deformer a child of the Particle Geometry object that represents the particles.
TUTORIALS 123 THINKING PARTICLES Working with Particle Groups Here we’ll work on advanced particle effects, but first we might want to grab a cup of coffee! Many complex particle effects can be achieved only with the help of particle groups. By using multiple groups, we can control each group’s particles separately from the others. In this final Thinking Particles tutorial we’ll practice working with particle groups plus we’ll learn numerous other advanced techniques.
124 TUTORIALS THINKING PARTICLES In the Object manager, select File > CINEMA 4D Tags > XPresso. This creates a new expression and opens the XPresso Editor. In the Object manager, drag the name Emitter and drop it into the XPresso Editor. This creates a node for our Emitter null object In the XPresso Editor, select Layout > Connections > Straight. Using this type of connection between nodes will allow us to keep things neat.
TUTORIALS 125 THINKING PARTICLES On the Parameter page, set Input [2] to 25. In the XPresso Editor, select On from the PStorm node’s inputs menu. Connect the Time node’s Frame port to the Compare node’s Input 1 port. The Time node’s Frame port outputs the animation’s current frame number. Connect the Compare node’s Output port to the PStorm node’s On port. Use a Compare node and Time node to restrict particle emission to a specific time frame.
126 TUTORIALS THINKING PARTICLES The first two points we create will be locked to the right edge and left edge of the graph. The third point can be placed freely. If we accidentally add too many points, we can drag the unwanted points out of the graph to delete them. Click the left-most point to select it and show its position in the X and Y boxes below the graph. Set its Y value to 0. Click the next point along. Set its X value to 0.5 and its Y value to 1.
TUTORIALS 127 THINKING PARTICLES Connect the Shot port to the Range Mapper’s Output port. The Range Mapper node remaps the frame number to a value from 1 to 15 and passes this value to the Shot port. As a result, at the start of the animation only one particle will be created per frame. The emission rate will then rise steadily until reaching a peak of 15 particles per frame by frame 12.
128 TUTORIALS THINKING PARTICLES Select Y Size from the PStorm node’s inputs menu. Connect the Range Mapper node’s Output port to the Math node’s upper Input port. Connect the Math node’s Output port to the PStorm node’s X Size port. Connect the Math node’s Output port to the PStorm node’s Y Size port. Use the Range Mapper’s output to control the size of the emitter as well as the emission rate.
TUTORIALS 129 THINKING PARTICLES Select Add from the All context menu again. We are creating two groups so that particles can be assigned to the first group and then later transferred to the second group. This creates a second new particle group named Group2. Still in the Thinking Particles Settings, select Settings from the Group2 context menu. In the settings dialog for Group2 we will set its color to red so that it is easier for us to distinguish between the two groups in the viewport.
130 TUTORIALS THINKING PARTICLES Select New Node > Thinking Particles > TP Standard > PGroup from the XPresso Editor context menu. The purpose of the PGroup node is to assign each particle to Group1 at the time of its birth. As a result, all particles will be initially assigned to Group1. Later on, we’ll have these particles transferred to Group2. In the Attribute manager, ensure that the PGroup node’s Parameter page is visible.
TUTORIALS 131 THINKING PARTICLES In the Object manager, ensure that the Emitter object is selected and in the Coordinate manager set its Position values to X = 0, Y = 90 and Z = 0. We’ve set sensible values for the starting position of our ‘bucket’. In the animation toolbar, ensure that the time slider is at frame 0 and then click the record button record keyframes for the Emitter object’s position.
132 TUTORIALS THINKING PARTICLES Select Objects > Primitive > Plane to from the main menu. Create a Plane object to act as the floor that the particles will spill onto. The Plane object represents the floor in our scene. Shortly we’ll be tipping the particles over the Plane object and we’ll use gravity to pull the particles down onto the Plane.
THINKING PARTICLES TUTORIALS 133 In the XPresso Editor, connect the PPass node’s Group1 port to the PGravity node’s Gravity port. Use a PGravity node and a PPass node to apply gravity to the particles. Group1’s particles are sent from the PPass node to the PGravity node. This causes gravity to be applied to these particles. As with the PStorm node, the PGravity node has no axis system of its own so we’ve used a null object (named Gravity) to control the node’s position and rotation.
134 TUTORIALS THINKING PARTICLES Select Position from the PGetData node’s outputs menu. Select New Node > XPresso > Adapter > Vector2Reals from the XPresso Editor context menu. These vectors output by the PPass node will be passed to the Vector2Reals node, which separates each vector into its X, Y and Z position values. Later we’ll use the Y value to check the height of each particle above the plane — vital information that will help us to ensure that no particles are allowed to pass though the plane.
TUTORIALS 135 THINKING PARTICLES In the Attribute manager, on the Node Properties page, set Data Type to Real and set Function to Add. On the Parameter page, set Input [2] to 10. We are adding 10 to the Y position via a Math node to define the height below which particles will be stopped. At the moment this is merely a value and won’t stop the particles — we need to add a few more nodes first. In the XPresso Editor, connect the Plane node’s Global Position.Y port to the new Math node’s upper Input port.
136 TUTORIALS THINKING PARTICLES Select New Node > Thinking Particles > TP Standard > PGroup from the XPresso Editor context menu. In the Attribute manager, ensure that the Parameter page is visible. In the Thinking Particles Settings dialog, drag the name Group2 and drop it into the PGroup box in the Attribute manager. Connect the PGroup node’s Group2 port to the PPass node’s Group1 port. In the XPresso Editor, select On from the PGroup node’s inputs menu.
TUTORIALS 137 THINKING PARTICLES Connect the PPassAB node’s top Output port to the Particle port of one of the new PGetData nodes. Connect the PPassAB node’s lower Output port to the Particle port of the other new PGetData node. Select New Node > XPresso > Calculate > Math from the XPresso Editor context menu. In the Attribute manager, on the Node Properties page, set Data Type to Real and set Function to Subtract.
138 TUTORIALS THINKING PARTICLES Connect the new PGroup node’s Group2 port to the PPassAB node’s Group1 (upper) port. In the XPresso Editor, select On from the new PGroup node’s inputs menu. Connect the new PGroup node’s On port to the new Compare node’s Output port. Particles in Group1 that are less than 2 units away from particles in Group2 are transferred to Group2. In principle, the same happens here as with the first change of groups.
TUTORIALS 139 THINKING PARTICLES Select Velocity from the PSetData node’s inputs menu. Connect the PSetData node’s Velocity port to the Constant node’s Vector port. Connect the PSetData node’s Particle port to the new PPass node’s Group2 port. Use a PSetData node to halt all nodes that collide with the plane or with other particles. In the animation toolbar, press the Play button.
Index
INDEX 143 THINKING PARTICLES A G P Age of particle 19 Alignment of particle 52 Assign particles to group 60 General tab on settings 7 Global force display settings 8 Gravity and particles 76 node 76 Group assigning particles to 60 number of particles in 8 of particles, transferring 90 passing with PPass 15 Groups.
144 INDEX THINKING PARTICLES PFreeze 73 PFriction 74 PGetData 89 PGravity 76 PGroup 55 PLight 20 PMass 55 PMatterWaves 37 PMotionInheritance 78 Polygon colliding particles with 69 PPass 15 PPassAB 16 PPositionFollow 80 PRepulse&Bounce 82 PRolling 57 PScale 58 PSetData 60 PShape 62 PSize 64 PSpin 65 PSpinConvert 90 PStorm 47 PSurfacePosition 91 PTimer 93 PVelocity 83 PVelocityConvert 95 PVolumePosition 96 R Registration 1 Render over network 11 Roll particles 57 Rotation of object, affecting particles 78