I'm getting into DOPs coming from SOPs. I'm building a tree in a POP Net where one single particle starts at the origin and gets affected by a directional force upward that's also affected by some wind.
This point replicates forming branches using the POP replicate node. But I want the newly created particles to replicate more often, specifically I want to drive it based on particle age. Since there is an Emit from attribute property on the Replicate node it seems this should be straightforward.
I do create a float attribute “prob” on each particle using a DOP wrangle that based on age gives each particle a 0-1 probability. But it seems binary, a zero attribute causes the Replicate to not emit particles for that point, and a non zero attribute causes all points to Replicate at the exact same frame.
POP replicate with variable replication rate?
3825 10 0-
- Erik
- Member
- 13 posts
- Joined: Aug. 2017
- Offline
-
- tamte
- Member
- 9586 posts
- Joined: July 2007
- Offline
-
- Erik
- Member
- 13 posts
- Joined: Aug. 2017
- Offline
Yes you are correct it does work as an emission rate rather than a probability! Thanks a lot.
I'm now trying to use a POP wrangle to set the age of each replicated particle to the age it's “master” had when it got replicated. The only way I could think of was to use the nearpoint() function but it always returns -1 so it can't find my particles that are there in the spreadsheet. I guess it might not work like it used to in the SOP world I guess. How would one write the age of the original point to the newly replicated points?
I'm now trying to use a POP wrangle to set the age of each replicated particle to the age it's “master” had when it got replicated. The only way I could think of was to use the nearpoint() function but it always returns -1 so it can't find my particles that are there in the spreadsheet. I guess it might not work like it used to in the SOP world I guess. How would one write the age of the original point to the newly replicated points?
Edited by Erik - July 31, 2018 19:14:18
-
- tamte
- Member
- 9586 posts
- Joined: July 2007
- Offline
-
- Erik
- Member
- 13 posts
- Joined: Aug. 2017
- Offline
Thanks that did it! It's a lot to wrap your head around because it's so different from the linear flow of SOPs. Just so understand why this actually works: it seems to me that the POP source is sort of like a merge node in a way, since the newly created particles that came out of the POP replicate-node in the previous solver step will end up coming out of the POP source in the next solver-step, right? Or am I just too tired now…
-
- tamte
- Member
- 9586 posts
- Joined: July 2007
- Offline
Erik
since the newly created particles that came out of the POP replicate-node in the previous solver step will end up coming out of the POP source in the next solver-step, right?
not exactly
all POP DOP solvers are operating on the Geometry data by default and modifying it
so in theory any node can access all the particles in the Geometry data, but POP DOP solvers are also made such that they only modify particles in the stream they belong to, which may look like certain particles flow only through certain streams, but that's not the case, rather the stream membership is resolved from the graph flow and used as a group filtering the particles to be modified
if you use Geometry Wrangle for example instead of POP Wrangle the stream membership will not be respected by default and it may seem like the particles are “flowing” through the stream they don't belong to
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- Erik
- Member
- 13 posts
- Joined: Aug. 2017
- Offline
Thanks for explaining! I am at a point now where I think I have to create the points myself in a POP wrangle rather than relying on the replicate node. Thing is it turns out I really want to control how often particles are split and vary this per particle.
I just read the docs on how to write vex snippets on DOP nodes that support it. For some reason the replicate node doesn't support vex snippets anywhere though. I feel it should be possible to control how often a point replicates but I might be going down a dead end here
I just read the docs on how to write vex snippets on DOP nodes that support it. For some reason the replicate node doesn't support vex snippets anywhere though. I feel it should be possible to control how often a point replicates but I might be going down a dead end here
Edited by Erik - Aug. 1, 2018 22:00:51
-
- BabaJ
- Member
- 2178 posts
- Joined: Sept. 2015
- Offline
-
- Erik
- Member
- 13 posts
- Joined: Aug. 2017
- Offline
Yes it might work, just seems it would be so clean to have a vex snippet available where you override a parameter that dictates the timestep for replication. I will try something tomorrow but since I'm not well versed in DOPs it feels like very hard work for something that's essentially really simple.
-
- tamte
- Member
- 9586 posts
- Joined: July 2007
- Offline
BabaJ
I am at a point now where I think I have to create the points myself in a POP wrangle rather than relying on the replicate node.
that's exactly what that attribute is for
to specify exact amount of particles any input particle will split into at any given time if you have impulse at 1 and no birth rate
of course you can use POP Wrangle to create that attribute, but you can leave the rest for pop replicate
Edited by tamte - Aug. 1, 2018 23:19:03
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- Erik
- Member
- 13 posts
- Joined: Aug. 2017
- Offline
-
- Quick Links

