Maya Tutorials:explosion using particle instancer

| Comments (4) | TrackBacks (0)

In this tutorial I'm going to show you how to generate exploding pieces with particle instancer and particle expressions.


maya tutorial particle instncer explosioninstance a object to particles
maya tutorial particle instncer explosion
Select particle and object in this order
Particle > Instancer(Replacement)
The particles are replaced by the object.

The instanced geometry object can be
a single object, animated or not animated,
and can be a sequence of objects in different shapes or positions.


making exploding pieces

Emitte particles from sphere object as the above,
connect the particles with Gravity and Turbulance fields.

(For more explanation of particle,please refer to
Maya Tutorial:basics of particle)

maya tutorial particle instncer explosion
Make some splinter objects,
(in this example, I made 4 pieces of objects)
select all the objects and the particle in this order
Particle > Instancer(Replacement)


In this step, it seems that only one object is instanced to the particles.

maya tutorial particle instncer explosion
Select particleShape and open the Attribute Editor.
Click General button in Add Dynamic Attributes.

maya tutorial particle instncer explosion
The Add Attribute Window will open,
enter a variable name r_off in Attribute Name,
select Vector, Per Particle,
click Add button

Add Attributes r_spd and rot according to the same procedure as r_off.

maya tutorial particle instncer explosion
Add index attribute with Data Type Float.


maya tutorial particle instncer explosion
In Per Particle(Array) Attributes,
you can see the attibutes, index, rot, r_spd, r_off, are added.


maya tutorial particle instncer explosion
Open the Expression Editor
(Window > Animation Editors > Expression Editor...)

Select Object Filter > Dynamics > Particle,
select particleShape
select Creation radio button (to make Creation Expression), enter expressions below

index = Id%4;
r_off = <<rand(6.28),rand(6.28),rand(6.28)>>;
r_spd = <<rand(6.28),rand(6.28),rand(6.28)>>*1;

Click Creat button.

(index = Id%4;  4 is number of objects
r_spd = <<rand(6.28),rand(6.28),rand(6.28)>>*1;  1 is multiple of rotation
6.28 is one rotation for the unit of the radian
rand(6.28) a random floating point number between 0 and 6.28)


maya tutorial particle instncer explosion
Select Runtime before Dynamics radio button (to make Runtime Expression), enter expressions below

rot = r_off + r_spd * age;

Click Creat button.

maya tutorial particle instncer explosion
Select particleShape, open the Attribute Editor,
in instancer tab, set Rotation Angle Units to Radians

maya tutorial particle instncer explosion
In particleShape tab
set ObjectIndex to index, set Rotation to rot


Completed.

Copyright (C) 2008 by maya blog:3D CG labo, All Rights Reserved.

0 TrackBacks

Listed below are links to blogs that reference this entry: Maya Tutorials:explosion using particle instancer.

TrackBack URL for this entry: http://202.58.16.97/cgi/mt41/mt-tb.cgi/150

4 Comments

great toturial . i learned a lot . thanx

Thank you for your visiting my site and commenting.

Good work. I'm new to this field and your tutorial helped me a lot.

Thank you for your visiting my site and your commenting.

Leave a comment