Saturday, November 21, 2009

MAYA Tutorial - Dynamics and Special Effects

Dynamics

Dynamics in Maya can be applied to objects using rigid-body or soft-body settings. With simple dynamics, also known as rigid-body dynamics. You can use NURBS or polygonal objects in dynamics simulations, but you must consider the objects' surface directions.Objects that interact can be active or passive. Passive objects, although they can be keyframe-animated, remain stationary; they can cause collisions , but aren't affected by them. Objects that are going to react to collisions must be set to active. You can switch an active object to passive and vice versa by setting the Active attribute in the Channel Box to on or off. You can also use Maya's Dynamics mode to simulate reality in how objects behave—for example, animating the way bowling pins react when struck with a bowling ball.
Soft Body Dynamics
Soft-body dynamics are handled in Maya by creating a set of particles that surround the object and influence it. When these particles collide with something or are moved by fields, the connected geometry moves with them. This is ideal for creating effects that mimic cloth and organic flexible materials. To get a realistic response, you must add goals or springs. Goals give the object a target shape to move toward, like a rubber squeeze toy that un-squeezes back to its original shape. Alternatively, springs add a lattice of tensioned springs throughout the geometry, like adding a box spring of rigidity to the object.

Creating a Soft-Body System

Any polygonal or NURBS object can be made into a soft body .You usually make an object soft with Bodies > Create Soft Body> option box, and then determine whether the object simply becomes soft or is duplicated to keep the original object as a goal. Normally, you choose the latter method so that the soft body tries to configure itself back to the shape of the original object. In either case, the object is then soft, but doesn't collide with other objects in the same manner as with rigid-body dynamics.
Soft /Rigid Bodies > Create Soft Body >
Sets the options when creating a soft body.
Make Soft

Converts the object to a soft body.

Adding Springs

When the object must be more resilient than a soft cloth, you can add the Springs attribute to give the object a kind of support structure. This attribute creates a virtual spring object between each particle. Wire Walk Length setting. parameter connects springs not only between a particle and its neighbor, but also the neighbor's neighbor, and so forth. The default setting is 2.
Active and Passive Bodies
Objects that interact can be active or passive. Passive objects, although they can be keyframe-animated, remain stationary; they can cause collisions but aren't affected by them. Objects that are going to react to collisions must be set to active. You can switch an active object to passive and vice versa by setting the Active attribute in the Channel Box to on or off.
You can set values for Initial Velocity and Initial Spin for active objects .
Fig8-1 Dynamics settings for active rigid bodies
Fields
Fields are localized or global forces that act on objects. You can simulate the motion of natural forces with dynamics fields.Fields have their own icons in a scene, so it's easier to select them if you want to animate a field or change its attributes. These fields are included with Maya.
Stand-alone fields influence objects from a stationary or moving position in the workspace. It's not owned by geometry.
Object Field are owned by an object and exert influence from the object. You can add fields to polygons, Nurbs curves or surfaces, particle objects, lattices or curves on the surface.
Volume Fields You can select a volume to define the region in space in which particles are affected.
The following fields are included with Maya:
  • Air An air field simulates the effects of moving air. The objects you connect to the air field accelerate or decelerate so their velocities match that of the air as the animation plays. A "push" type of field, it comes with presets for Wind, Wake, and Fan.

  • Drag a field that slows the momentum over time of objects within its reach. A drag field exerts a friction or braking force on an object that's animated with dynamic motion.

  • Gravity The most commonly used field, it causes objects to move and accelerate in a given direction. You can limit its reach to create localized gravity fields. It simulates the Earth's gravitational force.

  • Newton Similar to gravity, but operates in a spherical manner. A newton field pulls object towards it. Objects are attracted to Newton fields more strongly depending on their mass and their distance from the Newton field.

  • Radial A radial field pushes objects away or pulls them toward itself, like a magnet. Like the Newton field, but it doesn't take mass into account. It can be set to diminish with distance, as with the Gravity and Air fields, and it can be set to push or pull.

  • Turbulence Makes the object's motion or deformations more random. Turbulence is usually applied to soft bodies or particles to create the impression of wind or waves.

  • Uniform A field that pushes objects in a specified direction. Like the Gravity field, but without the progressive acceleration that Gravity includes.

  • Vortex A kind of rotating gravity, the Vortex field pulls objects in a spiraling motion that's centered on the field's icon. Often used to create galaxies, whirlpools, or tornados with particle systems.

  • Volume Axis A complex field that lets you specify a volume shape (cube, sphere, cylinder, cone, or torus) and then create effects that work within the shape. You can use the Volume axis field to create effects such as particles flowing around obstacles ,solar flares, mushroom clouds, explosions, tornadoes, and rocket exhaust.


Constraints

Constraints are used to restrict an object's motion. After you apply constraints, they are connected to the object they're associated with. Maya includes the following constraints:
  • Nail Ties an object to a point in the scene. The object behaves as though it's tethered by a solid rod, but it can orbit anywhere around the tie point as it collides with objects or is affected by fields. You can not use a Nail constraint on a passive rigid body.
  • Pin This type of constraint requires two objects that are tied together to a separate pivot point. You can use a pin constraint to create effects such as link in a chain or robotic arm.
  • Hinge As the name implies, you get free rotation constrained to an axis. You can make active objects hinge to a point in space, to another active object, or to a passive object.
  • Spring This constraint is similar to the Nail constraint, but it also has a telescoping characteristic that allows it to extend its length. As with the Hinge, you can use the Spring to tie an active object to another active object, to a passive object, or to a point in space.
  • Barrier Blocks objects from going beyond a planar boundary. You can assign this constraint to only one object. Objects can deflect, but not bounce, from the Barrier constraint, so it's recommended for objects that block other objects, such as walls or floors

Partiles

Particles can be particularly helpful when you want to create and animate dozens, hundreds, or thousands of similar objects that vary slightly in their geometry or animation. You can also use Maya's Dynamics mode to simulate reality in how objects behave—for example, animating the way bowling pins react when struck with a bowling ball. Another feature in Maya's Dynamics mode is the ability to create "soft-body" effects, in which objects deform as though they were made from rubber or gelatin. Dynamics and particles—work together to create animation. With rigid-body dynamics, the idea is to simulate physics so that objects collide with each other and deflect. With soft-body dynamics, objects change (deform) as a result of their collisions. With particles, you can easily control the animation of large numbers of objects.
What are Particles
A Particle object is a collection of particles that share the same attribute. In maya , Particles are points you display as dots, streaks, spheres, blobby, surfaces etc. You can animate the display and movement of particles with various methods, for instance, Keys, expressions, and field such as gravity. Particles are ideal for animating difficult effects, such as explosions, swarms of bees, and galaxies of stars.In maya, we use particles for creating special effects.

Creating Particles

To create particles in your scene, you can use drawn particles or particle emitters. To paint particles in your scene, choose Particles > Particle Tool > option box. Another method called Particle Grid is available, which you use to define the corners of a 2D rectangle that's filled with particles. Particle grids can be helpful for visualizing the effect of fields as you create them.
In Maya, the source that particles emanate from can be many things.
Point - omni An emitter that sprays particles from a point in all directions.
Point - directional An emitter that sprays particles in a linear or conical direction from a point.
Volume Particles are created from multiple points within a defined volume, which can be a cube, sphere, cylinder, cone, or torus.
Surface You can define one of your scene's NURBS or polygon objects to create particles from its surface.
Curve Any NURBS curve can emit particles.
Animate the Particles
You can animate particle motion in several ways.
Set the position, velocity or acceleration attributes of particles. You can set keys to animate an entire particle object's translate, scale and rotate attributes.
Apply fields , such as gravity to particles.
Turn geometry into a collision object and bounce particles off it.
Make the particles follow a moving goal object.
Particle Types
In Maya, there are two types of particles: hardware rendered and software rendered. Hardware particle render much faster using your graphics card's on-board hardware. Hardware particle types must be rendered with the hardware-rendering system (Window> Rendering Editors >Hardware Render Buffer), because the particles don't appear in the normal software render.
The Hardware Render Buffer has an option for masking any particles that fall behind scene objects. Another issue is that, by default, hardware rendering looks jagged . Maya handles ant aliasing similarly by multisampling in the Hardware Render Buffer, which is enabled by choosing Render>Attributes on the Hardware Render Buffer menu.
Hardware-Rendered Particles
Point The default particle type, designed to render as a spot. You use the render settings in the Hardware Render Buffer, under Render> Attributes.After you add attributes for a particle render type, you can change the render type and add its default Particle Render Type attributes.
Multipoint Like the Point particle type, but creates clusters of points to get a denser, clumpier appearance.You can use this render type to create dust, cluds,most or other gaseous emissions.
Streak Similar to the Point, but creates a streaking line instead of a dot. This type does not render until the particles are moving and you attempt to hardware-render a frame with particle motion. The Streak length is based on the velocity of the particles, so if the particles are stationary or moving slowly, you won't see the particles.
Multistreak Like the Streak particle type, but creates clusters of streaks to get a denser look.
Sprites Render type lets you display a texture image or image sequence at each particles.Each particle can display an identical or different image.Asprite appears as a small rectangle until you map a texture image to it .
Spheres These are three-dimensional spheres and render type displays particles as opaque spheres.
Numeric This particle type displays a number for each particle. It's particularly useful for troubleshooting stray particles.By default, Maya displays particle ids for the numeric render type.
Hardware-rendered particles cannot cast shadows or appear in reflections or refractions:
Software-Rendered Particles
The following particle types render as part of your scene when you render a frame. They are able to reflect, refract, and cast shadows.
Blobby Surface A particle form of metaballs, the blobby surfaces look like spheres until they approach another, at which point they reach for each other like drops of mercury. They appear only in software rendered images.

To set Blobby Surface render type

Select the particle object. In the attribute editor ,set Particle Render Type to Blobby Surface. Apply a shading group to the particle object and then add a light to the scene. Software render the scene.
Cloud The cloud render type displays particles as blurred or cloudy metaballs. This particle type works specifically with the Particle Cloud material type and doesn't render with typical object "surface" materials.
Tube As the name implies, the source object type is a kind of uncapped cylinder. You can define the radius at the two ends and renders only with volumetric material types .
Instanced Geometry If you want to have an object stand-in for the particles, you should use Maya's Instancer, which enables you to use any kind of geometry or textures you like.
AddingReflctions, Refractions and shadows to Software - rendered particles
Select the particle object. In the attribute editor turn on---visible in reflections, visible in refractions and cast shadows.
Collisions
Any particle system can collide with any scene geometry, but you have to set each collision up separately. To do so, you select the particles, Shift-select the geometry they will collide with, and choose Particles > Make Collide. The particles then collide if they hit the object.
Goals
Particles can also be set to have goals, meaning that the particles try to move to a specific configuration, shape, or location. You can create goals by selecting the particle object you want to be affected by the goal. Shift-select the object you want to.

0 comments:

Post a Comment