Author Topic: Using Height Map as displacement in Maya with Arnold.  (Read 10480 times)

So I know how to hook up a displacement map in Arnold. But the midpoint is based on a gray value, so even areas that should have no displacement 'puff up' the model.  The answer is likely in the Alpha Scale and Alpha Offset, or the spread between them. But I'm not sure the correct, or consistently correct settings to use.  In Zbrush, you can generate a displacement map with the midpoint set to rgb 0,0,0, so it doesn't bump where there's no detail. How might I achieve the same results with a Height Map generated in SP..

Thanks,
B.

Hi,
I recommend to change the default connection and change some parameters:

- Connect the generated image (the file node of course) through its Alpha Out output into the Displacement shader.
- Turn on the Alpha is Luminance option and set the Color Space to Raw in the file node.
- Alpha offset: -0.5 (This shifts the mid value to 0).
- Set the Displacement scale as you like it (in the Displacement Shader).

Because the generated Height map is not a 32 bit/channel image and the substances internally are not necessarily generating Height maps in the same way, there isn’t always a perfect way.

Here are some tests:
Displacement value: 50, Alpha Offset: 0


Displacement value: 50, Alpha Offset: -0.5. The surface is where it should be.


Here is a version where the scale value is much greater. The surface is where it should be.
Displacement value: 200, Alpha Offset: -0.5


Don't forget:
In Maya the object scale need to be 1,1,1 for correct results!

By the way I recommend to use tga not png format.

Cheers, D
Last Edit: November 29, 2016, 11:19:59 am
I'm an Environment Artist and R&D Generalist at Digic Pictures

Hi,
I recommend to change the default connection and change some parameters:

- Connect the generated image (the file node of course) through its Alpha Out output into the Displacement shader.
- Turn on the Alpha is Luminance option and set the Color Space to Raw in the file node.
- Alpha offset: -0.5 (This shifts the mid value to 0).
- Set the Displacement scale as you like it (in the Displacement Shader).

Because the generated Height map is not a 32 bit/channel image and the substances internally are not necessarily generating Height maps in the same way, there isn’t always a perfect way.

Here are some tests:
Displacement value: 50, Alpha Offset: 0


Displacement value: 50, Alpha Offset: -0.5. The surface is where it should be.


Here is a version where the scale value is much greater. The surface is where it should be.
Displacement value: 200, Alpha Offset: -0.5


Don't forget:
In Maya the object scale need to be 1,1,1 for correct results!

By the way I recommend to use tga not png format.

Cheers, D

Awesome post! Very helpful.

Just out of curiosity why do you mention to use TGA over PNG?

Cheers,
wes
Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja

Awesome post! Very helpful.

Just out of curiosity why do you mention to use TGA over PNG?

Cheers,
wes

Hi Wes,

PNG always use transparency not alpha channels. In Maya that's a problem.
Sometimes normal maps got transparency (I think it's a mistake by the users who created the .sbsar files with Substance Designer. You can't get correct results if that's the case). But if you choose tga, the transparency info goes to a seperate channel and you just simply not using it. :)

Easier to edit the textures if the transparency (or any other information) is on a separate channel.
That was the main problem between Substance Painter and Unity (Unity can't managed the alpha channel correctly - gamma correction problem - you had to do the gamma correction in post, to get the right results). Do you remember that post? :)

Cheers, D
Last Edit: November 29, 2016, 11:14:55 pm
I'm an Environment Artist and R&D Generalist at Digic Pictures

Awesome post! Very helpful.

Just out of curiosity why do you mention to use TGA over PNG?

Cheers,
wes

Hi Wes,

PNG always use transparency not alpha channels. In Maya that's a problem.
Sometimes normal maps got transparency (I think it's a mistake by the users who created the .sbsar files with Substance Designer. You can't get correct results if that's the case).

Easier to edit the textures if the transparency (or any other information) is on a separate channel.
That was the main problem between Substance Painter and Unity (Unity can't managed the alpha channel correctly - gamma correction problem - you had to do the gamma correction in post, to get the right results). Do you remember that post? :)

Cheers, D

Ah, yes I remember that post now : ) Thanks so much for the clarification! I greatly appreciate all of your help and knowledge.

Cheers,
Wes
Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja

I think the alpha offset should be +0.5 not -0.5 because the exported map from substance painter is black in the alpha 0 value and in maya black means object must be pushed in so I think offset +0.5 will push the black to 0 value. And I tried it and it was working better than -0.5.