per-point particle emission - how?

   9831   7   1
User Avatar
Member
66 posts
Joined: July 2005
Offline
I have an arbitrary point cloud with some custom numeric attribute that was supposed to be used as a per-point emission rate value.
The thing i cannot find is actually _how_ to emit required amount of particles from each point per time step/frame? Any ideas?
wbr, Mudvin
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Hi,
I believe you want to be using the npoints() expression to return you the number of points in your point cloud. You would enter the expression in the birth tab > impulse birth rate parameter.

Rob
Gone fishing
User Avatar
Member
512 posts
Joined: July 2009
Offline
put the variable $NPT into the impulse birth rate field of the source POP and you're all set!

best,

~M
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
66 posts
Joined: July 2005
Offline
Doesn't putting $NPT/using npoints() will emit “number-of-points” particles every second?
What i wanted to do is take some pre-created attribute on source geometry, and emit particles according to it. Say, “point N7 has attribute ”emit“ equal 13 = we need to emit 13 particles from this point”
wbr, Mudvin
User Avatar
Member
66 posts
Joined: July 2005
Offline
Let me explain the effect i'm trying to achieve:
It's a simple scene with RBD box falling onto RBD ground. Box has impactAnalysis attached, so i have the impact points in “import_impacts” geometry network.
What i'm actually trying to do is to emit particles from those points with popnet, with “source” node. It's actually work, but at the moment i'm getting constant stream of particles from each impact point, so guess what i need to do is to get impacttime of each impactpoint, and filter them with simple condition: if($T-$impacttime < 2) to emit particles just from those points that is 2s old or less. And i think i can scale actual emission amount by “impulse” attribute. That's why i need per-point emission rates.

Besides, there's also a vop sop that was supposed to reflect impact vector to generate new particles in proper direction, but atm i cannot even find that direction, since it seems that “v” holds some arbitrary data, and i cannot find any RBD velocity attributes.

Spent whole evening tryint to visualize vectors with “point/add” and polywire nodes(since custom display one is simply crashes H12), but encountered so many problems with expressions so i'm almost thrown my laptop out of the window.
wbr, Mudvin
User Avatar
Member
512 posts
Joined: July 2009
Offline
Mudvin
Doesn't putting $NPT/using npoints() will emit “number-of-points” particles every second?
What i wanted to do is take some pre-created attribute on source geometry, and emit particles according to it. Say, “point N7 has attribute ”emit“ equal 13 = we need to emit 13 particles from this point”

No, it outputs the total number of point of the incoming geometry per frame (if your oversampling on the popnet is set to one), of course you have to set the constant activation to 0 to make this work!

One idea to achieve what you want:
Use a copy node to copy-stamp the impact points to a number that you specify (have the amount of copies being influenced by impact strength for example) and then emit 1 particle from each point using the impulse birthrate of your source POP.
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
66 posts
Joined: July 2005
Offline
Guess that's gonna work, but is there some more elegant and simple solution? I mean i thought that per-point emission rates is quite a basic thing, why so many problems with it…
wbr, Mudvin
User Avatar
Member
304 posts
Joined: May 2006
Offline
Dunno about elegant, I´m one for the trenches, but let´s try this for simple

- Create a Delete SOP which deletes all the points with a neglectable impulse

- Create a Point SOP, add a color and use $IMPULSE/50 as your red color (50 depends on the magnitude of your sim. It could be higher)

- Connect a Popnet

- At the Source POP, do NOT add $NPT as your particle number. use the number of particles you want totally

- For their birth probability use $CR*4 (4 is just an example I used to check if it works, of course)

- Try it and tell me if it works

- if(solution works==1, grab a beer and make a toast for me, blame me and report here)


:wink:
Javier Meroño
FX TD.
  • Quick Links