Convert specular/gloss maps to metallic/roughness maps for Cycles?

A lot of games still use specular/gloss workflow.
I was tinkering with Apex Legends models and wanted to render in Cycles, but to my surprise Cycles does not support the Specular BSDF Shader as in it turns to black.
I tried a hacky setup to try to recreate Specular BSDF shader with Pricipled BSDF but result isn’t so good.
Gloss maps can easily be turned to roughness maps by inverting them but how do I convert albedo and specular maps to albedo and metallic maps (in a free program like Gimp or Blender itself)?


specgloss2metrough_002

So when using the older/simpler diffuse/specular setup (from the maps) then why don’t just use diffuse map as input on diffuse shader and specular map as controlling input on a mix shader with a glossy shader?..
Maybe also have alook at https://help.poliigon.com/en/articles/1712659-the-differences-between-metalness-and-specular-workflows (at 4:48) “Every piece of software works a litlle bit different from each other”… And then: specular value in Principled Shader

I tried to recreate Specular BSDF in Cycles by just adding a Diffuse Shader with a Gloss shader which look correct with normals pointing towards camera.
How do I get the brighter parts at the grazing angles?
I tried adding fresnel node to glossy shader but I didn’t get it to work.
blender_specular_bsdf_01

I’m a bit puzzled… what are you after?? :exclamation:

Title: convert … spec → rough… for cyles
Text: I was tinkering with Apex Legends models and wanted to render in Cyles…

So you want to use texture maps used with a specific shader setup and recreate or improve the look in some other render engine… That’s not easy because you have to “know”/ re-engineer the intented look. So you have to dig into (the science of ) shaders…
To have it easy you want to use a shader which isn’t present in cycles… then you compare shaders (not the one from the game but another setup) in the Shading Workspace with Material Preview which is different if set to Rendered using one of the render engines (and uses a specific HDRI) . And then you are adding diff and glossy instead of mixing with fresnel as control factor…?? It seems to be that you don’t know much about shaders???

If YOU wann do it then YOU have to investigate more about shaders because if just someone gives you a setup you don’t learn anything. Maybe finally you can leant : The reason why someone gets paid for this is because of his know-how or expert knowledge.

EeveeSpecShader
CyclesDiffGlossFresnelShader

Quick one with the setup i mentioned...of course have to play with th e parameter to get the look you want (comparing to the original and not Eevee/Cyles) used a little redish because blach doesn't show much... first E second C

and why don’t just use Eevee ?

1 Like

can you share the map so I can try to fix it?

Quite hard to answer on this, sure you can try to micic it to some degree.
But Specular and Metallic workflow have different degrees of freedom in the design process and quite some differences in the way the calculate the final shade. So taking a shader that works in the one workflow and hope to be able to transfer it to the other by just converting some textures values of specific parameters will fail at least if its about being correct, in details it differs.

And by faking you will break energy conservation.
And yes the specular shader doesnt work in cycles.

Hmm, the frensel node works in cycles.

So a Metallic, or Metalness map, is a black and white texture that acts as a mask.

why don’t you try plugging the metallic map into the fac input of the mix shader.

could you please show me your material node tree setup?

is this what you want?
to make the specular brighter increase the value to 2000

to @jhon_don : Hmm also interesting…
to @joeyq1 : essentially what i said… :

First off I’m a hobby artist, not a coder/programmer or an expert in material and shader stuff.
In that link you posted (https://help.poliigon.com/en/articles/1712659-the-differences-between-metalness-and-specular-workflows) I saw Blender can use both specular and metalness workflow.
I was under the the wrong impression that Blender had premade ‘plug and play’ materials for both workflows in both main render engines Cycles and Eevee.
Eevee has both Specular BSDF for specular workflow and Principled BSDF for metallic workflow, Cycles only has Principled BSDF for metallic workflow which imho is a shame.
So I thought, maybe there is an easy way to convert textures between the both workflows but that was whishfull thinking on my part.
Metallic workflow to specular is somewhat doable, specular to metallic almost isn’t, especially if the specular workflow isn’t 100% pbr in the first place which I found out by looking at texures of models of sketchfab with specular workflow or games like Apex Legends and Heroes of the Storm for example.
I searched the internet and I tried Shader Map to try convert textures from specular to metallic workflow but results were poor.
For me the materials don’t have to be 100% physically acurate pbr materials, some artistic licence is great as long as it looks “good” which I know is very subjective.
Something between PBR and NPR but leaning more on the former, “believable” is also fine for me.
So I thought to try and play with specular workflow in Cycles and found out a week or so that there’s no dedicated material shader for this.
Also my first setup comes closer to Eevee’s Specular BSDF than both of Okidoki and jhon_don solutions, add the same color to the color of Glossy BSDF and specular color of the Specular BSDF to see what I mean.
Here’s a second attempt at creating a Specular BSDF for cycles.
blender_specular_bsdf_02

Does someone know or can someone check the source code how the Specular BSDF shader is made under the hood and how it can be reproduced with basic nodes working in Cycles?
As I said I’m not a programmer so I wouldn’t know where to look in the source code or know how to interpret it if someone pointed to the relevent code.
test_specular_bsdf_002.blend (131.4 KB)
If someone can make this Cycles Specular BSDF setup better please do!

It might be simpler to use something like Materialize to create the metalness map from the Diffuse and Normal Maps you already have…

To actually MAKE a metalness map from the Specular…Involves creating a new RGB file and using the original Specular Map as the Base Layer, tracing the image in the RGB as a new layer, splitting the channels…I use the Green channel with Black/White and Greyscale where I want the Metallic etc…once done and back in Blender, separate out the HSV from the original S map. run it through the math node subtracting the S from the V and then a color ramp to tweak… Probably easier to see the result than explain it…


Notice the Mask on the Right is in the Green Channel…in the red, it looks like this…

There is nothing in the Blue Channel…( but sometimes that can be used for the AO or actually just about whatever you need.
Traditionally game engines use the Red channel for Rough, Green for Metallic, and Blue for AO… Dice engine in the Starwars franchise uses an inverted Albedo for the roughness… Other engines use a CS map where the albedo is In the RGB and the Specular is in the Alpha Channel…but I have used the Alpha for Metalness as well as the emissive depending on what is needed and what engine it is used with-in,