Jump to content

Specular Map to Metal-Roughness


reepblue
 Share

Recommended Posts

This extension is for those who have existing materials that were made for the Blinn-Phong shading (diffuse+normal+specular) such as the textures for Leadwerks. Right click on an image with a specular suffix in the name and a "Convert Specular to Metal-Roughness" option will show up. This will take the spec sheet, insert the existing pixels in the blue channel, then swap the pixels and store that copy into the green channel. (This seems to take a bit)

The result will be a blue and green texture. 

image.thumb.png.51e85ecdde38a659eb192c685c886b9b.png

In your material, you then can use the Metalness and Roughness spinners to adjust the values. I find setting the Metalness to 0.1 is what you want for most non-metal textures to mimic the specular effect. For things that are metal, well that's up to you to tweak and find out. It really helps if you know how the material should look.

image.thumb.png.6d78c8ee9f1070036c2e89175b80d137.png

The only thing you might need to consider is any roughness map you've made if you came from Leadwerks. That mask wasn't really conventional, and you may want to look into packing that yourself with the Channel Packing Tool to get the desired look. 

 

SpecMapToORM.lua

  • Like 3

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

I've updated the script to be SpecMapToORM (Occlusion-Roughness-Metal) and added the "Specular map suffixes" option under Material Generation. The red channel is also now filled with white instead of black, but it'll not make any difference. This still seems to take quite a bit to generate but it works. This will probably only be used for projects that want to emulate the Bling-Phong Shading look.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...