1
$\begingroup$

I have a metallic and smoothness map. The metallic is in the red channel, the smoothness is in the alpha channel. (This map is used in a Unity 3D project, by the Standard shader).

The values in the map are as so:

A: 0 - Not smooth; 255 - Smooth
R: 0 - Not metallic; 255 - Metallic

I have the metallic value working now I believe.

I need to invert the alpha (smoothness) channel somehow as the 'Principled BSDF' shader expects roughness. What is the best way to do this?

Here is my node setup:

enter image description here

$\endgroup$
4
  • 1
    $\begingroup$ Cycles has some weird behaviors when textures have unrelated data in the alpha channel, see blender.stackexchange.com/questions/32450/… Otherwise, your setup sounds correct from the description given. $\endgroup$
    – JtheNinja
    Commented Jun 27, 2018 at 16:43
  • $\begingroup$ @JtheNinja Yes, it seems the metallic setup was correct. The smoothness in the alpha channel needs inverting now somehow. $\endgroup$
    – rhughes
    Commented Jun 28, 2018 at 2:43
  • 2
    $\begingroup$ Inverting a value in the range of 0-1 is as simple as subtracting it from 1. Use a math node on subtract mode. (After you check out JtheNinja's link.) $\endgroup$
    – Nathan
    Commented Jun 28, 2018 at 3:30
  • $\begingroup$ You are right! I was trying to subtract 255. If you write this as an answer, I'll mark it as correct. $\endgroup$
    – rhughes
    Commented Jun 28, 2018 at 3:45

0

You must log in to answer this question.

Browse other questions tagged .