Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


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.

  • You cannot reply to this topic
1 reply to this topic

#1 Phillip Schuster   Members   -  Reputation: 122

Like
Likes
Like

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


Sponsor:

#2 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

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.



PARTNERS