eps Posted November 9, 2018 Share Posted November 9, 2018 I think I've got myself in a bit of a problem with light.... What I've currently got is this https://playground.babylonjs.com/#SJYUM3 What I'd like is something like this - https://playground.babylonjs.com/#IVIPF9 but it seems the wrong way of doing it - I'd like the blocks to be the same material but for the light to darken on the more distant blocks, but then to lighten if they move closer to the camera. Should I be using Spotlight? Am I using it in the wrong way? Help please! Quote Link to comment Share on other sites More sharing options...
entropy Posted November 10, 2018 Share Posted November 10, 2018 I think the main problem is that you had an emissive color turned way up (this was overpowering the lighting effects) and you needed to adjust the positioning and falloff of the spotlight: https://playground.babylonjs.com/#SJYUM3#2 Yazheirx 1 Quote Link to comment Share on other sites More sharing options...
eps Posted November 10, 2018 Author Share Posted November 10, 2018 Cheers, thank you! Quote Link to comment Share on other sites More sharing options...
eps Posted November 10, 2018 Author Share Posted November 10, 2018 I got to this.... https://playground.babylonjs.com/#SJYUM3#4 Just to add an extra light and a couple of spheres to give the location and direction of the light involved. Many thanks for this, I'm struggling slightly with the exponent part - I think the distances I need this to apply are quite small - due in part to the massive size of the meshes involved (the cubes are just to illustrate the example). I think I might have to rebuild my meshes at the size required, but then all my other maths goes out the window... Hmm...! GameMonetize 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.