Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking at the Ogre 3D library and I'm browsing through some examples / tutorials. My question is about terrain. There are a few examples showing how great the terrain system is, but I think that the global illumination and shadows of the terrain have to be pre-computed, which kinda makes it impossible to integrate this with a day / night cycle.

Is there a way to change the terrain light sources in real time? If so it is possible to do it and keep a decent FPS?

share|improve this question
The OGRE Terrain system does not support real-time lighting, IIRC. But have you thought about either creating a custom shader and applying that to your terrain, that does the lighting for you (maybe "fake" it since your sun position can probably be determined from the daytime). Or otherwise, try to write your Terrain class yourself that does a few things you need (back culling, LOD, and shading). Should not be too hard, if not as good in terms of performance as the OGRE original. – opatut Jan 3 '13 at 15:59

Ogre's TerrainComponent does support a single directional light, in addition to real-time shadows.

However, these will be of lower quality (and potentially, lower performance), than the pre-baked lighting and shadows. And if you opt for pre-baked, then dynamic lighting is not typically an option.

share|improve this answer

There's one topic on their wiki stating a material generator for deferred shading for terrains, you could take a look on that and see if it is good for your uses.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.