Google-apps
Hoofdmenu

Post a Comment On: C0DE517E

"Oh envmap lighting, how do we get you wrong? Let me count the ways..."

6 Comments -

1 – 6 of 6
Anonymous Anonymous said...

We precompute a 3D texture parameterized by V.N, roughness, and "F0" (spec intensity at normal incidence) which encodes the direction, spread, and intensity of the incidence lobe for our BRDF, and use that to sample the envmap. The spread is stored as an oblong gaussian with major axis assumed to be in the plane of N and V. Works pretty well.

June 26, 2014 at 8:34 AM

Blogger PS said...

You sample a 3D texture to avoid a dot product? Are they really *that* expensive? Or am I being too thick or noobish here?

June 27, 2014 at 8:40 AM

Blogger DEADC0DE said...

I think he was saying that he samples a 3d texture to know how to sample the prefiltered envmap.

The 3d texture stores some parameters that tell how the BRDF looks like, or in other words which prefiltered mip level of the envmap does represent the BRDF best.

That is because as I wrote in the article even if you do the state-of-the-art Cook-Torrance D/FG split (see Brian Karis Unrealengine 4 presentation, all the links are in the article) you still commit certain errors

June 27, 2014 at 11:01 AM

Anonymous Anonymous said...

Right, the 3D texture encodes the best-fit specular lobe to integrate the envmap with.

July 2, 2014 at 4:00 PM

Anonymous Anonymous said...

English is my second language so please feel free to correct me.

When we convolve a cubemap with diffuse or specular convolution, shouldn've convolve each texel differently depending on material of the surface from which that texel is coming from? Say one cubemap texel is metal and another is dielectric?

Something tells me we can ignore difference in materials if we create our cubemap from a point that's far enough from surfaces and we use correct parameters when rendering objects in source cubemap, but I'm still not sure on how correct diffuse and specular convolutions of arbitrary cubemap are.

Am I missing something?

July 6, 2014 at 10:04 AM

Blogger DEADC0DE said...

Anonym: sorry for the late reply!

You are right. The standard solution for that problem is to use mipmaps for specular (and maybe a second cubemap or SH or something else for diffuse).

In the specular cubemap, we convolve each mip with a different specular lobe, observing that as the lobes get wider, we need less resolution

see https://github.com/dariomanesku/cmftStudio

March 28, 2015 at 3:23 PM

You can use some HTML tags, such as <b>, <i>, <a>

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot