Jump to content
  • Advertisement
Sign in to follow this  
Lopez

shadows in lightmap space

This topic is 4495 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 there, I've been working on a process of rendering my lighting and shadows into lightmap space, as a precursor to implementing texture based Ambient Occlusion. I seem to have a few bottlenecks at the moment, and i'm wondering if anyone else has managed to implement anything similar. Currently my renderer performs the following... 1. Render each lights depthmap into a FBO, along with a color buffer containing the linear distance of each occluder from the light (for computing soft shadow penumbra - not working properly yet - There's probably a better way to do this). 2. Accumulate each light in lightmap space to another texture. 3. Apply the texture generated in (2) to the scene, along with an AO map (rendered using skylight, radiosity, and render to texture in Studio Max). Currently this is giving me 300-700 fps on a 6600 gt for 4 lights. I only update the lights if their position or view changes slightly; but when this happens, I have to re-render all of the lights that affect the lightmap, and this reduces the framerate significantly.

Share this post


Link to post
Share on other sites
Advertisement
Cmon...

Hasn't anyone out there implemented lighting in lightmap space.

It's similar to a couple of the demo's on the

http://frustum.org/3d/

website - subsurface scattering, and lightmaps onthe same page.



Share this post


Link to post
Share on other sites
The only thing you would need to make sure is that every vertex in your mesh has unique uv coordinates. Otherwise there will be overlap in the lightmap.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!