Workshop 9: Dynamics, Particles And Collisions

DYNAMICS, PARTICLES AND COLLISIONS

These workshop notes were initially developed after Robinson, Chapter 9, Dynamics.

1. Emitter types: (control in channels box)
Omni – all directions
Directional – one user specified direction
Volume – emitted from a user specified shape

FX: Particles Menu -> Create Emitter (checkbox)

Three types:

Omni type emitter:

Lifespan mode under particle shape tab: (control in attribute dialog box)

Options include:
Live forever
Constant (control time length)
Random range (up to time length)

Controlling rate:
Change to directional type emitter in channels box.
Use show manipulator tools, select blue square to adjust rate (works with other emitter attributes as well).

emitter rate

Select blue diamond shape with left mouse button to change attribute to be modified:
For example, adjust aim direction by selecting icon of input node ring for direction and using manipulator tool.

Similarly:

Select blue circle adjecent to emitter to change attribute to speed.
Use diamond shape icon again to adjust speed.

emitter speed

Change type to directional, set direction to x = 0, y = 1, and z = 0 in attributes dialog box, and use interactive icon again to adjust spread:

2. Emitting particles from an object
Make a simple ground plane of varied surface topology (with sculpt tool)
Use menu sequence nParticles/Emit from object.

emit from surf

Change emitter type to suface.

Edit Basic Emission Speed Attributes of emitter (select emitter ctrl/ctrl-a), note tangent and normal speeds
Change normal speed to “0” and particles stay on surface.

normal speed set attrib

Select nucleus1 and set gravity to zero.

set gravity on nucleus

Create cone and from and instance nParticel to cone (select cone, select particle, menu “nPariticles > instancer”)

cone instance

Within the attributes editor for emitter1, select the “Basic Emitter Rate” tab and right click on the text “Rate (Particles/sec) to bring up the
“Create New Expression” option. Next, within the Expression Editor, enter the following expression so that the rame rate drops to 0 after frame 30:

if (frame < 31)
emtter1.rate = 1;
else
emitter1.rate = 0;

set emitter rate in mel

The resulting animation places one cone only on the surface and stops placing them after frame 25.

3. render types

Select a particle type
Open render attributes section for particle shape
Select (s/w) cloud
Select Add Attributes for Current Render
Change radius from 1 to 3
Render the current frame.
Can modify particle cloud color to change rendering of cloud.

4. Hardware render types:

  • Points, radius adjustable.
  • Multipoint – radius of points, radius of cluster, multi-count dots per cluster
  • Streak, adjust size, line width, tail size and tail fade
  • Multi-streak – like streaks, also adjust cluster multi-radius and multi-count.
  • Sprite – can have an image texture map assigned to them
  • Spheres – can assign shaders to a sphere (no transparency)
  • Numeric – shows numerical values.

5. Software render types

  • Blobby surface, spheres can melt into one surface, attributes include radius and threshold (how much particles blend together, try 0.99)
  • Cloud  – spheres that become transparent the further you move from their center, render with particle cloud shader, adjust color, density
  • Tube – cylinders that grow, define expansion limits with radius0 and radius1 limits, size = length (try low different 1 and 2 radius values and long length … get meteor form)

6. Fields (grab particle and apply field (not to emitter but particle)

  • Air: three types
    Wind: specified direction
    Wake: disturbs particles and moves them along
    Fan: 45 degree spread simulating a fan
    (try adjusting speed, attenuation, magnitude)
  • Drag: slows down or adds friction. (try + and – values on magnitude)
  • Gravity real world gravity impact
  • Newton – particle attractor (try + and – values on magnitude)
  • Radial – attracts or repels particles in radial form.
  • Turbulence – disrupts position of particles (try magnitude and attenuation)
  • Uniform – similar to air, pushes particles in a direction
  • Vortex – spiral force on particles
  • Volume axis – effects particles within a shape (try magnitude and away from center attributes, move box to new location impacts particles.
  • General attributes:
  • Magnitude – amount of force on the field
  • Attenuation – dropoff on scale of 0 (none) to numerical value.
  • Speed attenuation – controls speed impact on particles
  • Direction – x, y, z direction of force
  • Use Max Distance – sets max distance of force impact

7. Collisions

Create polygon cyylinder and place omni directional nParticle emitter inside the cylinder. Select the cylinder and the menu item “nCloth/Create Passive Colider”

particles collide with cylinder

Create emitter and apply air field. Create nurbs plane with U and V set to 10 and place below emitter (polygon surfaces not effective for collisions). Select particle and ground plane and under particles menu choose make collide (particles are pushed along the surface by the air field)

8. nParticles of type water

Create a new scene file of 2000 frames.
Go to the FX module.
Create a polygon cylinder centered at the origin of model space.
Move the cylinder so that it sits below the origin where an nParticle emitter will be placed.
Right-mousebutton-click on the cylinder, select “Face” and delete all the upper faces.

polygon cylinder with faces deleted

Right-mousebutton-click on the cylinder and select “Object Mode”.
With the cylinder selected, select menu item”nCloth/Create Passive Collider”.

Select menu item “nParticles/CreateEmitter/Water”:

create particels water

Next, go to the nParticles menu again and choose “Create Emitter”.

Move the cylinder so that it sits below the nParticle emitter.
In the attribute editor for the nParticle emitter, go to the nParticleShape1 tab and put into effect the following settings:

Under the “Particle Size” tab:
set “Radius” to 0.5.

Under the “Collisions” tab:

Select a particle, go the the attributes editor icon, open the nParticleShape1 tab, go to the “Collisions” section, and turn on the check-box for “self-Collide and the other options as follows:

  • select the checkbox for “Self Colide” to on.
  • set “Collide Strength” to 1.0 (also try 0.1 and see the difference)
  • set “Collide Width Scale” to 1.
  • set “Self Collide Width Scale” to 1.0 (also try 0.5 and see the difference)
  • set “Bounce” to  0.0.
  • set “Friction to 0.1.

particle attribute editor

Under the “LIquid Simulation” tab:

  • set  “Incompressibilty” to 0.2.
  • set “Viscosity” to 0.0.

Further below, under the “Shading” tab (not shown in next figure):

  • Set “Particle Render Type” to “Blobby Surface (s/w).
  • Set “Threshold” to 0.6.

 Keyframe the cylinder to spill out onto a flat polygon surface. Select the flat polygon surface and select menu item “nCloth/Select Passive Collider” similar to the cylinder.
Add lights and materials,  and render in Maya Software with appropriate quality settings for about 800 frames.

Note: these settings will depict over-sized water droplet sizes at a quicker rendering time. For more realistic results at much greater rendering times, scale the droplets to 0.2 and the other values accordingly.

animation of water spilling from cup

A radius 0.2 particle with a higher emitter rate would render as follows:

animation of water spilling from cup

8. Collisions & Rigid bodies:

In the FX module, create sphere and convert to active rigid body subject to gravity in the negative z direction.
Create plane and convert to passive rigid body below the sphere.

active rigit body menu create passive rigid body menu

Adjust values of rigid body mass and bounciness for the sphere in the attributes dialog box under the rigidBody1 tab and see what happens.

adjust mass and bounciness for sphere

9. Soft-body Dynamics

Soft bodies settle into shapes especially as defined by target objects.
Create NURBS sphere, keyframe it a frame 1 and then goto frame 40 and locate it negative -10 in y. for a second keyframe.
Go to menu item nPartices/Soft Body and select the options box. Within the dialog box that follows choose the following options:
* Duplicate make copy soft with hide non-soft object
* Hide non-soft object
* make non-soft a goal

create soft body dialog

Play and notice minor wiggle.
Next, also within the FX module, select the menu Modify/Paint Attributes Tool select the Paint Soft Body Weights Tool select the check box, and set he value to 0.5 and paint the top of the sphere. Note the differential wiggle.

paint soft body weights dialog box

Result:

animation of water spilling from cup

10. FX module / Effects (extra)

Fire – can be from an emitter, or a surface, curve, or directional point, and subject to a field.

Smoke: uses sprint images(must supply), control life span, direction, spread and speed. (SKIP)

Lighting – makes an electric bolt between two or more objects, can control thickness, spread, jagged sections, glow and light intensity (on creation within options dialog box)

Shatter – breaks object in specified number of pieces by types of shatter (surface, solid and crack) on creation This is computationally intensive and so may want to initiate it separately from primary model file. Begin with simple surface and edit/delelete by type/ history. Try with extrusion at 9 shards, make each shard into active rigid body, add air and Newton field. Note that seed value introduces randomness. Another thing to try is to add lighting effect between segments

Surface Flow – creates manipulators causing particles to flow along a surface (try on surface plane, explore radius and threshold on particle shapes).

Curve Flow – creates flow of particles along a curve path (use cloud).