> > Try adding a second wall behind the first in modeling-shadow-1.py and
> > you will see that both the shadow and the light will go through the
> > first wall and hit the second wall too. Realisticly, the light should
> > stop at the first wall and the second wall shouldn't be lit at all.
> >
> 
> Unfortunately, that's not how opengl works. Light and shadows will pass
> through anything that's not set up itself to cast a shadow, regardless
> of whether or not the shadow is cast on the object in question. Read the
> tutorial and set up the walls to themselves cast shadows.
> 
> Think about it this way: blocking light (and therefore shadows) is a
> special operation that takes CPU cycles. Therefore, it takes some extra
> effort to do it. If everything blocked light by default, things would
> run very slowly.

Then it is very hard to make indoor levels look correctly in soya if
the lighting isn't affected by the geometry. Atleast Crystal Space
manages to do this by using lightmaps I think. If other 3d engines can
do this then maybe soya should too? Also please take a look at my
attached example. Both walls are setup to cast shadows but the light
and the shadow still passes through them regardless.

-- 
mvh Björn

Attachment: modeling-shadow-modified.py
Description: application/python

Reply via email to