# Emitting particles to multiple goals.

 02 February 2011 bartlebooth New Member portfolio Gaspard Winkler CIMS Ottawa, Canada Emitting particles to multiple goals. Hello. 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. Bartlebooth. share quote
 02 February 2011 mandark1011 Expert   portfolio Michael Lemon Fx Artist Canada 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; } etc obviously add per particle goalweights from att tab too. Good luck share quote
 02 February 2011 bartlebooth New Member portfolio Gaspard Winkler CIMS Ottawa, Canada 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. Bartlebooth. share quote
 02 February 2011 mandark1011 Expert   portfolio Michael Lemon Fx Artist Canada 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 //creation make a floatPP att called goalUAdd goalUAdd = rand(.1,.15); //runtime goalU += goalUAdd; if (goalU >=.99) lifespanPP = 0; something like that should help share quote
 02 February 2011 bartlebooth New Member portfolio Gaspard Winkler CIMS Ottawa, Canada 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. share quote
 02 February 2011 mandark1011 Expert   portfolio Michael Lemon Fx Artist Canada 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) share quote
02 February 2011
here is your file i changed hope that helps..
Attached Files
 lipidStructures_cholesterolREVIEW_MLMod.zip (21.0 KB, 36 views)

 02 February 2011 bartlebooth New Member portfolio Gaspard Winkler CIMS Ottawa, Canada 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. Bartlebooth. share quote
 02 February 2011 mandark1011 Expert   portfolio Michael Lemon Fx Artist Canada 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. share quote
 02 February 2011 CGTalk Moderation Expert 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. share quote

 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 CGSociety Society of Digital Artists www.cgsociety.org Powered by vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.