[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] shadow demo



>  On Mon, Mar 24, 2008 at 4:05 PM, Ian Mallett <geometrian@xxxxxxxxx> wrote:
>  > So at this resolution, the shadows can never be any higher resolution?  As
>  > they are, they are really pixel-y, which is unacceptable.  How can the
>  > shadows be more detailed?
>  >

A side note: If you only want to cast shadows onto a flat surface, ie
the ground plane, you don't need to use a texture at all. Just draw
the surface, then draw all your meshes "squashed" into the plane by a
transformation.

With this method there will be no loss of resolution at all, but there
will be no self-shadowing, and the shadows will not grow larger with
distance because you are simulating shadows from a directional source
rather than a point source. Even so, it can give reasonable results
for scenes with high levels of ambient lighting and a flat ground
plane, and where the light source is very far away, ie outdoor daytime
scenes.

-- 
Alistair Buxton
a.j.buxton@xxxxxxxxx