View Full Version : help writing an expression for 1 particleShape that references another
01 January 2011, 11:18 AM
im kinda stuck here so I though some of you might know better as im not a guru.
I have a scene where an emitter is emitting some particles (big chunks). I have given them a random radiusPP from 1-3. In return those particles emit other particles (trail).
Now i basically want to write an expression on the emission rate of the 'trail' emitter that is controlled based on the radiusPP of the 'big chunks' particleShape. So the smaller the particle (big chunk), the less emmision rate (of the trail) on this particle.
Since the particles (big chunks) are not objects, and is not only one but several, the emitter has not given me a 'scale rate by object size' tickbox.
This is the expression I wrote but its not working:
small_trail_emitter.rate = 100 + (chunksShape.radiusPP * rand (100 , 150));
This is the error i get back
// Error: Attribute of a particle object can only be used with dynExpression command: radiusPP
Anyone knows how to go about writing this? Or another approach maybe?
01 January 2011, 02:39 PM
the first thing you should do is turn on "per point emission rate" at particles which emit trail particles.
nParticle -> per point emission rate
next will deal himself.
hope it help.
01 January 2011, 02:42 PM
Hey ZeitG, not sure why by it is graded so cannot press it. Do i have to do something to activate it and if so will this solve my problem?
01 January 2011, 03:05 PM
from maya help:
per-point emission rates:
This creates an attribute named emitterRatePP for the emitted particle object. This attribute lets you vary emission rates on a per-particle basis.
Do i have to do something to activate it?
all it needs to be constantly active. but when the particles are on the emitters, then this function simply gives an error.
01 January 2011, 03:13 PM
im using a surface emitter. Not sure why but it is not available to check. Do i need to do something?
EDIT: Just found out it cannot be used in surface and curve emitters... not good! :(
01 January 2011, 03:26 PM
I have a scene where an emitter is emitting some particles (big chunks). I have given them a random radiusPP from 1-3.
so "big chunks" is particles.
In return those particles emit other particles (trail).
so particles emit other particles.
select the "big chunks" particles and hit "nParticle -> per point emission rate", if you use nParticles.
01 January 2011, 03:36 PM
thank you for your help ZeitG,
i quess i have to start again by using nParticles this time.
01 January 2011, 03:36 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.