Jump to content

Sampling positions from UV map using uvsample()

konstantin magnus

Recommended Posts

I am trying to place a point on a uv-unwrapped mesh based on its UV coordinates interpolated position and normals using uvsample().

float uv_x = chf('uv_x');
float uv_y = chf('uv_y');
vector uv_pos = set(uv_x, uv_y, 0);

@P = uvsample(1, "P", "uv", uv_pos);
@N = uvsample(1, "N", "uv", uv_pos);

While this kind of works, it unfortunately jumps from one row to another instead of smoothly running across the surface. Is this a bug or my fault?


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...