Dad72 Posted July 6, 2018 Share Posted July 6, 2018 Hi, I think there is a problem with the version 3.2 shadow generator. There is a huge black bar that is larger or smaller depending on the changes we make to shadowMinZ and shadowMaxZ and when we add no mesh with addShadowCaster () The second bug is if I add a mesh, the bar is no longer visible, except that it is always present, because if you move a character animate in the alignment of this invisible black bar, it becomes visible. https://playground.babylonjs.com/#B48X7G#15 Thanks in advance Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 7, 2018 Author Share Posted July 7, 2018 I forgot to mention that this only happens if we use this filter: shadowGenerator.usePercentageCloserFiltering = true; With other filters this problem does not appear Quote Link to comment Share on other sites More sharing options...
Guest Posted July 9, 2018 Share Posted July 9, 2018 Pinging @Sebavan for review Quote Link to comment Share on other sites More sharing options...
Sebavan Posted July 9, 2018 Share Posted July 9, 2018 Hello, All of the mentioned points are the result of the computation of the scene extends for the shadows. Basically in PCF several taps are made on the Shadow map to compute the final shadow. We prevent with this PR to compute huge extends when no meshes are present solving 1. https://github.com/BabylonJS/Babylon.js/pull/4712 About the second point, I am unfortunately unbable to repro, could you create another PG highlighting the issue ? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 9, 2018 Author Share Posted July 9, 2018 I do not know how to reproduce it, it can be due to a lot of things. I think it's following the orientation of the camera. But what is strange is that it is very random, it happens for example when I'm on the mesh of my city and more su the field and other times, it is on both. I try to make a PG, but I do not know what causes it at home, so I do not reproduce anything on the PG. I do not know how to help you with a useful repro. I should already understand why this is happening, but I do not understand yet. That's what I have : Quote Link to comment Share on other sites More sharing options...
Guest Posted July 10, 2018 Share Posted July 10, 2018 Could you try to increase the value of light.shadowOrthoScale to see if this is an light placement issue? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 10, 2018 Author Share Posted July 10, 2018 This improves a little bit by putting a big value of 1.0 (100%) of shadowOrthoScale , but it stays there. Look on the pictures. if I leave by default shadowOrthoScale , I have streaks on the shadow of the character. depending on the orientation of the character or the camera. IF I turn my character to the right or left, no problem. This only happens on the line of the black bar that we can currently see if we do not add mesh to the shadow generator using this filter only usePercentageCloserFiltering On static meshes no problem, maybe it comes from the fact that the character is animate or has bones (which I suppose) If I increase shadowOrthoScale, there are fewer sorts, but there are still some and I still have the problem, but less present. Looks like the problem comes from there. Look at the shadow of this video how it works according to stri: Captured video Webm Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 10, 2018 Author Share Posted July 10, 2018 I have to test : exclude of the hemispherical light the sidewalk mesh so that it is only illuminated by both directionals and the problem this product on the ground now. I do not understand what produces this, but I think there is a little bug with this filter. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 10, 2018 Share Posted July 10, 2018 We can call it a bug ONLY if we can reproduce it Pinging @Sebavan to pick his brain Quote Link to comment Share on other sites More sharing options...
Sebavan Posted July 10, 2018 Share Posted July 10, 2018 This looks like you have self shadow turned on and you have got acnea. black to white regular stripes. Could you increase the bias a bit ? PS: you can also play with normalBias to prevent it at grazing angle. Dad72 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 10, 2018 Author Share Posted July 10, 2018 Ok, the bias fix, the shadows are ok. But I still have this shadows extended when I move my character. if I stop it, no problem, but running, I have this: If I disable the filter (usePercentageCloserFiltering ), it works well. If I use another filter, no problem either. It's really only with this filter that I get that when I move a character and the camera is in a certain direction. Left : walk. right: stop I do not have a PG, because I do not know how to reproduce it because I do not know what this problem is. With your audit trails, I may end up finding out why and can be doing a useful PG. Thank you Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 10, 2018 Author Share Posted July 10, 2018 Ok, I managed to reproduce on a PG the problem. Wait for the complete loading of the character, there is for a moment, because there is a file of 20 mo which loads all the animations. To see the problem move the character in a circle (key Z) and you will see what I see in the image of the post above. http://www.babylonjs-playground.com/#IFYDRS#10 it's been 4 hours that I try to make this PG, it was hard to reproduce it, I was afraid to have to recreate all my play on the playground, which would have been impossible. it seems to be linked to the fact that the character is animating or because he has bones. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 10, 2018 Share Posted July 10, 2018 I'm not reproducing it can you tell me where the character should be? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 10, 2018 Author Share Posted July 10, 2018 Move the character in a circle and you will see it. Walk you right and left. In the diagonal of the field Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 10, 2018 Author Share Posted July 10, 2018 Quote Link to comment Share on other sites More sharing options...
Guest Posted July 10, 2018 Share Posted July 10, 2018 I repro it now Dad72 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 10, 2018 Author Share Posted July 10, 2018 It's a strange bug is not it? I have no idea what causes this. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 10, 2018 Share Posted July 10, 2018 Me neither Debugging in progress Quote Link to comment Share on other sites More sharing options...
Guest Posted July 10, 2018 Share Posted July 10, 2018 Should be good now: http://www.babylonjs-playground.com/#IFYDRS#12 This is mostly because we need to avoid reading data from the border of the texture (check line 36) I also recommend to boost the shadowOrthoScale a bit (0.2+) to make sure the shadowmap encompasses all the bones Dad72 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 10, 2018 Author Share Posted July 10, 2018 Oh, cool. Big thanks DK, there is so much parameter with the shadows. It's really hard to get nice shadows, but we can. Thank you again and sorry for the loss of time. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 10, 2018 Author Share Posted July 10, 2018 It's perfect on my project. I solve. Thanks again. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 10, 2018 Share Posted July 10, 2018 I know that shadows are complex but we really try hard to provide all tools to make them work. It is so complex to address all possible cases Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 10, 2018 Author Share Posted July 10, 2018 Yes, yes, I understand, reassure you. 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.