UVMapp MultiTiles

BlitzMax Forums/MiniB3D Module/UVMapp MultiTiles

FBEpyon(Posted 2008) [#1]
Hello,

Im trying to get multiple tiles from just one texture image so that I can do multi tiling on my new terrain engine.. can someone help me get this please..?


klepto2(Posted 2008) [#2]
AS I can'T post any code currently, just small hints:

- Each Vertex has 2 different Texcoord sets.
- The Texcoords is in the range of 0.0 to 1.0.
- Assuming you have 5 tiles on your texture,
you have to set the texcoords to the correct tile.
I think you have devided your mesh into quads so each quad has its texcoords 0,0;0,1;1,0;1,1 or the like. lets say you only want to have tile 1 shown: texcoords should look like this: 0,0;0,1;0.2,0,0.2,1.0
for tile 3 it would be: 0.4,0;0,1.0;0.6,0,0.6,1.0

For more info take a look in the b3d forum it behaves the same in minib3d.