basic Vertex UV values per triangle, if your new. I remember forgetting this!
(0,1) (1,1)
o o
o o
(0,0) (1,0)
Addvertex(surf x,y,z,u,v,w) is the way to use it. Currently, W doesnt do anything, so you set the UV coordinates like this:
bottom left:
addvertex(surf,x,y,z,0,0)
bottom right:
addvertex(surf,x,y,z,1,0)
top left:
addvertex(surf,x,y,z,0,1)
top right:
addvertex(surf,x,y,z,1,1)
(0,0) (1,0), (0,1), (1,1) make the entire texture fit onto the quad. you can use floating point values to only make part of the texture fit onto the quad, like this:
(.25,.25) (.75,.25) (.25,.75) (.75,.75).. which would take a quarter of the texture (actually, the middle bit) and stretch it across the quad
Forgive me if im terrible explaining, Will Someone clean up after me? I know you lot can do much better explanations than me!!!
Cheers.
(0,1) (1,1)
o o
o o
(0,0) (1,0)
Addvertex(surf x,y,z,u,v,w) is the way to use it. Currently, W doesnt do anything, so you set the UV coordinates like this:
bottom left:
addvertex(surf,x,y,z,0,0)
bottom right:
addvertex(surf,x,y,z,1,0)
top left:
addvertex(surf,x,y,z,0,1)
top right:
addvertex(surf,x,y,z,1,1)
(0,0) (1,0), (0,1), (1,1) make the entire texture fit onto the quad. you can use floating point values to only make part of the texture fit onto the quad, like this:
(.25,.25) (.75,.25) (.25,.75) (.75,.75).. which would take a quarter of the texture (actually, the middle bit) and stretch it across the quad
Forgive me if im terrible explaining, Will Someone clean up after me? I know you lot can do much better explanations than me!!!
Cheers.