BlitzTerrain 2
BlitzTerrain 2, utilized by [ F.A.L.L.E.N ], is readily available at a very affordable price for DarkBASIC Professional and DarkGDK developers. BT provides major enhancements to the default Advanced Terrain engine in several key areas including real-time terrain modification, dynamic LOD, advanced physics, tile exclusion and frustrum culling.
Features
- Supports up to 256 Terrains
- Up to 7 LOD levels
- Heightmap sizes can be up to 4096×4096 per terrain
- Frustum Culling
- Indexbuffering
- Very fast LOD system
- Environment Mapping
- Realtime Terrain Modification
- Tile Exclusion
- Multitexturing
- Terrain Loading
- Terrain Streaming
LOD Terrain
LOD (Level Of Detail) terrain is an algorithm to significantly lower the amount of polygons drawn in a 3D scene when using terrain and hence decrease the workload on the GPU. It works by reducing the poly count of the parts of terrain which are very far away. Because the low detail parts are far away, the eye can’t spot any visual difference. This reduction in polygons leads to an FPS increase of up to 3x; which means that you can have threefold more detail in your game and it will still run at the same speed. The image on the right shows LOD Terrain in action, the lighter parts have more detail and the darker parts have less.
Video: http://www.youtube.com/watch?v=DnEfzQDYlEQ
Tile Exclusion
Using a simple black and white “Exclusion Map” you can stop tiles which are not visible (ie, tiles under buildings or underwater) from being created. This will decrease the poly count in cases where a great deal of the terrain does not need to be visible. The two images on the right are an example of what the exclusion mapping does. As you can see, the exclusion mapping stopped the engine from generating the black circles.
Realtime Terrain Modification
BlitzTerrain features a fast Realtime Terrain Modification System. It is basically a system that allows you to edit the terrain from within your program. This can be used in editors or realtime damage effects for example when a shell explodes. It can also export heightmaps once you have finished editing.
Video: http://www.youtube.com/watch?v=nKI5b_BRC9Q
Environment Mapping
An Environment Map is a simple colour map showing what the ground of each part of the terrain is. You can apply this map to your terrain and the system will return what type of ground is under a certain point. This could be used for footstep sounds and vegetation.
BlitzTerrain 1.06 NEW FEATURES!!
Blitzterrain has just been through a complete rewrite! 1.06 is the first version of BlitzTerrain to be released after the rewrite. Some of the new features are:
Brand New Rendering Engine
In the past, Blitzterrain used DBPros rendering engine. But this isnt very good for Terrains so I written a new DirectX Rendering engine from scratch. Its ALOT faster now, especially with high detail terrains.
QuadMapping
This is an algorithm I invented. It allows for quick terrain modification, get ground heights for terrains with quads of different sizes and rotations. It can completely regenerate a 256×256 terrain 70 times per seccond. Or edit every single vertex on a 256×256 terrain 100 times per seccond.
QSP (Quad Space Partitioning aka QuadTrees)
This is used for super fast frustum culling, LOD and front to back rendering. Front to back rendering renders all the detail closest to the player first, this is so DirectX doesnt render things on top of each other and improves Pixel Shader performance! This also causes lower detail sectors to be 4x as big, reducing draw calls and getting rid of most of the LOD “popping”. Reducing draw calls is more speed enhancing than reducing the poly count.
Multi camera frustum culling
This is a feature that was added into Blitzterrain 1.05 but was very difficult to get working. It now works perfectly and is easy to add into your games.
60x Faster Loading speeds!
Yes, you have read that right, BlitzTerrain loads and generates a 256×256 terrain in 0.1 secconds. And can load and generate a 2048×2048 terrain in under 10 secconds. In the past it took 6 secconds to generate a 256×256 terrain and 10 minutes to generate a 2048×2048 terrain.
Easier to code with
All the parts of BlitzTerrain which were difficult to understand, are now alot easier! Such as the build loop has been made alot easier and doesnt even need to be used anymore if you don’t want to use loading bars!
Dark GDK with OOP Support
Blitzterrain now supports Dark GDK. Here’s a code sample to demonstrate the basic loading of a terrain in Dark GDK:
BT_TERRAIN MyTerrain; MyTerrain->SetHeightMap(HeightMapImg) MyTerrain->SetScale(20.0); MyTerrain->SetLOD(3); MyTerrain->Build(ObjectID);
Loading and Saving
BT SaveTerrain TerrainID,File$
TerrainID=BT LoadTerrain(File$,ObjectID)
These 2 commands load and save terrains.
Save can be called anytime after BT BuildTerrain so you dont acctually have to generate the terrain after building it.
The Load command will load the terrain without generating it. You can then do a build loop to generate the terrain.



