Sign in to follow this  

Mixing radiosity with bump mapped dynamic light

This topic is 4866 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, in my current fps engine, i have implemented radiosity lightmaps as well as specular bump mapping. now i combine them in the fragment program for bump mapping like this: color = decalColor * (bump_diffuse + bump_specular + lightMapColor); this looks good, but the problem is: in my sample scene, there are two lights, one red light emitting from a cola-automat, which is a radiosity light, and the other is the main "light", a white light which is placed on the ceiling. this is per-pixel light. the problem is now, that the cola-automat do not cast shadows on anything that would not be seen by the main light, since this light is not a radiosity light.´ but i still want to use the soft shadows from the radiosity algo, so i tried to place another radiosity light at exact the same position as the per pixel light. this, as i expected, decreases realism, since i have to make the per-pixel light darker, so that it does not cancel out the effect of the shadow. but then, the bumps and specularity does no longer look that good... how can i solve this problem? appreciate any ideas! thanks Gammastrahler

Share this post


Link to post
Share on other sites
Well, you need to use some form of realtime shadowing for the PP light: shadow maps or shadow volumes. As an example, the equation would look like this when using a shadow map:

c = (radiosity_map + bump_diffuse * shadow_map_result) * decal_texture + bump_specular * shadow_map_result

Both the diffuse and specular contributions of the PP light are modulated by the shadowmap. You can easily add distance attenuation to this equation, if you need it. Also note, that the specular contribution should be outside of the decal texture multiply, otherwise you won't get any saturated highlights on dark textures.

Once you get that working, there are various additional tricks to make your pp light generate indirect illumination like the radiosity lights.

Share this post


Link to post
Share on other sites

This topic is 4866 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this