Smooth shading

Question

I'm trying to understand smooth shading. This is how I see it right now. Instead of just one normal over the whole face, Blender interpolates different normals at each point on the face. And the way it does it is as I've tried to sketch in the image below. Here I have chosen a quad.


1 love
Reply
  • Tom Fransson(tfsuper3d) replied


    interpolation.jpg

    1 love
  • Tom Fransson(tfsuper3d) replied

    I'll try to explain a little more what I mean. First, interpolate along each edge between those average vertex per face normals. To get a new normal (corresponding to a certain point on the face) on each edge. Then interpolate twice more between opposing edges, for the interpolated normals that have been calculated (four for each point on the face). This gives two normals for the given point on the face. And these are added together to form a single normal for the given point, by averaging them together.


    1 love
  • Tom Fransson(tfsuper3d) replied

    If anyone can confirm that this is correct or explain how it works, I would be grateful.

    1 love
  • Martin Bergwerf replied

    Hi Tom tfsuper3d ,

    I think it's simpler than that; take the Face Normals (blue) and interpolate between those to get the Smooth Shading Normals (yellow) at each Shading Point, something like this:

    Smooth Shading.png

    1 love
  • Martin Bergwerf replied

    But it's very possible, that your 'method' gives the exact same result (and that that is how it's done under the hood).

    1 love
  • Tom Fransson(tfsuper3d) replied

    Hi Martin, yup but isn't that a special case when you have two averaged pairs of vertex per face normals that are the same?

    1 love
  • Tom Fransson(tfsuper3d) replied


    me interpolation.jpg

    1 love
  • Tom Fransson(tfsuper3d) replied

    Like this. Then the interpolation will be the same all across the face. Just like you show. But when all the averaged vertex per face normals are different, like my first image. We must have a different story, am I right?

    1 love
  • Martin Bergwerf replied

    The Averaged Vertex Normals are the average of the Face Normals.

    It doesn't matter if the interpolation is in 2 directions (as in my example) or in 3 directions. I went for 2 directions, because that's easier to explain, understand and 'draw', but in 3 directions it's the exact same principle; just interpolate between the Face Normals of the connected Faces.

    1 love
  • Martin Bergwerf replied

    Here are some of the Shading Normals of a Smooth Shaded Cube, for instance:

    Smooth Cube.png

    1 love
  • Tom Fransson(tfsuper3d) replied

    Amazing, how do you draw all those lines, I assume you didn't draw them by hand?

    1 love
  • Omar Domenech replied

    If it's any help, JL goes into the technical of Normals in these lessons:

    https://cgcookie.com/lessons/the-normal-direction

    https://cgcookie.com/lessons/smooth-flat-and-custom-normals

    1 love
  • Tom Fransson(tfsuper3d) replied

    Hi Omar, yes I have taken those lessons

    1 love
  • Martin Bergwerf replied

    Hi Tom,

    No those lines aren't hand-drawn; I just hid a Subdivided Cube inside the visible Cube 😉

    1 love
  • Tom Fransson(tfsuper3d) replied

    To Martin, I must draw by hand. So this

    1 love
  • Tom Fransson(tfsuper3d) replied


    simplification.jpg

    1 love
  • Martin Bergwerf replied

    Yes, exactly!

    Don't focus too much on the Vertex Normals, just interpolate between the Face Normals and the Vertex Normals 'follow' automatically.

    1 love
  • Tom Fransson(tfsuper3d) replied

    is a simplified version of yours. Is this the ways the interpolations goes?

    • 👍🏼
    1 love
  • Tom Fransson(tfsuper3d) replied

    Okay great! Thanks Martin

    1 love
  • Martin Bergwerf replied

    Or in a 'pretty' picture, if you have  3 Face Normals (no matter what directions they are pointing), the interpolation looks something like this:

    Normals_05.png



    1 love