BJörn Lindqvist wrote:
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.


I am not sure whether you know what you are talking about. Lightmaps have nothing to do with dynamic lights used by OpenGL. Lightmap is essentially a texture which you can add to the object to simulate effects of lighting (or shadowing, which is the same). You can do the same thing in Soya, if you bake your textures together with the lightmap.

The issue of dynamically casting shadows and blocking light (or global illumination in general) is a very difficult problem. What Soya is doing is just a geometric hack, it is not a true shadow casting which would be needed if you wanted really correct shadows. In fact, most 3D engines either do not have any shadows at all or just use hacks with shadow textures and similar to give impression that there is some shadow.

If you want to get correct shadows and have walls occlude the light automatically, you can do it, however this is very CPU intensive task - e.g. look up algorithms on shadow volumes. Why do you think that even games like Halflife 2 or Doom 3 are doing it with just a few lights at most and only for special cases (e.g. moving missiles, flashlight and such). It is simply too expensive to do everything by dynamic lighting. If you want real-time performance, you have to resort to hacks - e.g. shadow textures or stencil shadows, but these have their own problems.

Jan

Reply via email to