1 MINUTE VEX II

Sampling Attributes With Uvdist And Primuv


In this example, we continue with our tree - assigning ‘u’ to the 1st vector component of ‘uv’.

By isolating our primitive number (converting it to a string ‘group name’), we can use the ‘uvdist’ function to detect how far our sample position ‘spos’ is from the current prim.

We then compare our distance to a minimum tolerance; If the sampled distance to the prim is less, ‘primuv’ (in conjunction with our exported ‘dprim’ and ‘duv’ variables) is used to extract our desired attribute across all possible instances.