PDA

View Full Version : Particle Questions


EightBit
08-26-2008, 11:43 PM
I'm using particles to create and effect if an image being sprayed out of a projector.
I've created a grid of particles w/the desired texture assigned, and I've tried various combos of forces and collision objects to get the motion.

My questions are:
1) Is there a way to control when the individual particles start moving (ie are affected by the forces)?
2) Is there a way to add a bit of randomness to the particle motion?

Thanks much.

Aikiman
08-27-2008, 12:40 AM
On the particle shape you can keyframe the dynamics weight to zero if all that is affecting your particles are forces, if you have a speed attribute above zero on your emitter this wont work. Or under the time attributes on the particle shape you can set that to the frame you want.

As for the randomness a turbulence field works well.

EightBit
08-28-2008, 07:50 AM
Thanks for the reply.
The turbulence is helpful for adding a bit of randomness, but I don't see how to assign a bit of randomness to the dynamic weights. I'm starting with a grid of particles which have been saved as an initial state.

drGonzo
08-28-2008, 10:14 AM
1) Is there a way to control when the individual particles start moving (ie are affected by the forces)?
You can manipulate field attributes on a per-particle level.


Apply a field to a set of particles.
In the particleShape Attribute Editor, expand the Add Dynamic Attributes section, if necessary.
Click the General button. The Add Attribute dialog box is displayed.
Create a per-particle attribute of float or vector type on the particleShape with the name fieldName_attributeLongNameOnTheField or fieldName_attributeShortNameOnTheField. The type for the per-particle attribute you use must match the attribute type on the field. For example, create airField1_magnitude to control the magnitude on airField1.
Write an expression to control this attribute.
In the field’s Attribute Editor, go to the Special Effects tab, and turn on Apply Per Vertex.

Aikiman
08-28-2008, 08:11 PM
An option would be to set up your particles with a goal value to an invisible plane. If you have the correct number of particles to vertices they will line up in a grid fashion. Then you could setup up goalPP expressions so they release in an irregular fashion.
I like DrGonzo's method better.

EightBit
09-05-2008, 05:27 AM
drGonzo:
Thanks for the help.
For the Per Particle Mass, in the AE, I added the expression:
particleShape1.mass = rand(0.15,6);
to run before dynamics and I got what I was after.
Take care.

Als
09-05-2008, 07:59 AM
drGonzo:
Thanks for the help.
For the Per Particle Mass, in the AE, I added the expression:
particleShape1.mass = rand(0.15,6);
to run before dynamics and I got what I was after.
Take care.

To simulate "creation" you can make expression like

if (frame < 2 ) particleShape1.mass = rand(0.15,6);

So it will evaluate only in frame one...


Als

EightBit
12-17-2008, 05:10 PM
I am revisiting this project.
Basically, I have particles making an image implode into a single point. When I run it in reverse it makes them look like they are spraying out of a projector. It has a 2D look.
I would like to control the implosion so that the particles furthest from the projector move first. Anyone have a suggestion for an expression to achieve that? I don't necessarily need to measure the distance to the projector, maybe I could just use the particle's X value to change the mass?
Thanx.

Aikiman
12-17-2008, 07:41 PM
I am revisiting this project.
Basically, I have particles making an image implode into a single point. When I run it in reverse it makes them look like they are spraying out of a projector. It has a 2D look.
I would like to control the implosion so that the particles furthest from the projector move first. Anyone have a suggestion for an expression to achieve that? I don't necessarily need to measure the distance to the projector, maybe I could just use the particle's X value to change the mass?
Thanx.

In that case I would probably use the distance between your projector and particle to affect the mass like...

vector $fieldPos = `xform -q -ws -t uniformField1`;
vector $pos = position;
vector $dist = <<($fieldPos.x-$pos.x), ($fieldPos.y-$pos.y),($fieldPos.z-$pos.z)>>;
float $mag = mag($dist);
mass = 1-linstep(0,100,$mag);

as long as you use something like a uniform field.

Wick3dParticle
12-18-2008, 03:03 PM
Hey 8bit.
Using expressions is a good way to go...
But if you don't have that many fields, you could probably just make your fields in to volume shapes and plow them through your particle grid. Basically setting it up to where anything within the volumes are affected by the fields.

Just an alternative to expressions.

~Ilan

EightBit
12-24-2008, 02:46 AM
Hey guys, thanks for the responses.
Wick:
I don't know how I'd get this effect using the technique you suggested.

Aikiman:
Your expressions worked, but then I realized it was the opposite of what I wanted. I achieved the desired result by animating the Max Dist. of a radial field.

In addition, this expression adds a bit of randomness to the particle spray:
if (frame < 2 ) BG05_ParticlesF10Shape.mass = abs(gauss(0.5));

A basic particle question:
1) When I have the Caching enabled, it has to plow thru the animation twice in order to finish building the cache - is that correct or is there a way to cache it one pass?

Wick3dParticle
12-24-2008, 03:13 AM
For example, let's say you are using a turbulance field and a directional. You make both fields active as volumes, where anything within the volume is affected by the fields. Then you animate the volumes through your particle grid... Basically activating each particle as the field's volume moves through it.

~Ilan

Aikiman
12-24-2008, 05:12 PM
Aikiman:
Your expressions worked, but then I realized it was the opposite of what I wanted. I achieved the desired result by animating the Max Dist. of a radial field.

1) When I have the Caching enabled, it has to plow thru the animation twice in order to finish building the cache - is that correct or is there a way to cache it one pass?

Take the 1 away from the linstep function so you have "mass = linstep(0,100,$mag);" that should fix it. As for the caching Im not sure what is going on there, are you subsampling?

CGTalk Moderation
12-24-2008, 05:12 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.