Today I was looking at a still frame of a game, and noticed that all of the shadows were dynamic (created per frame). As we know, shadows can be quite expensive. I was wondering why shadows could not be simply mapped at run time for non moving objects, and then only do dynamic shadows for players, vehicles, etc. What are the advantages/disadvantages of doing this?

  • \$\begingroup\$ Quake 2 does this; Carmack indicated that there are really no disadvantages - just really good looking shadows that are fast. \$\endgroup\$ – Jonathan Dickinson Dec 22 '11 at 9:28
  • 1
    \$\begingroup\$ You can't have dynamic light sources if you bake the shadows from terrain/scenery can you? \$\endgroup\$ – ClassicThunder Dec 22 '11 at 9:42
  • 1
    \$\begingroup\$ What if you have notmoving house and static light source. And you bake out house shadow to texture of the ground. What would happen if you move with your player to the shadow of house? Player won't be "shadowed" - am I right? \$\endgroup\$ – zacharmarz Dec 22 '11 at 9:46
  • 2
    \$\begingroup\$ Differences in quality and visual appearance between dynamic and static shadows is the main one I can think of; this kind of visual discontinuity can be quite jarring once you start noticing it. \$\endgroup\$ – Maximus Minimus Dec 22 '11 at 10:48
  • 1
    \$\begingroup\$ @zacharmarz that's what I meant by 'good enough'; not good enough for a AAA title; but maybe acceptable for an indie one. Either way you can trim down the number of dynamic lights with precalc (especially in angular/indoor/futuristic environments). \$\endgroup\$ – Jonathan Dickinson Dec 22 '11 at 14:10


  • Lightmaps are very large textures. If you have enough processing to make all shadows dynamic you can probably use the memory for something else.
  • Non unified lighting model. Some lighting models like deferred don't mix well with prebaked shadows.
  • Light mappers are usually very slow. You need to wait few hours to preview lighting changes in the scene.
  • You can't pre-bake lights in case that light sources are moving even if everything else the scene is static.


  • You can have much higher quality shadows and lighting.
  • Faster processing
  • Virtually unlimited number of light sources can be used
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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