View Single Post
# 2 24-06-2005 , 07:17 AM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
I remember scatter. It was nice.

The best way to do this in Maya is with particle instancing. Get ready for show and tell.

1) Create your surface.

2) Select the surface and run Particles > Emit from object

3) Set the emitter type to Surface and the Normal type to 0.

4) Select the object you want to scatter and the particle system (in that order) and run Particles > Instancer

5) In the attribute editor for the particleShape node under Add Dynamic Attributes click General. Add 2 attributes called rotPP, and scalePP with the settings: make keyable, Vector, Per Particle, Add Init State

6) rotPP and scalePP should appear in attribute editor under PP array attributes. Next to either of attributes right click and select Creation Expression.

7) add the following to the creation expression
float $scaleX = rand(1,2);
float $scaleY = rand(1,2);
float $scaleZ = rand(1,2);
scalePP = <<$scaleX,$scaleY,$scaleZ>>;

float $rotX = rand(1,2);
float $rotY = rand(1,2);
float $rotZ = rand(1,2);
rotPP = <<$rotX,$rotY,$rotZ>>;

This will randomize the X,Y,Z values of your object's scale and rotation. You can change these values to your liking.

8) Still with the particleShape node in the attribure editor > Instancer (Geometry Replacement) and set Scale to scalePP, and Rotation to rotPP.

9) Now hit play and watch your object get scattered accross your surface. You can change the scale and rot varibles to your liking. Also, by changing the emitter's emission rate, it will change the scattering pattern.

10) When you're done tweaking and want to keep what you have, run Solvers > Init State > Set for selected and turn off is Dynamic

I hope this works. Let me know if I missed something.