Terrains - lots of Qs

Blitz3D Forums/Blitz3D Programming/Terrains - lots of Qs

syfax(Posted 2003) [#1]
I'm making a futuristic flight-sim game (kinda like Terminal Velocity). I've not used terrains before so I'd appreciate it if you could point me in the right direction. I have experimented a bit and researched the different options, but I'm sure other people have tried to make this sort of game before so I'd like to know how they've solve the problems.

Obviously I'm gonna need a huge terrain. It needs to big enough to make the person think they're flying across a never ending world. To do this am I better to make like a 4096x4096 map and scale it 100x or to make a smaller terrain and tile it? If I choose the latter would it start to get repetitive? Maybe something in between is best.

Does using a bigger heightmap file make it slower? Does scaling a file affect the speed? What's the biggest heightmap you'd recommend using? How easy is tiling?

To make my heightmap it seems I could either use something like Terragen, use a Perlin noise program to make it, or use a map editor like Mr Tricks. I'll probably make a perlin noise program to make it, and maybe modify it with a map editor, but would I get better results with Terragen?

For texturing it I can either overlay a huge texture on top of it all (which would probably eat memory, but would look very nice), or use a grass texture, a detail one and a shadow one and mutitexture it. I assume the latter is better unless I'm using quite a small heightmap file. Also, is it possible to make it so mountains have a different texture to valleys etc? ie only apply textures to certain heights on the terrain?

Told you I had a lot of Qs :)


Rob Farley(Posted 2003) [#2]
I'm not sure how the terrains work, but a 4096x4096 terrain seems way unnessary. That's a whole lot of detail there, you'd probably be able to get away with a 512x512 or 1024x1024. But that's you're choice. Terragen for example maxes out at 513x513.

Bigger heightmaps don't make it slower as far as I'm aware as you set the LOD to xx polys.

I create heightmaps by using perlin noise then edit it in a paint program, you usually need to smooth a few edges here and there to reduce LOD pop/morph and it tends to make it looks better, although you do lose a little detail.

Texturing, the way I go about it is by using a 'noise' pattern that is tiled over the whole thing, this just gives a bit of detail when you're up closed, use a grey scale sand texture or something, then multi-texture a big texture stretched over the whole map that gives tonal colour and shadow/light, this works pretty well. Especially for flight sim type stuff that doesn't need close up detail. I wrote a little app called terrain shader 2.0 that creates the big texture based on height, slope, adds lighting and shadows. Although there's still an older version of Terrain Shader that creates light and shadow but no texturing for free download.

Output from Terrain Shader 2.0 rendered in blitz in real time:





My Lander game uses a 512x512 heightmap with a 512x512 texture wrapped over the top of it and I think it gives plenty of detail.



syfax(Posted 2003) [#3]
Thanks that helps a lot

I'll download Terrain Shader, screenshots look very nice :)

The terrain for Lander looks good, how much have you scaled the 512x512 heightmap? What happens when you get to the end of it, does it tile it, or do you have the sea or something?

And how do you make explosions look so damn cool???


PS The links to your programs in your sig don't seem to work. I'm using IE6.


Rob Farley(Posted 2003) [#4]
The lander terrain is scaled 20, 800, 20. Because it's a 512x512 map this means it ends up 10240x800x10240. With regards to the edge I don't let you get to the edge.

The expolsions are done with particle effects.

Just fixed the links!


makakoman(Posted 2003) [#5]
I uploaded an infinate terrain engine a while ago using meshes instead of Blitz terrains. You can download it with source:

http://www.blitzcoder.com/cgi-bin/showcase/showcase_showentry.pl?id=makakoman04012003155225&comments=no

Terragen makes great texturemaps, and then just add a tiled texture for detail.

If I remember correctly, the problem with using more than 2 textures (i.e. colormap, shadowmap, detail texture), is that some graphics cards can't handle more than 2 and Blitz will duplicate the mesh(polycount) to simulate the correct effect.

MK


Rob Farley(Posted 2003) [#6]
The colour map, shadow map and light map are all 1 texture, therefore you only have 2 textures, 1 detail and 1 colour map.