Textures on a mesh/surface/triangle?

Blitz3D Forums/Blitz3D Beginners Area/Textures on a mesh/surface/triangle?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The most useful thing to remember (or learn about) is UV texturing. If you have a look at the AddVertex command you'll see optional u,v,w components. The U and V is the most important for texturing as they determine the positioning of textures on surfaces. So for example a surface on a cube, let's say one side of the cube, has four vertices. Therefore to be textured correctly the U and V coords should be 0,0 for top left and 1,1 for bottom right ala:

0,0-------1,0
|
|
|
|
0,1-------1,1

Hope that helps.

PS - I never used the w component, I'm sure it has some use but it isn't required to get the texturing working.