Extended Light functionality
Posted: Wed Jan 05, 2011 1:54 am
I've got one. I think it classifies as a paper cut.
A few months back I was writing a lightmapper, the idea was to use Ogre's dynamic light system to place lights around the scene and then bake lightmaps to textures. Pretty standard stuff for a lightmapper. However, I was surprised to find that the Ogre::Light class doesn't have the functionality to help calculate the intensity of light at a given point in space.
I'm not sure how difficult it would be to implement but I figured that the functionality probably already exists internally for calculating the colours of the vertices so it makes sense to have it exposed to the user to for there own use. For example, a function like this would be very useful:
Ouch! Papercut 
A few months back I was writing a lightmapper, the idea was to use Ogre's dynamic light system to place lights around the scene and then bake lightmaps to textures. Pretty standard stuff for a lightmapper. However, I was surprised to find that the Ogre::Light class doesn't have the functionality to help calculate the intensity of light at a given point in space.
I'm not sure how difficult it would be to implement but I figured that the functionality probably already exists internally for calculating the colours of the vertices so it makes sense to have it exposed to the user to for there own use. For example, a function like this would be very useful:
Code: Select all
// Retrieves light intensity at the specified point using the specified normal taking into account the type, position, attenuation, colour and range of the light.
ColourValue& Ogre::Light::getIntensity(const Vector3 &point, const Vector3 &normal)