<p>DFG pops up in the family of microfacet based BRDFs. It is simply the product of three terms:</p>

<ul>
<li>D : The microfacet distribution.</li>
<li>F : The fresnel coefficient.</li>
<li>G : The geometric attenuation between microfacets.</li>
</ul>

<p>When someone says Cook-Torrance, they usually mean a microfacet BRDF where the distribution (D) is Beckmann, which I think is what the original Cook-Torrance paper was about.</p>

<p>GGX is really just a different distribution (D term). GTR is another one. The names are often used as a shortcut to mean a BRDF using that distribution.</p>

<p>Now all of these assume specular reflection (or refraction) on the microfacets, hence the fresnel term. If you take a similar idea but use diffuse (lambertian) microfacets, you get the Oren-Nayar BRDF. I think that one is based on a gaussian distribution of the microfacets but I'm not familiar with the details.</p>

CC BY-SA 3.0
2017-06-05T23:57:17.883Z
okay, that's a bit more clear but it still doesn't explain what do I do with my "vec3 reflectionColour" that I get from re-launching a ray in raytracing/marching or using SSR/cubemap. It's like the equations only taking into account a pointlight/spotlight but no idea for area lights or reflections. It also seems that the "specular" is only related to the "white dot" instead of reflection because of that which doesn't make sense =/
newin
CC BY-SA 3.0
2017-06-06T01:04:41.147Z
@newin In a PBR model, specular and reflection are different names for the same thing. It's a specular highlight when the ray hits a light, a reflection when it hits another object (or an environment). As for your reflectionColour, it depends how the ray is generated. Are you sampling direct lighting? Area lights? Integrating a BRDF against and environment map? Try reading [Progressive Path Tracing with Explicit Light Sampling](https://computergraphics.stackexchange.com/questions/5152), there's a long answer which might clear a few things up about the process.
Olivier
CC BY-SA 3.0
2017-06-06T12:16:28.103Z
So if I understand correctly that "vec3 reflectionColour" should be treated as a light and if I want to make mesh emitting light I should just put a value > 1 in the albedo and that's it ?
(I'm trying to integrate PBR in to different scenario the first is a raymarcher where I want meshes emitting light, the other is a game engine that use SSR and probably will use cubemaps)
newin
CC BY-SA 3.0
2017-06-06T14:57:19.783Z
@newin emitted light is just added on top of everything else. It's unrelated to BRDFs. If your mesh does nothing but emit light, you don't even need to trace any further rays from it. A large albedo will amplify light (physically wrong), not create it.
Olivier
CC BY-SA 3.0
2017-06-01T19:51:53.180Z
2017-06-01T19:51:53.180Z
Olivier
<p>I'm discovering the wonderful world of math and I'm hitting a huge wall with PBR and naming so I have a few questions:
As far as I understand BRDF describe how a material react to light (incoming direct light and reflections). But in "Cook-Torrance" I don't see anything about reflections I don't understand how I integrate it so I only get diffuse light and reflections.</p>

<p>I've read a lot about different "diffuse term" like "Oren-Nayar" is it a part of Cook-Torrance like a different "D" in the DFG nominator ? does it replace it without specular calculations ?</p>

<p>I've read a lot about "GGX" from my blender artist background I thought it was something that make a blurry reflection but It seems I was wrong and now I find this GGX term in a lot of different situations like in micro-facet normal distribution in this <a href="http://learnopengl.com/#!PBR/Lighting" rel="noreferrer">tutorial</a></p>

<p>So in short the question is: how "Oren-Nayar" and "GGX" and "Cook-Torrance" are related to each other (if they are) and how do I integrate "vec3 reflection" in those algorithm ?</p>

<p>As I said before I'm a newbie in math so If your answer is "math heavy" please write a glsl/hlsl version of your equations it's much easier to understand for me so an equivalence will help me a lot</p>

<p>PS: I understand my question is blurry but it is also as blurry as my understanding of the subject.</p>

CC BY-SA 3.0
2017-06-06T06:00:40.910Z
You can try to read the original Cook-Torrance paper: http://inst.cs.berkeley.edu/~cs294-13/fa09/lectures/cookpaper.pdf - be sure to check the references listed in the end too, when possible (most are available online). It will take some time, but it is a sure way to understand "in depth" what is happening.
wip
CC BY-SA 3.0
2017-06-02T22:06:48.067Z
Something that might help you out is that "specular" means "mirror like".  So, when talking about specular and diffuse reflections, specular means mirror like reflections, what people normally call reflection.  Diffuse is just "things lighting up".  They are reflecting light too, but they are reflecting from many different directions, so the result isn't anything that you can recognize an image in.  There is a scale between specular and diffuse reflection in real objects, and this is part of what the "roughness" parameter of PBR controls.
Alan Wolfe
<glsl><pbr>
Confused with PBR implementations
newin
# Confused with PBR implementations

(Asked by: username_0 on 2017-05-31)

I'm discovering the wonderful world of math and I'm hitting a huge wall with PBR and naming so I have a few questions:
As far as I understand BRDF describe how a material react to light (incoming direct light and reflections). But in "Cook-Torrance" I don't see anything about reflections I don't understand how I integrate it so I only get diffuse light and reflections.

I've read a lot about different "diffuse term" like "Oren-Nayar" is it a part of Cook-Torrance like a different "D" in the DFG nominator ? does it replace it without specular calculations ?

I've read a lot about "GGX" from my blender artist background I thought it was something that make a blurry reflection but It seems I was wrong and now I find this GGX term in a lot of different situations like in micro-facet normal distribution in this [tutorial](http://learnopengl.com/#!PBR/Lighting)

So in short the question is: how "Oren-Nayar" and "GGX" and "Cook-Torrance" are related to each other (if they are) and how do I integrate "vec3 reflection" in those algorithm ?

As I said before I'm a newbie in math so If your answer is "math heavy" please write a glsl/hlsl version of your equations it's much easier to understand for me so an equivalence will help me a lot

PS: I understand my question is blurry but it is also as blurry as my understanding of the subject.

**Tags:** glsl, pbr

> **Comments:**
> **username_2**: Something that might help you out is that "specular" means "mirror like".  So, when talking about specular and diffuse reflections, specular means mirror like reflections, what people normally call reflection.  Diffuse is just "things lighting up".  They are reflecting light too, but they are reflecting from many different directions, so the result isn't anything that you can recognize an image in.  There is a scale between specular and diffuse reflection in real objects, and this is part of what the "roughness" parameter of PBR controls.  
> **username_1**: You can try to read the original Cook-Torrance paper: http://inst.cs.berkeley.edu/~cs294-13/fa09/lectures/cookpaper.pdf - be sure to check the references listed in the end too, when possible (most are available online). It will take some time, but it is a sure way to understand "in depth" what is happening.  

---

## 1 answers

### Answer by username_3 on 2017-06-01. Score: 11

DFG pops up in the family of microfacet based BRDFs. It is simply the product of three terms:

* D : The microfacet distribution.
* F : The fresnel coefficient.
* G : The geometric attenuation between microfacets.

When someone says Cook-Torrance, they usually mean a microfacet BRDF where the distribution (D) is Beckmann, which I think is what the original Cook-Torrance paper was about.

GGX is really just a different distribution (D term). GTR is another one. The names are often used as a shortcut to mean a BRDF using that distribution.

Now all of these assume specular reflection (or refraction) on the microfacets, hence the fresnel term. If you take a similar idea but use diffuse (lambertian) microfacets, you get the Oren-Nayar BRDF. I think that one is based on a gaussian distribution of the microfacets but I'm not familiar with the details.

> **Comments:**
> **username_0**: okay, that's a bit more clear but it still doesn't explain what do I do with my "vec3 reflectionColour" that I get from re-launching a ray in raytracing/marching or using SSR/cubemap. It's like the equations only taking into account a pointlight/spotlight but no idea for area lights or reflections. It also seems that the "specular" is only related to the "white dot" instead of reflection because of that which doesn't make sense =/  
> **username_3**: @username_0 In a PBR model, specular and reflection are different names for the same thing. It's a specular highlight when the ray hits a light, a reflection when it hits another object (or an environment). As for your reflectionColour, it depends how the ray is generated. Are you sampling direct lighting? Area lights? Integrating a BRDF against and environment map? Try reading [Progressive Path Tracing with Explicit Light Sampling](https://computergraphics.stackexchange.com/questions/5152), there's a long answer which might clear a few things up about the process.  
> **username_0**: So if I understand correctly that "vec3 reflectionColour" should be treated as a light and if I want to make mesh emitting light I should just put a value > 1 in the albedo and that's it ? (I'm trying to integrate PBR in to different scenario the first is a raymarcher where I want meshes emitting light, the other is a game engine that use SSR and probably will use cubemaps)  
> **username_3**: @username_0 emitted light is just added on top of everything else. It's unrelated to BRDFs. If your mesh does nothing but emit light, you don't even need to trace any further rays from it. A large albedo will amplify light (physically wrong), not create it.  

---

