Exporting large (but not too large) terrain from L3DT
by Andrew Edmonds · in Torque Game Engine Advanced · 05/13/2007 (11:09 am) · 3 replies
Hi all,
I'm hoping I can get some help off someone more intelligent than myself!
I've had no problems creating terrains in L3DT Pro and exporting to atlas using the L3DT plugin with fairly small maps. However, after a couple of unsuccessful attempts at creating someting bigger I feel it is time to ask for assistance... I'm trying to export a terrain from l3dt (obviously) - the design map was set up as follows:
X=128
Y-128
Heightfield resolution = 2.00 (giving a resolution of 8192 x 8192)
Mosaic map checked, tile size = 512 (16x16 mosaic)
I have generated all the maps and for the time being at least, I haven't activated high-res maps (although I may want to at a later date). When I export using the L3DT plugin it gets to around 20% on 'Propogating Activation Levels' and then L3DT crashes.
So then I tried to do it using the console commands in TGEA. atlasOldGenerateChunkFileFromRaw16() seems to work, as well as importOldAtlasCHU(), so I then have my atlas geometry file. However, when I run atlasGenerateTextureTOCFromTiles() TGEA crashes on me. The console log doesn't really give me anything useful as I think it crashes before
it has a chance to log anything:
I'm hoping I can get some help off someone more intelligent than myself!
I've had no problems creating terrains in L3DT Pro and exporting to atlas using the L3DT plugin with fairly small maps. However, after a couple of unsuccessful attempts at creating someting bigger I feel it is time to ask for assistance... I'm trying to export a terrain from l3dt (obviously) - the design map was set up as follows:
X=128
Y-128
Heightfield resolution = 2.00 (giving a resolution of 8192 x 8192)
Mosaic map checked, tile size = 512 (16x16 mosaic)
I have generated all the maps and for the time being at least, I haven't activated high-res maps (although I may want to at a later date). When I export using the L3DT plugin it gets to around 20% on 'Propogating Activation Levels' and then L3DT crashes.
So then I tried to do it using the console commands in TGEA. atlasOldGenerateChunkFileFromRaw16() seems to work, as well as importOldAtlasCHU(), so I then have my atlas geometry file. However, when I run atlasGenerateTextureTOCFromTiles() TGEA crashes on me. The console log doesn't really give me anything useful as I think it crashes before
it has a chance to log anything:
atlasGenerateTextureTOCFromTiles - Initializing atlas file 'atlas.fps/data/terrains/testLargeTexture.atlas'... AtlasDeferredFile::ensureStreamWritable - switching file into writable mode... This may cause a crash if you have other copies of Torque accessing it! atlasGenerateTextureTOCFromTiles - Atlas started, processing tiles for 5 deep tree... atlasGenerateTextureTOCFromTiles - Storing tiles in JPEG format...
About the author
Formed in 2005, EiKON Games is an indie games development project based in the UK working on the tactical first person shooter "Epoch: Incursion". See the Join Us or Contact Us pages at http://www.eikon-games.com/
Torque Owner Andrew Edmonds
EiKON Games
Much of it is probably to do with me not understanding what all the variables mean on the various functions. For the above manual way of importing I used the following functions:
atlasOldGenerateChunkFileFromRaw16("atlas.fps/data/terrains/Maps/testLarge.raw", 8192, 2.0, 2.0/512.0, "atlas.fps/data/terrains/testLargeGeometry.chu", 1.0, 5);Which gives me:
Generating chunked geometry (depth=5, baseMaxError=1.000000) o Calculating activation levels... - done. o Propagating activation levels... - done. o Writing file header... - done. o Generating empty TOC... - done. o Generating meshes... AtlasOldActivationHeightfield::generateNodeData - Max exceeded! May have paging issues! AtlasOldActivationHeightfield::generateNodeData - Min exceeded! May have paging issues! AtlasOldActivationHeightfield::generateNodeData - Min exceeded! May have paging issues! AtlasOldActivationHeightfield::generateNodeData - Min exceeded! May have paging issues! AtlasOldActivationHeightfield::generateNodeData - Min exceeded! May have paging issues! AtlasOldActivationHeightfield::generateNodeData - Min exceeded! May have paging issues! AtlasOldActivationHeightfield::generateNodeData - Max exceeded! May have paging issues! AtlasOldActivationHeightfield::generateNodeData - Max exceeded! May have paging issues! AtlasOldActivationHeightfield::generateNodeData - Max exceeded! May have paging issues! AtlasOldActivationHeightfield::generateNodeData - Min exceeded! May have paging issues! AtlasOldActivationHeightfield::generateNodeData - Min exceeded! May have paging issues! AtlasOldActivationHeightfield::generateNodeData - Min exceeded! May have paging issues! AtlasOldActivationHeightfield::generateNodeData - Min exceeded! May have paging issues! AtlasOldActivationHeightfield::generateNodeData - Max exceeded! May have paging issues! AtlasOldActivationHeightfield::generateNodeData - Min exceeded! May have paging issues! AtlasOldActivationHeightfield::generateNodeData - Min exceeded! May have paging issues! - done. === Chunk Statistics ===\ \===== Level Count Avg. Size 0 256 2922.472656 1 64 11343.859375 2 16 24916.937500 3 4 45453.250000 4 1 104962.000000 ======================================== chunks: 341 input verts: 67108864 output verts: 225279 avg verts/chunk: 661 NOTE: verts/chunk is low; for higher poly throughput consider setting the tree depth to 4 and reprocessing. output bytes: 12645 bytes/input vert: 0.00 bytes/output vert: 0.06 real triangles: 2159606Quite a few errors in there...?
I then used:
importOldAtlasCHU("atlas.fps/data/terrains/testLargeGeometry.chu", "atlas.fps/data/terrains/testLargeGeometry.atlas");which gives no errors, and finally:
If anyone could a) let me know if there is something obviously wrong with the above and b) explain what the variables in atlasOldGenerateChunkFileFromRaw16() and atlasGenerateTextureTOCFromTiles() mean that would be great.
If you've got this far - thanks for reading! I'll also post this over at Bundysoft to see if anyone has any ideas there.
Andy