Venerated1 Posted February 18, 2018 Share Posted February 18, 2018 http://playground.babylonjs.com/#1NE321#1 Maybe this isn't even a bug but a setting that I'm too newb to figure out... but the shadow distorts pretty bad on smaller spheres. When you make the sphere bigger, it look beautiful. Like this: http://playground.babylonjs.com/#1NE321#2 Is this indeed a bug? Or, is this a setting that I can dynamically change? Or, is it just a limitation that I should just be patient on? Quote Link to comment Share on other sites More sharing options...
Guest Posted February 20, 2018 Share Posted February 20, 2018 This is not a bug per se but more a settting issue Please read this: http://doc.babylonjs.com/babylon101/shadows#troubleshooting Shadows are quite complex to set up but we are trying hard to provide all kind of tools to help In your case you can try to bring the light closer by playing with light.position. The closer the better Quote Link to comment Share on other sites More sharing options...
Venerated1 Posted February 22, 2018 Author Share Posted February 22, 2018 http://playground.babylonjs.com/#1NE321#4 So, I held back my frustration with the fact that distance didn't make any noticeable difference and dug through the troubleshooting guide. SUCCESS!!!! But, I would strongly recommend an edit to the troubleshooting guide. Quote Bias You may want to reduce shadow acne resulting from not precise enough shadow map. To do so, you can define the bias (which is 0.00005 by default).: shadowGenerator.bias = 0.01; Shadow generators compare the depth of every pixel with the depth of occluders (shadow casters) seen from the light point of view. As we are dealing with low precision textures (when supported Babylon.js will use float textures but low end devices only support int textures), you may want to boost the depth of occluders to facilitate self shadowing (An object casting shadows on itself). Possibly add this: Quote Bias can also sometimes shrink or distort a shadow. In these cases, reducing the bias can occasionally produce a better effect. shadowGenerator.bias =0.000009; I don't know why everything I'm writing is bold now... but you get the point. I'm just happy that I have a fix. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 22, 2018 Share Posted February 22, 2018 This makes sense Do you want to edit it directly? https://github.com/BabylonJS/Documentation/blob/master/content/babylon101/babylon101/Shadows.md Quote Link to comment Share on other sites More sharing options...
Venerated1 Posted February 22, 2018 Author Share Posted February 22, 2018 Change suggestion submitted, thanks. Quote Link to comment Share on other sites More sharing options...
Venerated1 Posted February 27, 2018 Author Share Posted February 27, 2018 I guess that it didn't really let me edit because I "don’t have write access to." So, if you can give me access then I would gladly make that edit. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2018 Share Posted February 27, 2018 We have a doc for the doc 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.