What is the relationship between area lights and reflections (SSR/local/global)

Started by
9 comments, last by vlj 7 years, 11 months ago

I have been reading about the various reflection techniques in the Frostbite paper (planar, SSR, local cube map, global cube map) and just when I think I have everything sorted out I see this:

So, to my eyes that looks just like some of the reflection techniques I am studying (especially distance-based roughness in the FB paper). Does the usage of area lights remove the need for the reflection techniques I mentioned above? Or are the authors just using these additional techniques and not mentioning it?

The whole paper is here, but honestly it is a bit over my head:

http://pascal.lecocq.home.free.fr/publications/lecocq_i3D2016_specularAreaLighting.pdf

Advertisement
I'd stick at Frostbite kind of area lights in general, those are practical solutions.

The video is very impressive, but it has issues:
Very expensive
No general shadowing (would need to use approximating low poly occluders or voxels... even more expensive)

That limits the usecase to special situations, brobably not worth the affort?

Since area lights and punctual light sources (spot, directional, point) basically try to approximate a realtime reflection for one light source it's not wrong for you to think that they are one and the same because what they are trying to achieve is the same thing. However as "everything reflects" in some way or another you'd have to evaluate every single pixel in your scene as a sort of light source, which is kinda what you're doing in image based lighting. Capture the environment and evaluate the reflected light from/into all directions.

Which also has the issue that it can only be done efficiently in an offline preprocess so that leaves us (for realtime reflections) with either planar reflections or screen space techniques.

Ah, right I got confused with that "blurry reflection look" and forgot that this video is only about lights. What a bozo I am!

I've never written SSR/cube reflection before -- it seems like you would have to turn off the lights before your SSR/cube reflection pass so you don't "double up" the reflections of the light, right? It Otherwise you would have one reflection from the analytic/punctual light model and another reflection from your SSR/cube reflection pass. Or is that not that big of a deal?

Ah, right I got confused with that "blurry reflection look" and forgot that this video is only about lights. What a bozo I am!

I've never written SSR/cube reflection before -- it seems like you would have to turn off the lights before your SSR/cube reflection pass so you don't "double up" the reflections of the light, right? It Otherwise you would have one reflection from the analytic/punctual light model and another reflection from your SSR/cube reflection pass. Or is that not that big of a deal?

For cubemaps you turn off any direct contribution, correct. But it's not necessary for SSR as you are essentially overwriting any other specular contribution if the SSR contribution actually hits valid info, so it shouldn't double the contribution. But this assumes your specular from the lightsource is actually at least somewhat of a match with whatever emissive material the light source is supposed to come from. If they're too mismatched it could certainly look odd.

Ah, right I got confused with that "blurry reflection look" and forgot that this video is only about lights. What a bozo I am!

I've never written SSR/cube reflection before -- it seems like you would have to turn off the lights before your SSR/cube reflection pass so you don't "double up" the reflections of the light, right? It Otherwise you would have one reflection from the analytic/punctual light model and another reflection from your SSR/cube reflection pass. Or is that not that big of a deal?

For cubemaps you turn off any direct contribution, correct.

Do you really ? I always thought you capture it n number of times to simulate light bounces ?

Ah, right I got confused with that "blurry reflection look" and forgot that this video is only about lights. What a bozo I am!

I've never written SSR/cube reflection before -- it seems like you would have to turn off the lights before your SSR/cube reflection pass so you don't "double up" the reflections of the light, right? It Otherwise you would have one reflection from the analytic/punctual light model and another reflection from your SSR/cube reflection pass. Or is that not that big of a deal?

For cubemaps you turn off any direct contribution, correct.

Do you really ? I always thought you capture it n number of times to simulate light bounces ?

I'm assuming he means the emissive texture/sprite that's supposed to represent the actual "light emitting" part of the light. EG your sun disc representing the sun. In which case you'd want to turn it off for cubemaps or else you'd get a double contribution, one from the cubemap capturing the sun disc, and one from your analytic directional light. This doesn't, or shouldn't matter for SSR as SSR is hopefully just going to overwrite your analytic specular with more accurate SSR reflections of your emissive material (assuming it hits).

There are plenty of circumstances where you may even want to leave them on for cubemaps too. If the light is distant enough that its analytic solution doesn't contribute, you can certainly capture it in a cubemap (distant city lights or something).

And for actual light contribution otherwise, eg drawing point lights and etc. then you just leave them on for both cubemaps and SSR.

OH! And edit, duh. Here's the exact same thing as the area lights OP posted, but with source code and a permissive license and etc. etc. Also diffuse lighting at the same time, still no shadows though (raytrace analytic shapes/signed distance fields?) https://eheitzresearch.wordpress.com/415-2/

The lighting for an Area light generally includes diffuse lighting and specular lighting.

Compared with the specular one, the diffuse area-lighting is relative simple. It's view-independent. There are so many approx methods to mimic the efforts, and most of them are relatively accurate. The main contribution of Frostbite's course in Sig15 is the summary for typical approx methods that used for diffuse area-lighting.

But the specular area-lighting is just another thing. It is the most significant perception that you feel like a 'reflection'. Its fast & ACCURATE approx methods were not available until Pascal's I3D paper (I3D2016 Best Paper) and Heitz's Sig16 paper (another big break-though).

On the other hand, SSR is a screen-space based technology. Generally speaking, I prefer to consider it just like a Post-Effect. Accurate calculation for area-lighting is not involved in SSR.

For demo purpose, the author of area-lighting traditionally prefer to use a planar ground to show the specular area-lighting. But by no mean should this case be confused with a Glossy SSR scene.

Does the linearly cosine transform base fit more complex function than uniform polygon? My be it can be used for environment map specular integration

Compared with the specular one, the diffuse area-lighting is relative simple. It's view-independent

That depends if you're using Lambert BRDF or not :wink:

Does the linearly cosine transform base fit more complex function than uniform polygon? My be it can be used for environment map specular integration

Yeah, in the paper they extend it to include a good approximation for textured polygons.
However, they split the calculations between light intensity (which receives the Blinn-esque skewing at glancing angles) and light colour (which doesn't)... So unfortunately, while this does reproduce the shape of Blinn/GGX/etc BRDF's quite well in general, this accurate reproduction doesn't apply to the way that the texture-colours are blurred.

I have been reading about the various reflection techniques in the Frostbite paper (planar, SSR, local cube map, global cube map) and just when I think I have everything sorted out I see this:
...
So, to my eyes that looks just like some of the reflection techniques I am studying (especially distance-based roughness in the FB paper). Does the usage of area lights remove the need for the reflection techniques I mentioned above? Or are the authors just using these additional techniques and not mentioning it?

At the heart of the rendering equation is the BRDF. This is a function for each surface/pixel/etc, which defines how it reflects light.
Light sources emit light, light bumps into surfaces, the BRDF then says how much is absorbed, how much is reflected, what direction(s) it's reflected, and what kind of colouration occurs.
Typically in games we make our BRDFs by glueing together the Lambert diffuse BRDF and the Blinn-Phong specular BRDF, to create a function that captures a range of surfaces from rough to smooth, and dull to shiny.

When we calculate the reflections that are caused by photos that have directly come from a light source (light->surface->eye), we call it direct lighting. For these, we calculate the irradiance/illuminance - the amount of light arriving at the surface from the light source -- plug that value into the BRDF along with the eye direction, and we calculate the radiance towards the eye.
We can do direct lighting for point lights, spot lights, directional lights, etc -- and recently good techniques have been invented for computing direct lighting from area lights quickly too.

With only direct lighting calculations, shadows are too dark and bumps in a surface have too much contrast. Everything looks very fake.
Traditionally in realtime graphics, we use a hacky solution of an "ambient light", which just adds some constant lighting everywhere to fill out the shadows and stop them from being black.
What we really want though is to calculate the indirect lighting -- this is the photons that have have been emitted from a light source, have bounced off multiple surfaces before reaching the eye (light->surface->...->surface->eye). This is where other techniques that you've been researching come in. Planar reflections, cube-map reflections (a.k.a. environment maps, or nowadays: IBL) and SSR are all ways to capture a second bounce of light. Using these techniques we first compute light->surface->eye as usual, but we store the results into this environment map. Later on, we can compute environment->surface->eye, which gives us a good approximation of light->surface->surface->eye.
Often these techniques are tied to a particular kind of BRDF -- e.g. planar reflections work best for perfect mirrors, or the Phong specular BRDF. Only recently have decent approximations for the Blinn-Phong BRDF been invented for use with cube-map reflections, etc...

This topic is closed to new replies.

Advertisement