Game Development Community

Atlas help for beginner

by Michael Dockery · in Torque Game Engine Advanced · 05/19/2007 (6:43 am) · 10 replies

Ive tried following the Atlas/Terragen Tutorial (http://www.garagegames.com/docs/tse/general/ch05s05.php) and although i follow it verbatim i find 3 problems (granted its probably my fault).

1: 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???

2: 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.

3: 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.

I am not really interested in the large terrain end of Atlas but rather an average sized terrain with better texture detail and as i stated im using the tutorials figures and settings so i dont know whats going wrong.

#1
05/19/2007 (8:09 am)
Hi Michael -

See if this tutorial helps you a bit; it explains some of the parameters you are adjusting: exodusproject.com/torquewiki/doku.php?id=atlas2_terrains.

Best of luck,
Kilo
#2
05/20/2007 (5:05 am)
Thanks Keith,

Ive been trying that tutorial all day and i sware now its not me :) When i get to the point of creating the 'chunk from raw' the engine pops up:

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.

..and then quits.

This Atlas idea is not really straight forward at all, or theres a version conflict in the tutorials or my TEGA does not work properly (although compiled fine no errors).
#3
05/20/2007 (6:34 am)
Perhaps terrain too small? Minimum size is 512x512 or better 513x513 for the heightmap
#4
05/20/2007 (6:43 am)
Well as per the tutorial my height map should be 1024 which l3dt does state it is apart from that i cant really check it further oh and i did produce height maps 4096,1024 from terragen and got the same responce.
#5
05/20/2007 (9:20 am)
The tutorial shows the heightmap being exported as a power of 2. Have the requirements changed from a power of 2 plus one?
#6
05/21/2007 (6:45 am)
I tried exporting from L3DT as 1025 but that crashes on export, i think because its the free version its limited to 1024. Besides that the tutorial is based on the free version and does state that its limited and to use that size.

Surely i cant be the only person to have this error especially as i am using the downloaded TEGA.exe. Is there some other setting/files that have an impact on the Atlas procedures? The whole thing seems a bit hit and miss to me.
#7
05/21/2007 (11:06 am)
Hi guys -

When I first wrote that tutorial, the word on the Bundysoft forums was that the power of 2+1 restriction had been changed back to power of 2, and lo and behold it worked. I don't recall which TGEA version that was, however, but it might have been RC4, I'm not sure. At any rate, I just tried it with TGEA 1.0 and it did want the power of 2 + 1 size for the heightfield again. I've updated my tutorial to reflect that.

Just to be clear, though, your L3DT project should, in fact, be 1024 -- the limit of the free version. All you need to do is change the size of the heightfield to 1025 on export. Just to make sure I'm still sane, I just tried everything in the tutorial from the beginning and it worked fine. Michael, you aren't using the L3DT->Atlas plugin are you? The tutorial assumes you are not, but I wanted to make sure. If you want to post (or email me) a step-by-step of what you're doing, I'll see if I can set up my system like yours and try it. I'm still recovering from surgery and am not yet back up to 100%, but I'd be happy to look at it as I can. So far, these small Atlas terrains have had a 100% success rate for me. I have -not- tried the really huge terrains yet, since L3DT requires about 3 months of real time to generate them. Once the "save as you go" feature is added to L3DT, I'll try it again, but until that is in place there's just too many things that can interrupt your program in the space of 3 months to get anywhere!

Regards,
Kilo
#8
05/21/2007 (11:36 am)
Thanks for the reply Keith, ive been getting really frustrated with this problem and not people as yourself putting the time in to produce the tutorials and helping people like me out.

You say you got the standard version L3DT to export at 1025, my L3DT pops up a message:

CMapWrap::InitMosaic error
- invalid map size

CMapGroup::ExportMap error:
- call to InitMosaic failed

Although i didnt select Mosaic tiling (in fact idont think u can). Mine would be the latest version maybe its a bug in it?.
I attempted the point that the size should be 2+1 so i exported a raw16 from Terragen same size but plus 1 which is by default in Terragen but the TEGA replys with:

AtlasOldHeightField::loadRawU16 - unexpected file size; file is too small did you maybe export as 8bit RAW instead of 16bit raw? Or maybe size is not pow2 + 1? etc.

So ive really got 2 problems i think, one i cant get either my purchased L3DT for Torque to run (Reg key bug) or the Standard L3DT to export as 1025 and two even if i do produce a raw16 map the engine doesnt like it.

Anyway would it be ok if i go through it step by step in an email/post and send you my raw file aswell?

It will probably take a bit though.

Actually just realised that i cant produce the 2+1 map as my L3DT wont do that so i cant send you the raw16 could you send one to me so i can rule out my TEGA as being suspect?
#9
05/21/2007 (3:04 pm)
Hi Michael,

Oops, this is my fault. When re-sizing maps for export (e.g. to 1025x1025), L3DT opens a mosaic map as swap memory. L3DT Standard Edition doesn't support mosaic heightfields, so this operation will fail when exporting the heightfield. I'll include the bugfix in the next update.

Best regards,
Aaron.
#10
05/21/2007 (3:11 pm)
Hi Aaron,

I think you just mailed me about my other problem with my registration key crashing the L3DT but at the mo i cant get at my mail could you post what ever you mail here?

thanks