Hot answers tagged

47 votes
Accepted

Physically based shading - ambient/indirect lighting

Real-time graphics deploys a variety of approximations to deal with the computational expense of simulating indirect lighting, trading off between runtime performance and lighting fidelity. This is an ...
Nathan Reed's user avatar
20 votes
Accepted

Programmatically generating vertex normals

Computing the normal from vertex positions is quite simple using the vector cross product. The cross product of two vectors $u$ and $v$ (noted $u \times v$, or sometimes $u \wedge v$) is a vector ...
Julien Guertault's user avatar
7 votes

Albedo vs Diffuse

The Diffuse, specular and Reflection terms have lead to a lot of confusion because they have been commonly used to describe different lighting processes along the CG history and sometimes diverge from ...
Titou's user avatar
  • 71
6 votes

Physically based shading - ambient/indirect lighting

This is the main 'hard' problem remaining in real-time CG, and there is a lot of research ongoing into solving it. The biggest hurdle is that in raster graphics, each component of the scene is ...
russ's user avatar
  • 2,382
6 votes
Accepted

Microfacet shading for diffuse materials

You can combine Oren-Nayar with GGX, if your normalize the result. A BRDF is defined by two properties: Helmholtz reciprocity and energy conservation. $f(l_i, l,_o) = f(l_o, l_i)$ $f(l_i, l_o) \leq ...
Tare's user avatar
  • 1,541
6 votes
Accepted

"Artist Friendly Metallic Fresnel" reversible?

I wasn't really expecting that, no. The formula in the paper is not the most elegant - there's quite a few parentheses in there. In this case I think it's just a matter of shuffling the parentheses ...
Ole's user avatar
  • 76
6 votes

What's the justification of multiplying colors together?

When you multiply colors together the surface color acts as a filter. Remember that colors are scaled from 0 to 1. That way with white incoming light a green object will remain looking green. This ...
ratchet freak's user avatar
6 votes
Accepted

Difference betwen Rendering Equation, Lighting model, Ray Tracing, Global Illumination and Shadows?

The rendering equation aims to describe what the light distribution for a specific scene is, under several assumptions. The most important assumption is that we are working in a geometrical optics ...
lightxbulb's user avatar
  • 2,151
5 votes
Accepted

What's the difference between geometric surface normal and shading surface normal?

Your existing opinion is correct, though there's one extra detail. The geometric normal is the normal of the actual triangle, based on the vertices' positions (the cross-product of edge vectors, as ...
Dan Hulme's user avatar
  • 6,770
5 votes
Accepted

Phong: Real-time rendering of Metal and Plastic Materials

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 ...
Dan Hulme's user avatar
  • 6,770
5 votes

Albedo vs Diffuse

Briefly: Low albedo --> darker object High albedo --> brighter object Low diffuse reflection --> mirror-like reflection (aka Specular) high diffuse reflection --> cotton-like reflection
Kamran Bigdely's user avatar
5 votes

Surface shading on an triangle

That completely depends on how you are computing the shading. If you are then just linearly interpolating the shaded colours across the triangle, i.e. Gouraud shading then, clearly, the answer is "no"....
Simon F's user avatar
  • 4,231
5 votes
Accepted

How is screen space ambient occlusion implemented?

The motivation behind ambient occlusion (AO) in general is to approximate the way crevices and corners are often shadowed, because less indirect light bounces into them. An example from a photo of my ...
Nathan Reed's user avatar
5 votes

What is the difference between shading and shadowing?

In simplified terms, shading controls how object's surface's brightness changes when the angle between its normal and light vector changes. Shadows are areas where the light cannot reach because it's ...
SurvivalMachine's user avatar
5 votes
Accepted

How is lighting done in Rasterization based pipeline?

I'm guessing Rasterization based pipelines use the same procedure for shading i.e. A ray is shot from the pixel and then from the triangle that got projected on that pixel to the light source? Close, ...
Dan Hulme's user avatar
  • 6,770
4 votes
Accepted

What does $E_L$ mean in the context of shading equations from the book "Real time rendering"?

The line you quoted says it: $E_L$ is the incoming irradiance at the surface due to the light source under consideration. Less technically, it's a vector representing the intensity and color of the ...
Nathan Reed's user avatar
4 votes

How can i make my ray tracing algorithm fast in terms of intersection testing?

You have several techniques. Use acceleration structures. The idea is that you store your geometry (triangles) into generally some kind of volumes. The general idea behind acceleration structure is ...
user18490's user avatar
  • 656
4 votes

Sampling against geometry normals

That is, to my knowledge, a problem without a proper solution. You're seeing the discrepancy between shading normal and geometry normal and it becomes obvious, that the shading normal is just a trick. ...
Stefan Werner's user avatar
4 votes
Accepted

Inconsistent shading in pathtraced image

I have managed to fix the error. It turns out the error was never situated in the normal calulation it was the shading algorith. The floating point precision error caused the new ray to be slightly ...
Oliver Cruickshank's user avatar
4 votes
Accepted

How to compute normal of surface from implicit equation for ray-marching?

The usual way of doing this with raymarching is to define your surface as a signed-distance field and use finite differences to get the gradient of the distance function at the point you’re sampling. ...
Noah Witherspoon's user avatar
4 votes
Accepted

How are colors really mixed?

With an old-style Phong shader (as in your example), they really are just added together. Each of those things is a contribution to the overall amount of light, so they're just added together, the ...
Dan Hulme's user avatar
  • 6,770
4 votes
Accepted

How to approximate the heightmap of processed wood?

A sine wave remapped to [0, 1] and raised to a power will give you periodic ridges: (Desmos graph) That could be a good place to start. It will make perfectly straight, even ridges; but you could ...
Nathan Reed's user avatar
4 votes
Accepted

Gouraud Shading interpolates color across a triangle using vertex normals. Phong Shading interpolates normals. How are their end-results different?

View angle changes all the time. In goraud shading the color sampling is done once per vertex. But in phong shading the angle between view angle and normal is calculated for every pixel. Why would ...
joojaa's user avatar
  • 8,407
3 votes

Paper for the approximation formula provided by Brian Karis

I do not have a derivation but i can explain the reasoning behind its usage. On the left side is a (monte carlo) estimator for the rendering equation. It states the very same thing that the rendering ...
Sebastián Mestre's user avatar
3 votes

Surface shading on an triangle

Assuming you have almost any lighting model at all: You cannot bound the view irradiance (light reflected from a surface location towards the eye/camera) by computing the irradiance at the vertices ...
GroverManheim's user avatar
3 votes

Energy Conservation in Lighting Equation

Comment: if you make references to book, then it would be good if you could provide references. To answer your questions: First, it is quite unusual these days to see people representing colors ...
user18490's user avatar
  • 656
3 votes

PBR missing rim darkening on non metallic rough surfaces

The problem is in the diffuse term, which can be seen by making the specular portion of IBL not be added into the result. The diffuse only render will not have the darkening, and of course, the ...
Alan Wolfe's user avatar
  • 7,791
3 votes

How are normals assigned to vertices in different types of shading?

Flat shading uses the same normal for each vertex of the triangle. In this case the normal is constant, and one color is evaluated for the triangle. For Gouraud and Phong shading normals are ...
Calvin's user avatar
  • 506
3 votes
Accepted

Smooth shading on sphere approximation

Sphere's don't have edges like the ones in that picture. The "silhouette" should be a circle. This is because the sphere was rendered as triangles and rasterized. Triangles can only approximate a ...
Andrew Wilson's user avatar
3 votes
Accepted

Point light illuminating only half of a scene

The normals were indeed wrong. Which was crazy, because I had even checked in Blender that they were correct (and they were). Turns out, when loading the mesh, I was passing the normal as color and ...
Ohkomonkiainen's user avatar

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