• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

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

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

### #1Phillip Schuster  Members

Posted 15 August 1999 - 12:27 PM

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

### #2Anonymous Poster_Anonymous Poster_*  Guests

Posted 15 August 1999 - 12:27 PM

Hi

If I understand correctly you want to convert a UV in a texture (mapped on a poly) back to worldspace, right?

This is not really possible since the single texel is not just 1 wordspace coordinates.
Imagine a 4x4 texture mapped on a very large polygon. Now the texel at UV position 2,2 for example will be mapped on a big piece of the polygon, covering more then 1 worldspace coordinate.

Are you trying lightmaps or volumetric fog?
Then this is not the way to do it

Sorry if I understand your question wrong.

- John vd Burg
Programmer of Oxygen3D http://www.mysticgd.com/oxygen3d.htm

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.