Why doesnt Atlas not work as is?
by Michael Dockery · in Torque Game Engine Advanced · 05/21/2007 (7:06 am) · 17 replies
First off i own TEGA indie and if i use the standard downloaded compile (TEGA.exe) and try the procedures as stated in the tutorials to create atlas/atlas2 terrains they either dont work of crash or a mixture of both.
Ive tried L3DT and Terragen on different sizes i.e. 1024 4096 etc
EXAMPLE:
creatintg the chunk file always gives the following error -
AtlasMesher::write - too many vertices!(>65535) Try making a deeper tree!
The only way to resolve this it to increase the tree from tutorial stated 6 to 10???
(is 6 wrong and if so why is it used in the tutorial?)
After creating both tqt and chu the files are of 59mb(tqt) and 298mb(chu) size. This then leaves the system hanging at the "Waiting for server...." when i try to load them into the engine as per mission file.
(Can the engine handle a 298mb file?)
If i reduce the chu to a 1024 size they both load into the engine but the atlas terrain looks like a very small terrain (1 foot squared) that is white and stretched high into the sky.
If i try the Atlas2 tutorials i get:
AtlasOldHeightField::loadRawU16 - unexpected file size; fileis too small did you maybe export as 8bit RAW instead of 16bit raw? Or maybe size is not pow2 + 1? etc.
Although i follow the tutorial to the letter.
Im sure Atlas works fine but my problem is that as a beginner to Torque having to overcome misterious crashes/problems when trying to learn the engine and tutorials or finding 'out of date' posts/links really hinders your ability to get to grips with the system, then you find yourself having to post every second day to the forums hoping you guys can help which im sure causes its own problems.
Ive tried L3DT and Terragen on different sizes i.e. 1024 4096 etc
EXAMPLE:
creatintg the chunk file always gives the following error -
AtlasMesher::write - too many vertices!(>65535) Try making a deeper tree!
The only way to resolve this it to increase the tree from tutorial stated 6 to 10???
(is 6 wrong and if so why is it used in the tutorial?)
After creating both tqt and chu the files are of 59mb(tqt) and 298mb(chu) size. This then leaves the system hanging at the "Waiting for server...." when i try to load them into the engine as per mission file.
(Can the engine handle a 298mb file?)
If i reduce the chu to a 1024 size they both load into the engine but the atlas terrain looks like a very small terrain (1 foot squared) that is white and stretched high into the sky.
If i try the Atlas2 tutorials i get:
AtlasOldHeightField::loadRawU16 - unexpected file size; fileis too small did you maybe export as 8bit RAW instead of 16bit raw? Or maybe size is not pow2 + 1? etc.
Although i follow the tutorial to the letter.
Im sure Atlas works fine but my problem is that as a beginner to Torque having to overcome misterious crashes/problems when trying to learn the engine and tutorials or finding 'out of date' posts/links really hinders your ability to get to grips with the system, then you find yourself having to post every second day to the forums hoping you guys can help which im sure causes its own problems.
#2
07/03/2007 (8:10 am)
Same here, no luck with importing atlas terrain :( I think GG should care more, when I pay $300 for engine and there is not working tutorial for terrain, it's a shame
#3
Three file names are used in this line (clean.atlas, geometry.atlas and arcticTexture.atlas), but this command will fail since 2 files are missing (clean.atlas and arcticTexture.atlas) and were never mentioned before.
Sadly, but this example shows what kind of documentation I've seen and tried to work with the last days.
Conclusion: No Atlas terrain but ~20 hours lost!
Since other people are obviously wasting a lot of their time as well with this, GG should review existing or write new and better documentation IMO.
07/03/2007 (8:52 am)
I've spent 3 days now without success as well :/ I read a lot but IMO there's only incomplete information out there. Look at the first code box of this wiki page for example. There are 7 code lines - only 4 of them regarding the creation of Atlas terrain, but even those 4 won't work. Looking closer at these 4 lines, we see this:atlasGenerateUniqueTerrain("terrain_water_demo/clean.atlas", "terrain_water_demo/geometry.atlas", "terrain_water_demo/arcticTexture.atlas");Three file names are used in this line (clean.atlas, geometry.atlas and arcticTexture.atlas), but this command will fail since 2 files are missing (clean.atlas and arcticTexture.atlas) and were never mentioned before.
Sadly, but this example shows what kind of documentation I've seen and tried to work with the last days.
Conclusion: No Atlas terrain but ~20 hours lost!
Since other people are obviously wasting a lot of their time as well with this, GG should review existing or write new and better documentation IMO.
#4
I agree that the product lacks Atlas documentation. You can easily find yourself playing around with Atlas all day and still come up with nothing. There was talk about an Atlas Terrain Edtior but that's been noise for the past 2+ years. I doubt they'll ever have that.
TGEA as is, is incomplete for the most part and until they're done fiddling around with TGB or TorqueX enhancements, I doubt we'll see any TGEA completion for awhile. The last update was in February, some 5 MONTHS AGO.
07/03/2007 (9:34 am)
If you are new to Atlas, just use L3DT and the L3DT to Atlas plugin. This will atleast get your terrain into the game. After that, it's like a complete science to do all the calculations manually. I agree that the product lacks Atlas documentation. You can easily find yourself playing around with Atlas all day and still come up with nothing. There was talk about an Atlas Terrain Edtior but that's been noise for the past 2+ years. I doubt they'll ever have that.
TGEA as is, is incomplete for the most part and until they're done fiddling around with TGB or TorqueX enhancements, I doubt we'll see any TGEA completion for awhile. The last update was in February, some 5 MONTHS AGO.
#5
07/03/2007 (10:22 am)
I'm currently working on a comprehensive "Getting Started" Tutorial package for TGEA. Atlas is the next subject I'm going to be working, and threads like this one really emphasize how badly that documentation is needed.
#6
07/13/2007 (6:54 pm)
Please release ASAP, unhappy that the L3DT to atlas plugin crashes L3DT as is
#7
But assuming that you patch that bug, here's the info that is missing from the TDN article currently:
In your command :
That basically is formatted as:
atlasOldGeneratedChunkFileFromRaw16([input file name], [heightfield size],[tile size],[vertical range],[output file name],[error metric],[tree depth]);
inputfilename - The input file should be a raw file which is 1 size larger than your terrain. So if your creating it in l3dt and manually importing you should export a heightfield that is one pixel larger than normal. So instead of 1024 in this case you'd save it as 1025.
heightfieldsize - this is the size of the heightfield image. So if you have a 1024x1024 heightfield this would be 1024.
tile size - This is the tile size, or heightfield resolution if your generating with l3dt. 8 is the size of tiles in legacy, I usually use 2, you could use 1 for really fine terrains.
vertical range - If you generated in l3dt go to Operations->Heightfield->Change Vert. Scale. Divide the Alt. Range field's value by 65536 and use that value here.
error metric - this is the error metric. If it's too high you'll see some mesh's moving around a little in your outputted map, decreasing its size increases file size though I believe. Something to tinker with.
tree depth - how deep your tree is. You'll have to play with it to get the proper results, 5 is a good median though. Some maps will give warnings that your tree is not deep enough and others will choke if you create a tree too small or large.
The next command:
is pretty straightforward, it takes the chu file you just generated from the raw file and it converts it to an atlas heightfield.
numtiles - This is the number of tiles . This is used to import a texture which is too large to store as a single large jpeg. This imports the l3dt style mosaic tiles. So if you have 4x4 tiles then you'd input 4 here.
inputfilename - This might look something like this: "terrain_water_demo/l3dt/LM_x%dy%d.jpg". The two %d's are used to store the x and the y numbers on the tiles.
outputfilename - An atlas texture file
fileformat - 0 = JPG, 1 = PNG (required for opacity maps), 2 = DDS (doesn't work)
NOTE: If your doing blended terrain you'll have to import the lightmap as a JPG (or as a PNG but JPG is smaller) and then from L3DT generate the opacity maps by using the Operations->Alpha Maps->Generate Maps and then importing that as a png opacity using the atlasgeneratetexturetocfromtiles for it. For unique terrain you just need one for the texture map.
Finally putting them all together:
Unique Terrain:
It should be noted that your output file path and your blended texture paths are hard coded into your output file if you hard code their directories in the input. Meaning if you compile as using texture "terrain_water_demo/blends/thistexture" then it will look in for that path when loading it. The Virtual Texture Map Size has to be a power of 2. 32768 is a good number. If the blend textures are missing the terrain will appear black wherever they are used.
Atlas is a bit of a mess right now. Starting with the fact that the manual generation has been broken for 3 months since 1.01 was launched, and that fix still hasn't made its way into the downloadable code base. For the most part it is usable, but it isn't affect by sunlight and doesn't self shadow, which pretty much excludes it from any project with a day or night cycle. As is 4 textures isn't really enough variety on a large terrain. You could use unique textures and get a decent result, but it will take up a lot of hard drive space. I hope it gets some love in the near future, Atlas is a nice feature, but as it stands now you see a lot of projects still working with Legacy terrain in TGEA.
07/13/2007 (9:45 pm)
There was much better documentation previously on TDN, but someone deleted basically all of the instructions on how to calculate the values, and only left you with the raw commands and no explanation. I just LOVE wikis, don't you? It doesn't help that there is a texture generation bug currently that you will need to fix (documented with fix in the bugs forums) if you want to do it manually until 1.03 comes out, making it all a mess.But assuming that you patch that bug, here's the info that is missing from the TDN article currently:
In your command :
atlasOldGenerateChunkFileFromRaw16("terrain_water_demo/l3dt/terrain.raw", 1024, 1.0,
1.0/512.0, "terrain_water_demo/geometry.chu", 1.0, 5);That basically is formatted as:
atlasOldGeneratedChunkFileFromRaw16([input file name], [heightfield size],[tile size],[vertical range],[output file name],[error metric],[tree depth]);
inputfilename - The input file should be a raw file which is 1 size larger than your terrain. So if your creating it in l3dt and manually importing you should export a heightfield that is one pixel larger than normal. So instead of 1024 in this case you'd save it as 1025.
heightfieldsize - this is the size of the heightfield image. So if you have a 1024x1024 heightfield this would be 1024.
tile size - This is the tile size, or heightfield resolution if your generating with l3dt. 8 is the size of tiles in legacy, I usually use 2, you could use 1 for really fine terrains.
vertical range - If you generated in l3dt go to Operations->Heightfield->Change Vert. Scale. Divide the Alt. Range field's value by 65536 and use that value here.
error metric - this is the error metric. If it's too high you'll see some mesh's moving around a little in your outputted map, decreasing its size increases file size though I believe. Something to tinker with.
tree depth - how deep your tree is. You'll have to play with it to get the proper results, 5 is a good median though. Some maps will give warnings that your tree is not deep enough and others will choke if you create a tree too small or large.
The next command:
importOldAtlasCHU([importfilename],[outputfilename].[fileformat]);
is pretty straightforward, it takes the chu file you just generated from the raw file and it converts it to an atlas heightfield.
atlasGenerateTextureTOCFromTiles([numtiles], [inputfilename], [outputfilename]", [format]);
numtiles - This is the number of tiles . This is used to import a texture which is too large to store as a single large jpeg. This imports the l3dt style mosaic tiles. So if you have 4x4 tiles then you'd input 4 here.
inputfilename - This might look something like this: "terrain_water_demo/l3dt/LM_x%dy%d.jpg". The two %d's are used to store the x and the y numbers on the tiles.
outputfilename - An atlas texture file
fileformat - 0 = JPG, 1 = PNG (required for opacity maps), 2 = DDS (doesn't work)
NOTE: If your doing blended terrain you'll have to import the lightmap as a JPG (or as a PNG but JPG is smaller) and then from L3DT generate the opacity maps by using the Operations->Alpha Maps->Generate Maps and then importing that as a png opacity using the atlasgeneratetexturetocfromtiles for it. For unique terrain you just need one for the texture map.
Finally putting them all together:
Unique Terrain:
atlasGenerateUniqueTerrain([outputfilename],[geometry file anme], [texture file name]);[code] I'm pretty sure that is the format for it, could be texture and output file names swapped but I don't think so. Instead I think whoever edited teh TDN and erased all of the instructions probably borked things up there too. Yes, I do love WIKIs for all this fun stuff like this. Blended Terrain: [code]atlasGenerateBlenderTerrain([output file name],[geometry file name],[opacity texture name],[opacity lightmap name].[virtual texture map size],[blend texture 1],[optional blend texture 2],[optional blend texture 3],[optional blend texture 4]);
It should be noted that your output file path and your blended texture paths are hard coded into your output file if you hard code their directories in the input. Meaning if you compile as using texture "terrain_water_demo/blends/thistexture" then it will look in for that path when loading it. The Virtual Texture Map Size has to be a power of 2. 32768 is a good number. If the blend textures are missing the terrain will appear black wherever they are used.
Atlas is a bit of a mess right now. Starting with the fact that the manual generation has been broken for 3 months since 1.01 was launched, and that fix still hasn't made its way into the downloadable code base. For the most part it is usable, but it isn't affect by sunlight and doesn't self shadow, which pretty much excludes it from any project with a day or night cycle. As is 4 textures isn't really enough variety on a large terrain. You could use unique textures and get a decent result, but it will take up a lot of hard drive space. I hope it gets some love in the near future, Atlas is a nice feature, but as it stands now you see a lot of projects still working with Legacy terrain in TGEA.
#8
I have no idea if it works. Atlas is way to confusing.
07/14/2007 (2:38 am)
Theres also this: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=11826I have no idea if it works. Atlas is way to confusing.
#9
07/14/2007 (3:12 am)
That's quite a workflow, I had no idea that Atlas was in such bad shape.
#10
Ben updated the plugin in May to fix this bug. Can you please check the date-stamp on your plugin to see if it is the latest version? The plugin is located at:
C:\Program Files\Bundysoft\L3DT [version number]\Extensions\l3dt_atlas.dll
The correct 'Last modified'; date is 31 May 2007. If your version does not have this date, you may want to re-download the L3DT installer from GarageGames, which was updated in early June. We've not had any plugin-related bug reports since then, but if you can re-produce the crash with the latest version, we'll get right onto it ASAP.
Best regards,
Aaron Torpy
07/15/2007 (4:33 am)
Hello,Quote:
unhappy that the L3DT to atlas plugin crashes L3DT as is
Ben updated the plugin in May to fix this bug. Can you please check the date-stamp on your plugin to see if it is the latest version? The plugin is located at:
C:\Program Files\Bundysoft\L3DT [version number]\Extensions\l3dt_atlas.dll
The correct 'Last modified'; date is 31 May 2007. If your version does not have this date, you may want to re-download the L3DT installer from GarageGames, which was updated in early June. We've not had any plugin-related bug reports since then, but if you can re-produce the crash with the latest version, we'll get right onto it ASAP.
Best regards,
Aaron Torpy
#11
Thanks in advance!
07/29/2007 (9:14 am)
Does Atlas work now? My current project requires a single large-scale map that is comprised of a series of smaller heightmaps. Would this be easy to do in TGEA? I am worried about making a bad investment. Time is not an issue but what is the learning curve like and is the documentation up to par?Thanks in advance!
#12
BTW: The l3dt to atlas plugin only works with the Pro version of L3DT and that version costs money... I have no idea if it works or not. And I'm not about to kick out more money for it until I try it first.
07/29/2007 (9:30 am)
You would probably want to combine those heightmaps into one heightmap and import it ino L3DT (thats if you used L3dt of course...). I still haven't been able to use alas terrain and I'm patiently waiting for some way of doing it without buying another program that may or may no work.BTW: The l3dt to atlas plugin only works with the Pro version of L3DT and that version costs money... I have no idea if it works or not. And I'm not about to kick out more money for it until I try it first.
#13
07/29/2007 (9:57 am)
Thanks a lot! Would I be able to export the L3DT height map directly into TGEA?
#14
If you would like to try L3DT Pro and the Atlas export plugin for free, please apply for a 90-day trial by following the instructions on this page:
www.bundysoft.com/L3DT/downloads/pro-trial.php
Cheerio,
Aaron.
07/29/2007 (1:54 pm)
Hi All,If you would like to try L3DT Pro and the Atlas export plugin for free, please apply for a 90-day trial by following the instructions on this page:
www.bundysoft.com/L3DT/downloads/pro-trial.php
Cheerio,
Aaron.
#15
07/29/2007 (2:01 pm)
Thanks Aaron
#16
07/29/2007 (3:23 pm)
Thanks a lot!
#17
Does this glitch still occur? Thanks again.
07/29/2007 (3:35 pm)
I just read a review that stated, "After creating terrains and porting them into TGEA at the size of 1024.... I have noticed small slivers that cut through the land in random areas. Out of the box this software does not work well for exporting to TGEA as claimed."Does this glitch still occur? Thanks again.
Torque Owner Edmund Burke