I have no idea why the CornellBox example does have no shadow most of the time.
I know i have seen the shadow in the past. But now its gone.
I havnt changed anyhting.
You’re right! Actually I remember had issue combining PBR workflow and dynamic shadow darkness :-/ And I always suffer to get proper dyn shadow when lightmaps (as shadowmaps) have to be used, it’s impossible for example to get a pure black dyn shadows.
I will try to fix that as soon as Internet comes back at home
Here a quick try (doesn’t works) https://www.babylonjs-playground.com/#J5E230#251
And also, why not, a standard workflow too (shadow doesn’t work either, 'still don’t know why) : https://www.babylonjs-playground.com/#4AJ16M#50
But im sure i saw shadows in that scene today.
Its sometimes working.
For 10 sec i had the shadow showing up cause i increased the map size.
But if i hit Run again its gone. Wont come bake if i change the size again.
Without lightmaps, we’re able to see the shadow in standard workflow https://www.babylonjs-playground.com/index.html#4AJ16M#51, but not in PBR https://www.babylonjs-playground.com/index.html#J5E230#253 …
the direct light does also not show up in the expector.
if the shadow is there you will see the light in the expector.
Fixed!
https://www.babylonjs-playground.com/#J5E230#259
Mistake on my side, I was using createDefaultCameraOrLight and this default light was attenuating shadows. I make the PR to update the page example right now, thanks for reporting
(I also simplified the code and added comments)
Thanks for the fix.
A small crit form my side. The light maps arnt that clean.
If i could get them i would clean them in Photoshop and upload the fixed one.
What kind of issues have you spotted? Feel free to enhance them:
- BJS library sources: MeshesLibrary/CornellBox at master · BabylonJS/MeshesLibrary · GitHub
- original model from GitHub - Vinc3r/cornellBox: just a simple cornell box, for quick tests (oriented realtime engine) (here the precomputed lighting one)
'will be updated soon: cornellBox lightmap tweaked by Vinc3r · Pull Request #19 · BabylonJS/MeshesLibrary · GitHub
These artefacts was here due to the floor albdedo texture influence during lighting, thanks for the stamping