Texture tiling

Blitz3D Forums/Blitz3D Programming/Texture tiling

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.

UV mapping...

Sorry, I'm a 3d newbie. What's UV mapping?

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

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.

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

Got it. Thanks!