Mesh XYZ to UV

Hi Gang,

New to VVVV and it’s been decades since I did any serious 3D programming so I am a bit rusty.

I am using the Kinect 2 to cast a ray that hits a 3D model. From this I am getting the XYZ coordinates of where the ray intersects the mesh (Collada). What I want is to get the UV values of the texture where the XYZ position is so that I can interact with and animate the texture. How do I get those values?

(This texture will eventually also be projection mapped onto real structure.)

Thanks for your help.

This might be of help.

I did see that already. The problem I have with this method is that it uses the mouse’s screen position on the final image for input rather than the XYZ coordinates on the surface of the model. I’m not using the mouse as an input device (or any input device that gives me an XY coordinate on the screen).

Also the perspective of the camera will cause this function to return uneven results depending on where on the model the ray is intersecting which is less than ideal.

Since the system needs to know where the XYZ position on the model corresponds to the UV position on the texture in order to put the texture onto the mesh I was hoping there was a way to access that information.

Not 100% clear what you want to do sorry. But I think you can just render the UV of your mesh from kinect perspective unless I misunderstood. There is VertexAttribute shader in Instance Noodles that will do this (just set Technique pin to UV).

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.