2
$\begingroup$

Is there a way to access the attributes of a triangle or face associated with the currently processed fragment? I see that we can get barycentric coordinates for each face using Geometry node -> Parametric output but I would like to further get for example and ID or at least color value or whatever attribute of each adjacent vertex. I guess I can do something like using the Position output to get a world-space coordinates and then get the closest vertices to this but that's not ideal. For example here: enter image description here

I would like to also know that the barycentric coordinates of the red point are also corresponding to the vertices 1,4,3.

$\endgroup$
2
  • 1
    $\begingroup$ I've only managed to get this far... with OSL. From there, I guess you could get the UV coordinates at the triangle corners, and, from there, any of their function-of-UV, or baked, attributes.. but we need an Attribute node that takes a coordinate input. $\endgroup$
    – Robin Betts
    Commented Sep 6, 2021 at 9:02
  • $\begingroup$ @RobinBetts Hmm nice approach! I will have to experiment with it a bit. Thanks! $\endgroup$
    – Hitokage
    Commented Sep 6, 2021 at 9:16

0

You must log in to answer this question.

Browse other questions tagged .