The Stack Overflow podcast is back! Listen to an interview with our new CEO.
13

Using two Fresnel terms is correct in the sense that any given diffuse path will pass through the surface twice. If you're solving diffusion by tracing a path through the medium until it bounces out again then that you will get two (or more) Fresnel terms for that path as it interacts with the surface. However, that's not what you're doing with a diffuse ...


13

I am posting this for anyone wondering about the confusion between the terms $\frac{1}{\pi}$ and $\frac{1}{4}$. The term $\frac{1}{\pi}$ is an error from the original Cook-Torrance reference. In fact, the whole term $\frac{1}{4(n \cdot \omega_i)}$ comes from the Jacobian of the transformation from reflected solid angle to normal solid angle. According to ...


12

According to this paper, the $\frac{1}{\pi}$ in your $f_r$ should be $\frac{1}{4}$: $$ f_r = \frac{DFG}{4(n\cdot w_i)(n \cdot w_o)}, $$ so you would end up with $$ \frac{\pi}{2}L_i(p,w_k)\left(\frac{DFG}{n\cdot w_o}\right). $$


9

No, because the underlying physics is not the same, nor the lobe shape - not to speak of their parameters such as color and Fresnel term. Specular is really true surface interaction with the interface material/air, so it has Fresnel modulation and the internal medium has no influence on colors. But the surface condition strongly influence the reflectance, ...


9

As you already note, there is no clear cut interpretation/conversion for these values. I think it is even much worse: Depending on your BRDF and internal limitations (like having defined exponents ranging from 2-2048) the interpretation is completely different. Like suggested in the comments, it might be the best to render a series with different values and ...


8

While browsing to properly write my question, I actually found the answer, which happens to be very simple. Another Fresnel term is also going to weight in as the photons make their way out of the material (so being refracted into the air) and become the diffuse term. Thus the correct factor for the diffuse term would be: $$(1 - F_{in}) * (1 - F_{out})$$


8

What "ideal" means in this context is that there is no divergence in the direction of light reflection vectors (i.e. no roughness) but that they are all considered to be perfect reflections from an optical flat surface. However, even for optical flat surfaces Fresnel equation is still applied in BRDF evaluation that changes specular reflection and is ...


7

Yes, because refractive index can vary with wavelength. This is the origin of colored specular reflection in metals such as gold and copper; most other materials have essentially uncolored specular. At each wavelength, the specular reflectance at normal incidence is related to the refractive index at that wavelength according to the formula you mentioned. ...


6

You want to use the "conductor" plugin to create a smooth conductor / metal type BRDF. See section 8.2.6 in the documentation. As far as Mitsuba is concerned, a mirror is a special instance of a metal, where the material is specified as "none" (which corresponds to using complex IOR of $ \eta = 0 $ and $ k = 1 $). Here is an example in xml: <shape type=...


5

Most renderers allow you to set a flag on an object to make shadow rays ignore it (so it won't cast shadows). You could set this flag on your glazing. That said, it's not unusual to make it so that refraction is disabled on shadow rays: that is, if they would be transmitted by an object, a child ray is traced in the same direction, ignoring any refraction ...


5

The specular of metals is a product of the light color and the albedo of the material. Only for non-metals is the color of the specular independent of the albedo, but it's also rather dim. A perfect mirror would therefore be a perfectly smooth metallic surface with an albedo of 1. So, you could say such a mirror would be white, rather than having no color. ...


5

Assuming that the classic Phong model is desired here, the dot product that goes into the specular calculation should be R·L, rather than N·H (which was introduced by Blinn). That is, Phong calculates specular using the angle between the reflected eye vector and the light vector. In the diagram you posted, these vectors are shown and the angle is given as ...


5

In this context, "perfect mirror" refers to a perfectly flat surface with a 0% (pure black) diffuse color. It is still possible though to have a specular color: for example a Christmas tree ball behaves like a perfect mirror, but still tints the reflection. If you replace the 99% white color with a red tint, you will get the red Christmas ball look. In ...


4

Short answer: yes. Longer answer: yes, because the vectors you’re using are meant to represent directions, not directions-and-distances. Think of it in terms of light: it doesn’t matter how far a photon’s traveled, whether it’s from the sun or from a lamp on your desk—once it arrives at a surface, it’s going to get reflected in exactly the same way. From a ...


4

Diffuse colours on materials typically come from within the material, while the specular colour is from the very surface. Coloured plastic materials are made by embedding particles of dye inside a colourless medium, so the diffuse colour is the colour of the dye, while the specular colour is white from the colourless surface. With metals, all of the ...


3

The charts you show aren't showing two different phenomena - "glossy reflection" and "specular reflection" - they're showing two parameters of specular reflection. One is the specularity or specular colour and gives the amount or brightness of the specular reflection. The other is the glossiness or roughness and shows how sharp the specular reflection is. ...


3

Problem fixed by RichieSams, trichoplax and xpicox. Thanks all of you for the answers. I lower the roughness, change the color of material and reversed the ViewDirection then finally I start to see proper specular :). Fixed Code: #version 330 core in vec3 Position; in vec2 TexCoord0; in vec3 Normal; in vec3 Tangent; out vec4 FinalColor; uniform vec3 ...


3

Just to comment on the 0.16*Specular^2 term that was mentioned in the comments by Karim: Frostbite only remaps the specularity for their internal purpose so that they can pack gemstones specularity into the 8bit channel. They just lose some precision in favor of more variation. The specularity value is the original one when rendering. Check the Disney BRDF ...


3

Ideal mirrors are just that, ideal. The question if or not it has color never comes to play, its ideal it reflects everything. Like division by zero it is undefined. However, that does not mean you could not multiply your result by one its still the same result. The problem is that we have succesfully mixed the concepts of intensity and color together. We ...


3

But, at this point, do i apply a specular highlight to the surface that i hit from the inside? Unless you have a light source inside your object, there's no point in doing lighting on the inside surface as you'll hit the object again before you reach the light or environment. If you want to support a light in the object, then by all means do your lighting ...


2

Using independent settings for each colour channel is like using settings dependent on wavelength when doing spectral rendering. So the question could be re-formulated as: Is a material which changes its roughness with wavelengths physically plausible? With some kind of nano-fabrication process you could build a material surface using some microfacets ...


2

Specular surfaces which use MIS are not perfectly specular like a mirror. They have a small amount of blur, otherwise there is indeed no point in sampling the light as all the samples will evaluate the BRDF as 0. In fact, you would only need to trace a single reflection ray. A small amount of blur means that a given camera ray will see a small area of the ...


1

The code does seem a bit ugly since it doesn't assign pdf and instead returns 0. By returning 0 it's basically saying the same thing as pdf = 0 because f.IsBlack() returns true. This is acceptable, it's basically saying the BSDF doesn't allow light go through at the given $w_o$


1

I'll point out that even if you did implement it correctly, at 1 sample per pixel with low roughness materials you'll still see heavy specular aliasing. It's not uncommon to see the firefly pattern on edges on low roughness materials. For reference see the Infiltrator demo without TAA http://advances.realtimerendering.com/s2014/epic/TemporalAA_Compare....


1

The cosine term in the rendering equation is to account the amount of light reaching the surface, and leaving it out from the rendering equation is what he refers as "complete nonsense", which is right. The original Phong model didn't have the cosine term in the rendering equation, so if you want to model the original nonsensical Phong with proper rendering ...


1

If I understand you correctly, the problem is that the provoking vertex isn't the same vertex between the two triangles in a quad, due to using triangle strips. You could switch to using an indexed triangle list, and set up indices in such a way that the provoking vertex is the same in each quad. For instance, if one quad is vertices {0, 1, 2, 3} (CCW) then ...


1

Gloss and Specularity are features of the surface. In modern PBR terms we usually refer to the smoothness and metalness of a surface instead (unless you use a specular workflow, then metalness is still linked to specular). Basically, dielectric surfaces reflect around 4% of light in a specular way, and the rest is diffuse. Metallic surfaces reflect no light ...


1

I read that paper as well last year. There's a strong assumption made by authors which is the "stationary". What this means is that in absence of light in given 3000x2000 pixels image the material is more or less the same in each tile of 192x192. The reason for this is because we the surface is lit by white light is like they have a sample of BRDF for a set ...


Only top voted, non community-wiki answers of a minimum length are eligible