Extracting the least and max values in attribute vop?

   781   4   1
User Avatar
Member
188 posts
Joined: May 2021
Offline
How can I select the highest and maximum values from a set of values in attribute vop?

Here I am trying to extract the maximum and minimum values for the mask attribute.

Attachments:
ATT_LIMITS.hipnc (195.9 KB)

User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
I don't believe it's possible, and even if it were, it probably wouldn't be efficient to perform this operation inside a VEX Wrangle or an Attribute VOP. Doing so would result in an identical operation being repeated as many times as the number of points or primitives.

For finding the minimum and maximum values of an attribute, you can utilize the Attribute Promote SOP.
Edited by Andr - Sept. 18, 2023 08:13:15
User Avatar
Member
4516 posts
Joined: Feb. 2012
Offline
Hi,

You can use the Minimum and Maximum Merge Modes of Set Attribute VOP but they won't be resolved until the Attribute VOP finishes executing:

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
188 posts
Joined: May 2021
Offline
Andr
I don't believe it's possible, and even if it were, it probably wouldn't be efficient to perform this operation inside a VEX Wrangle or an Attribute VOP. Doing so would result in an identical operation being repeated as many times as the number of points or primitives.

For finding the minimum and maximum values of an attribute, you can utilize the Attribute Promote SOP.

How do I select the primitives or the points with the maximum mask values using attrib promote? Is it only supposed to promote the attributes to the maximum or minimum? I am not understanding. I have only known about its usage from promoting one class of attribute to another.


It is not specifically choosing the maximum values. It is containing all the lesser values for mask as well.
Edited by proceduralist - Sept. 26, 2023 11:33:26
User Avatar
Member
188 posts
Joined: May 2021
Offline
animatrix_
Hi,

You can use the Minimum and Maximum Merge Modes of Set Attribute VOP but they won't be resolved until the Attribute VOP finishes executing:


I checked the geometry spreadsheet and it contains attributes with all values when I select the 'set attrib node'. How do I extract the points only containing the maximum value?
Edited by proceduralist - Sept. 26, 2023 11:35:39

Attachments:
ATT_LIMITS.hipnc (175.4 KB)

  • Quick Links