How would you use specular maps now based on what he said?

Tomorrow, if you are interested, I will create a version directly applicable to the specular map. I have to convert it from octane render, which is the engine I usually use.

have downloaded and rendered your helmet,looks great.nice idea to convert specular back to IOR.

edit,inspired by noldos post,i builded a F0 specular map to principled specular converter.
here first testrender

It has to do what kind of texture assets you have. If you’re creating your own textures for Cycles use, there is no reason to output the textures for specular workflow. Metalness workflow (Principled shader) handles energy conservation (albeit “buggy”) for you no matter what you plug into it. Specular workflow (unsupported by Cycles, but Eevee has a node for it) does not do this automatically, and you can easily break energy conservation (white diffuse + white specular = 2*white, not good). Textures output for specular workflow will do so with this accounted for.

Nothing stops you from creating a library with fake user set, link it into your startup file and saving the startup. You can add a shortcut to the library node groups if you want to link them into a previous project. You can make your own shading building blocks and layer them together. Examples could be:

  • Glass.Simple (for thin architectural glass, transparency or refraction based with incoming trick).
  • Glass.Advanced (same as above but with real IOR, no incoming trick).
  • Absorption.Thin Term Mixer (diffuse/translucency + transparency/refraction using incoming trick).
  • Absorption.Thick Term Mixer (diffuse/sss + transparency/refraction not using incoming trick).
  • Glossy.Simple (basic fresnel for when roughness is very low).
  • Glossy.PBR (fresnel that accounts for roughness).
  • Glossy.Advanced (same as PBR but with face angle tint).
  • Glossy.AdvancedTopcoat (basic fresnel, but with darkening of incoming shader).
  • Glossy.Anisotropic.
  • Fuzz (A chain to mix in Velvet shader, I would do the tint options on this one).
  • Shadow Handling (how to handle shadows where refraction is used, or help out/fake other terms).
  • Transparent Backface (makes backfacing faces transparent).
  • GI Color Bleed Control.
    With these, you just chain the shaders one into the other depending on what effect you want. Want fabric? Absorption Term into Fuzz, done. Too much color bleed issues? Add GI Color Bleed Control. Want a metal? Glossy.PBR or Glossy.Anisotropic - done. Want a translucent leaf? Absorption.Thin Term Mixer into PBR.Glossy - done, possibly with added Shadow Handling if desired.

Shader setups isn’t really that hard to setup and setup correctly. But it could be better if fresnel node had roughness input and a thin switch. Even if that rids us from certain aspects of the Principled shader I don’t think many cares about in the first place.

Formula

this is (if I have not made any mistakes) the formula for directly connecting the specular map (gamma 2.2, not linearized) to the specular PBR blender node (x is the grayscale value).
I don’t know blender very well, but as soon as I have time I will try to create an arithmetic node to convert it.

I added the new version to the link. (noldo2.blend)

thanks for posting your formula.

i have made a simple converting node group,the formulas for this are…

F0 reflection to IOR

formf0ior
source
https://blender.stackexchange.com/questions/73009/how-to-make-a-node-group-to-calculate-fresnel-via-f0-values

then IOR to principled shader specular
iortospec
source
https://docs.blender.org/manual/en/latest/render/shader_nodes/shader/principled.html

i have posted a rendertest allready some postings above,have checked the F0 to n (IOR) formula with a calculator and its works.

if the spec/reflection map contains F0 reflection data, then the conversation result must be correct.
the only point is that in the texture node,we have to select non-color data for colorspace,since these are only datas that dont need a gamma applyed.

finaly the nodegroup

So what is your guys thought about https://armorpaint.org/ ?

with metalness shading it seems a lot of the texture hacks that have to be done for specular workflows are not needed anymore.

is then an app like https://armorpaint.org/ useful when you want to work more with metalness PBR and cannot be belnders build in paint module be sufficient?

I thought this needed some complex number to solve it !
which is hard to do with nodes !

thanks
happy bl

Sorry I am lost :wink:

talking about the formula for IOR function of F0

happy bl

it is not that hard to build a formula with complex numbers,even more if you know the formula you want to build.

the formula i used is mainly for dielectric materials.and for the F0 maps this is mostly over 90% the case.so no need for a complex formula.i have double checked the formula(with the well known dielectric fresnel to f0 and back to IOR with the formula)it just works.the rest is from the blender docs,to convert IOR to principled specular.
If you want to make a black detection,that uses some engines in the spec map,for metalness.then this could be easely done additional to this converting nodes.for example with a less /greater than node,if its black then it switch from 0 to 1,this output could be conncted to the metalness input,very easy.

edit,have it done quickly,here it is.if the map contains black (0,0,0)then it switch to 1,the metallic output,should be conncted to the …metallic input.

1 Like

there was another tread about this IOR and PBR

I got a list of IOR and mat for a script if needed
let me know

also another thread using N K values for making PBR materials

happy bl

i am not sure, that this formula in the link, gives the expected value.

as example

you have the IOR of water thats 1.333
to get the F0 reflection of the Water you need this formula…
(IOR-1)(IOR-1)/(IOR+1)(IOR+1)

if you insert 1.333 for water into the formula the result is 0.0200168 at F0 reflection

now calculate IOR back
1 +sqrt (F0) / 1 -sqrt(F0)

the result is 1.333

Small update,i made a mistake with the last noodle screenshot.The black value is not from the spec map,instead its from the Diffuse color map.

Based on Allegorithmic PBR Guide


as you can see,the black parts on the diffuse are these parts that gets metallic.

Since in the specular workflow (all based of the PBR Guide),the Metallic color are taken from the spec map,i simply added the color from the spec map to the diffuse map,if the diffuse color is pure black(0,0,0)

Hi there, I’m really interested in this nodegroup setup (i do models which later client will render in corona, and i need to see how good textures look on them, beating wall with my head trying to understand why i can’t make material look like in Substance painter), please, can you show whole node group image, at least what those three lines are coming from (on top), or throw me a blend with it?

I have reload the old file.The 3 nodes lines are going too a math that is unconnected/unused.This was for some calculation checking(iirc it was some roughness calc),however it is bypassed unused.

What this nodegroup does is allready described.
The upper input converts F0 reflection to Specular values.
The middle input inverts the glossy map to roughness.
The last input is for the Diffuse map,if it has pure black (0,0,0) in the map then the metallic output gets a 1 from the black is metal greather than,and adds the color from the F0 map to the basecolor output,for the metal color.

This was the last version from the conversation node,and i have not tested it with Allegorithmic maps.

These glossy workflow is dependent of the renderengine used (what maps it awaits).And on the other hand the maps, you have downloaded or whatever,you have to know what each map represent,to make sure you choose the right workflow/conversation.

To make your life easyer,use the roughness metal workflow in cycles.

These conversion node/test is just if you have only maps with specular glossiness workflow.
If you can load the same materials as metal roughness workflow,then you can connect the maps with the usally PBR method into the principled shader without conversation.

2 Likes