Author Topic: How to use displacement and gloss image from POLIIGON  (Read 15657 times)

0 Members and 1 Guest are viewing this topic.

Offline bdesign

  • Hero Member
  • *****
  • Posts: 795
Re: How to use displacement and gloss image from POLIIGON
« Reply #15 on: December 08, 2016, 07:03:09 pm »
Displacement maps modify the actual surface geometry, either at render time or as a modeling modifier. As for the POLIIGON displacement maps, I find that they can sometimes create nice enhancements to the larger details when used as a bump map in combination with the normal map via a Bump Add node. Also, from what I've experienced so far, the Bump Height for normal maps from POLIIGON needs to be set to a negative value to give the correct effect, and make sure to check "Normal Map" under the Bump texture properties tab. The AO maps can be multiplied over the Diffuse color or texture via a Color Composite node to enhance details. The attached render has two cubes with a brick texture from POLIIGON. The Diffuse color of both is set to 84% grey. The left one utilizes the displacement and normal maps combined with a Bump Add node, and has the AO map multiplied over the Diffuse color. The right one uses the normal map only, and has no AO map.

Eric
« Last Edit: December 08, 2016, 07:11:45 pm by bdesign »

Offline TpwUK

  • KeyShot Beta
  • Hero Member
  • *****
  • Posts: 2910
Re: How to use displacement and gloss image from POLIIGON
« Reply #16 on: December 09, 2016, 01:03:48 am »
AO or Ambient Occlusion is used by KS6

Martin

Offline bdesign

  • Hero Member
  • *****
  • Posts: 795
Re: How to use displacement and gloss image from POLIIGON
« Reply #17 on: December 09, 2016, 01:16:51 am »
AO or Ambient Occlusion is used by KS6

Martin
Yes, of course...I was just offering a possible way to utilize the existing AO maps from poliigon :)

Eric

Offline TpwUK

  • KeyShot Beta
  • Hero Member
  • *****
  • Posts: 2910
Re: How to use displacement and gloss image from POLIIGON
« Reply #18 on: December 09, 2016, 02:53:01 am »
AO or Ambient Occlusion is used by KS6

Martin
Yes, of course...I was just offering a possible way to utilize the existing AO maps from poliigon :)

Eric

You must have posted just before me Eric as your post was not present as I started my reply, my response was for Bronson and his request to be corrected where wrong ... Next time I will quote instead :P

Martin

Offline bdesign

  • Hero Member
  • *****
  • Posts: 795
Re: How to use displacement and gloss image from POLIIGON
« Reply #19 on: December 09, 2016, 08:50:30 am »
You must have posted just before me Eric as your post was not present as I started my reply, my response was for Bronson and his request to be corrected where wrong ... Next time I will quote instead :P

Martin

Oh...no worries, Martin :)

Cheers,
Eric

Offline bronson

  • Jr. Member
  • **
  • Posts: 96
Re: How to use displacement and gloss image from POLIIGON
« Reply #20 on: December 09, 2016, 04:06:24 pm »
Thanks for the very details and in-depth explanations, Eric.
Really appreciate it.  :D

Bronson

Offline Will Gibbons

  • Hero Member
  • *****
  • Posts: 2849
  • willgibbons.com
    • My Website
Re: How to use displacement and gloss image from POLIIGON
« Reply #21 on: December 13, 2016, 06:13:25 am »
I like the iterative teamwork that's happened in this thread. Nice to see each person sharing their knowledge to fill in gaps. Cheers all!

Offline bdesign

  • Hero Member
  • *****
  • Posts: 795
Re: How to use displacement and gloss image from POLIIGON
« Reply #22 on: December 13, 2016, 11:55:18 am »
The recent enlightening information from Søren concerning the non-linear relationship between gloss and roughness got me wanting to delve futher into this subject. When searching, I came across this great post from 4 years ago by DriesV: https://www.keyshot.com/forum/index.php?topic=4751.0 .
Based on his findings, I opened a new 32-bit document in Photoshop and created a custom gradient in 10% increments, entering the floating point roughness values provided. I then opened a gloss map from Poliigon (Tiles 40_GLOSS_3K) and applied a Gradient Map adjustment layer using the custom gradient, then saved out as a new file. I used this new map in the Roughness channel along with the rest of the Tiles 40 texture map set. To my eye, the resulting render is significantly improved in overall appearance and realism. I'm attaching the custom PS gradient (GlossInversion_GradientMap.grd) for any who wish to give it a try. Place it into your AppData/Roaming/Adobe/Adobe Photoshop/Presets/Gradients folder and load it into the Gradient Editor window when applying the Gradient Map adjustment layer. Thanks again to Søren and Dries for the inspiration to dig deeper into this.

Cheers,
Eric
« Last Edit: December 17, 2016, 09:11:30 pm by bdesign »

Offline Søren

  • Developer
  • Jr. Member
  • *****
  • Posts: 81
  • KeyShot Developer
    • KeyShot
Re: How to use displacement and gloss image from POLIIGON
« Reply #23 on: December 13, 2016, 12:09:56 pm »
Interesting experiment, Eric.

A further technical point worth noting is that when contrast is 1 on a texture map in KeyShot it corresponds to the source image having gamma = 2. Thus if your texture is in linear space, you should set contrast to zero. This may or may not apply to various images you find (and it is a fairly technical point which can be confusing to find sensible information about), but if you have exr roughness maps for example, set contrast to 0.

Also, you can remap the colors directly in keyshot using the gradient node. Here again, you need to be aware that colors in KeyShot are displayed with the same gamma as set in the Image Tab (by default - can be changed in preferences). Thus a 50% gray defined using a procedural or gradient in the material graph will correspond to a value of 0.25 roughness (if image gamma is 2).

Søren

Offline bdesign

  • Hero Member
  • *****
  • Posts: 795
Re: How to use displacement and gloss image from POLIIGON
« Reply #24 on: December 13, 2016, 12:16:09 pm »
Thank you for all your technical input, Søren :) I did try to set this up directly in KeyShot using the Color Gradient node, but found that it would not hold most of the small incremental values (RGB: 0,5,6,8,9,12,15,18,23,31,255), and would set them back to 0%. Do you know of a way to prevent this behaviour?

Cheers,
Eric
« Last Edit: December 17, 2016, 06:36:39 pm by bdesign »

Offline Søren

  • Developer
  • Jr. Member
  • *****
  • Posts: 81
  • KeyShot Developer
    • KeyShot
Re: How to use displacement and gloss image from POLIIGON
« Reply #25 on: December 13, 2016, 12:50:19 pm »
Just tried it and you are correct - this is definitely a bug. The problem is smaller if you disable "Compensate Gamma" in preferences.

I filed an issue in our bug tracker.
Søren

Offline bdesign

  • Hero Member
  • *****
  • Posts: 795
Re: How to use displacement and gloss image from POLIIGON
« Reply #26 on: December 13, 2016, 01:11:47 pm »
Just tried it and you are correct - this is definitely a bug. The problem is smaller if you disable "Compensate Gamma" in preferences.

I filed an issue in our bug tracker.
Søren
Thanks for verifying, Søren.
A further technical point worth noting is that when contrast is 1 on a texture map in KeyShot it corresponds to the source image having gamma = 2. Thus if your texture is in linear space, you should set contrast to zero. This may or may not apply to various images you find (and it is a fairly technical point which can be confusing to find sensible information about), but if you have exr roughness maps for example, set contrast to 0.
So if a texture map is created with gamma 2.2 (which I believe many 8-bit maps are), would it be technically accurate to set the Contrast value to 1.1, if KeyShot is set to the default gamma of 2 under the Image tab? Or, conversely, leave the texture map Contrast at 1, and set KS gamma to 2.2 under the Image tab?

Eric
« Last Edit: December 17, 2016, 06:37:05 pm by bdesign »

Offline Søren

  • Developer
  • Jr. Member
  • *****
  • Posts: 81
  • KeyShot Developer
    • KeyShot
Re: How to use displacement and gloss image from POLIIGON
« Reply #27 on: December 13, 2016, 01:13:29 pm »
You would set contrast = 1.2 (gamma + 1). The gamma in the Image Tab, incidentally, has nothing to do with this, since it is the gamma of the source file (the texture) - not the output image.

Søren

Offline bdesign

  • Hero Member
  • *****
  • Posts: 795
Re: How to use displacement and gloss image from POLIIGON
« Reply #28 on: December 13, 2016, 01:21:48 pm »
You would set contrast = 1.2 (gamma + 1). The gamma in the Image Tab, incidentally, has nothing to do with this, since it is the gamma of the source file (the texture) - not the output image.

Søren
Forgive my confusion, but I'm really interested in this. Contrast 1.2: "Gamma + 1"(?)... 2.2 + 1(?)

Eric

Offline Søren

  • Developer
  • Jr. Member
  • *****
  • Posts: 81
  • KeyShot Developer
    • KeyShot
Re: How to use displacement and gloss image from POLIIGON
« Reply #29 on: December 13, 2016, 01:24:08 pm »
sourceGamma = contrast + 1, i.e. contrast = sourceGamma - 1. So sourceGamma = 2.2 implies contrast = 1.2 and sourceGamma = 1 implies contrast = 0.

Søren