Getting the Alpha Map from L3DT
by Kyle Cook · in Torque Game Engine Advanced · 07/12/2006 (4:47 pm) · 1 replies
I am following this set of import instructions and seem to be getting stuck on the Alpha Map parts.
Honestly I have no clue how to get the alpha map from so I can use it in this code. But the Light Map appears to work without the x and y stuff in the file. If anyone can help me with this Alpha thing that would complete my first Atlas file!
// Generate a blended terrain from a L3DT dataset.
// Convert the raw heightfield.
atlasOldGenerateChunkFileFromRaw16("starter.fps/heightmap.RAW", 1024, 1.0, 1.0/512.0, "starter.fps/geometry.chu", 1.0, 5);
importOldAtlasCHU("starter.fps/geometry.chu", "starter.fps/geometry.atlas");
// Import opacity/alpha map.
// note: the png file need to contain the 4 alpha maps on separate layers
atlasGenerateTextureTOCFromTiles(1, "starter.fps/alphamap.png", "starter.fps/opacity.atlas");
// Load lightmap and JPEG compress.
atlasGenerateTextureTOCFromTiles(8, "starter.fps/lightmap.jpg", "starter.fps/lightmap_png.atlas");
atlasConvertTextureTOC("starter.fps/lightmap_png.atlas", "starter.fps/lightmap.atlas", 0);
// Finally combine into a blender terrain.
atlasGenerateBlenderTerrain("starter.fps/downtownDenver.atlas", "starter.fps/geometry.atlas", "starter.fps/opacity.atlas", "starter.fps/lightmap.atlas");I don't quite understand the purpose of this line of code (with the x%d and y%d stuff) that was in the original instructions.atlasGenerateTextureTOCFromTiles(8, "terrain_water_demo/l3dt/LM/terrain_LM_x%dy%d.jpg", "terrain_water_demo/lightmap_png.atlas");
Honestly I have no clue how to get the alpha map from so I can use it in this code. But the Light Map appears to work without the x and y stuff in the file. If anyone can help me with this Alpha thing that would complete my first Atlas file!
Torque Owner Kyle Cook