i was playing portal 2,and i noticed that every light have shadows,but the game run smoothly,in blender if i add 15 or more spot lamp with shadows,it makes my game lags,so i examine the shadows in portal 2 and i noticed not all light have shadows,when i moved from light1 to light 2,the shadows moved to light2,so the shadows is not coming from the light,but,something like a lamp that cast only shadows,and it’ll place it self at the same position of a light near the player.
so,i tried to replicate this in blender,i added a spot lamp with “shadows only” option enabled,and some python so it’ll place it self at the same position of a light source near the player,and the spot lamp is tracking the player.
here’s a .blend: shadows.blend (687 KB)
Note: there are 2 spot lamp and i added integer property to both of the lamp, first spot lamp have an integer with a value set to “0” and the second spot lamp with a value set to “1” so both of the spot lamp souldn’t be placed at the same place,but, somehow it doesn’t work in blender 2.70,and shadows are overlaping.