Dump_lightmaps Fix (map2dif)
by Kevin Johnson · in Torque Game Engine Advanced · 06/10/2005 (10:31 am) · 0 replies
Not sure if this is really or bug or not but here is a quick fix to get it going..
lmpacker.cpp
map2dif will now dump the lightmaps and the lightmap normalmaps after each sheet is assembled
edit : oh compile with the DUMP_LIGHTMAPS preproc define /D "DUMP_LIGHTMAPS"
lmpacker.cpp
//~ line 14 add
#ifdef DUMP_LIGHTMAPS
#include "core/fileStream.h"
#endif
//~ line 296 add
#ifdef DUMP_LIGHTMAPS
static U32 majCnt = 0;
U32 minCnt = 0;
FileStream output;
dPrintf("\nexporting lightmaps...");
output.open(avar("lightmap_%d_%d.png", majCnt, minCnt++), FileStream::Write);
m_sheets[0].pData->writePNG(output);
dPrintf("finished\n");
majCnt++;
#endifmap2dif will now dump the lightmaps and the lightmap normalmaps after each sheet is assembled
edit : oh compile with the DUMP_LIGHTMAPS preproc define /D "DUMP_LIGHTMAPS"