1
$\begingroup$

Many people recommend using 16-bit images for displacement and normal maps.

If I want to create my own displacement maps in, say, Photoshop, which color space should I use? Is 16-bit sRGB okay?

Does Blender assume a particular color space or does it detect it in the image file itself?

$\endgroup$
4
$\begingroup$

If I want to create my own displacement maps in, say, Photoshop, which color space should I use? Is 16-bit sRGB okay?

The term "sRGB" is thrown around far too frequently without an understanding as to what it means.

The best way to think about things like displacement maps and such, is that in many instances they are data, akin to units of measurement. That is, they are not colours.

This means that when you are building data in another application, it should be saved as such. Most image file formats are of course designed to encode colours. The sRGB specification, being designed for images, was likewise designed for colour encoding, not data.

Having data means that in many to most instances, one requires the encoded values to reflect a linear proportion, just as we would expect a ruler to have uniformly distributed markings. If we had a ruler with erratic / nonlinear markings, even if we re-distributed the measurements we took with such a ruler to be evenly distributed, the data would reflect overly sparse or overly dense regions based on the original erratic / nonlinear measurements. As a result, most image formats, being designed for nonlinear colour encoding, exhibit this behavior and are a poor choice as a result.

EXRs on the other hand, were designed from the ground up to encode data, including colour data. By convention, data encoded into an EXR is typically linear ratios, making it a great fit for data.

Being a display referred application designed for manipulating... Well... Photographs, Photoshop tends to be a sub-optimal solution here. Even PS's EXR support has been awful for a long time. Thankfully, FNordware has a useful plugin to use. There are plenty of PS "gotchas" though, so be careful and learn more about colour space encodings and colour management to give you control.

Does Blender assume a particular color space or does it detect it in the image file itself?

Unlike graphic design applications that have an ICC Colour Management System in place, Blender utilizes OpenColorIO, which is designed to make very few assumptions about encoded data. It leans heavily on encoded data format detection and defaults, as well as filename support, which will hopefully land in Blender proper soon.

It makes assumptions based on the encoding format of the data. If it is 8 bit or 16 bit integer (non-decimal), it will assign a default transform, which is currently only the sRGB transfer function. This may be inappropriate depending on context.

If the file is encoded as 16 bit or 32 bit float (decimal) such as the data in an EXR, the default transform will be set to "Linear", which is also a colour format. When loading data, change the transform to be "Non-Color Data".

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.