Game Development Community

A question about Atlas

by Dave Mckay · in Torque Game Engine Advanced · 10/23/2005 (12:52 pm) · 5 replies

I been working on L3DT and creating a few maps but the program requires me to split up any map larger than 4096. If I want a larger texture with more detail I also have to split it so here are a few questions.

Does Atlas support Mosiac output? If not will it be implemented later?

I was atempting to import a 4096x4096 texture. Every time I tried to process it the program (TSE)crashed. I set the tree depth to 6 since that was my height map size and the leafsize to 64 since L3DT set it to 64 by 64 on creation. (2^6 * 64 = 4096) The documentation is a little unclear so some one explain it please.

#1
10/23/2005 (1:30 pm)
First you're talking about a map, and then it's texture.

Map is most commonly referred to as heightfield.

You'll have to put all these mosaic bits together using a program like photoshop/gimp/paint shop pro.
Then combine them to make a larger texture.

If it crashes, it's most likely due to you providing it with incorrect data (ie. the leafsize or any other parameter).
It shouldn't CRASH, however..

Are you running a debug build and are you waiting for more than 10 minutes for the process to complete?
#2
10/23/2005 (2:00 pm)
Maybe I should have posted two threads.

Will Atlas support Mosiac heightfields and textures like those generated by L3DT?

About the second issue,

Program crashed out after hitting enter key.
#3
10/23/2005 (4:15 pm)
Hi,

1. You can always put your textures together with any graphics program you want (i did with photoshop)

2. Its 2^(Depth-1) * leafsize so in your example you would have to enter 7

sorry for beeing so short ... its 1am and i'm about to sleep ;)

Edit: dont forget to rotate the texture so that it matches with the RAW file. (i saw some mirroring there once)
#4
10/23/2005 (4:27 pm)
I have been working some with these same issues this weekend. I should wait, as I know there are still more Atlas changes coming however I am naturally impatient and wanted to test a couple things. While this is not likely the prefered means of this, it so far has shown promise on a small scale.

First I started with a small mosiac in L3DT, 4x4 of a 512x512 map. Now this could easily be done in a single sheet, but that wouldn't allow me to test tiles. Anyhow, after processing, I smoothed the edge around entire 'island' to make it more feasable to add to others and make a larger landmass (connected by rivers or even larger water bases, but still allowing the feel of one basic land). Once I was done with the base map and edits, I generated the heightfield for this. Once done here, I saved the heightfield out and began loading the indivual pieces of it (each of the 4 tiles). Each of these you can process, with the rest of the stages and then resample up one size from 512 to 513 at end and export the raw and texture maps. After this I used the base imports for the small, can't recall what I had to modify on the texture for correct size but I am still trying to grasp what the settings really do at this stage so I can't attest to more there. Hopefully soon I will get back to testing with the small samples and smoothing the heightmap edges to mix better before exporting to raw or clear the few warnings I got while converting them to chu format.

Once completed I was able to place these into TSE, by adding a new datablock for each one. Where in Torque only one terrain was allowed, Atlas seems to work fine with multiples and I do hope that was intended or at least a pleasant (and kept) side effect. =) It did take me a few tries to line the tiles up again, knowing they were 512x512 I decided to start there. Turned out those go x2 with the parameters I exported with (still new so not even sure which ones were on this test, started logging after this trial realizing my flaw there). Anyhow, setting each piece, one at 0 0 0, next at 1024 0 0, then 0 1024 0 and finally 1024 1024 0. Once in I loaded up the mission and tested, they lined up very well, with a few minor (but noticable) flaws where one heightmap would have a slightly higher peak or such. I think this can be overcome with more work in L3DT, but I got side tracked building a bigger mousetrap after the joys of that success and am yet to get back to proving it can be truely completed. I am also still working on the right settings for everything, but I like doing 512x512 chunks so each texture map can then be exported with enhanced by 8 still being at the maximum for jpg of 4096x4096 and offering higher resolution to each heightmap.

Anyhow, I know I kinda rambled, but wanted to offer up my test so far in case helps plus someone may see some big flaws in this concept and help out others who may be trying the same or soon to be perhaps. With luck the editor or HTC once ready will prove great for this, but at the moment L3DT with mosiacs seems plausable for larger sized files if this pans out as well as I am blinded by my own excitement to believe right now. ;)
#5
10/24/2005 (3:52 pm)
@Florian

Thanks for the info on rotation. I will run 7, 64 as soon as this map finishes processing. It has been running the batch file now for 27 hours and only at the sea flood. :)

This map is 300Km square. Maybe I am pushing the limits but in the past 2 days I have learned a lot.

@Mark

Good to know info. I expect the missaligment issue is due to the conversion process where one point is rounded up or down and the other is vice-versa.

Wondering if it will be possible to join them and resave. Maybe a batch file? When working on these large scale worlds, I need to find a automated process.


Dave