[Help] dynamic lightmap modifications

LR

10-09-2007 18:19:57

Is it possible to manually change the lightmap and/or normalmap texture?

So far the only way I've found to dynamically change lighting on deformed terrain was to use vertex lighting which does not look nice when LOD kicks in.

Playing around with texture painting I only managed to paint to the base and coverage maps.

std::vector<Ogre::Real> channelValues(10);
channelValues[0] = 0; // base.b
channelValues[1] = 0; // base.g
channelValues[2] = 0; // base.r
channelValues[3] = 0; // coverage.b
channelValues[4] = 0; // coverage.g
channelValues[5] = 0; // coverage.r
channelValues[6] = 0; // coverage.a
channelValues[7] = 0; // ?
channelValues[8] = 0; // ?
channelValues[9] = 0; // ?
mSceneMgr->setOption( "setPaintChannelValues", &channelValues );

Did I miss something?

hotgloupi

28-11-2007 07:47:23

Hi man,

Did you see my post?
You just can get an pointer to Ogre::uchar tab, that is the lightmap.
You can modifie it, but you mustn't change sun direction (setOptions("SunDir",..) and setOptions(SunAngle,..)) because it will compute the new lightmap, and so, erase your modification...