Game Development Community

Atlas2 Terrain with no texture

by Dave Young · in Torque Game Engine Advanced · 07/05/2006 (11:00 am) · 0 replies

I have used the following process to try and get an Atlas2 terrain in, and it shows up, but without a texture.

I hardcoded the texture paths in AtlasBlender.cc and tried using a Blended Terrain, making sure that all the textures my terrain was using could be located.


// Convert the raw heightfield.
atlasOldGenerateChunkFileFromRaw16("oakhome/l3dt/oakhome.RAW", 1024, 1.0, 1.0/256.0, "oakhome/geometry.chu", 1.0, 4);
importOldAtlasCHU("oakhome/geometry.chu", "oakhome/geometry.atlas");

// Import opacity/alpha map.
// note: the png file need to contain the 4 alpha maps on separate layers
atlasGenerateTextureTOCFromTiles(1, "oakhome/l3dt/Alpha/oak2_Alpha1.png", "oakhome/opacity.atlas");

// Load  lightmap and JPEG compress.
atlasGenerateTextureTOCFromTiles(8, "oakhome/l3dt/LM/oakhome_x%dy%d.jpg", "oakhome/lightmap_png.atlas");
atlasConvertTextureTOC("oakhome/lightmap_png.atlas", "oakhome/lightmap.atlas", 0);

// Finally combine into a blender terrain.
atlasGenerateBlenderTerrain("oakhome/l3dt.atlas", "oakhome/geometry.atlas", "oakhome/opacity.atlas", "oakhome/lightmap.atlas");

This shows up as a white terrain, turning gray and then black when I move in with the camera.

So I tried just using a texture map and the geometry file:

// Convert the raw heightfield.
atlasOldGenerateChunkFileFromRaw16("oakhome/l3dt/oakhome.RAW", 1024, 1.0, 1.0/256.0, "oakhome/geometry.chu", 1.0, 4);
importOldAtlasCHU("oakhome/geometry.chu", "oakhome/geometry.atlas");

atlasGenerateTextureTOCFromTiles(8, "oakhome/l3dt/TX/oakhome_x%dy%d.jpg", "oakhome/texturemap_png.atlas");
//atlasConvertTextureTOC("oakhome/texture_png.atlas", "oakhome/texturemap.atlas", 0);

atlasGenerateUniqueTerrain("oakhome/l3dt.atlas", "oakhome/geometry.atlas", "oakhome/texturemap.atlas");


Same result. So I tried using a single texture files:

// Convert the raw heightfield.
atlasOldGenerateChunkFileFromRaw16("oakhome/l3dt/oakhome.RAW", 1024, 1.0, 1.0/256.0, "oakhome/geometry.chu", 1.0, 4);
importOldAtlasCHU("oakhome/geometry.chu", "oakhome/geometry.atlas");

atlasGenerateTextureTOCFromLargeJPEG("oakhome/l3dt/texmap.jpg", 4, "oakhome/texmap.atlas");

atlasGenerateUniqueTerrain("oakhome/l3dt.atlas", "oakhome/geometry.atlas", "oakhome/texmap.atlas");


For the same result. Terrain shows up, but has no texture. The UniqueTerrain files are always much larger than the blended, so I know that the textures are getting processed, no errors on the console.log either.

What am I doing wrong?