Smooth shading

Forum Archive Smooth shading

Viewing 15 posts - 1 through 15 (of 28 total)
  • Author
    Posts
  • #19449
    Tom Fransson
    Participant

      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.

      #92315
      Tom Fransson
      Participant

        interpolation.jpg

        #92316
        Tom Fransson
        Participant

          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.

          #92317
          Tom Fransson
          Participant

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

            #92318
            Martin Bergwerf
            Participant

              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

              #92319
              Martin Bergwerf
              Participant

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

                #92320
                Tom Fransson
                Participant

                  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?

                  #92321
                  Tom Fransson
                  Participant

                    me interpolation.jpg

                    #92322
                    Tom Fransson
                    Participant

                      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?

                      #92323
                      Martin Bergwerf
                      Participant

                        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.

                        #92324
                        Martin Bergwerf
                        Participant

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

                          Smooth Cube.png

                          #92325
                          Tom Fransson
                          Participant

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

                            #92326
                            Omar Domenech
                            Participant

                              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

                              #92327
                              Tom Fransson
                              Participant

                                Hi Omar, yes I have taken those lessons

                                #92328
                                Martin Bergwerf
                                Participant

                                  Hi Tom,

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

                                Viewing 15 posts - 1 through 15 (of 28 total)
                                • The topic ‘Smooth shading’ is closed to new replies.