ctarrington Posted March 26, 2016 Share Posted March 26, 2016 Hi all I am experimenting with lights and shadows in Babylon JS and really liking it! I did stumble onto one thing that confuses me. Initially I was using an invisible box that I would use as a parent for a light source, a visible proxy for the light source, etc. Animate the invisible box and everything else follows nicely. This works fine for illumination. When I added shadows to the scene things broke down a little bit. If an object both receives and casts shadows then it fails to be illuminated. Reversing the parent relationship fixes things - if the light source is the parent then illumination, shadows and animation all work smoothly. Here are some playgrounds to show the different scenarios. I left out the animation as it doesn't seem relevant. Light as parent to the proxy - Everything workshttp://www.babylonjs-playground.com/#25VTCJ#0 Proxy as parent to the light - casting shadows works but receiving shadows causes the blue box to lose illumination http://www.babylonjs-playground.com/#25VTCJ#2 Proxy as parent to the light (receive only) - casting shadows works, removed receive so that illumination workshttp://www.babylonjs-playground.com/#25VTCJ#3 So, am I missing something? Or is having the light as the parent just the way to go? Thanks - CT Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 27, 2016 Share Posted March 27, 2016 Hey this is a good question And guess what: this is a bug I'll get it fix really sooooon 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.