Tiling terrain

Blitz3D Forums/Blitz3D Programming/Tiling terrain

I am messing around with tiling terrain that uses vertex alpha to smoothly transition between textures. I wanted to compare my findings with anyone else who has done this.

For each texture in the terrain, I use a separate surface, with EntityFX 32 enabled. I set the vertex alpha values from an alphamap bitmap. I have to apply the terrain lightmap as a second texture to each of these surfaces.

The use of the '32' flag causes z-order problems. The only way around this is to use an extra surface, just plain white, as the first surface in the mesh.

The results look good, but it seems pretty unoptimized, since at the very least, you have to render the whole terrain twice just for the underlying z-order-fixing white surface.