Game Development Community

Megaterrain help

by Juha Eerola · in Torque Game Engine Advanced · 11/11/2008 (2:45 pm) · 2 replies

Hi,

How would I import heightfield from L3DT to TGEA?
I have 4096x4096 png and I tried importing it, but the result was ... weird. It seemed like only part of the heightfield was used and the terrain slopes were like stair steps.

Is that image too large? If it is, can I cut it into pieces, let's say 512x512 and make multiple megaterrain blocks and import each piece to each block to make one, large terrain?
I'm not using atlas, because I want to be able to edit the terrain later and make caves.


Thanks for the help.

- Juha

#1
11/11/2008 (3:14 pm)
MegaTerrains only accept 512x512 hms, and auto split them into 256x256 semi-legacy chunks. You can manually break up a larger one into 512x512 chunks, but in order to properly import them, you're best off importing them one at a time. Code will autoposition them, so trying them all at once will cause them to get stacked. So... import your first group, exit, check mission file and adjust position values of all 4 (they will be at say -4096 -4096 0, move to -8192 -8192 0, etc). Do this for each group.
Overall, it should work fine, but problems are bound to appear at some point. I've used 4 megaterrains (16 chunks) with no problems, but that's only a 1024x1024 map. You're asking for 4x that! Some type of paging system may be in order here....
#2
11/12/2008 (2:55 pm)
Woah! Never imagined it would require that much to get it in as a megaterrain. I just wonder how heavily that would affect the fps... having that many megaterrains...

Maybe I'll just leave caves out of the game and make craters straight to the heightmap in L3DT's 3d-editor and use Atlas instead.

Thank you for your answer :)