Jump to content

how to only birth particle from a point if no other particles birthed


Recommended Posts

In pops there's the origin attribute that indicates what point on SOP level a particle is sourced from.

I need to guarantee that a particle is born from a sop point (like point on a curve) only if

no other particles exist that were born from that point..

So trying to come up with a way to to

1) check if other particles exist that were born from origin point x.

2) if none exist, birth a new one (birth probability?)

Easy to do if I could have a global python dictionary with particle origins, but can't seem to do that in POPs:

python pseudocode:

lookup = {}

upon birth:

if origin not in lookup:

(birth particle)

lookup[origin] = "dummy"

alternatively if I can group particles by origin attribute and kill all the particles except those with smallest

particle id, that might work.

thanks for your help!!

Alex

Edited by locvio
Link to comment
Share on other sites

In pops there's the origin attribute that indicates what point on SOP level a particle is sourced from.

I need to guarantee that a particle is born from a sop point (like point on a curve) only if

no other particles exist that were born from that point..

So trying to come up with a way to to

1) check if other particles exist that were born from origin point x.

2) if none exist, birth a new one (birth probability?)

Easy to do if I could have a global python dictionary with particle origins, but can't seem to do that in POPs:

python pseudocode:

lookup = {}

upon birth:

if origin not in lookup:

(birth particle)

lookup[origin] = "dummy"

alternatively if I can group particles by origin attribute and kill all the particles except those with smallest

particle id, that might work.

thanks for your help!!

Alex

why don't You emit by ordered points, and set let the emission just stop when all You have $NPT particles?

Link to comment
Share on other sites

why don't You emit by ordered points, and set let the emission just stop when all You have $NPT particles?

thanks,

I need to be able to re-emit one particle from any of the points based on other criteria as the sim progresses...

Link to comment
Share on other sites

thanks!

instancing library pre-simmed bgeo splash sequences onto the location of points on a curve... I have an attribute called

effectTrigger that goes to 1 whenever I want to fire off the splash.. would like to use the particle to

store the location and the frame of where the effect needs to be fired. The particle will live for

as long as the library bgeo sequence will live, and then will die... at that point whenever effectTriger is turned on

(based on things like wave height) a new effect will be fired..

(at least that's the idea :))

Alex

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...