[Gtkradiant] BSP monitoring from standard output?
Riku 'Rakkis' Nurminen
Tue, 17 Feb 2004 10:39:52 +0200
> OTOH, is OGRE reading the lightmap width/height offset?
Hrm, as far as I can see they are just assuming each lightmap is 128 *
128 * 3 (ie. width, then hight, ..), as you can see in the DataChunk
void Quake3Level::extractLightmaps(void) const
// Lightmaps are always 128x128x24 (RGB)
unsigned char* pLightmap = mLightmaps;
for (int i = 0; i < mNumLightmaps; ++i)
sprintf(name, "@lightmap%d", i);
// Load, no mipmaps, brighten by factor 2.5
Image img; img.loadRawData( DataChunk( pLightmap, 128 * 128
* 3 ), 128, 128, PF_R8G8B8 );
TextureManager::getSingleton().loadImage( name, img,
TEX_TYPE_2D, 0, 4.0f );
pLightmap += BSP_LIGHTMAP_BANKSIZE;
Could this be the problem? It works for q3map maps..
Btw, are there any "official" specs for the BSP format that comes from
q3map2? Furthermore, is there any example code that was written
especially for loading q3map2 maps? Could be better if I could see
either of those instead of guessing the problems here..