Repeated Texture

Blitz3D Forums/Blitz3D Programming/Repeated Texture

_PJ_(Posted 2004) [#1]
On a primitive mesh, how can I get a texture to repeat itself all the way along when the Mesh is scaled?


i.e. A cube created with CreateCube and a square texture. I want the texture to retain its dimensions and just be tiled when the cube is stretched along one axis.

Is this possible with single-surface meshes?


mrtricks(Posted 2004) [#2]
Yes, but you can't use a portion of a texture and repeat that. Just multiply the UV values by the scale of the object.


jhocking(Posted 2004) [#3]
Or use ScaleTexture to scale the texture down in one direction. Although this will make the texture look weird on the ends of the cube as you stretch it.


_PJ_(Posted 2004) [#4]
Ahh got it. I just added a ScaleTexture command. Hmm too much or too little caffeine? :)


ashmantle(Posted 2004) [#5]
You can never have too much caffeine ^^


_PJ_(Posted 2004) [#6]
Ohh it dont look right actually...

Its actually a cone (so I know its gonna look strange when it tapers, but that will be far from the camera.) I just wanna get some detail to my laser beams.

I create the cone, rotatemesh it, then stretch it into the distance.

The faces that are stretched look like the texture is also stretched along.


Yes, but you can't use a portion of a texture and repeat that. Just multiply the UV values by the scale of the object.



UV values means nothing to me haha and how would I multiply them???