How to Access F0 Factor in PBR Node Materials

Hello Guys,

I have a small doubt regarding a PBR material that we export directly from maya or 3ds max and the PBR material that we create using node material editor. In the PBR mat from 3d design tools we are getting functions like metallic work flow which has F0 Factor which is helping in enhancing the speculars, reflections but in Node Material PBR material i am unable to find such settings. Can you guys point me out in right direction how to get access on metallic workflow in node material editor…

You don’t have direct access to F0 factor but this parameter is computed from the index of refraction with the formula:

const f0 = Math.pow((ior - outside_ior) / (ior + outside_ior), 2);

outside_ior = 1 as we consider the outside to be air.

So, by changing ior you will change the F0 factor.

ok, the F0 factor that we have attained where should i pass it so that it gets effected in PBR roughness node material created in the editor

You have an indexOfRefraction input on the PBR block:


Just below opacity

ok got that now i can determine F0 factor so after calculating the f0 value where should i assign it for example for pbr material class there is some thing called metallicF0Factor but for node material i cannot find that…

_metallicF0Factor is protected in the PBRBaseMaterial class and so should not be used. It seems it is not meant to be modified. Maybe @sebavan will have more inputs about that.

If you really need to change this value for node materials, you can retrieve a pointer to the PBRMetallicRoughness block of your material and change the _metallicF0Factor property. But this is also an internal (private) property and so should normally not be accessed by user code.

It is accessible through metallicF0Factor on the material:

/**
     * In metallic workflow, specifies an F0 factor to help configuring the material F0.
     * By default the indexOfrefraction is used to compute F0;
     *
     * This is used as a factor against the default reflectance at normal incidence to tweak it.
     *
     * F0 = defaultF0 * metallicF0Factor * metallicReflectanceColor;
     * F90 = metallicReflectanceColor;
     */
    @serialize()
    @expandToProperty("_markAllSubMeshesAsTexturesDirty")
    public metallicF0Factor = 1;

My bad, was looking for _metallicF0Factor which appears only in PBRBaseMaterial!

no problem at all, thanks for all the great answers :wink:

That’s means we can update this value in the nodematerial