In UV mapping each vertex has a UV coordinate, but wouldn't that just make 1 pixel for every vertex? How do you find out the texture coordinate for the spaces in between the vertices? Am I not understanding UV mapping right?
Actually every face of your mesh has UV coordinates through which UV mapping works. Let take an example of cube.
Cube has 6 faces and every face has 4 coordinates. That means a Cube must have 24 coordinates for UV mapping.
Now second part is to map coordinates with texture. Let's take an example of a square texture image having 6 different color boxes ( for each face actually). This means texture has 2 rows and 3 columns of color boxes containing 6 different colours. Have a look
Now if I want to map red color on Cube's top face let say and I know that the coordinates at 0, 1, 2, 3 represents the top face of cube. Then I would map as
- Coordinate at 0 would map 0,1 of texture
- Coordinate at 1 would map 0.33,1 of texture
- Coordinate at 2 would map 0.33,0.5 of texture
- Coordinate at 3 would map 0,0.5 of texture
As texture's points lies between 0 and 1. And if 0.33 is not clear then it is 1/3 of total width because 1/3 + 1/3 + 1/3 = 1