Hey Guys.
I've searching for a while can't can't quite find an answer that helps me out much, so here I am
I've created a custom point attribute called ‘exceedThreshold’ It's just a simple 1 or 0 on each point of my mesh. What I want to do is add each point's exceedThreshold value to an array so that I can check the array to see if any 1's exist (and then if they do it'll flip a switch and do other cool stuff). The closest I've gotten is (all in a VOP network) using a for loop to create an array and then a for each loop to check the array for any 1's. It halfed worked. What ended up happening was it created one array for each point, containing as many elements as there were points, and each element was just the same value as the exceedThreshold attribute was before the array was created.
For example, point 0 had an exceedThreshold value of zero, so the array for it was just 8 zeros.
I've also tried a few other things that failed miserably.
If anyone has any answers as to how I can get this done, or even just point me in the right direction, I would be very appreciative. Also I realize it might be a super simple solution that I've missed, but I'm at the end of an 11 hour day at uni so my mind is kinda fried. Thanks again to anyone who can help
P.S. I'm using Houdini15 if that is at all relevant.
Adding custom point attributes to an array
4917 6 2- Kubaki
- Member
- 12 posts
- Joined: May 2015
- Offline
- galagast
- Member
- 252 posts
- Joined:
- Offline
I'm not sure if this would help as I'm fairly new to VEX.
In the attached file, I used a couple of Wrangle nodes to:
In the attached file, I used a couple of Wrangle nodes to:
- create the exceedThreshold point attribute.
- create a array from those as a Detail attribute (although I don't know how to process the array using expressions..)
- create a “switch” attribute to control the input of a Switch SOP.
* The scene has an animated box which will select and group points.
* The grouped points will have an exceedThreshold value of 1.
- Kubaki
- Member
- 12 posts
- Joined: May 2015
- Offline
- galagast
- Member
- 252 posts
- Joined:
- Offline
- tamte
- Member
- 8555 posts
- Joined: July 2007
- Offline
- Kubaki
- Member
- 12 posts
- Joined: May 2015
- Offline
- tamte
- Member
- 8555 posts
- Joined: July 2007
- Offline
yes, in this case it basically promotes attribute from points to detail
which means that it applies the chosen operation to attribute values of all the points, in this case it picks maximum value from all (but you can as well do minimum, average, sum, …)
if you would promote from points to primitives with max
then you would get primitive attribute where each primitive would store maximum value of given attribute among just points of that primitive
etc.
which means that it applies the chosen operation to attribute values of all the points, in this case it picks maximum value from all (but you can as well do minimum, average, sum, …)
if you would promote from points to primitives with max
then you would get primitive attribute where each primitive would store maximum value of given attribute among just points of that primitive
etc.
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- Quick Links