Terrain Scaling

Blitz3D Forums/Blitz3D Programming/Terrain Scaling

_PJ_(Posted 2004) [#1]
I have a heightmap (for use with LoadTerrain) which is 256 x 256 pixels.

I also have a texture for this terrain which is also 256 x 256 pixels.

I wish to scale the Terrain with ScaleEntity by say 128,8,128

If I scale the texture with ScaleTexture 128,128 - will it fit the scaled terrain exactly?

Does it matter in which order I do the scaling, or whether I Texture the Terrain first???


Filax(Posted 2004) [#2]
the color map must the same size than the heightmap
if you have a heightmap in 512/512 resizetexture
in 512/512.


GfK(Posted 2004) [#3]
The two are totally independent. ScaleEntity only repositions vertices, not UV coords.

If you have a 256x256 terrain, a texture applied to it, by default, will be repeated 256 times along each axis.

If you scale the texture by 128x128, the texture will be repeated twice along each axis (128+128=256). Scaling the texture by 256x256 would make the texture exactly fit the terrain.


_PJ_(Posted 2004) [#4]
So I need to scale the texture by 256 x 256 regardless of terrainscale!

Thanks peeps!