Lights in ogre

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
sunbox
Gnoblar
Posts: 13
Joined: Thu Sep 08, 2005 12:00 am

Lights in ogre

Post by sunbox »

Does ogre's lights supports map projection ?
User avatar
Alexis
Halfling
Posts: 59
Joined: Fri Jul 22, 2005 3:35 pm
Location: Ukraine
x 1

Post by Alexis »

You can attach a texture to a frustum and use it as a projection texture.

Code: Select all

MaterialPtr mat_caust = MaterialManager::getSingleton().getByName("Caustic");
    TextureUnitState* tus_caust = mat_caust->getTechnique(0)->getPass(0)->getTextureUnitState(0);
    tus_caust->setProjectiveTexturing(true, m_caustic_frustum); 
Now "Caustic" texture projected by m_caustic_frustum.
sunbox
Gnoblar
Posts: 13
Joined: Thu Sep 08, 2005 12:00 am

Great

Post by sunbox »

Thanks a lot for your fast answer, I use Map projection instead of create many spotlights ( rendertime :s ) ans it's very useful for me ...
Post Reply