Game Development Community

AtlasConvertTextureTOC ?

by Mark Dynna · in Torque Game Engine Advanced · 07/07/2006 (9:06 am) · 3 replies

I noticed this function used in the example of creating a new Atlas2 terrain. However I cannot find any other documentation for it. Looking at the code it says the function:
"Convert the single texture TOC contained in inFile to be format format, and write the results into new atlas file outFile. Options for format are: 0=JPEG,1=PNG,2=DDS."

So it seems to take an Atlas file, convert it to some image format, then write it out into another Atlas file. Is anyone using this? Does anyone know why this function would need to be run?

#1
07/07/2006 (10:04 am)
I think to compress the image if the source was huge.
#2
07/08/2006 (1:12 am)
It sounds like an image processing function.

Basically take input file in .jpg/.png/.dds and write it to outfile .jpg/.png/.dds usually you'd input a given PNG or something big, and output it to something smaller, like DDS.
#3
07/08/2006 (9:00 pm)
Ok that would make sense if inFile and outFile were image files, but in the (only) example they are both .atlas files. So I'm kind of baffled as to what this function does. Here's the example from TDN:
atlasGenerateTextureTOCFromTiles(8, "terrain_water_demo/l3dt/LM/terrain_LM_x%dy%d.jpg", "terrain_water_demo/lightmap_png.atlas");
atlasConvertTextureTOC("terrain_water_demo/lightmap_png.atlas", "terrain_water_demo/lightmap.atlas", 0);