Hey community,
While exploring Babylon’s new rectangular area light, I also discovered some potential improvements for the Directional Light
.
Please see these render tests:
The bottom row shows the directional light render tests in Babylon, while the top two rows display area light tests from both Babylon and Blender.
The specular pass of this light is unexpectedly empty. I expected it to have similar pass separation to the area light in Blender.
The diffuse pass rendering looks all working fine as expected.
PS: another post regarding to area light issue: Specular issue for Rectangular Area Light
Please let me know what you think.
Many thanks,
Tawibox
Can you share a repro exhibiting the wrong behavior ?
A directional light being a punctual light it will only appear like a simple dot on a glossy surface and a broader “patch” on a rough one.
@sebavan
You can use this link for reference!
Sorry for the confusion, I wasn’t specifying the shape of the highlight.
I was specifying the color data in the diffuse
and specular
channels of the directional light. When I tried to isolate these channels, I discovered that the specular
pass was completely empty, while all the color data was in the diffuse
pass:

I expected these two channels to contain different data, similar to other DCC software such like Blender:
Hope this makes sense.
Many thanks,
Tawibox
What do you use to isolate each channel ?
@sebavan
To have more control over lighting, I sometimes need to fine-tune only the specular amount when they appear too strong on particular objects.
This is a common practice in VFX and 3D animation studios. I hope we can enable this feature in Babylon.js, not just for directional lights but also for other light types such as area lights and spot lights. This functionality should be consistent across all light types.
In general, I believe it would be beneficial if Babylon.js could align this feature with other DCC software such as Blender, Maya V-Ray, Maya Arnold as well as other game engines.
Also, it seems strange that while this property exists in the light object, it doesn’t appear to have any effect.
Hope this makes sense 
Tawibox
What properties do you use on lights or materials to achieve your goals ? My guess is that you are not using the correct one.
@sebavan
These 2:
**
**
I am quite certain these two properties are the correct ones, unless they serve different purposes than expected.
The same two properties are already partially working for the rectAreaLight
, though there are some issues with the color data. @srzerbetto is currently working on fixing this issue, as discussed here: Specular issue for Rectangular Area Light
Please let me know if you need further explanations.
Tawibox
Ohhhhh, from the screenshots you might be using diffuse and specular colors on lights.
The pbr material only supports the diffuseColor, the other one is not used.
You would need to use diffuseIntensity as well as specularIntensity on the material to tweak it.
Yes!!
Ah, I understand now! This is quite different from Blender’s approach. It would be nice if all platforms handled this consistently!
So, am I correct in assuming that once the rectAreaLight
issue is fixed, I should control diffuse and specular levels through the PBRMaterial properties rather than through the lights themselves too?
Thank you very much for the clarification.
Tawibox
1 Like