Not logged in, Join Here! or Log In Below:  
News Articles Search    

 Home / 3D Theory & Graphics / shadows in dynamic worlds Account Manager
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

March 02, 2005, 08:47 AM

I'm currently working on a simple engine that (should) allow any deformation of the world at any time. So preprocessing algorithms aren't good. There are a lot of lights, but often with small radius- I'm currently asking myself what method best suits this need. I had following ideas.

vertex coloring (raytrace from each vertex to light): fast enough but creates lots artifacts (some models haven't high polycount, especially floors).

shadows maps (generate a small texture for every tri, raytrace to light): needs more power than vertex coloring + texture upload.

stencil shadows etc. may not work for the whole world, because i'cant render the whole world multiples time (lot lights).

The only game, to my knowledge, is Silent Storm but I don't know excatly how they done it (always small worlds, some kind of view dependant tracing that creates lots of artifacts, but even though looks better then my approaches)

Thanks in advance for any suggestions (cheating, ...)...


March 02, 2005, 10:08 AM

Hardware shadow mapping + deferred shading ? =)

Deferred shading seems - at least according to nvidia's paper - to be ideal for scenes with many small lights.

Likewise, hardware shadow mapping sounds reasonable as well.

- Wernaeh


March 02, 2005, 03:04 PM

You could try keeping the polygons in an octree or similiar (you'll have to anyway, for collision detection and such), and looping through the lights rendering, for each, only the polygons within its radius. This should help you keep fillrate down, if the lights have small radii so there are only going to be one or two lights on each surface.

Shadow mapping should be workable - don't use a texture for each triangle but a depth texture for each light (cubemaps for omnidirectional lights, ordinary 2D textures for spotlights). Doing this with a lot of lights will be tricky. Keep the resolution down on the shadow maps and it should be okay, since depth-only rendering is often twice as fast as color rendering. Also, perhaps you can mark some lights as non-shadowing, and only use shadows where it is really needed for visual quality.


March 02, 2005, 05:03 PM

Deferred shading seems like the right thing to do.

This thread contains 4 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.