Attribute gradient

   960   4   0
User Avatar
Member
94 posts
Joined: Jan. 2015
Offline
I have a mesh grid. Each point has an attribute with a different value. For each point, I'd like to compute the "gradient" vector for this attribute: a vector pointing in the direction of the largest difference in attribute value between the given point and its surroundings. I can do it with vex code, but is there maybe a SOP that already does this automatically?
User Avatar
Member
802 posts
Joined: Feb. 2017
Offline
Hey element33,

yes, the polyframe node can do it. Set its style to attribute gradient.
Your attribute must be from type vector for some reason.
So you have to convert your float attribute to a vector first.


Cheers
CYTE
User Avatar
Member
94 posts
Joined: Jan. 2015
Offline
CYTE
yes, the polyframe node can do it.

Nice, thanks.
User Avatar
Member
9372 posts
Joined: July 2007
Offline
You can also use Measure SOP
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
94 posts
Joined: Jan. 2015
Offline
tamte
You can also use Measure SOP
Thanks.
  • Quick Links