Advertisement

Approximating Diffuse Indirect Illumination

Started by May 25, 2016 08:49 PM
0 comments, last by apatriarca 8 years, 7 months ago

Hi,

currently I am working on a new algorithm for realtime indirect illumination for my master thesis but I am not very versed in the mathematics of it. The goal is not to create stunning photorealistic images but rather the development and performance of the algorithm. Nevertheless I would like to generate images which are heading into the right direction in the sense of the math behind it.

At the moment I use phong shading as the illumination model for direct lighting.

The situation in my algorithm is the following:

I have something like photons in my scene. To gather indirect light for one photon I render the scene from its perspective. Assume only those fragments are rendered which are directly illuminated by a light source. To only account for diffuse indirect illumination I thought I could compute the diffuse color value with the phong model for every rendered fragment. Then all this values are summed up and divided by the number of rendered fragments. The resulting values (for every R,G,B channel one value) will be the indirect diffuse lighting part of the photon at its particular position.

Am I correct so far? Is this mathematically wise a reasonable approximation of the inidirect illumination?

The next question is what to do with this photon? Assume I render the scene from the perspective of my camera and a fragment with such a photon at its position is rendered. How do I incorporate the photon's diffuse color value in the lighting computation when using the phong model? My idea so far is to add the photon's diffuse color to the final color value (result of only direct lighting computation) of the fragment . Maybe with an appropriate weight factor to prevent overexposure.

Best Regards,

Stan

If you do not understand the mathematics (and physics?) of indirect illumination, why are you trying to come up with a real-time algorithm for it? The first step to solve any problem (and thus also creating an algorithm for that) is indeed to understand it in depth. You should have at least looked for algorithms doing the same thing!

I find your description very confusing. I am not sure I understand what you mean by "photon" in your algorithm. A photon is simply light, there is no direct or indirect contribution. It also look quite expensive since you probably need to render your scene for a lot of photons and (I guess) store these render buffers in several textures. You will then need to retrieve all these information in some way in the final pass.

This topic is closed to new replies.

Advertisement