10
$\begingroup$

From what I know, flat shaded polygons use the face normal for lighting calculations for every pixel that makes up said face. Likewise, smoothshaded polygons do per-pixel normal calculations. However, in the case of any face of a standard cube, the perpixel normals and the face normals point in the exact same direction, since the face is perfectly flat, with all the vertices lying in the same plane

By logic, a flat-shaded cube should look no different from a smooth-shaded cube. That being said however, there are differences as one can view in the viewport, for reasons I can not quite understand

A flat-shaded cube:

enter image description here

The same cube but smooth-shaded:

enter image description here

Material for reference:

enter image description here

The difference is quite staggering. The reflection is so much more detailed on the smooth-shaded one. But why? Most of their normals are more or less the same, and afaik their UV maps could not have been affected in any way

What exactly causes the differences in their reflections of the environment?

$\endgroup$
7
  • 8
    $\begingroup$ CAUTION: Objects in mirror are closer than they appear! A smooth shaded surface behaves like a convex-mirror, while a flat shaded surface behaves like a flat mirror. $\endgroup$
    – Ron Jensen
    Oct 13 at 17:28
  • 3
    $\begingroup$ "In the case of any face of a standard cube, the perpixel normals and the face normals point in the exact same direction" This is not true, and is where you're getting stuck. All (triangular) faces are perfectly planar. But vertex normals are interpolated between the normals of all faces containing that vertex, and then smooth sampled normals are interpolated between those vertices. Look at the world space normal of your smooth cube. $\endgroup$
    – Nathan
    Oct 13 at 17:46
  • 1
    $\begingroup$ "The reflection is so much more detailed on the smooth-shaded one." – More detailed, maybe, but it certainly doesn't look like a cube! Cubes don't look like that. $\endgroup$ Oct 14 at 4:26
  • 4
    $\begingroup$ "The normals are more or less the same".. The normals, which, when smooth shaded, are interpolated across the faces from the vertex-normals at their corners, are nothing like the same. There is a difference between the Geometric, or True normal, and the rendering normal. Related: blender.stackexchange.com/a/186324/35559 $\endgroup$ Oct 14 at 17:43
  • 1
    $\begingroup$ @Nathan So if Im getting this right, the direction of the normals not only affect color intensity but ALSO the colors/pixels themselves of the environment map they sample from? $\endgroup$
    – Hash
    Oct 18 at 6:37
11
$\begingroup$

It's an optical illusion. Actually, the flat-shaded cube has a reflection which is more clear and more detailed.

But why doesn't the flat-shaded cube look detailed? It's because the flat-shaded cube reflects only a very small portion (or, rather, 3 very small portions) of the surrounding room. The portions of the room which are reflected are so small that they're very difficult to recognize. Since it's hard to recognize what's in the reflections, your eyes and brain falsely interpret the reflections as being unclear and not detailed.

In fact, however, the reflections are very detailed. The top face of the cube is a very detailed reflection of a tiny piece of the ceiling; the front face of the cube is a very detailed reflection of a tiny piece of the curtains; and the side face of the cube is a very detailed reflection of a tiny piece of the floor, shoe moulding, and wall.

The smooth-shaded cube, on the other hand, reflects the entire room (or, at least, a very large portion of the room). Because you can see the entire room, you can easily recognize most of the objects in the scene. As a result, your eyes and brain falsely interpret these reflections as being clearer and more detailed.

Try adding a small object next to both cubes. Make sure you put it in a position where you can see its reflection in the flat-shaded cube. You should see that the flat-shaded cube gives a very clear and detailed reflection of the object, whereas the smooth-shaded cube gives a smaller and very distorted reflection.

$\endgroup$
1
  • $\begingroup$ Is the reason the smooth shaded cube represents a larger portion of the room because the smooth-shaded normals sample from a larger portion of the HDRI? $\endgroup$
    – Hash
    Oct 18 at 7:06
10
$\begingroup$

The built-in HDRI images are fairly low resolution, in addition, there is some blur added by default. Finally, your image shows the flat-shaded square pointing at the curtains, which are blurry from light bleed anyway.

As I said in a comment, CAUTION: Objects in mirror are closer than they appear! A smooth shaded surface behaves like a convex-mirror, while a flat shaded surface behaves like a flat mirror. In the animation below, you can see the surface normals (in light blue) bend as the shape moves from a square to a circle. The smooth normals function simulates this bending of the normals while leaving the geometry unchanged. Notice if we were to add a bevel modifier with a very high number of segments to the cube in the original question the difference between flat and smooth shaded would greatly decrease. Smooth Normals

I made a short youtube video demonstrating this phenomenon. I set up a hemisphere with smooth shading and a shapekey to transition from a full hemisphere to a flat plane. The material is similar to the question, but I set specular to 1.0 for a better mirror effect. Here are a few stills from the video: Frame 01 In this frame, the sphere is fully round and half the room can be seen in a fish-eye panoramic view.

Frame 89 In frame 89, the sphere is getting flat, you can see we are "zooming in" on the window.

Frame 125 In frame 125, the sphere is completely flat. All you can see is white from the curtain.

$\endgroup$
3
  • $\begingroup$ Sorry, I am not quite able to understand. Why exactly are smooth shaded meshes like curved mirrors? Is there is an intuitive reasoning? $\endgroup$
    – Hash
    Oct 14 at 11:08
  • 1
    $\begingroup$ I added an animation showing how the normals behave. Hopefully that makes it clearer? $\endgroup$
    – Ron Jensen
    Oct 14 at 15:03
  • $\begingroup$ Would it be correct to assume its because the smooth shaded normals happen to get color info from a large portion of the HDRI? $\endgroup$
    – Hash
    Oct 18 at 7:08
8
$\begingroup$

When using an HDRI the light is coming into the scene from infinitely far away.

This means when looking at the flat shaded cube it will reflect only a tiny portion of the background. The smooth shaded cube's interpolated normals are gathering light from a very wide arc and reflecting it to the camera, and that's why you can see practically the entire room.

If you add a Subdivision Surface modifier and change it from Catmull-Clark to Simple it may be more apparent what smooth shading is doing to the object.

$\endgroup$
3
  • $\begingroup$ If we assume the light comes from infinitely far away, would it be right to assume the light rays from the HDRI are these perfectly straight vectors that point in the direction of the X or Y or Z world space vectors? (I am assuming the diagram of these light rays is similar to the diagram of an infinitely long plane sheet's electric field diagram) If so, how does that allow the cube normals to pick up light from a much bigger area? Since the light rays are straight lines, it should not matter if the cube is flat/smooth, all the light rays from hdri will hit the cube regardless right? $\endgroup$
    – Hash
    Oct 14 at 11:05
  • $\begingroup$ Rays are traced in reverse, from the camera back to the light source. The ray comes from the camera and hits the object, and then reflects at some angle with respect to the angle of incidence, and the roughness of the object. Since the camera is a single point in space (and acts differently from the eye, perhaps another point of confusion) it can reflect a big or small portion of the room based on how close it is to the object. $\endgroup$ Oct 14 at 18:29
  • $\begingroup$ Could you explain how an eye is different from a camera? Both can be interpreted as single points right? $\endgroup$
    – Hash
    Oct 18 at 7:11
7
$\begingroup$

The other answers are correct: the difference is that the smooth cube reflects a large contiguous area of the room, while the flat cube reflects three small isolated areas of the room. Since a small image stretched over an area looks blurrier than a large image stretched over the same area, the flat cube looks blurrier than the smooth one.

This answer only adds some pictures.


You can think of the environment as a large sphere enclosing the scene from "infinitely far away". When you look at a point P, what you see is the point on that sphere reflected across the normal vector at P.

ie. it depends on the direction from P to the eye, and on the normal at P.

Reflected vector


On a flat shaded cube, all the normals on one face are the same. As the eye travels from one end of the face to the other, the normal doesn't change but the direction to the eye does, and all the reflected lines sweep out the region on the sphere that you see reflected on the face.

Flat shaded face


On a smooth cube, the normal at the corners point outward, away from the cube (like a sphere). In between, the normals vary smoothly between the normals at the corners. (The normals are not "more or less the same" as the flat cube!). As you can see, this sweeps out a much larger area on the sphere that will be reflected.

Smooth shaded face

$\endgroup$
5
  • $\begingroup$ This is a great answer, I was struggling trying to find a way to illustrate this. And of course the normal direction is super important to see. $\endgroup$ Oct 14 at 18:31
  • $\begingroup$ So essentially here normal angle affects which pixel of the HDRI is sampled? Also for the last normal in your last diagram, the reflected ray has an angle > 90 wrt to the normal. This would mean the dot product of normal and HDRI's sampled value would be negative Would this not cause that specific pixel to be darkened as opposed to lit up with light since its negative? Would it be right to thus say that it is 'anti-PBR'? $\endgroup$
    – Hash
    Oct 18 at 7:12
  • $\begingroup$ "So essentially here normal angle affects which pixel of the HDRI is sampled?" The direction of the reflected line determines the point in the HDRI to sample. Both the normal and the vector to the eye affect the direction of the reflected line. $\endgroup$
    – scurest
    Oct 18 at 13:43
  • $\begingroup$ "This would mean the dot product of normal and HDRI's sampled value..." You're confusing ideas here. The dot product is between two vectors, not a vector and a color. We're talking about pure reflection here, where only one direction is perfectly reflected. There's no attenuation like for the diffuse. What it does mean is you can see objects in the HDRI that are behind the cube that wouldn't be visible if the cube were a sphere instead (try it!). $\endgroup$
    – scurest
    Oct 18 at 13:50
  • $\begingroup$ @scurest Could you explain what you mean by 'The dot product is between two vectors, not a vector and a color. We're talking about pure reflection here, where only one direction is perfectly reflected.'? I am confused, what precisely does 'only one direction is perfectly reflected' mean? $\endgroup$
    – Hash
    Oct 25 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.