Game crashed with huge atlas terrain texture
by Bryan Stroebel · in Torque Game Engine Advanced · 04/21/2006 (10:24 pm) · 6 replies
OK. I have a 1025X1025 height map (generated using L3DT). I can successfully generate a chu file using this command:
generateChunkFileFromRaw16("MyDemo/data/terrains/terrain1.raw", 1024, 2.0, 1.0 / 256.0, "MyDemo/data/terrains/terrain1.chu", 2, 2);
My terrain1_TX.jpg file is 12288X12288 (27MB). When I use this command TSE crashes:
generateTQT("MyDemo/data/terrains/terrain1_TX.jpg", "MyDemo/data/terrains/terrain1.tqt", 2, 6144);
If I crank the chu treedepth to 5 and the tqt depth to 5 it generates a tqt file. However, TSE still crashes when loading the mission. Here is the last few lines of the console:
*** Phase 3: Mission Lighting
Mission lighting done
Mapping string: MissionStartPhase3Ack to index: 2
Mapping string: MissionStart to index: 11
Mapping string: SyncClock to index: 12
*** Initial Control Object
Activating DirectInput...
When it crashes I can see the terrain in white without texture for a second. I dont know whats wrong. I haven't reached the 65K limit. I tried messing with the error/tree and still no go. I am using the MS3 head that I downloaded a few days ago. This will not work in my MS2 version of TSE either.
generateChunkFileFromRaw16("MyDemo/data/terrains/terrain1.raw", 1024, 2.0, 1.0 / 256.0, "MyDemo/data/terrains/terrain1.chu", 2, 2);
My terrain1_TX.jpg file is 12288X12288 (27MB). When I use this command TSE crashes:
generateTQT("MyDemo/data/terrains/terrain1_TX.jpg", "MyDemo/data/terrains/terrain1.tqt", 2, 6144);
If I crank the chu treedepth to 5 and the tqt depth to 5 it generates a tqt file. However, TSE still crashes when loading the mission. Here is the last few lines of the console:
*** Phase 3: Mission Lighting
Mission lighting done
Mapping string: MissionStartPhase3Ack to index: 2
Mapping string: MissionStart to index: 11
Mapping string: SyncClock to index: 12
*** Initial Control Object
Activating DirectInput...
When it crashes I can see the terrain in white without texture for a second. I dont know whats wrong. I haven't reached the 65K limit. I tried messing with the error/tree and still no go. I am using the MS3 head that I downloaded a few days ago. This will not work in my MS2 version of TSE either.
#2
04/22/2006 (9:03 am)
The height map should always be one more than the original size of the map. This is in the atlas documentation.
#3
04/22/2006 (9:51 am)
Each time I tried to create a tqt greater than 8192x8192, it crashes. I think Engine can't handle more than 8192x8192.
#4
My PC has plenty of memory too. 2GB XMS.
04/22/2006 (10:07 am)
Vincent, I'm glad you said that because I noticed that too. I just wanted to make sure I wasn't doing anything wrong. The documentation says it can handle 65K X 65K and I can never get anything higher than 8192 either.My PC has plenty of memory too. 2GB XMS.
#5
04/23/2006 (1:46 pm)
It seems that libjpeg can't handle more than 8192x8192 even if theorical limit for jpeg is 65Kx65K :(. I saw in TSE code that Ben think to merge TQT files, it could be a solution to this problem. FTM I have no solution about this issue.
#6
It DEFINITELY won't work until you fix that issue.
04/28/2006 (12:50 pm)
12288X12288 is not a valid texture size. You must have power of 2 sizes. I mentioned this in IM conversation with you earlier. :)It DEFINITELY won't work until you fix that issue.
Associate Andy Hawkins
DrewFX