• ### What is your GameDev Story?

#### Archived

This topic is now archived and is closed to further replies.

# Simple Questions about UV texture mapping

This topic is 6573 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I''ve noticed that most texture mappers (modelling software) allow for textures to be offset. I''ve done this myself but never new the name. Is this effect known as UV mapping? Does the UV stand for anything, or is it just some letters to use rather than x,y,z which are normally used for coordinates? If this IS called UV mapping then why do most implementations (I''ve seen) use S and T to represent it? Futhermore, why am I seeing 3D vectors used to describe these values rather than just just 2 x,y (on faces plane) float coordinates? Many thanks Chris

##### Share on other sites
UV mapping is taking a 3D surface (x,y,z) and projecting (or mapping) it
onto a 2D surface (u,v).

##### Share on other sites
Hmmm. uv versus st. An unfortunate nomenclature inconsistency.

I think the variable ''s'' and ''t'' were created in order for various aspects of geometry and rendering to be documented, discussed together. Anonymous is correct when they say that the uv coordinates historically represent the two independent coordinates that represent a mapping of a 3D surface onto a 2D space. In geometry, (u,v) is a point on a 2D plane, exactly the same as (x,y) in that plane. But through the mapping, (u,v) corresponds to some 3D coordinate, (x,y,z). For example, if you unwrap a cylinder you get a plane. The (u,v) coordinates of this plane correspond to (x,y,z) points on the cylinder. If you want to talk about uv geometry coordinates and uv texture mapping at the same time, you have to invent new variables to talk about texture coordinates and those new variables are s and t.

For every geometric (u,v) on a surface there is a corresponding (s,t) that maps the (u,v) point to a texture point. So when you do UV mapping in a modeling package, the UV coordinates are actually (s,t) coordinates from the graphics theory point of view. I know that''s probably more confusing than ever. A picture would be good.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

##### Share on other sites
Actually, ST refers to vectors in 3D space. These are not the same as
uv coordinates, which are 2D points. Instead, ST vectors define the rotation
of the uv plane in 3D space. So you can think of them as helper vectors to
project (u,v) into (x,y,z).

But from what I understand, you don''t need ST vectors at all. You could
directly map (u,v) into (x,y,z) without them.

##### Share on other sites
Too make the whole issue even more confusing: lots of 3D modelling packages use UVW mapping...

What is the W used for ? Is this a kind of homogeneous coordinate to u,v (like [x,y,z,w]) or is this just used for volumetric texture mapping ?

##### Share on other sites
W is simply used for procedural mapping, things like wood, marble, etc..
For example, if you were able to cut out a section from 3D block of wood,
you should be able to see how W applies its mapping. I guess you can say
it gives uv mapping a sense of depth.

You typically don''t need to use W if you were just wrapping a texture
around a object. That means if you don''t use procedural mapping, W is
ignored by your modelling program.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

(You must login to your GameDev.net account.)

• 13
• 9
• 15
• 14
• 46
• ### Forum Statistics

• Total Topics
634056
• Total Posts
3015282
×