Announcement

Collapse
No announcement yet.

How to guess if a normal map needs gamma or not

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to guess if a normal map needs gamma or not

    Someone asked me if there's a way to guess if a normal map needs to be loaded with gamma 2.2 or 1.0; you can tell that by loading the map with Render > View Image File... then right-click on a region of the map that seems "flat" and look at the RGB values you get. If they are around 128,128,255 - then the map does not need gamma override. If you get values around 50,50,255 then you need load the map with a gamma override of 1.0.

    Additionally, you can guess if the map needs to have its red/green channels flipped (at least when mapped on a default plane); if you look just at the red channel of the loaded bitmap, if must look as though the surface is illuminated from the left; if you look at the green channel, it must look as though the surface is illuminated from above. If they look different, then you'll need to flip and/or swap the red and green channels accordingly.

    Best regards,
    Vlado
    Attached Files
    I only act like I know everything, Rogers.

  • #2
    sticky please!
    Lele
    Trouble Stirrer in RnD @ Chaos
    ----------------------
    emanuele.lecchi@chaos.com

    Disclaimer:
    The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

    Comment


    • #3
      Very Nice tip.... thanks Vlado.

      Comment


      • #4
        Hi Vlado, can i check bump map and reflection map with this method?
        Best regards,
        Jackie Teh
        --

        3ds max design 2023, V-Ray 6, Update 2.1 [6.20.06 build 00000]
        AMD Threadripper 1950X @3.40 GHz | 64GB RAM | Nvidia RTX 3070 ti
        Website: https://www.sporadicstudio.com
        Email: info@sporadicstudio.com
        YouTube: https://www.youtube.com/c/SporadicStudio

        Comment


        • #5
          ok so just a bit confused, ive only ever had to flip the green channel depending on if its opengl or directx, i dont think anyone flips the red. Also im pretty sure every normal map ive seen, the red is as if illuminated from the right. Do you mean the mapping is left to right, ie X: -1 to +1 : Red: 0 to 255? As opposed to it looking like the lightsource is on the left?
          Last edited by francomanko; 23-03-2019, 11:54 PM.
          e: info@adriandenne.com
          w: www.adriandenne.com

          Comment


          • #6
            Originally posted by francomanko View Post
            ok so just a bit confused, ive only ever had to flip the green channel depending on if its opengl or directx, i dont think anyone flips the red. Also im pretty sure every normal map ive seen, the red is as if illuminated from the right. Do you mean the mapping is left to right, ie X: -1 to +1 : Red: 0 to 255? As opposed to it looking like the lightsource is on the left?
            I think he meant swapping of the channels, not flipping as in image coordinates.
            Lele
            Trouble Stirrer in RnD @ Chaos
            ----------------------
            emanuele.lecchi@chaos.com

            Disclaimer:
            The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

            Comment


            • #7
              Make this a feature for next Vray Update. Corona has it, I believe?
              Available for remote work.
              My LinkedIn: https://www.linkedin.com/in/olegbudeanu/

              Comment


              • #8
                Originally posted by Oleg_Budeanu View Post
                Make this a feature for next Vray Update. Corona has it, I believe?
                Corona can detect whether a normal map has incorrect gamma, not if it's wrongfully flipped
                A.

                ---------------------
                www.digitaltwins.be

                Comment


                • #9
                  Originally posted by Vizioen View Post

                  Corona can detect whether a normal map has incorrect gamma, not if it's wrongfully flipped
                  Yep, I am talking about incorrect gamma.
                  Available for remote work.
                  My LinkedIn: https://www.linkedin.com/in/olegbudeanu/

                  Comment


                  • #10
                    im still confused about the "if you look just at the red channel of the loaded bitmap, if must look as though the surface is illuminated from the left" because its the right for me. (eitherway I've ruined the sticky)
                    Click image for larger version  Name:	normal.jpg Views:	1 Size:	285.3 KB ID:	1031113
                    e: info@adriandenne.com
                    w: www.adriandenne.com

                    Comment


                    • #11
                      Originally posted by vlado View Post
                      Someone asked me if there's a way to guess if a normal map needs to be loaded with gamma 2.2 or 1.0; you can tell that by loading the map with Render > View Image File... then right-click on a region of the map that seems "flat" and look at the RGB values you get. If they are around 128,128,255 - then the map does not need gamma override. If you get values around 50,50,255 then you need load the map with a gamma override of 1.0.

                      Additionally, you can guess if the map needs to have its red/green channels flipped (at least when mapped on a default plane); if you look just at the red channel of the loaded bitmap, if must look as though the surface is illuminated from the left; if you look at the green channel, it must look as though the surface is illuminated from above. If they look different, then you'll need to flip and/or swap the red and green channels accordingly.

                      Best regards,
                      Vlado
                      Vlado, I don't like to question your tips, but I just tested this and are you sure it's not the other way around? As in RED needs to be illuminated from the right and GREEN needs to be illuminated from the bottom? Because I have a map that is illuminated from the right in the Red and illuminated from above in the Green. And the only way it looks correct is if I flip the green channel.
                      A.

                      ---------------------
                      www.digitaltwins.be

                      Comment


                      • #12
                        Or anybody else?
                        A.

                        ---------------------
                        www.digitaltwins.be

                        Comment


                        • #13
                          Originally posted by Vizioen View Post

                          Vlado, I don't like to question your tips, but I just tested this and are you sure it's not the other way around? As in RED needs to be illuminated from the right and GREEN needs to be illuminated from the bottom? Because I have a map that is illuminated from the right in the Red and illuminated from above in the Green. And the only way it looks correct is if I flip the green channel.
                          Can someone explain this red/green situation? I'm confused right now.

                          Every Quixel Bridge material I import to max (via MSLiveLink) green is illuminated from the top and red is illuminated from the right.

                          So... which one is correct at last?

                          Comment


                          • #14
                            with quixel you need to switch ‘flip green’ on.
                            I just added this to their exporter script.
                            just two different ways of interpreting normal maps between engines or DCCs
                            Marcin Piotrowski
                            youtube

                            Comment


                            • #15
                              Originally posted by piotrus3333 View Post
                              with quixel you need to switch ‘flip green’ on.
                              I just added this to their exporter script.
                              just two different ways of interpreting normal maps between engines or DCCs
                              I see. So as Vizioen said above, RED needs to be illuminated from the right and GREEN needs to be illuminated from the bottom. Am I understand correctly?

                              Comment

                              Working...
                              X