Game Development Community

Detailed Terrains

by William Todd Scott · in Torque Game Engine Advanced · 05/02/2006 (5:00 pm) · 8 replies

Hi all,

I want to be able to procedurally generate a 512x512 heightmap on the fly. The 512x512 is necessary not for a particularly large map, but instead for a more detailed terrain. I know I could do this using atlas but I would then have the additional overhead of generating the .chu and .tqt files which isn't really necessary at this size.

Is there a way in TSE to do this? Basically, what I need is TGE-type terrain that supports a 512x512 heightmap with smaller block sizes.

Thanks
Todd


edited for clarity

#1
05/02/2006 (5:02 pm)
Use the Legacy terrain like TGE uses? It's in there.
#2
05/02/2006 (5:07 pm)
Hey C2,

I didn't think that TGE supported a heightmap larger than 256x256 and I know there are issues with the block size and water in TGE.

Since the water is new in TSE, maybe that part isn't and issue?

Thanks
Todd
#3
05/02/2006 (5:13 pm)
Woops, didn't see the 512x512 part. Not sure about that one.
#4
05/03/2006 (12:07 pm)
What's the problem with 512x512 heightmap ? Why don't you use a 256x256 with larger spacing/scale? So by this way you can use legacy terrain with textures features.
#5
05/03/2006 (12:12 pm)
Hi Vince,

The 256x256 terrain is too coarse with the larger spacing/scale.

Thanks
Todd
#6
05/03/2006 (12:51 pm)
So you can generate .chu and .tqt on the fly (it takes approx 2 seconds). The main difficulty is to fill raw and jpeg.
#7
05/03/2006 (1:02 pm)
Vincent,

Thanks, that looks like where I am headed.

The cost to procedurally generate the heightmap is ~ 5 secs, so 2 more secs is meaningful. But not meaningful enough for me to spend weeks on it! :)


Todd
#8
05/03/2006 (1:14 pm)
Todd,

Simply script your generateChunkFromRaw16 and generateTQT. I explain :

To generate your terrain, you call your C++ code with script via a Consolefunction. And after you can create a simple script function which generate your terrain and stream it with .chu and .tqt generation.

That's what I do in HTC+ to have change on the fly. To make a 512x512 sample tile it take approx 4 seconds.

*Edit : What kind of generation are you working on?

Vincent