-
Learning about lighting in three.js
-
There’s a lot of different light sources available and positioning them will take experimentation. Make use of the THREE light helpers which visualise where the light source is coming from combined with
dat.GUIto quickly move the light sources around. -
Lights sources come at a computational cost and should be used sparingly
Minimal cost:
AmbientLight HemisphereLightModerate cost:
DirectionalLight PointLightHigh cost:
SpotLight RectAreaLight -
Consider
BakingA good technique for lighting is called baking. The idea is that you bake the light into the texture. This can be done in a 3D software. Unfortunately, you won’t be able to move the lights, because there are none and you’ll probably need a lot of textures.