8
$\begingroup$

I was always under the assumption that turning an image to "Non-Color data" that is was converting it to greyscale. Playing around with normal maps it doesn't seem to be doing that at all. So what is happening?

Also because normal maps have color data in them I have always left the setting on "color" is this correct?

Shouldn't the 2nd image be black and white?

(using Node Wrangler viewer as rendered)

enter image description here

enter image description here

$\endgroup$
20
$\begingroup$

What Non-Color Data means

Choosing Color Data vs Non-Color Data determines whether or not Blender will color manage your image.

Gamma Correction is a way of compressing color data and is commonly used in many image formats, such as PNG and JPEG. Without getting in to the mathematical nitty-gritty, Gamma Correction raises the intensity of a pixel to a certain power (or gamma value) to encode it, then raises it to the reciprocal power to decode it. Why would we want to do this? Here's a helpful table from Wikipedia:

enter image description here

Source

The bottom row, Linear intensity represents the non-gamma corrected values. You will observe that there is a large jump in intensity between 0.0 and 0.1 stops. In the top row, Linear encoding (meaning it is gamma-corrected), you will see that the difference in intensity between the stops is much more even.

What this means is that a basic linear scale does not equally distribute intensity as our eyes see it across the range [0, 1]. Referencing back to our image, between stops 0.0 and 0.1 on the bottom row, that whole range of color has to be squeezed into one tenth of the available range. On the other end of the spectrum, the range between 0.8 and 1.0 on the bottom only needs 0.9 to 1.0 on the top. This way, the colors that we can see are given more "space", and the colors we can't really distinguish from one another receive less.

Most common image formats (and video displays) use sRGB (standard Red Green Blue) as their chosen encoding. This actually has a non-linear gamma (don't worry about it) that can be approximated by 2.2.

When you select Color Data, Blender will gamma correct your image (based on the image encoding). When you select Non-Color Data, Blender will not alter the RGB values of the image, leaving them in a linear scale.

When you should use it

Color Data should be used for image textures being used to color a model, like Diffuse and Albedo textures. This way, they will be color managed to display their intended color values.

Non-Color Data should be used for image textures being used to store other data. For example, Normal Maps store the normal vector data of a given point on a mesh. Vectors (in this case) are linear and have no need to be gamma corrected. The same goes for other maps like Bump maps or Specular maps. These images had values stored to them on a linear scale, so they should be read on a linear scale.

Hope that all made sense. I'm happy to clarify anything.

Example:

enter image description here

Left - Color Data:

How the image is intended to look.

Center - Non-Color Data:

The image with no gamma correction. Note how there are lots of lighter values and very few dark values, making it look "washed-out."

Right - Non-Color Data with Gamma node:

This looks very similar to the Color Data image. It isn't exactly identical, though, since the image was encoded with sRGB, while I decoded it with a normal Gamma of 2.2.

$\endgroup$
  • 2
    $\begingroup$ This should be the accepted answer. Very nice $\endgroup$ – bertmoog Aug 5 '17 at 3:18
  • 1
    $\begingroup$ You explained it beautifully. I appreciate the time you put to this answer. $\endgroup$ – icYou520 Aug 6 '17 at 5:30
  • 2
    $\begingroup$ "When you select Color Data, Blender will gamma correct your image" is actually false believe it or not! Try it with an EXR. What you will find is that in both cases, the data is stored linearly. The difference here would be that the data in the non-colour case exists outside of the colour managed pipeline. TL;DR there are cases where the data values may appear identical, but flagging as non-colour is mandatory to keep the data from undergoing other possible colour transforms. Same for "leaving them in a linear scale" as some data may be nonlinear. $\endgroup$ – troy_s Aug 9 '18 at 5:46
  • $\begingroup$ @troy_s That makes sense. Are there any edits you think should be made beyond what you corrected a couple of months ago? $\endgroup$ – Scott Milner Aug 9 '18 at 15:50
  • 1
    $\begingroup$ It is a pretty darn good summary. If anything, it perhaps gets a little too focused on transfer functions for sRGB's OETF or the 2.2 power function; they key point is that non-colour data exists outside of the transform chain, and you accurately nailed the types of data that should be outside. Also, it should be noted that what happens in Blender encoded files regarding colour vs non-colour depends heavily on file encodings. EXR for example. $\endgroup$ – troy_s Aug 9 '18 at 16:14

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.