Game Development Community

TGEA 1.7 AFXbeta1 'gentle rolling terrain

by Andy Hubbard · in Torque Game Engine Advanced · 04/19/2008 (9:41 am) · 3 replies

Hi all,

I am using L3DT to produce a heightmap of a gentle rolling terrain. I just want a base for several mega terrains stitched together, so would like to use L3DT in edge wrapping mode to create a 512x512 heightmap with a height range from 1m to 10m. I can get the heightmap exported from L3DT as a 512x512 16bit png file easily enough.

But! When I create a mega terrain using this heightmap the gentle rolling terrain turns into a very jagged terrain that has height variation of 100s of meters. I have tried adjusting the heightmap scale to 0.00015 (10/65536) (alt range / png bit depth), but changing this value seems to have minimal effect. I would like to use a terrain square size of 4.

Does anyone know what I may be doing wrong, or maybe can suggest a better way of producing the effect I need?

Cheers,

Andy

#1
04/19/2008 (10:43 am)
I can't offer much else help, but if you are using the BuildMegaTerrain gui, I believe it clamps the heightmap scale to a value from 32 to 255. Are you interpreting it correctly?
#2
04/19/2008 (2:04 pm)
Thanks Jeff, reducing the clamp so I could put in a heightmap scale of 4 seemed to get just the terrain I am after.

Not that a value of 4 stands up to my interpretation --- if you have a height range of 10m in your heightmap, and that heightmap is 16bits, i.e. 65536 grey levels, then every grey level in the heightmap should equal 10/65536 meters, which is ~0.00015m per grey level.

But, 4 worked, so I am happy :) I have a gently rolling terrain, with the peaks at ~10m ;)

Thanks again.

Andy
#3
04/19/2008 (3:10 pm)
Try exporting your heightmap from L3DT as a 512x512 8 bit and/or 24 bit png file. I've created mega terrains using both 8 and 24 png files and they all look more or less like what I expected.

Everything I can remember reading about legacy terrain suggests using 8 or 24 bit png files. The same may be true for mega terrains.