Multiple ways to attack the problem, but no matter how you implement it you're 
crawling the UV space on object 'a' looking for the coordinate found in object 
'b'.

You can build a lookup table in advance to accelerate the search, or you can 
resort to something using barycentric coordinates, which would be similar to 
testing if a point is inside a polygon (or triangle).  Basically you go polygon 
by polygon and break it down into triangles using the UV coordinates of the 
triangles points instead of position coordinates, and test to see if object 
'b's UV coordinate resides inside the triangle. If not, go to the neighbor with 
the most negative barycentric weight and try again (assuming the UV space is 
contiguous).

Matt



-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Eric Thivierge
Sent: Friday, June 28, 2013 10:54 AM
To: [email protected]
Subject: Re: Closest Location in UV space?

Thanks Alan will take a look.

Matt, the UVs overlap in that object A's UVs are in the same UV space as object 
B's. If you watch this video it exemplifies what I'm trying to achieve.

http://www.youtube.com/watch?v=B7ZwPjCubs0


Eric Thivierge
===============
Character TD / RnD
Hybride Technologies


On June-28-13 1:19:25 PM, Alan Fregtman wrote:
> Have you seen this from Julian Johnson?
> http://julianjohnsonsblog.blogspot.ca/2013/06/texture-uv-to-location.h
> tml
>
>
>
> On Fri, Jun 28, 2013 at 11:12 AM, Eric Thivierge 
> <[email protected] <mailto:[email protected]>> wrote:
>
>     So I have 2 meshes. Both have UVs. The UVs overlap in UV space.
>     Point order is different. Is there a way to get a location or
>     point position on object b from object a using UV space?
>
>     Anyone familiar with Maya, I'm trying to recreate the transfer
>     attribute tool (point positions) in UV space.
>
>     Any help is appreciated. Running into issues because of different
>     point counts and unable to get closest location using UV space.
>
>     --
>      Eric Thivierge
>     ===============
>     Character TD / RnD
>     Hybride Technologies
>
>
>


Reply via email to