What does the **&UVW** mean in the intersect function?

   1570   3   1
User Avatar
Member
19 posts
Joined: 1月 2019
Offline
Hey 3d people, New to VEX here.

The ampersand symbol means variable overwritten, right?
Then what does the uvw mean? UV coordinates? I've checked the intersection position on uv, but they weren't aligned

int  intersect(<geometry>geometry, string group, vector orig, vector dir, vector &p, vector &uvw)

https://www.sidefx.com/docs/houdini/vex/functions/intersect.html [www.sidefx.com]
User Avatar
Member
859 posts
Joined: 10月 2008
Offline
Correct!
--
Jobless
User Avatar
Member
8551 posts
Joined: 7月 2007
Online
bao007fei
Then what does the uvw mean? UV coordinates?
those are parametric UV coordinates within the primitive (or intrinsic primitive UVs), nothing to do with "uv" attribute

essentially primitive number + parametric uvw will define exact location within the primitive (e.g. on the polygon or within the tetrahedron)

many functions would return such location, intersect(), xyzdist(), uvdist(), Ray SOP, Scatter SOP, ...
then you can use such location in primuv() function (or within Attribute Interpolate SOP) to sample an interpolated attribute value at that location
Edited by tamte - 2021年3月1日 10:34:02
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
19 posts
Joined: 1月 2019
Offline
tamte
bao007fei
Then what does the uvw mean? UV coordinates?
those are parametric UV coordinates within the primitive (or intrinsic primitive UVs), nothing to do with "uv" attribute

essentially primitive number + parametric uvw will define exact location within the primitive (e.g. on the polygon or within the tetrahedron)

many functions would return such location, intersect(), xyzdist(), uvdist(), Ray SOP, Scatter SOP, ...
then you can use such location in primuv() function (or within Attribute Interpolate SOP) to sample an interpolated attribute value at that location
Thanks for the explanation. I did some research and finally figured out what you mean about the Primitive Parametric Spaces. Much appreciate.
Edited by bao007fei - 2021年3月1日 11:12:27
  • Quick Links