Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I would like to know, how dynamic shadows, that 'blend' onto other objects, are created.

enter image description here

share|improve this question
    
+1 me too. Any chance for a video? –  ashes999 Feb 4 '12 at 1:35
    
The game is Blocktality - blocktality.sourceforge.net –  liamzebedee Feb 4 '12 at 1:40
add comment

2 Answers 2

up vote 6 down vote accepted

These can be done using shadow mapping. Basically, place the camera at the light source and render the scene into a depth buffer; the resulting buffer identifies all the lit surfaces since they are just the surfaces the light can "see". This texture is then used in the pixel shaders in the main render to mask away light on surfaces behind the shadow map. There are plenty of shadow mapping tutorials on the Web, so consult those for details.

share|improve this answer
1  
On the screen shot there is one Omnidirectionnal shadowmap light, you might want to check out dual paraboloid shadowmaps or shadowmaps with cubemaps for those. –  Valmond Feb 4 '12 at 7:34
add comment

Assuming you know how to generate a shadow for an object, generate all the shadows separately, and then blit them onto the scene. Any overlaps will have the sum of their... darkness (as it were), and therefore look like the shadows overlap.

share|improve this answer
add comment

Your Answer

 
discard

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.