Inside a dopNetwork, how do we find the particle count for a stream ?
I'd like to use this number to drive a parameter in the same network.
Particle count
3319 8 1- A-OC
- Member
- 253 posts
- Joined: July 2006
- Offline
- Dean_19
- Member
- 319 posts
- Joined:
- Offline
- Dean_19
- Member
- 319 posts
- Joined:
- Offline
Tried it, doesn't seem to work. Although I did get it to work if you look outside the popnet for the node. I.e. append a null to your popnet node (outside the popnet) and ref that null in the npoints expression.
npoints(“../../null1”)
I used it in the amp field of a force pop, and it grabbed the number of points in the pop stream just fine.
npoints(“../../null1”)
I used it in the amp field of a force pop, and it grabbed the number of points in the pop stream just fine.
- tamte
- Member
- 8595 posts
- Joined: July 2007
- Offline
if you want to use it inside of DOPnet on the node belonging to some stream you'd probably need to do:
npointsgroup(“..:$OBJ/Geometry”, “stream_popstream1”)
where “stream_popstream1” is of course name of your stream or group you want to get pointcount for
I assumed following would work for current stream as well, however it returns 0 for me maybe a bug:
npointsgroup(“..:$OBJ/Geometry”, opstreamname(“.”))
npointsgroup(“..:$OBJ/Geometry”, “stream_popstream1”)
where “stream_popstream1” is of course name of your stream or group you want to get pointcount for
I assumed following would work for current stream as well, however it returns 0 for me maybe a bug:
npointsgroup(“..:$OBJ/Geometry”, opstreamname(“.”))
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- A-OC
- Member
- 253 posts
- Joined: July 2006
- Offline
- tamte
- Member
- 8595 posts
- Joined: July 2007
- Offline
`opstreamname(“.”)` works on it's own and returns name of the current stream, however using it in former expression seems not to be able to replace explicit name, which seems weird
regarding docs, maybe it was just never added there, but that function is heavily used by POP nodes
regarding docs, maybe it was just never added there, but that function is heavily used by POP nodes
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- A-OC
- Member
- 253 posts
- Joined: July 2006
- Offline
- A-OC
- Member
- 253 posts
- Joined: July 2006
- Offline
So trying to understand this
npointsgroup(“..:$OBJ/Geometry”, “stream_popstream1”)
I see the expression takes a surface node as the first argument, am I to conclude that ..:$OBJ/Geometry is a surface node?
Where is it ?
What is $OBJ ?
Docs say: “This value is the index of the specific object being processed by the node.” But I can't make sense out of it.
I understand .. ( two periods ) means 1 level up.
What does “:” do ?
And again most importantly, forgive me for asking, where is this info in the help files? Or what tutorials, etc. should I see regarding this syntax ?
npointsgroup(“..:$OBJ/Geometry”, “stream_popstream1”)
I see the expression takes a surface node as the first argument, am I to conclude that ..:$OBJ/Geometry is a surface node?
Where is it ?
What is $OBJ ?
Docs say: “This value is the index of the specific object being processed by the node.” But I can't make sense out of it.
I understand .. ( two periods ) means 1 level up.
What does “:” do ?
And again most importantly, forgive me for asking, where is this info in the help files? Or what tutorials, etc. should I see regarding this syntax ?
- tamte
- Member
- 8595 posts
- Joined: July 2007
- Offline
that's how you access data from DOP sim
in this case Geometry Data of Current object as $OBJ is id of current object, or actually it should have been $OBJID
http://www.sidefx.com/docs/houdini14.0/dyno/io#idm140132764773680 [sidefx.com]
in this case Geometry Data of Current object as $OBJ is id of current object, or actually it should have been $OBJID
http://www.sidefx.com/docs/houdini14.0/dyno/io#idm140132764773680 [sidefx.com]
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- Quick Links