Massive terrains

Blitz3D Forums/Blitz3D Programming/Massive terrains

xmlspy(Posted 2007) [#1]
What's the best lib or way to have massive terrains? I'm looking for a way to make them seamless and varied. I know some games have portals so they free/load the levels, that is not what I want. I would like to have something more like a semi-infinite landscape that loads the levels as the player goes. Any tips?


_33(Posted 2007) [#2]
Best tip would be to section your terrain and load the terrain parts by analysing the distances. And at some point, you could make the terrain loop back, so it seems infinite. Terrains can be huge, and if you have many huge terrain meshes spread around, in a flight simulation, it could work nicely.


xmlspy(Posted 2007) [#3]
I wish Blitz terrains worked better with collisions and didn't do the things it does to terrain corners.


John Blackledge(Posted 2007) [#4]
Blitz terrains still work best for me.

I use a 1024x1024 heightmap and colourmap then ScaleEntity hEntTerrain, 20,100,20.
This gives me (by my estimate) 16 sq kilometres of terrain, surrounded by sea.
Then I add an extra layer of rock (256x256) to the terrain using ScaleTexture hBmpTerrRock,10,10 just to 'roughen' up the look.
Very, very efficient (low fps) and good-looking long range views when blended with an appropriate fog (camera/fog distance about 4000)
- because I wanted to be able to stand on a hill and see for miles, not have the usual copout of 'oh, there are houses, trees or hills in the way; there's actually a very short camera view'.
See the Blitz main news page and also the screenshots at www.stonehenge3d.com

For 'A walk in the Country' screensaver (http://www.blitzbasic.co.nz/gallery/view_pic.php?id=1529&gallery=&page=4)
I used the same heightmap, then:
hBmpTerrRock = LoadTexture("rock.png") : ScaleTexture hBmpTerrRock, 10,10
hBmpTerrGrass = LoadTexture("grass.png") : ScaleTexture hBmpTerrGrass, 1,1
hBmpTerrLight = LoadTexture("height_LM2.jpg") : ScaleTexture hBmpTerrLight, TerrainSize(hEntTerrain), TerrainSize(hEntTerrain)
;/\ modified heightmap in PSP becames lightmap
EntityTexture hEntTerrain, hBmpTerrRock, 0, 0
EntityTexture hEntTerrain, hBmpTerrGrass, 0, 1
EntityTexture hEntTerrain, hBmpTerrLight, 0, 2
EntityFX hEntTerrain, 2
EntityColor hEntTerrain,255,255,255

This gave a much more 'grassy' look where you could see blades of grass, and the high efficiency of the Blitz terrain still allowed me to then add in:
12 meshes each containing 125 mesh-trees (137 tris each) = 1500 trees, and
21 meshes containing 1000 3-quad plants/bushes = 21000 plants.

Long live Blitz terrains.


puki(Posted 2007) [#5]
They stole your terrain.

Don't worry though - I've stolen it back.


puki(Posted 2007) [#6]
Add cloud shadows to the terrain - it looks totally cool.


John Blackledge(Posted 2007) [#7]
Puki - do you have to pinch the terrain? The heightmap alone took weeks of work getting the circular ditch around Stonehenge accurate. At least overlay it with a new colourmap or Sandy'll kill you.

Cloud shadows? That would be a bit of a problem in 'Walk in the Country' with all those trees.

Stonehenge3D would benefit from it though - that would take 'draped' shadows wouldn't it? - though _I_ say that as England exists under a permanent layer of cloud without proper cloud definition, it wouldn't be accurate. That's my excuse anyway.


puki(Posted 2007) [#8]
Shouldn't be too much of a problem if you lightmap the tree canopys.


Rob Farley(Posted 2007) [#9]
I wrote an explaination of my terrain system here:

http://www.blitzbasic.com/logs/userlog.php?user=547&log=1319