Convert Base Color/ Metallic Workflow to Diffuse/Specular and back

The 2 most used pbr workflows are Metallic and Specular. Using the first one you have embedded f0 values while in the other one you have the total control on frenel effect.

Now, what i recommend is to use a metallic approach also if you are using a specular engine and only in the end convert all textures to the specular workflow.

Why? Less pbr errors on frenel, lower maps size, freedom to convert all textures in other specific areas.

There are various maps, some suitable for vfx and others for gaming but at the core the math is the same.

The common textures between the two worflows are the same: heigh(bump), displace, normal(directx or opengl/ tangent or world space), ao, curvature, thickness, id. I’m not going to discuss how these maps work but I’ll say some words about the linear workflow at the end of this article.

The main maps of metallic workflow are base color, metallic and roughness against the diffuse, specular and glossiness of specular method.

We can convert easily a roughness map to glossiness and back because they are one the inverse of the other. For this purpose I’m concentrating my efforts on the remaining two maps (base/metal vs diffuse/specular).

The point important to consider here is the completeness of the specular method. With only 2 maps you can represent if a material is metallic/non metallic  and his reflected specular color at f0. With the metallic workflow instead, you can’t set the non metallic specular color at f0 and so we consider it fixed.

What is really important in the metallic workflow is the metallic map, a 1 or 0 switch to tell the engine if a material is a metal or not. Using this map you can easily separate, in the base color, the diffuse part( non metal ) from its specular, reflected part( metal) .

To summarise, to create maps for the specular workflow from a metal one:

  • Create a black map and add the diffuse( non metal) from base color. This is your diffuse map
  • Create a map with rgb set to (10,10,10). This is your specular part of non metals. Merge to this map the metallic part from the base color. Now you have the specular map at f0 complete.

We have just created a diffuse and an f0 specular map.

Some softwares require a gray scale map for specular at f0 and and a different specular map at 90 degrees. In this case the metallic map becomes the specular map at f0. For the specular map at 90 degrees you need to create a map full white and then merge the specular component (metal) from the base color. Usually at 90 degrees all materials are 100% reflective. The white map gives you the non metallic part. A metal usually reflects between a 70/80%. So now you have also split a general specular map into a specular gray map at f0 and a specular map at 90 degrees.

Let’s try the inverse approach. If we had only the diffuse and specular maps we wouldn’t know what is the metallic and non metallic part. A method could be to analyze the diffuse map. If we find texels with and rgb value of (0,0,0) we should be sure enough that it’s a metal. Are we sure that all zero points are a metal? If someone paints the diffuse map in the wrong way we can’t be sure that all of these texels are a metal. Maybe a distracted artist has painted and projected a too dark texture and so we have a black point for a non metal; even worse, a non zero texel could be a metal. You could say: yes but on the other side, during the metallic workflow, we could have a bad metallic map. Yes but think about how these maps are built. A diffuse map is painted manually whereas a metallic part is usually painted automatically from the software we are using. The last one is less prone to errors. If we consider a perfect diffuse map we can invert the process.

To summarise, to create maps for the metallic workflow from a specular one:

  • Create a mask selecting texels with zero value from the diffuse map. Using this mask, select texels from the specular channel and merge them on the diffuse map. We have realized the base color map.
  • Create a black map, using the mask created before, replace the texels inside this new black map with a full white. We have now a metallic map.

Some considerations on the linear wokflow. When connecting maps to the engine, we should be sure that we  are following a linear workflow. In the metallic workflow, the base color needs to be corrected from the srgb color space. For the specular workflow, instead, we need to correct the diffuse and the specular.

Please consider also that this is a generic method. You should follow these tips but you are free to make tricks for a better visualization on realtime or offline renders.

For questions or issues please ask me or simply show me your preferred pbr method.

Thank you

 

1
Leave a Reply

Leave a Reply

  Subscribe  
newest oldest most voted
Notify of
Hannes Ulbricht
Guest

Very nice, thank you!

Twitter | Instagram | Bitbucket | Battlelog | LinkedIn | GitHub

Google Profile


My name is Giovanni Di Grezia, but people call me xgiovio.

Here is my homepage: .

I am a VFX Artist and Software Developer

And this is a picture of me.

Giovanni Di Grezia





%d bloggers like this: