updated lighting in templates


This post has left a few questions for me.

Q: You made an artificial 18% grey ball. By “fully rough sphere” I assume the roughness was set to 1. Right? And what was the base color value? and what was the specular value you used there for the material?


Base color should be 0.18. Roughness should be 1.0 and specular should be left disconnected.

The specular for non-metals is between 40-65 and for metals it’s +180 as you know. Since the default value for specular in UE4 is 0.5 which is 128 that’s something between both non-metal and metallic range. It sounds like a specular that doesn’t exist in real world. I’m confused. :confused:

Have you read the UE4 PBR page? We recommend leaving most materials specular disconnected. Metals have no real specular value in UE4 since once you have metalness, the specular input is not read. So the s pecularity values in ue4 are slightly different.


Out of curiosity where are you getting those numbers from?

We usually only use specular like a cavity mask. it is common to see them clamped to max 0.5 with some darker cracks for spec occlusion.

According to these charts the specular values for non metals fall within 40-65 which is around 0.15 to 0.23 in UE4. 0.5 seems to be a little off.

It is true that in UE4 for metals Specular slot isn’t needed but still it makes a big difference on non metals in my eye. (Or maybe I’m too careful with the accuracy).

Those charts are completely irrelevant for UE4. I just talked to Brian Karis about this since he wrote this part of the system. I will just paste what he said:

You should definitely trust our own documentation more than some 3rd party PBR tutorial. These days PBR is a very loosely used term, it doesn’t mean all the numbers are 100% interchangeable. It just means you build your lighting equations to simulate physical behavior, it isn’t a single standard of data values. There tends to be a lot of similarity though since everybody wants to use the most good looking/performant equations. Ie ggx is kind of a ‘standard’ lighting term for PBR renderers.

Btw if you are curious why their numbers are different, just take the linear reflectance values on that chart and divide by 0.08. Then you get the thing they said was 60 in srgb comes out to 0.5. 0.04/0.08=0.5.

You don’t want to correct for srgb values when setting a float value. That is only if you are encoding in a texture. I usually disable srgb on all my spec textures to keep them linear.

Great! Thanks for the information Ryan. All I needed to know. :slight_smile: