Texture tiling

Blitz3D Forums/Blitz3D Programming/Texture tiling

Almo(Posted 2004) [#1]
Hi!

Is there an easy way to tile textures?

For example, if a texture is on a 1x1 cube, I want to make a 4x4 cube where the texture tiles over the surface, so it's displayed 16 times.


Mustang(Posted 2004) [#2]
UV mapping...


Almo(Posted 2004) [#3]
Sorry, I'm a 3d newbie. What's UV mapping?


Mustang(Posted 2004) [#4]
http://www3.sk.sympatico.ca/kelbeau/max2ued/html/uvw.html

http://www.psionic3d.co.uk/tutorials/lowpoly/zuvm.html

http://www.delaflor.com/uvtutorial2.html


Almo(Posted 2004) [#5]
So do I have to use a modelling program? I'm just a lowly programmer. I just want to take this one texture and use Blitz to texture various things made with CreateCube.


Odds On(Posted 2004) [#6]
You can use ScaleTexture on the texture you want to tile. Basically scale the texture the opposite amount you want to tile it (ScaleTexture tex, 0.25, 0.25) to tile it 4 times on the cube. An easier way to remember how much to tile it is to simply use:

ScaleTexture tex, 1.0/num_tiles, 1.0/num_tiles


Almo(Posted 2004) [#7]
Got it. Thanks!