I’m reaching out to you with a question about lighting that has me a bit puzzled. Here are two scenarios:
Case 1: I have a basic scene with a ground that has no texture. When I add a light with an intensity of 2, it significantly brightens up the ground.
Case 2: In the same example, I change the texture of my ground to a PBR color. Suddenly, my lighting seems almost non-existent, and I have to crank up the intensity to 100 or more to get the right feel.
I suspect the PBR color might be the culprit… is there some kind of adjustment needed? Is this normal? Can you provide some guidance on this?
Thanks in advance!
PS: the capture without texture on the ground is at intensity 2.5, the capture with the PBR texture is at intensity 100.
To answer your question without a PG and just for a starter, what I can say is this:
- In general, PBR materials are less reactive to light then standardMaterials (no mat being the default standardMaterial)
- In general, PBR materials take their light from the environment and the physical properties of the material. In particular, when not set any further, the metallic workflow. When importing a mesh from i.e. blender, materials are set to PBR (PBRMaterial). If unset, the metallic workflow is set to the default which is 0 for roughness and 1 for metallic (I guess). I’m saying I guess because I ALWAYS set these, at a very minimum (and so should you).
- In general, when a light hits a material, the intensity of the light on this material is worked through the material settings (the one receiving the light and not the light itself)
- In essence, the way a material reacts to light is different between standard and PBR materials.
The light (color and intensity) is managed through the specular properties on a standard material. This same light on a PBR material is managed through a number of parameters (since PBR is much more complex) but, to simplify, essentially the intensity at which the light hits the surface of a PBR material can be modified though ‘directIntensity’ (material.directIntensity). This is the intensity of the light that will be added to the overall lighting of a PBR material when the light directly hits the surface.
There are in fact many other parameters to set to diffuse the light, angle the light, etc. I encourage you to tour the doc which provide quite a number of information and insight on PBR materials for what’s supposed to be a rendering engine . Also, use ‘the inspector’ in the playground, sandbox or in your scene to twist and tweak your light and materials for a better understanding.
Finally, if you have a specific issue, try to provide a PG. It will provide a base and make it easier for us to modify and demonstrate.
I hope this little piece of feedback will help. Have a great time with BJS and a merry Xmas and meanwhile, have a great day
This is the part that might help understand the difference Mastering PBR Materials | Babylon.js Documentation
Just back after a few days off, and catching up on your answer. First of all, I wish you all the best for the new year
Regarding the lights, I haven’t revisited the subject since my return, but indeed, I believe the light settings on my PBR material might be off. I’ll start by looking into that.
Thanks for your feedback.
Have a great day!