White Terrain using Atlas2
by Dennis Trevillyan · in Torque Game Engine Advanced · 09/11/2006 (7:22 pm) · 7 replies
I'm working on importing a fairly basic terrain into TSE using Atlas2. The problem is that the terrain shows up as completely white, no textures at all. It looks like the vertical elevation is there but no color. Here is the process I'm using to create the terrain:
1. create a 2048 x 2048 terrain in L3DT pro. The heightmap, lightmap and texture map are 512 x 512 mosaic.No high res anything, just a basic terrain.
2. Export the heightmap as a 2049 x 2049 raw and copy the texture, lightmap and raw file to the data/terrains folder.
3. Convert the raw into a chu using generateChunkFileFromRaw16(). no problems here. verts per chunk ranging around 4000 to 5000.
4. Convert the chu into an atlas using importOldAtlasChu(). no problems here
5. Convert the L3DT lightmap files into an atlas file using atlasGenerateTextureTOCFromTiles().
6. Convert the L3DT texture files in an atlas file as in 5.
7. Built the blender terrain using atlasGenerateBlenderTerrain() using the three atlas files above. The atlas from step 5 is used as the opacity file and the atlas from step 6 is used as the lightmap file.
8. load the terrain in a mission file as follows:
new AtlasInstance2(NewTerrain) {
position = "-2048 -2048 384";
rotation = "1 0 0 0";
scale = "1 1 1";
atlasFile = "~/data/terrains/Detail.atlas";
};
I've tried adding detailTex = "~/data/terrains/details/detail1"; too but it doesn't seem to do anything.
I have managed to get the above process to work using a n equally basic 1024 x 1024 terrain. It was a little blah but it worked.
thanks.
1. create a 2048 x 2048 terrain in L3DT pro. The heightmap, lightmap and texture map are 512 x 512 mosaic.No high res anything, just a basic terrain.
2. Export the heightmap as a 2049 x 2049 raw and copy the texture, lightmap and raw file to the data/terrains folder.
3. Convert the raw into a chu using generateChunkFileFromRaw16(). no problems here. verts per chunk ranging around 4000 to 5000.
4. Convert the chu into an atlas using importOldAtlasChu(). no problems here
5. Convert the L3DT lightmap files into an atlas file using atlasGenerateTextureTOCFromTiles().
6. Convert the L3DT texture files in an atlas file as in 5.
7. Built the blender terrain using atlasGenerateBlenderTerrain() using the three atlas files above. The atlas from step 5 is used as the opacity file and the atlas from step 6 is used as the lightmap file.
8. load the terrain in a mission file as follows:
new AtlasInstance2(NewTerrain) {
position = "-2048 -2048 384";
rotation = "1 0 0 0";
scale = "1 1 1";
atlasFile = "~/data/terrains/Detail.atlas";
};
I've tried adding detailTex = "~/data/terrains/details/detail1"; too but it doesn't seem to do anything.
I have managed to get the above process to work using a n equally basic 1024 x 1024 terrain. It was a little blah but it worked.
thanks.
#2
Tiling in general is for working with unique textures, so that you can break a very very big texture down into smaller, easier to load/edit tiles in something like photoshop.
Blended on the other hand is for non unique texturing.
Maybe Ben does intend tiled imports to work seamlessly with blended terrains, I'm not 100% sure, but it's possible the two "modes" are conflicting.
Will bump this to him, but it is the weekend!
09/23/2006 (2:24 pm)
I'm not an expert on the inner workings of Atlas2, but I'm thinking that the combination of tiling and blended terrains isn't an intended/fully tested one.Tiling in general is for working with unique textures, so that you can break a very very big texture down into smaller, easier to load/edit tiles in something like photoshop.
Blended on the other hand is for non unique texturing.
Maybe Ben does intend tiled imports to work seamlessly with blended terrains, I'm not 100% sure, but it's possible the two "modes" are conflicting.
Will bump this to him, but it is the weekend!
#3
09/23/2006 (3:14 pm)
Yeah, this won't work the way you're doing it. Your lightmaps are 8 bit greyscales (most likely), and you're telling the blender they are 4 layered opacity maps.
#4
09/23/2006 (6:21 pm)
Lee, Stephen and Erik, thanks for the posts. After trying various things to get around this my impression was that the textures were just plain missing. Then I noticed Erik's post (great thread Erik, thanks!) discussing the additional arguments in atlasGenerateBlenderTerrain() under MS4 and this seemed to confirm my suspicion. After copying over the proper textures and running aGBT() I had a properly textured terrain! So I'm fairly confident that the terrain was white because I hadn't specified any textures. Fairly confident...
#5
Much more to learn no doubt. Here is a sample from afar. This particular terrain was reduced in size which makes it more peaked than in reality.
09/24/2006 (7:49 am)
Just downloaded the latest update to TSE and success! Using the USGS NED data for the northwest part of Maui (hey, if I can't go there I can at least do it virtually!) and running it through L3DT as a 1024 x 1024 hf with high res (4x) and running it as a blended atlas terrain... success! Process used was that shown in the first post above.Much more to learn no doubt. Here is a sample from afar. This particular terrain was reduced in size which makes it more peaked than in reality.
#6
09/28/2006 (7:54 pm)
Looks awesome! :)
#7
09/28/2006 (11:05 pm)
Looks Great !
Torque Owner Lee Latham
Default Studio Name