As of May 31, 2023, we have updated our Code of Conduct.

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
  • 24.4k
37 votes
Accepted

Albedo vs Diffuse

The short answer: They are not interchangeable, but their meaning can sometimes appear to overlap in computer graphics literature, giving the potential for confusion. Albedo is the proportion of ...
trichoplax is on Codidact now'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
13 votes
Accepted

Shading: Phong vs Gouraud vs Flat

Flat shading is the simplest shading model. Each rendered polygon has a single normal vector; shading for the entire polygon is constant across the surface of the polygon. With a small polygon count,...
Mark's user avatar
  • 1,592
7 votes

How does state of the art real time hair rendering work?

Sorry for the bad quality of my answer. I do not have access to a computer currently and editing from my phone is not a straightforward task. In particular I would love to be able to paste images. ...
wip's user avatar
  • 1,829
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,332
6 votes
Accepted

What is ambient occlusion?

Your point is correct when applied to ambient lighting as an approximation technique. This crude approach does indeed give the same lighting level to all surfaces regardless of their surroundings. ...
trichoplax is on Codidact now's user avatar
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,477
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
  • 1,951
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
  • 24.4k
5 votes

How is screen space ambient occlusion implemented?

As Alan and trichoplax mention in the comments, the effect that ambient occlusion simulates is not the occlusion of a surface from the camera but the surface’s occlusion from its surroundings. Think ...
Noah Witherspoon's user avatar
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

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

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,151
5 votes

What is ambient occlusion?

Ambient light does not really exist, if we do not talk about cosmology. What we call ambient is just light form many secondary reflections. Image 1: No ambient light (left) and ambient light (right). ...
joojaa's user avatar
  • 8,317
5 votes

Is a Lambertian reflector illuminated by a smaller fraction of the incident radiation when it's tilted?

I see some problems in the quote you posted. In effect, a point rotated around its normal vector will not change the way it reflects light. This is true, because a Lambertian reflector will ...
David Kuri's user avatar
  • 2,293
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,650
5 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
  • 66
5 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
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

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
  • 24.4k
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 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,650
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,650
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
  • 24.4k
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,317
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

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