We all have watched and read about linear workflow dozens of times. We’re not talking about linear workflow again, this time we will see how to convert your default sRGB textures to linear inside Photoshop, and understand how Photoshop deals with color profiles. This video is part of the CG Generalist Course.
Force linear profile
So having this rust texture as an example, the quickest way to convert the image to linear is by changing the image mode from 8 bit to 32 bit.Apparently nothing changes, but if we go to View > Proof Setup > Monitor RGB, we will see the image becoming darker. This is now a linear image, whenever we change the image mode to 32 bit, we are converting the image to linear space.
And the reason why we don’t see this by default, when we change the image mode, is because photoshop is applying a color lookup, you can swtich on and off the look with the Ctrl + Y hotkey.
Affect colors, keep values
As you see by the image above, whenever we change an 8bit image to 32bit, we are actually affecting the values of the image. What was a 50% grey is now around 20%, due to the gamma curve.
So what if we want to keep the values on the image when converting it to 32bit? Let’s go back to our 8bit image, and select in the menu Edit > Color Settings. Then make sure you click in the More Options button.
In the RGB dropdown select Custom RGB, change the gamma to 1.0 and give it a name, something like, linear_color_profile. In the same RGB dropdown select Save RGB, and save it to a color profile folder, photoshop should take you there by default, something like C:\Windows\System32\spool\drivers\color.
Before saving out the changes, make sure you switch back to your previous working profile, something like “North America General Purpose 2”.
So now back to our 50% grey image, go to Edit > Assign profile, and choose the one we just saved out. As you see by the image above the image appears brighter, but if we sample the values, after converting it to 32bit, we keep the same 50% grey values intact.
Convert to linear without 32 bit
So we saw that changing the image mode to 32 bit would give us a linear image by default, and we could save it out as an exr image. But what if we want to keep our textures in a png/jpeg 8bit mode?
For that, instead of assigning any profile, we choose Edit > Convert to Profile. And if we switch on and off the sRGB lookup we can see that we have a linear image.
Keep in mind that this is not the ideal workflow, you should use at least 16bit data for linear textures so you don’t lose color information.
After saving out the image if we look at it in the image browser, we have that same sRGB look in our linear image, so what we did wrong?
Well, actually that’s a linear image, but the image browser displays it with an sRGB color lookup, and if we test the image in Maya or Nuke we can confirm that the image is in linear color space.
So you can easily create an action in photoshop to auto convert any texture or folder of textures to linear, with a suffix “_linear”, so you don’t mix them up with the sRGB version.
Thanks for reading.