combining lightmaps and shadow volumes

How can I render my shadow mask only on dynamic primitives ? My static geometry uses a precomputed radiosity lightmap so I don’t need/want it to be shadowed by the shadow volume, but I want to correctly shadow the meshes which enters the shadow volume.
Any idea ?

Julien.

I think it’s just a matter of rendering order, just draw the receiving objects and casting objects, render the volume shadows, THEN render the rest of the scene.

rIO.sK http://www.spinningkids.org/rio/

Originally posted by rIO:
I think it’s just a matter of rendering order, just draw the receiving objects and casting objects, render the volume shadows, THEN render the rest of the scene.

The problem is, there are many dynamic entities and the main occluders are static (walls, etc).
Doing what you suggest would mean to transform and light thousands of primitives which wouldn’t have been enlighten if they were culled away by the depth test, or am I wrong ?

Julien.

use this
( shadow mask + lightmap + other lighting equations ) * texture

Zed,

That doesn’t work for specular, as specular has the color of the light, not the color of the object. Thus, what you want is this:

pixel = (ambient+reflection)*basetexture
for i = 0; i < numLights; ++i
pixel += shadow_mask[i] * (diffuse[i]*basetexture + specular[i])

For light maps, you’d have to determine whether the light map is solving “ambient” or “diffuse”, or whether you have a bit of both, perhaps with alpha or two separate maps. And if the light map is solving “diffuse” then you need one per light.

[This message has been edited by jwatte (edited 03-01-2002).]