Emitting particles to multiple goals.

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  02 February 2011
Emitting particles to multiple goals.


I have one particle system being generated by three emitters. Particles from each emitter have their own radius and colour (emitter 1 - white particles, 1.2 radius, emitter 2 - black particles, 1.7 radius, etc...). I would like to goal these particles to three different CV curves so that each curve has a particle of differning size and colour. I am guessing that I need to use the emitterId to specify which particles emit to the curves but am unsure how to do it. Right now, my expression is like this for colour:

if (nParticleShape1.emitterId == 0)
nParticleShape1.rgbPP = <<1,1,1>>;

And this for radius:

if (nParticleShape1.emitterId == 0)
nParticleShape1.radiusPP = 1.2;

Any help you could give me would be greatly appreciated, I am somewhat new to expressions. Thank you.

  02 February 2011
goal your particles to all your curves then use the same expression but with this syntax

if (emitterID blah blah)
goalWeight1PP = 1;
goalWeight2PP = 0;
goalWeight3PP = 0;

obviously add per particle goalweights from att tab too.

Good luck
  02 February 2011
Thanks for the reply mandark.

I seem to be having a problem. The particles are clumping together as opposed to goaling to the curves. Here is what I put as my expression after adding PP attribute like you suggested:

if (nParticleShape1.emitterId == 1)

nParticleShape1.goalWeight0PP = 0;

nParticleShape1.goalWeight1PP = 1;

nParticleShape1.goalWeight2PP = 0;


Is this what you meant in terms of an expression?
Thanks again for the help.

  02 February 2011
so is the multiple goal deal working?

if so looks like you just need to add a goalU rand expression to spread them out or if your looking to drive the particles along the curve a goalU+= expression in runtime

for evenly placed particles along your curve
goalU = rand(0,1); //in creation

for running along a curve
make a floatPP att called goalUAdd

goalUAdd = rand(.1,.15);

goalU += goalUAdd;
if (goalU >=.99)
lifespanPP = 0;

something like that should help
  02 February 2011
No, the multiple goal is not working. I need a particle at the CV point of each curve. For example emitter 1 is emitting 46 particles and the curve has a corresponding number of points. I need the particles goaled to these specific points. Does this change anything? Should I try adding a gaolU rand expression? Again, I appreciate the help, this has been driving me crazy.
  02 February 2011
no by default you should get that behaviour with a goal to a curve.

hmm when you create your goals make sure goal is set to 1...
make sure that you are getting a goalWeight0,1,2 in your channel box.....
apart from that it should work perfectly i use this technique all the time.

if it isnt working after that maybe post your scene (if you can ill try and take a look at it after work today)
  02 February 2011
here is your file i changed hope that helps..
Attached Files
File Type: zip lipidStructures_cholesterolREVIEW_MLMod.zip (21.0 KB, 36 views)
  02 February 2011
Amazing! Thanks.

One last question, kind of a dumb one but can you explain how you got that one particle constrained to the locator. I know you mentioned it previously but could you just dumb it down a bit for me. That would be really helpful.

  02 February 2011
very low tech solution to that one. I made a poly cube and vert snapped all the verts to the centre of the locator then goaled that emitter to that piece of geo. sooo i basically made that poly cube a point in space, but it still has the ability to be a goal.

Last edited by mandark1011 : 02 February 2011 at 05:49 PM.
  02 February 2011
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 03:52 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.