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.
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
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.
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
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?
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.