[RESOLVED] Substance Painter 2018.2.1 <> Keyshot 7.3.40

Started by cjwidd, August 31, 2018, 02:18:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cjwidd

TL;DR: What is the correct mat graph configuration to achieve parity between Substance Painter's Iray with Keyshot 7.3.40?

I recently did an exploration of how to achieve visual parity between Substance Painter 2018.2.1 and Corona 2 using 3ds Max Slate Material Editor and shared those results on the Corona forum. To do this required an extensive amount of testing, especially for a process that should otherwise be automatic, and I am now confronted with an identical issue in Keyshot.

Fundamentally, the issue surrounds the fact that PBR textures cannot simply be slotted into a single shader in Keyshot to achieve the desired results. Instead, it seems that separate material labels are needed for metals and dialectric surfaces - if they are represented in a single object (i.e. single texture map) - and then mask blended.

I am including a link to the assets used in the aforementioned forum post with the hopes that Will, or Dries, or another Hero Member can describe how to replicate the following image in Keyshot 7.

[REFERENCE]
Substance Painter 2018.2.1 - IRay


*link to assets
*link to source HDRI

cjwidd

#1
Continuing to explore the issue and my best guess is there is linear / srgb conversion or gamma correction issue happening inside Keyshot that I cannot apprehend.

Rex

Hey Christopher,

Have you seen the documentation here? https://support.allegorithmic.com/documentation/display/SPDOC/Keyshot

Check out the scene here and let us know if this looks correct to you. https://we.tl/t-Wf3yATAOgW

cjwidd

#3
Rex, thank you for taking the time to help me address this issue. I took a look at the scene you provided, but I cannot say the appearance of the asset is correct; if you view the object from a different angle you will notice extreme glossiness values throughout.

The textures that I provided in the previous post were exported from Substance Painter using the Corona export preset, which uses glossiness (glossiness^2) instead of roughness. As such, it would not have been possible to achieve the proper look anyway, even if you inverted the glossiness for roughness.

Exporting the texture set from Substance Painter using the Keyshot export preset and following the mat graph example provided by Allegorithmic's documentation does resolve the issue (see attached).


Rex

Hey Christopher,

Looks great. Glad to see you figured it out.

FYI there is actually a setting under Preferences > Advanced for "Use gloss instead of roughness for materials". This will change the Roughness slider to a Gloss slider that goes from 0-100.

bdesign

#5
Here is an alternate setup using a single Advanced material. For the pick axe, it rendered 1.2x faster than the layered material; for the demo sphere, 2x faster. I used the Blend map as the Input of a Color To Number node, set Output From/To values to 1.5 and 10 respectively, and plugged it into the Refractive Index channel. For the pick axe single material, I set the Blend map Contrast to 4. In the texture assets folder for the pick axe, there is a MetalColor map, which I believe is intended for the Specular color of the metal. I used a Color Composite node to combine the two Specular maps (Reflection and MetalColor), using the Blend map as Source Alpha. The Gloss to Roughness inversion was done by first setting the texture map Contrast to zero (I later tweaked it to .4...higher contrast = rougher), then using a Color Gradient node created by Søren, found under reply #3 here: https://www.keyshot.com/forum/index.php?topic=13929.0. The renders below are:

1. Demo Sphere - single material
2. Demo Sphere - layered material
3. Pick Axe - single material
4. Pick Axe - layered material

Cheers,
Eric

cjwidd

Eric, this sounds *really* good, but can you post some screenshots of the render and associated mat graph?

bdesign

Hey Christopher-

^The images finally uploaded :)

Cheers,
Eric

cjwidd

This looks very promising. I would like to look over this more thoroughly in the morning, but it appears correct to me at first blush; although I think the normal map should be inverted (>1,  flip the green channel).

I am curious about the gloss to roughness conversion, however. As I understand it, gloss and roughness are simply inversions of one another, but due to gamma correction in Keyshot, a color invert node is not sufficient to achieve the correct conversion. Until now, I have been inverting based on the procedure described here, but what Soren has implemented is much different(?)

bdesign

#9
Quote from: cjwidd on September 02, 2018, 11:30:26 PM
This looks very promising. I would like to look over this more thoroughly in the morning, but it appears correct to me at first blush; although I think the normal map should be inverted (-1, or flip the green channel).

I am curious about the gloss to roughness conversion, however. As I understand it, gloss and roughness are simply inversions of one another, but due to gamma correction in Keyshot, a color invert node is not sufficient to achieve the correct conversion. Until now, I have been inverting based on the procedure described here, but what Soren has implemented is much different(?)

EDIT: After checking again, I now think the normal map should be at +1 :). I will upload a new render, with bump height at 1 and glossiness texture map contrast at zero, which I think looks more like the IRay render. I tweaked it to .4 in the original renders to make it look rougher.

Hey Christopher-

The normal map Bump Height is set to -1 for the pick axe. Normal maps can be funky to gauge at times, almost creating an optical illusion as to what is the correct orientation, so I usually check them with extreme values (e.g. +10, -10) to easily see the effect. That's what I did with the pick axe. A positive value had the wood grain incorrect. The relationship between gloss and roughness is non-linear, which is why a Color Invert node will not produce correct results. Søren actually created the Color Gradient node based off of a study I did a while back (see reply #22 here: https://www.keyshot.com/forum/index.php?topic=13729.15 ). The whole thread is really informative.

Cheers,
Eric

cjwidd

#10
After checking the original project, the normal map value should be positive (>1), so my suggestion was incorrect regardless. I've updated the post for consistency.

bdesign


cjwidd

Quote from: bdesign on September 03, 2018, 12:12:28 AM
We were typing at the same time :) See my edit above^

Haha, very nice. I really appreciate you taking the time to provide your input. I know it can be a chore sometimes, testing mat graphs and organizing screenshots for a forum post. Hopefully the information in this thread will benefit others in the future.

bdesign

You're welcome, glad to help. The new render will be done shortly and I'll post it. It looks very close to your original IRay reference image.

Cheers,
Eric

bdesign

Here is the new render, with normal map Bump Height = 1, Glossiness map Contrast = 0.

Cheers,
Eric