Announcement

Collapse
No announcement yet.

Why does Vray bake normal map in sRGB?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why does Vray bake normal map in sRGB?

    Hi guys!

    I am trying to bake a normal map from a high poly object to a low poly object via 3ds Max 2016's Render To Texture, using V-Ray 3.40. I want to use that map in Unity. My problem:

    The rendered normal map has an sRGB curve applied to it, resulting in a too bright normal map. Why does that happen? Have a look at the image I posted which shows screenshots of most gamma related settings that I used for the bake. Note that changing the gamma via "Override" in the file save dialog to 1,0 or any other value has no influence on the rendered normal map.

    Click image for larger version

Name:	NormalMap_SRGB.jpg
Views:	1
Size:	404.9 KB
ID:	885025

    Thanks!

    Julian
    Last edited by JulianT_CD; 26-07-2016, 07:57 AM.

  • #2
    in the maxscript listener check what is internal gamma:
    fileingamma
    fileoutgamma
    if either of those return anything other than 2.2, then set it like so:
    fileoutgamma=2.2
    Kind Regards,
    Morne

    Comment


    • #3
      Morne, thank you for your fast response!

      Both commands return 2.2. So I suppose this is correct?

      Comment


      • #4
        try baking to PNG.
        Maybe the tiff writer's bugging out.
        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


        • #5
          Originally posted by ^Lele^ View Post
          try baking to PNG.
          Maybe the tiff writer's bugging out.
          Same with PNG and TGA

          Comment


          • #6
            Its the gamma.
            Vray seems to always bake normal maps with 1.0 gamma. Its very cool if you save them out as exr's and load them in the VrayHDRI loader.
            But unity thinks a normal map image would come in 2.2 so it changes the gamma and the map looks awful.
            You can change that in photoshop (Just didn't found a way to bake them directly like this, yet).
            In ps go to ajust->Exposure and change the gamma to 0.47.

            Edit:This could possibly help: The save file dialogue of render to texture check Override and type 2.2. I think I didn't tryed that jet.
            I usally generate Normal Maps in XNormal. For me, it just works far better than 3ds max normal map generation.
            I use 3ds max for normal map baking only if I want to bake a texture atlas of already existing normal maps.
            Last edited by Ihno; 27-07-2016, 12:13 AM.
            German guy, sorry for my English.

            Comment


            • #7
              I tryed the override option of the save dialogue.
              Seems to be broken somehow.
              If I check override and render, the texture is still wrong and the override option is unchecked again afterwards.
              But If I use the save button in the VFB while its rendering and check gamma override 1.0 the file is right.
              Don't know if there is a reason for the reset of the override option... for me it seems to be a bug.
              Max2016 vray 3.40.02
              Last edited by Ihno; 27-07-2016, 12:39 AM.
              German guy, sorry for my English.

              Comment


              • #8
                Ihno, thanks for your input! I have also tried rendering to EXR and that seems to output a linear Normal Map. Of course Photoshop will make you view this through "gamma goggles", but changing the "Proof Setup" to "Monitor RGB" shows the linear values and let's you save them. Still not ideal to work like that.
                For me, the "Override" doesn't work either in 3ds Max 2016, V-Ray 3.4. It's behaving exactly like you described. That issue and the baked in sRGB curve into Normal Maps seem to be bugs!

                Can someone confirm that this is not working as designed?

                Comment


                • #9
                  V-Ray actually is not responsible for the output gamma values of any file-type different than .vrimg.
                  Those gamma settings are ultimately handled by 3dsMax itself and they are different for every file format.
                  TIFF format is always stored with baked gamma like other 8bit formats like JPG, PNG etc.
                  Linear files like .EXR and .HDR are always stored with gamma 1.0.

                  So if you would like to export images without embedded sRGB profile it would be better to use file formats like .vrimg .exr or .hdr.

                  Override gamma indeed doesn't work but this is something that Autodesk should fix.
                  Svetlozar Draganov | Senior Manager 3D Support | contact us
                  Chaos & Enscape & Cylindo are now one!

                  Comment


                  • #10
                    Ok, thanks.

                    Comment

                    Working...
                    X