I wanted to attach the light to the mountain and place it relative to the mountain rather than the whole scene. So I refactored the code to attach a new THREE Group to the mountain scene and add the light on to it. This way, when I draw the big matrix of mountains, each mountain is lit properly.

As I’m modifying the lights, I realized that I am using a directional light, point light, hemisphere light and the ambient light. So that’s a lot of lights. The hemisphere light is not really needed here, I think it was there just for my experimentation. The ambient light needs to be there for global illumination.

I don’t like the DirectionalLight though because it appears from infinity and goes to infinity so I can’t change the cut-off or frustrum so it only lights a certain area. Point light is nice but it also cannot limit to a certain area unless you change the decay.

Rather, I’ve replaced those lights with a Spotlight which I can change the frustrum and it lights it in a circular area. Changed the light to be placed at the top of the mountain at some fixed height. Likely need to move to relative to the height of the area.