32 bit displacement map vs 32 bit grayscale monitors + 8 bit grayscale brushes...?

The Blender manual recommends 16 or 32 bit grayscale displacement maps. However, monitors only display colors at 8 bits per channel. How do you work at 32 bit grayscale when you can only see 8 bit grayscale on the monitor? Are there even monitors that can display 32 bit grayscale? Also, aren’t grayscale brushes 8 bit at the most? I feel like I’m missing something here. Can anyone elaborate further? My only guess is that 8 bit brushes are processed at 32 bits and there is interpolation of the 8 bit values to give a smoother gradation?

Also, I noticed that the png format supports 16 bit gray scale. However, an article recommended against using png. Any particular reason to avoid 16 bit png? I mean it’s a lossless compression format, so I’m not sure why one should avoid 16 bit grayscale png.

So many questions… :open_mouth:

The reason displacement maps should have a higher bit depth, is just because they represent values, not colors. They are not meant to be visualized (thought you can), but to be used in further calculations; i.e. to displace a surface by some amount.

If you’re using an 8bit texture, then your precision will just be 1/2^8 (0.003921) of some unit. And this is a very low precision.
Using a 16bit texture will make this precision higher (1.52e-5), and 32bit will make even higher (2.32e-10).

You can use grayscale 16bits per channels images . Or you can save a 16bits RGBA image , and it will be automatically converted to grayscale by blender when used for displacement .
Using grayscale image will save you some disc space and also some memory.

Indeed when these images are displayed on a monitor you can’t tell the difference between 8bits and 16bits. The monitor clamps everything to 8bits. But the software can take advantage of these extra information even if the monitor can’t display them.

8 bits images when loaded in blender are converted to 16 or 32 bits, but they aren’t “interpolated”, the value stay the same. If you got a 1bit (2 color) image , converting it to 8bits won’t magically add color variations to the image and make it smoother. However once it’s converted you can take advantage of the new color range if you modify it , like if you blur the image you’ll get some interpolations of the original colors that weren’t possible in 1bit.

If when using a displacement map, you notice some artifact like a stepping in the displace, something like in the right of this image :


Then you need to redo you displacement map in 16bits , or export it in 16bit if it’s done in another software. If not , you can stay with 8 bits as these artifacts aren’t always noticeable, (it’s the same issue with bump maps and normal maps) . Doing only the 8 -> 16 bit conversion won’t change anything as stated earlier.

You can use png, I’ve never really understand why it must avoided in some case, but I think it’s mostly related to colormanagement and when you deal with different sources/displays. For textures , brush , normal maps, ect… I think it’s fine especially if you’re output is meant to be displayed on monitors and you aren’t dealing with others color profile/space.

I’m not sure I understand. If they are not meant to be visualized, how do you hand paint displacement maps in 32 bits?

A displacement map is just a set of data that is stored in an image format. You can ‘paint’ it just like you could ‘paint’ a 2d float array by incrementing the values at each element by some amount.
As sozap said, you can visualize it in the monitor, but the real functionality of it is to be used in repositioning the vertices of a mesh before rendering.

Though this has nothing to do with bit depth of a value…
The bit depth of a texture determines the precision that each value can be stored!!
It doesn’t limit the processes of creating and manipulating that value (which will be your CPU/OS floating point precision)…

If you’re hand-painting a displacement map, picking out values from a color picker, and plopping them down pixel by pixel, no, there is no benefit to using 16 bit over 8 bit per channel. You can’t see the difference.

But that’s not a great way to make a displacement map.

If you are baking a displacement map from a mesh, if you are creating it out of procedural textures or by combining other sampled textures, if you are converting a normal map to a displacement map, even if you’re just running a gaussian blur on hand-painted values in GIMP, then 16 bits per channel becomes valuable. You can’t see the difference, not without processing (levels, or for example putting it on a model) but it’s still there.

As far as .png goes, I don’t think there is any problem with using .png. It’s jsut, not everybody knows everything. I have seen bad advice scattered in with good advice in places. Some people don’t realize that .png is lossless and just lump it in with .jpg (which you should never, ever use for a displacement map.)

Note that if you’re using a displacement map as a bump map, that a regular normal map, intended to be normalized in the shader, has 16 bits of information (really 17 bits, but nobody ever inverts the normal). If you just use an 8 bit bump map, you’re losing a ton of precision over a normal map.

Yes, I see how 32 bit can make sense in most of these contexts since they start out with data that can be represented higher than 8 bits.

Maybe I should’ve explained the context of my question. I was looking for ways to increase polygon resolution in sculpting with Blender using maps. I thought maybe painting with displacement maps would make up for the lower resolution, but then noticed that you can only paint in 8 bits and would cause jagged surfaces similar to sculpting in Blender.

What do you mean? Using a displacement map as a brush for sculpting? Bit depth isn’t likely to matter as much there, but it doesn’t matter what brush you use, you’re not going to make detail between verts. Your verts are the only thing that get moved by sculpting (or displacement), and if you want more detail, you need more verts.

No. I mean just painting on a map.

Thanks to everyone for taking the time to reply.

I thought the map’s bit depth was defined by the texture you set up/import and paint on, while the colour values in Blender are float.