JoeyDeVries / LearnOpenGL

Code repository of all OpenGL chapters from the book and its accompanying website https://learnopengl.com
https://learnopengl.com
Other
11.1k stars 2.81k forks source link

Confused by your explanation of "irradiance map" #368

Open moonryul opened 1 year ago

moonryul commented 1 year ago

Hi, Joey de Vries.

I really enjoyed your illuminating article on IBL: Diffuse irradiance and Specular IBL.

But I am very much curious why you wrote the following paragraph, with the accompanying picture of hemisphere:

To convolute an environment map we solve the integral for each output wo sample direction by discretely sampling a large number of directions wi over the hemisphere Ω and averaging their radiance. The hemisphere we build the sample directions wi from is oriented towards the output wo sample direction we're convoluting.

Capture

This pre-computed cubemap, that for each sample direction wo stores the integral result, can be thought of as the pre-computed sum of all indirect diffuse light of the scene hitting some surface aligned along direction wo . Such a cubemap is known as an irradiance map seeing as the convoluted cubemap effectively allows us to directly sample the scene's (pre-computed) irradiance from any direction wo

Q1. L0(p,w0) is the same regardless of the value of w0. So I find the statement:

Such a cubemap is known as an irradiance map seeing as the convoluted cubemap effectively allows us to directly sample the scene's (pre-computed) irradiance from any direction wo. . What do you mean by this if L0(p,w0) is the same regardless of the value of w0 ?

Q2. Later on, under section "Cubemap convolution", you again say:

Since the orientation of the hemisphere decides where we capture the irradiance, we can pre-calculate the irradiance for every possible hemisphere orientation oriented around all outgoing directions wo.

But immediately you say the following: To determine the amount of indirect diffuse (irradiant) light at a fragment surface, we retrieve the total irradiance from the hemisphere oriented around its surface normal.

The following picture is given to help understand this statement:

Capture2.

The two pictures seem to say the same thing. But one use w0 to represent the orientation of the hemisphere. The other uses N to do the same thing.

Q3. Is N the same as n which occurs in the equation ?

L0(p, wo) = kd 3/pi int_{Omega} Li(p,wi) n dot wI dwi.

I think so, but I would like to double check it.