Why does the ray fire from the cage’s edge along the average normal?

Forum Archive Why does the ray fire from the cage’s edge along the average normal?

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #15386
    naiad
    Participant

      On the course video, the ray fires from the cage’s edge along the angle about 45 degree (or along the average normal of the cage’s edge in the opposite direction):

      However, all the cage’s edge normals are still perpendicular to the corresponding faces unless the “Shade smooth” is used. As the following screenshot shows, no average normal is used, all edge normals are split normals.

      So why does this course assume that the ray fires from the cage’s edge along the average normal (in the opposite direction) please? Thanks!

      #75249
      Martin Bergwerf
      Participant

        Hi @naiad ,

        I don’t know this, but it might have something to do with the fact that with split Normals, a lot of rays would simply never hit the Object:

        Rays.png?

        Or even worse, in the wrong spot?

        @jlampel will certainly be able to answer this.

        #75250
        naiad
        Participant

          The course has already mentioned some problems caused by the rays fired along the split normals. But my question is that:

          I don’t understand how the rays can fire from the cage’s edge along the average normal. Because this is only possible if the “Shade Smooth” is applied. With the “Shade Flat”, the cage only has split normals. However, this course does not mention that the “Shade Smooth” is applied.

          #75251
          Martin Bergwerf
          Participant

            Although the Cage is not Smooth Shaded, the information of the averaged Normals is still available (or easily calculated).

            The Rays are not dependent on the Normals of the Cage.

            #75252
            naiad
            Participant

              The Rays are not dependent on the Normals of the Cage.

              Then, who determines the direction of the rays please? Can I manually control the direction of the rays? Thanks!

              #75253
              Adrian Bellworthy
              Participant

                Like Spikey, I’m not entirely understanding of how this works.
                I would suspect by enabling the cage option in the bake properties may alter the normals.

                On further reading, the blender manual says,

                When not using a cage the rays will conform to the mesh normals. This produces glitches on the edges, but it is a preferable method when baking into planes to avoid the need of adding extra loops around the edges.

                 The inward rays are casted from a version of the active object with disabled Edge Split Modifiers.

                The normals (rays) as I understand it, on the cage object the angles of the rays are dependent on position.
                Something like this:

                ge-normals-angle.jpg

                These are not exact angles but a guide

                #75254
                Martin Bergwerf
                Participant

                  What I meant was:…not dependent on the ‘Shading Normals’ of the Cage. (The Cage doesn’t even have Shading…)

                  I don’t think you can control the ray direction manually, but again, I am not sure about all this.

                  #75255
                  Omar Domenech
                  Participant

                    Boy, that escalated quickly. I’m guessing the cage does to the normals its own thing under the hood, without you having to set shade smooth or anything. Blender be nice like that, saving you a hassle or two. 

                    #75256
                    naiad
                    Participant

                      @Adrian ,

                      45 degree, 56.25 degree, 67.5 degree, 78.75 degree …. do you know why the angles of the rays are changed based on those exact values please?  

                      It is unbelievable to me that a simple cage will tell the direction of the rays to behave in a such precise manner.

                      ” without you having to set shade smooth or anything.”

                      @Omar , 

                      Yes, you are right – when baking the normal map and no cage is used, people do have to set both the low poly and the high poly with “Shade Smooth”. For example, 

                      https://blenderartists.org/t/normal-map-doesnt-bake/1403559

                      #75257
                      Martin Bergwerf
                      Participant

                        @naiad

                        don’t worry about those angle values too much; the side of the Object has to be represented on the side of the Cage and because the Cage is larger, the corresponding points of the Object are in an angle to the Cage:

                        Ray.png

                        #75258
                        Omar Domenech
                        Participant

                          Cool in depth explanations. And even though we see that picture above as a cube from up top and a cage with the normals pointing at the cube, I like to think of it as a trampoline, with the elastic tendons supporting the thing where you jump at the middle.

                          #75259
                          Martin Bergwerf
                          Participant

                            It’s amazing, how many complicated CG concepts can be explained by trampolines

                            #75260
                            Adrian Bellworthy
                            Participant

                              Exactly as Spikey said, visualized as if the cage is extruded from the mesh, with many more rays than in the visuals.
                              Knowing how things work is useful, but try not to get bogged down by the details of how and why. 
                              It will probably have little or no effect on the result of your Blender project.

                              #75261
                              Jonathan Lampel
                              Participant

                                Martin’s picture above is perfect! A cage only works because it has the exact same vertices as the low poly object. The bake can then use the imaginary line that’s drawn in between each matching vertex to guide the rays INSTEAD of using the normals. 

                                #75262
                                naiad
                                Participant

                                  Based on the answer from Martin, does this mean that the directions (or the angles) of the rays for a cylinder must look like the diagram below please?

                                  (On the diagram, the rays fire inward and follow the imaginary straight lines from the external cage to the surface of the cylinder.)

                                Viewing 15 posts - 1 through 15 (of 21 total)
                                • The topic ‘Why does the ray fire from the cage’s edge along the average normal?’ is closed to new replies.