Jump to content
  • Advertisement
Sign in to follow this  
Gammastrahler

Mixing radiosity with bump mapped dynamic light

This topic is 5229 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!