Home Technical Talk

Best way to create Diffuse-Specular PBR textures from Albedo-Metalness?

polycounter lvl 8
Offline / Send Message
pixaeiro polycounter lvl 8
Hello,

I have a few models with PBR textures that use the albedo-metalness workflow, and I am trying to create the diffuse-specular textures from them. I found a tutorial on Marmoset, and many of the textures look right, but for some of them the specular reflections seems to be very high.

I don't have Photoshop, so I'm not sure if I am doing it correctly. Does anybody know about another tutorial? Or is there another way to do this?

And by the way, is there a way to create the albedo-metalness textures from the diffuse-specular textures?

Thank you!

Replies

  • EarthQuake
    Options
    Offline / Send Message
    That tutorial explains how to create albedo-metalness textures from diffuse-specular.
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    pixaeiro said:
    but for some of them the specular reflections seems to be very high.
    Is it possible that your A/M textures use a roughness map (white = rough) and the S/G shader you're using uses a gloss (white = glossy) map? Meaning, you forgot to invert the roughness map? Otherwise check it's not an sRGB/linear mixup on the spec / gloss maps.
  • pixaeiro
    Options
    Offline / Send Message
    pixaeiro polycounter lvl 8
    That tutorial explains how to create albedo-metalness textures from diffuse-specular.
    Not really. The first tutorial basically tells you to identify in your textures what is metal and what not, and paint it black or white. There is no workflow to do it as in the albedo-metalness to diffuse-specular tutorial.

    Bek said:
    Is it possible that your A/M textures use a roughness map (white = rough) and the S/G shader you're using uses a gloss (white = glossy) map? Meaning, you forgot to invert the roughness map? Otherwise check it's not an sRGB/linear mixup on the spec / gloss maps.
    Yes, I inverted the roughness textures to get the glossiness textures.

    Thank you guys!
  • EarthQuake
    Options
    Offline / Send Message
    pixaeiro said:
    That tutorial explains how to create albedo-metalness textures from diffuse-specular.
    Not really. The first tutorial basically tells you to identify in your textures what is metal and what not, and paint it black or white. There is no workflow to do it as in the albedo-metalness to diffuse-specular tutorial.



    Well, I wrote the tutorial so I'm pretty sure I know what it covers. There are sections that explains how to go both ways.

    http://www.marmoset.co/toolbag/learn/pbr-conversion#metaltospec

    http://www.marmoset.co/toolbag/learn/pbr-conversion#spectometal

    If after reviewing it again, you're getting caught at a specific point, let me know and I'll try to help.
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    pixaeiro said:
    Not really. The first tutorial basically tells you to identify in your textures what is metal and what not, and paint it black or white. There is no workflow to do it as in the albedo-metalness to diffuse-specular tutorial.
    Huh? The tutorial covers everything you need to do to go from spec to metalness (first set of instructions) or metalness to spec (second set, also the one you want). What do you mean by "it"? It's not clear what you're talking about. Regardless, the tutorial covers exactly what you seem to be asking, and there's nothing missing from the tutorial, so the only variable left here is you. Did you follow all steps in the Metalness -> Spec section, or not?
  • ZacD
    Options
    Online / Send Message
    ZacD ngon master
    I'm kinda surprised I haven't seen a tiny stand alone application that does this automatically and can do it in batch. 
  • EarthQuake
    Options
    Offline / Send Message
    ZacD said:
    I'm kinda surprised I haven't seen a tiny stand alone application that does this automatically and can do it in batch. 
    Yeah going from metalness to spec would be easy to automate. Going the other way is more difficult because you need user input (a metalness mask) to be created so it can't be done fully automated. I mean it can, and we actually do this with a Toolbag -> Unreal import plugin we're working on, but the results are imprecise at best. 
  • ZacD
    Options
    Online / Send Message
    ZacD ngon master
    Couldn't you generate a mask based off the spec values? (And maybe include a slider or two to adjust the transition)
  • radiancef0rge
    Options
    Offline / Send Message
    radiancef0rge ngon master
    ZacD said:
    Couldn't you generate a mask based off the spec values? (And maybe include a slider or two to adjust the transition)
    Yes (ish)TM, everything >170 srgb is metal, fill with white. Everything < 170 is 56 srgb therefor black.
  • pixaeiro
    Options
    Offline / Send Message
    pixaeiro polycounter lvl 8
    Maybe my workflow is wrong. I don't have a Photoshop license, so I've been doing this with GIMP. This is what I am doing:

    Diffuse Map:
    1. Load the albedo map into GIMP.
    2. Drop the metalness map on the bitmap window (it get's loaded as a new layer).
    3. In the layer stack's menu select Add Layer Mask. Pick Grayscale copy of Layer.
    4. Fill layer with black (#000000)
                       


    Specular Map
    1. Load the albedo map into GIMP.
    2. Drop the metalness map on the bitmap window (it get's loaded as a new layer).
    3. Invert metalness layer.
    4. In the layer stack's menu select Add Layer Mask. Pick Grayscale copy of Layer.
    5. Fill layer with gray (#383838)
                       

    Albedo-Metalness:

    Diffuse-Specular:


    The Diffuse-Specular looks brighter than the Albedo-Metalness... Is all that energy coming from the #383838 input when converting the specular?

    Thank you!

  • EarthQuake
    Options
    Offline / Send Message
    ZacD said:
    Couldn't you generate a mask based off the spec values? (And maybe include a slider or two to adjust the transition)
    Yep, this is what we do for the Unreal plugin, but it's gross. A bespoke metalness map works much better.
  • EarthQuake
    Options
    Offline / Send Message
    pixaeiro said:
    Maybe my workflow is wrong. I don't have a Photoshop license, so I've been doing this with GIMP. This is what I am doing:

    Diffuse Map:
    1. Load the albedo map into GIMP.
    2. Drop the metalness map on the bitmap window (it get's loaded as a new layer).
    3. In the layer stack's menu select Add Layer Mask. Pick Grayscale copy of Layer.
    4. Fill layer with black (#000000)
                       


    Specular Map
    1. Load the albedo map into GIMP.
    2. Drop the metalness map on the bitmap window (it get's loaded as a new layer).
    3. Invert metalness layer.
    4. In the layer stack's menu select Add Layer Mask. Pick Grayscale copy of Layer.
    5. Fill layer with gray (#383838)
                       

    Albedo-Metalness:

    Diffuse-Specular:


    The Diffuse-Specular looks brighter than the Albedo-Metalness... Is all that energy coming from the #383838 input when converting the specular?

    Thank you!

    What you've done in gimp appears to be correct. So it's strange that you're seeing that difference.

    What are you rendering this in?
  • pixaeiro
    Options
    Offline / Send Message
    pixaeiro polycounter lvl 8
    I'm rendering this on an application I'm developing, and I needed to know what was wrong, my workflow or my shader.

    I have added that #383838 (0.22) minimum specular color to my albedo-metalness shader and now I get the same result with both workflows:

    Albedo-Metalness-Roughness:


    Diffuse-Specular-Glossiness:


    It is a bit weird that the minimum specular value is so high, but I tested my textures in Unity and there is no difference between the Albedo-Metalness and Diffuse-Specular workflows.

    Thank you for your help!
  • radiancef0rge
    Options
    Offline / Send Message
    radiancef0rge ngon master
    Wait what? Can you post your new texture maps?
  • pixaeiro
    Options
    Offline / Send Message
    pixaeiro polycounter lvl 8
    Wait what? Can you post your new texture maps?
    Yes, I was a bit confused too... I know everything is shiny, but a minimum of 0.22 seems too large!

    Here are the texture maps:

    Albedo:


    Metalness-Glossiness:


    Diffuse:


    Specular-Glossiness:


    And this is the workflow I used to generate and combine the texture maps:



    The model and the other maps are from the Grindstone free models library.
Sign In or Register to comment.