Directional light shadows look wrong

Hello everyone, newbie here. I’m trying to recreate a scene in babylonjs which resembles an archaeology site. I have loaded all my models into the playground, however, the lighting looks off. I’m currently using directional lights and I have played around with the lights position and intensity to no avail. I want a better looking scene with shadows. The shadows look extremely dark as of now for eg. inside the tent and if you look behind the rocks. Any help on how to go about this would be greatly appreciated!

https://playground.babylonjs.com/#EQXST7

P.S the objects in the scene haven’t been placed correctly but it shouldn’t matter. Use W,A,S,D to move and click and drag to look around.

Hi bleakGorilla,

Welcome to Babylon! The are a lot of potential things to try to change the look of a scene like this, but the first thing I’d recommend is switching from direct lighting to IBL (image-based lighting).

Babylon Playground | Babylon.js Playground (babylonjs.com)

The reason for things looking so dark before was because they weren’t receiving any light whatsoever because, with direct lighting, light only comes from one direction per light. However, physically-based rendering using IBL uses light coming from all directions, so things like interiors will show up much better. To add IBL to your scene, I added line 40 (which is just a convenience method to set up some easy physically-based rendering defaults) and switched the ground material from StandardMaterial to PBRMaterial so that it could be illuminated by the new environment lighting. The process of working with IBL is a little different from working with direct lighting, so I’m sure there will be things to tweak, but hopefully this is a good step in the right direction. Hope this helps, and best of luck!

3 Likes

It looks much better now! I will check out some more stuff on IBL. Thank you so much.

1 Like