kurhlaa Posted December 13, 2017 Share Posted December 13, 2017 Hello, Playing with shadows - https://www.babylonjs-playground.com/#JI41I3 Several issues: 1. Why there are no soft shadows? 2. How do I remove this ugly black square around box/torus on the ground? I've noticed it after switching to the latest babylon.js version. If you comment out the line "shadowGenerator.useBlurExponentialShadowMap = true;" - black square will disappear and shadows will appear, but not soft. 3. If you comment out "shadowGenerator.useBlurExponentialShadowMap = true;" and uncomment "shadowGenerator.usePoissonSampling = true;" - poison shadow appears, but black square still exists; Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted December 13, 2017 Share Posted December 13, 2017 It's a problem in self shadowing, if you comment out box.receiveShadows = true; on line 43, the black wrong shadow disappears (It's not a solution of course if you want anything to cast a shadow on the box) I don"t know the solution, but this bothers me as well. Quote Link to comment Share on other sites More sharing options...
kurhlaa Posted December 13, 2017 Author Share Posted December 13, 2017 Unfortunately no difference for me: ... wrong ugly black shadow at red points, no shadow at green point. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 13, 2017 Share Posted December 13, 2017 https://www.babylonjs-playground.com/#JI41I3#1 Does that look any better? Not much soft-edge/blur. In fact, none. But, I don't see any unwanted shadowing. Anyone else? Quote Link to comment Share on other sites More sharing options...
kurhlaa Posted December 13, 2017 Author Share Posted December 13, 2017 @Wingnut, that's how your example looks for me: ... this weird black square is being enabled by both useBlurExponentialShadowMap and usePoissonSampling Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 13, 2017 Share Posted December 13, 2017 Interesting. I don't see the outer square in my FF or IE... on Windows 7 desktop. hmm. What the heck? What are you driving, K? Quote Link to comment Share on other sites More sharing options...
Arte Posted December 13, 2017 Share Posted December 13, 2017 Wingnut that what I see: (Windows 7 64-bit, Chrome Version 62.0.3202.94) One more from me? https://www.babylonjs-playground.com/#JI41I3#2 Wingnut 1 Quote Link to comment Share on other sites More sharing options...
kurhlaa Posted December 13, 2017 Author Share Posted December 13, 2017 on Arch Linux now. Tried Firefox 57, Chromium 62, even Gnome Web Wingnut 1 Quote Link to comment Share on other sites More sharing options...
kurhlaa Posted December 13, 2017 Author Share Posted December 13, 2017 @Arte Quote Link to comment Share on other sites More sharing options...
Arte Posted December 13, 2017 Share Posted December 13, 2017 @kurhlaa https://www.babylonjs-playground.com/#JI41I3#2 ??? Quote Link to comment Share on other sites More sharing options...
kurhlaa Posted December 13, 2017 Author Share Posted December 13, 2017 @Arte, with "shadowGenerator.frustumEdgeFalloff = 1.5" looks good, no weird black square, but with "shadowGenerator.useBlurExponentialShadowMap = true;" still no shadow at all. Quote Link to comment Share on other sites More sharing options...
kurhlaa Posted December 13, 2017 Author Share Posted December 13, 2017 @Arte, but how does "frustumEdgeFalloff" affects only me, in simple words? I see "1.5" sets a transparency of poison shadow. Maybe something makes soft exponential shadow transparent at all? What should we use - "frustumEdgeFalloff" or "shadowGenerator.setDarkness()" ? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 13, 2017 Share Posted December 13, 2017 What hardware, Kurhlaa? (Wingnut sets his details-extraction vacuum cleaner to full throttle) (We hear some screw-gun insanity, and soon, all we see is Wingnut's feet sticking-out-of Kurhlaa's computer case) Update: Ahh... smell this video card. Smells like tuna, right? Yep... smuggled from China under the deck-boards of a Chinese tuna boat, to avoid import tariffs. Arte 1 Quote Link to comment Share on other sites More sharing options...
kurhlaa Posted December 13, 2017 Author Share Posted December 13, 2017 @Wingnut, Radeon HD 6770 Something else? Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 13, 2017 Share Posted December 13, 2017 Thx! Mostly wanted to know if mobile device/desk. Any change when switching to slightly older BJS version? Anything interesting seen when switching to spotlight or point light? Any thoughts WHY some of us see the issue, and some of us don't? hmm. I should probably shut up and wait for experts to comment. Sorry. Quote Link to comment Share on other sites More sharing options...
Arte Posted December 13, 2017 Share Posted December 13, 2017 I'm agree with Wingnut. Let's wait and see what the experts come up with. Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted December 13, 2017 Share Posted December 13, 2017 I don't see that weird circle shadow either! So, .useBlurCloseExponentialShadowMap DOES work, setting it up is not easy.https://www.babylonjs-playground.com/indexstable#IX08ES#5 A good shadow map (from Spector JS, helps a lot!) looks like that attached. A shadow map depth is encoded in an unsigned int. depth scaled by shadowGenerator.depthScale (255 means precision is 1/255 unit) between light.shadowMinZ (nearest point from light) and light.shadowMaxZ (farthest point from light) bias pushes shadow below surfaces. I dont really understand how to scale it. Arte and Wingnut 2 Quote Link to comment Share on other sites More sharing options...
kurhlaa Posted December 13, 2017 Author Share Posted December 13, 2017 @Wingnut, probably locally I've mostly used stable version, so didn't noticed this. But now I've found it. At 28 July @Deltakosh made a commit - https://github.com/BabylonJS/Babylon.js/commit/14b644a851a3ae4064d5cf790c22cf0865168997 - after it has appeared this bug with strange square shadow. The previous commit is good. Idea - please add to the playground an option to choose babylon.js's version more precisely - would be useful in such cases Wingnut and BitOfGold 2 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 13, 2017 Share Posted December 13, 2017 Good read to help setting the shadows up: http://doc.babylonjs.com/babylon101/shadows#troubleshooting BitOfGold 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.