I began learning Three js and it has been bothering me that some of the lights does not work for me. While following a tutorial on Youtube (https://www.youtube.com/watch?v=XXzqSAt3UIw&list=PLjcjAqAnHd1EIxV4FSZIiJZvsdrBc1Xho&index=2), everything works fine except for the lights that are supposed to illuminate the planets (like in the video at 4:21). When I tested it out, there is not even the faintest light illuminating any planets.
I am not sure if the video is outdated and subject to new changes. If so how should I edit it so that I can at least see some lights in my scene. Thanks.
In physically-based units, an intensity of 2 is similar to 2 candles. At a distance of 300m, it won’t do much. You could either vastly increase the intensity (I recommend setting up lil-gui or similar to make this easier), or decrease the decay property from the physically-based default to 0 or 1. If you look at the first comment on the Youtube video, there are some updates explaining what to do for newer three.js versions. For example:
// 2. The intensity values of point lights are changed. You need to pass way higher values now:
const pointLight = new THREE.PointLight(0xFFFFFF, 30000, 300);
That distance parameter is not really doing much, it’s a cutoff distance that stops the light from going farther. But if the light isn’t bright enough to reach that far, raising the cutoff distance won’t make it any brighter.