Hi,
ok, this is by far not as elegant as I planned to, but I haven't dealt with solvers in POPs yet, so I beg your forgiveness for the somewhat dirty solution.
The following VEX code can be hooked up to the source_geo node emitting the points (after DOP I/O import), no additional attributes needed, as it only deals with attributes provided by the simulation already:
int hit=0; // counter for found hits
for(int pointnum=0;pointnum<i@numpt;pointnum+=300) // pointnum is "each point in current frame", checked in chunks of 300
{
if(pointnum+300>i@numpt) // safety check: If we are trying to address more points than available, bail out
break;
hit=0;
for(int i=0;i<300;i++) // 300 points per chunk
{
if(point(0,"hittotal",pointnum+i)>0) hit++; // if point no. i within chunk checked has at least 1 hit, increase number of points with hits
} // loop through points in chunk
if(hit>=300) // do we have 300 hits within this chunk (300 points)?
{
for(int i=0;i<pointnum+300;i++) removepoint(0,i); // remove all points within this current chunk
} // 300 hits found
else break; // we do not yet have 300 hits within this pulse group, no need to waste CPU cycles
}
Attached is a very simple example, emitting 300 points every 2 seconds (with 24fps at least), including the wrangle.
I hope this is of some help!
Marc
P.S. I am running over detail, so the code only gets executed once per frame to limit the CPU cost. Like I said: Not elegant … but there are people out there who like dirty
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [
www.marc-albrecht.de]