I know you can get uv space to world space, but is there a way to trace backwards?
if I have vector3 position on the model surface I want to find out where is it in the UV coord?
Thanks
houdini from model world position to uv position?
3227 4 1-
- JIn_
- Member
- 20 posts
- Joined: Dec. 2018
- Offline
-
- tamte
- Member
- 9374 posts
- Joined: July 2007
- Offline
you can use Ray SOP in Minimum Distance mode and import uv attribute
or you can use xyzdist() followed by primuv() VEX functions to get coordinates on the closest surface and interpolate uv attribute at that location, essentially the same as Ray SOP above does
or you can use xyzdist() followed by primuv() VEX functions to get coordinates on the closest surface and interpolate uv attribute at that location, essentially the same as Ray SOP above does
Edited by tamte - March 14, 2022 23:16:21
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- animatrix_
- Member
- 5091 posts
- Joined: Feb. 2012
- Offline
Hi,
Here is an example:


Lookup UV :
Here is an example:


Lookup UV :
int hitprim = -1; vector hituv = 0; xyzdist ( 1, @P, hitprim, hituv ); i@hitprim = hitprim; v@hituv = hituv; vector p = primuv ( 2, "P", hitprim, hituv ); @P = p;
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
-
- JIn_
- Member
- 20 posts
- Joined: Dec. 2018
- Offline
-
- JIn_
- Member
- 20 posts
- Joined: Dec. 2018
- Offline
-
- Quick Links

