Hi all ,
In the source pop you can read in the point count from a SOP in the birth parameter using npoints , is there any way I can read into the birth rate the point count from a group at the sop level ?
regards r
Reading Point count from a group
9627 8 1- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- johner
- Staff
- 807 posts
- Joined: July 2006
- Offline
- wolfwood
- Member
- 4256 posts
- Joined: July 2005
- Offline
Or alternatively just append a Blast SOP to the Group and delete everything but that group. Then just use the npoints() expression. No harm in using extra SOPs to do your work for you.
If the geometry isn't changing over time then the Blast SOP will be cached so the npoints() expression will be nice and quick.
If the geometry isn't changing over time then the Blast SOP will be cached so the npoints() expression will be nice and quick.
if(coffees<2,round(float),float)
- johner
- Staff
- 807 posts
- Joined: July 2006
- Offline
Yeah, I thought maybe this was for an asset or something where the SOP and group name in question are entered directly as parameters. In that case a SOP-oriented solution could still work, but you'd probably want to embed a SOP network in the POPNet, ObjectMerge in the SOP in question, do the Blast and then reference that embedded SOP from the npoints expression.
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- wolfwood
- Member
- 4256 posts
- Joined: July 2005
- Offline
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- probiner
- Member
- 337 posts
- Joined: June 2013
- Offline
Hi guys, necropost here because I was looking for a solution for this.
Best I found was to set an attribute like i@check = 1 ; for the points belonging to the group and then do Attribute Promote to detail with sum.
This was faster than Blast SOP check, especially in a loop.
Let me know if there's an even faster one!
Cheers.
Best I found was to set an attribute like i@check = 1 ; for the points belonging to the group and then do Attribute Promote to detail with sum.
This was faster than Blast SOP check, especially in a loop.
Let me know if there's an even faster one!
Cheers.
Edited by probiner - Feb. 7, 2018 15:41:44
- Sean Rowe
- Member
- 39 posts
- Joined: July 2013
- Offline
Looks like the npointsgroup vex expression does the job, unless I'm mis-understanding the question (I probably am)
http://www.sidefx.com/docs/houdini/vex/functions/npointsgroup.html [www.sidefx.com]
http://www.sidefx.com/docs/houdini/vex/functions/npointsgroup.html [www.sidefx.com]
-
- Quick Links