Scaling Textures

After you’ve applied your texture, you may find that it is either too big or too small for the object you are wrapping it around. You can use the ScaleTexture command to increase or decrease the scale of the texture.

Here is the line we would add to our code to scale the texture:

; Creating the texture
tex=LoadTexture( "texture.bmp" )
ScaleTexture tex, 2,2
EntityTexture sphere,tex

After the ScaleTexture command, you tell Blitz3D which texture you want to scale—in this case it is the one called tex. You then specify how much you would like to scale the object. Because the image you used as your texture was two-dimensional, you only have to enter a number for the amount you want to scale the x and y axes. Any numbers you enter above 1 will increase the size of the texture, and any integer between 0 and 1 will decrease the size of the texture. For example, if you entered 0.5,0.5 for the scale, the texture would be reduced by half.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.4.174