Game Development Community

Atlas clipmap problem

by Trish O'Toole · in Torque Game Engine Advanced · 07/17/2007 (10:22 pm) · 7 replies

Hello,
I am trying to put a terrain and texture into Atlas using an .atlas file like in this tutorial:
http://exodusproject.com/torquewiki/doku.php?id=atlas2_terrains

I have gotten through all the conversion and got to the point where I needed to run the application and it gets to loading the objects when this error pops up: "AtlasClipMapImageCache_TextureTOC::setTOC - clipmap size is bigger than all levels of the TOC! Set smaller clipmap size or bigger texture TOC!"

I have searched through the forums and documentation but to no avail.

The commands I entered into the console are as follows (Filenames and paths are different but irrelevant, just the variables are important, I think):

atlasOldGenerateChunkFileFromRaw16("data/terrains/heightmap.raw", 1024, 1.0, 0.0015, "data/terrains/geometry.chu", 1, 1);

importOldAtlasCHU("data/terrains/geometry.chu", "data/terrains/geometry.atlas");

atlasGenerateTextureTOCFromLargeJPEG("data/terrains/colormap.jpg", 1, "data/terrains/texture.atlas");

atlasGenerateUniqueTerrain("data/terrains/terrain.atlas", "data/terrains/geometry.atlas", "data/terrains/texture.atlas");

I also tried:

atlasOldGenerateChunkFileFromRaw16("data/terrains/heightmap.raw", 1024, 1.0, 0.0015, "data/terrains/geometry.chu", 2, 1);

atlasGenerateTextureTOCFromLargeJPEG("data/terrains/colormap.jpg", 2, "data/terrains/texture.atlas");


I then just edited the simple.mis file and replaced the arcticBlended.atlas file path with mine.

The reason the TREE_DEPTH variable is '1' is because the console kept recommending I reduce the number from my original test value of '5' to '4' then '3' etc.

Please help me! I need to get this fixed urgently as it is halting my project.

Thanks in advance

About the author

Recent Threads


#1
07/17/2007 (10:45 pm)
Check this out

http://www.bundysoft.com/phpBB2/viewtopic.php?t=586

Contact me at maddcowthomas@hotmail.com if you need further help...be happy help the best I can.
#2
07/17/2007 (10:48 pm)
Nice tutorial, thanks for posting.
#3
07/18/2007 (8:15 am)
Nice job Thomas. Glad to see you're passing on what you've learned.
#4
07/18/2007 (10:21 pm)
Thankyou very much, I'll give this a go.
#5
07/18/2007 (10:26 pm)
Thanks Mark
#6
07/20/2007 (4:54 pm)
Trish,
The 'clipmap size is bigger than all levels of the TOC!' error is coming from the processing of your texture with a treedepth that is too low.
I recomend these minium treedepths for your texture:
2 - for a 1024x1024 pixel texture
3 - for a 2048x2048 pixel texture
4 - for a 4096x4096 pixel texture
5 - for a 8192x8192 pixel texture
6 - for a 16384x16384 pixel texture
7 - for a 32768x32768 pixel texture

The message to lower your treedepth while processing the heightmap is just a suggestion and is meant to guide you in processing your heightmap so that the resulting CHU file averages between 1000 and 5000 vertices per chunk. This is only a suggestion. CHU file with average above this range and below this range will still work in the engine. I have used terrains where the heightmap processed out at averages from 12,000 down to less than 100 vertices per chunk.
Before you lower your treedepth to get a higher average, try lowering the error metric first. I think of the error metric as the fine tune control and the treedepth as the course tune control. You can take the error metric down very close to zero, before you need to resort to lowering the treedepth.
And if you get an error saying that one chunk has more than 65535 vertices, that just means you need to go the other way by increasing the error metric or treedepth.
#7
07/22/2007 (10:30 pm)
Okay, well thanks for all the help but it seems my problem may lie elsewhere, whether it is with my machine or the fact that I am using Vista (which I know TGEA has issues with).

The problem seems to be that with the conversion of the jpg the tree depth value needs to be '1' otherwise TGEA freezes and I have to close and reopen. But of course this will cause problems as the conversion of the .raw file, as you have stated, should have a higher tree value of at least '2'.

Do you know if this could be a problem with Vista? Or is there something else wrong? It couldn't work with a texture with a tree value lesser than the one in the .raw conversion, could it?

Again, thanks for any help you can give me.