Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / UV Coord to 3D Point that lies in the face Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Phillip Schuster

August 04, 1999, 12:29 PM

Calculating a 3D Point in a face when an UV coordinate is given



Hi all !!

Ok, I have a problem. I have a face (Triangle, so with 3 vertices). Every vertex has of course UV coordinates. Now, what I basically want is :

Stepping through each pixel of the texture the face has assigned:

for (y=0;y

 
Dimitris

August 05, 1999, 07:12 PM

A simple way to find the uv coords is this:
- find iu=1/u, iv=1/v, iz=1/z for each vertex
- linear interpolate iu,iv,iz for every pixel
- you can get the uv coords like this: u=iu/iz, v=iv/iz

Phillip Schuster wrote:
>>Calculating a 3D Point in a face when an UV coordinate is given
>>
>>
>>
>>Hi all !!
>>
>>Ok, I have a problem. I have a face (Triangle, so with 3 vertices). Every vertex has of course UV coordinates. Now, what I basically want is :
>>
>>Stepping through each pixel of the texture the face has assigned:
>>
>>for (y=0;y> for (x=0;x> ....
>> }
>>}
>>
>>and I want to calculate the 3D Point (World Space) that lies in the face and represants the UV coordinate (x,y in this example). How can I do that.
>>
>>
>>Thanks,
>>
>>Phillip

 
This thread contains 2 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.