I´m spending sometime studying displacement, and I started looking at Displacement modifier. I downloaded some textures from Texture Haven, both JPG and PNG versions. Attached, you can see 2 comparisons. Changing from PNG to JPG, shows different result. To try making the two versions similar, I had to tweak Displacement modifiers attributes (Midlevel and Strength). I opened both files in Gimp, and I noticed that JPG is 8bit grayscale, and PNG, 16bit. I know that higher color depth, can return more detail. Technically, is that the reason for choose from both files? Because, PNG 16 is much more bigger than JPG 8, consuming more memory.
Displacement textures are “Data” textures, along with normal maps or roughness. The shown pixels are not made to attract a human eye but a math function. Thus they are vulnerable to pixel value manipulation like compression or color space transformation.
A basic rule for thoose kind of maps is:
- Use linear color space (no srgb) (Hint: Photoshops sGray is linear)
- Use a high bitdepth to store more informations (16-32bit)
- Use a losless format that accounts for most of the features, like .exr, .hdr, .tif
- Set your DCC’s texture node settings correctly, for Blender that is: Non-Color Data within the Image Texture node
If you want to get a better understanding, Google for “Normal Map bitdepth and compression”, “linear space for displacement”.
@Xortag Thank you very much! Excelent explanation.