Swift Terrain System Demo


Tweet blitz3d terrain
(Posted 2 weeks ago) RonTek

This is a demo of sswift's terrain system.

The terrain system constructs it's terrains out of a series of tiles, each which is a discreet mesh which can have it's own texture. For each tile, you can flip the texture so that you can dramatically reduce the number of textures you need. You can also apply a lightmap seprately from the textures which is stretched over the entire terrain.

The system manages the level of detail at each tile replacing them with lower detail meshes as the tile receeds into the distance. This allows very long view distances with high levels of detail, while maintaining a polygon count of between 10,000 to 50,000 polys per frame. You can change parameters to decide where you want the detail to be, what kind of view distance you want, and you can even change the mesh detail on the fly in your game to a lower detail level instantly.

You should be aware that currently there can be cracking between tiles. You can reduce the visiblity of this if you use a dark background for the lower half of the sky, or if you, like in my demo, move the distant tiles downward slightly. Also, there will be visible popping of new tiles in the distance if the fog is not heavy enough to cover them up completely, or if you do not scale them vertically like I have also done in the demo. This scaling and moving of tiles which I do in the demo comes at the cost of potentially causing distant objects to appear to float above the terrain. If your game has lots of flying enemies, this will not be a problem, and you can also use autofade to fade distant enemies out before they start to visiblity float above the ground which you should probably do anyway to avoid haivng too many enemies visible at once. But the option is there to remove that scaling and motion if you need to. Eventually I may come up with a way to seal the cracks between tiles, and if you buy a commercial license and need me to do that I'll certainly give it another shot, but it's not easy to do!

Author: sswift

Download Demo (library source not included)

Image

Reply To Topic (minimum 10 characters)

Please log in to reply