PDA

View Full Version : [Python] Dynamic 2D shadows??



crazyfuturamanoob
October 3rd, 2008, 05:48 PM
I have been looking, but found nothing yet. I want to make dynamic 2D shadows around polygons, but how??

Here is an image demonstrating what I want:
http://images.gamedev.net/features/programming/2dsoftshadow/03HullGeneration.gif

So how can I do that?

Calmatory
October 3rd, 2008, 06:42 PM
Vector from light source towards every vertex which is visible to the light.
Shade the area which the vectors fill.

http://www.gamedev.net/reference/programming/features/2dsoftshadow/

crazyfuturamanoob
October 4th, 2008, 08:45 AM
But I don't understand those mathematical terms (or math very well at all).
I want an example demonstrating how the vectors would work. What are normals?
How can that normalthing work for finding is the edge either front facing, or back facing???
Could someone explain that tutorial for me a bit clearer?

Calmatory
October 4th, 2008, 01:14 PM
In case you don't find help here, you should take a look at DevMaster's forums (http://www.devmaster.net/forums/). At least I've got a lot of graphics related help there, even for QuickBASIC. ;)

crazyfuturamanoob
October 4th, 2008, 05:22 PM
Ok, I managed to do the thing with only one light, but two lights?