Author Topic: is 4% reflectance value is in linear or srgb?  (Read 985 times)

Here is one of those confusing topic again.  I remember I've asked long ago how come using designer to convert from metal/rough to spec/gloss the spec value is grey.  And someone has answer it is because all object has spec and its 4% in linear and 2% in srgb (or the other way around)

Assuming my render engine will "add" gamma to any linear input(image get brighter when I set the input as linear).  Do I still put 4% gray on my spec/reflection map? or should I degamma that to 2% (or simply set the input as srgb)

Here is one of those confusing topic again.  I remember I've asked long ago how come using designer to convert from metal/rough to spec/gloss the spec value is grey.  And someone has answer it is because all object has spec and its 4% in linear and 2% in srgb (or the other way around)

Assuming my render engine will "add" gamma to any linear input(image get brighter when I set the input as linear).  Do I still put 4% gray on my spec/reflection map? or should I degamma that to 2% (or simply set the input as srgb)

Hi

You don't need to worry about gamma or linear values while authoring. You can just work in sRGB space. The maps are set to be interpreted by renderers. The 4% just means that most common non-metals at the Fresnel 0 angle will reflect 4%. The linear value is 0.04.

The conversion is like this.
0.04 ^ 0.4545 = 0.2315 * 255 = 59.03

We have a PBR F0 Reflectance node that gives you the correct specular value for common materials.

Cheers,
wes
Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja

Hi Wes,

Further to the above OP can help out with a quick question I have mate? I'm just buggered if I can't seem to find the answer to this anywhere on the forum.  :o

I really want to know how to calculate the specular value in the formula used below. What exactly are the values used, (specifically that 0.4545, is that a constant and the only thing you change is the Value?

Also is the 255 a constant as well?



I know we don't need to know this as Substance does this calculation for us and we can use the PBR validate utility you created, but I like to know why/how authoring takes place in case I need to do it manually and make sure I have correct values in my albedo to calculate the right metal reflectance range.

Many thanks in advance fella.

Sam

EDIT: Also I guess one other reason is that I would like to author my own material stacks from scratch for better understanding overall! Hope this makes sense, I'm still a newbie to painter so...
Last Edit: May 30, 2017, 09:04:39 pm

Hi Wes,

Further to the above OP can help out with a quick question I have mate? I'm just buggered if I can't seem to find the answer to this anywhere on the forum.  :o

I really want to know how to calculate the specular value in the formula used below. What exactly are the values used, (specifically that 0.4545, is that a constant and the only thing you change is the Value?

Also is the 255 a constant as well?



I know we don't need to know this as Substance does this calculation for us and we can use the PBR validate utility you created, but I like to know why/how authoring takes place in case I need to do it manually and make sure I have correct values in my albedo to calculate the right metal reflectance range.

Many thanks in advance fella.

Sam

EDIT: Also I guess one other reason is that I would like to author my own material stacks from scratch for better understanding overall! Hope this makes sense, I'm still a newbie to painter so...

HI Sam,

The 0.4545 is the inverse of 2.2 gamma. The 0.4545 is used linearize the values. The constant for the values is 0.04 which is 4% specular. The 0.04 is the linear value in this case. The 255 is used in the conversion process to get an sRGB 0-255 value.

We have a node for computing the f0 values for non-metals. You can find it in the Library>PBR Utilities>Dielectric F0. This node will give you the correct sRGB value for a range of non-metals. This data is designed to be used in the specular map for the specular/gloss PBR workflow. The output is color.

There is also a setting for custom IOR. You can look online for an IOR for a material and enter the value and it will produce the correct color value for you. Again, this is for non-metals.

Most common non-metals fall within this 4% range for reflection. The value is measured at the f0 which is the Fresnel angle at 0 degrees (looking straight at the surface). As the Fresnel angle approaches 90 (grazing angle) the surface will go 100% reflective and this is handled in the PBR shaders.

Cheers,
wes
Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja