I am kind of a Houdini newbie struggling through one of my first technical projects. Almost there.
I have a collection of primitives generated by find shortest path.
Points in my scene reference these primitive paths with an @sourceprim attribute.
Each points @sourceprim attribute changes from time to time so it is not static.
The number of points with an @sourceprim reference also changes.
I need add the primitives referenced by each points @sourceprim to a group and remove the ones no longer referenced.
I know how to add the primitives to a group with vex but am getting hung up on how to reference the primitive via the point attribute and then add that to a primitive group.
Hope that makes sense
Any suggestions much appreciated
Jeff
add primitives to group via point attribute
5069 4 0-
- jeffMc
- Member
- 125 posts
- Joined: April 2014
- Online
-
- tamte
- Member
- 9241 posts
- Joined: July 2007
- Online
Primitive Wrangle
first input your prims
second input your points with @sourceprim attrib that matches primnum in first input
however if you are gonna be deleting it in a solver then your primmnum will not match sourceprim anymore since after each delete it will change
so you can store sourceprim attrib on prims as well before any deleting happen and then use that to lookup the points
first input your prims
second input your points with @sourceprim attrib that matches primnum in first input
int pt = findattribval(1, "point", "sourceprim", @primnum); i@group_isnotreferenced = pt == -1;
however if you are gonna be deleting it in a solver then your primmnum will not match sourceprim anymore since after each delete it will change
so you can store sourceprim attrib on prims as well before any deleting happen and then use that to lookup the points
int pt = findattribval(1, "point", "sourceprim", i@sourceprim); i@group_isnotreferenced = pt == -1;
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- rizviali110
- Member
- 79 posts
- Joined: March 2012
- Offline
-
- jeffMc
- Member
- 125 posts
- Joined: April 2014
- Online
-
- Kaminszakr
- Member
- 2 posts
- Joined: Aug. 2016
- Offline
What about making unique primitives with a facet or fuse and promoting the area attrib to points? Then you could run this through a vopsop.
http://www.3d-architectural-rendering.com/Animation-Design-Studio.html [3d-architectural-rendering.com]
-
- Quick Links