Currently, I am working on rendering solid models in three.js, inspired by the way GitHub showcases STL files like the Octocat head. However, I am facing difficulties in setting up the lighting to achieve an optimal look. The current rendering has its limitations, as shown below:
https://i.sstatic.net/82uWR.png
One of the main issues is that the model looks good only from certain angles, resulting in poor contrast and planes appearing to be the same shade of grey when viewed from different perspectives.
The snippet of code I am using for lighting is:
light = new THREE.DirectionalLight(0xffffff, 1);
light.position.copy(camera.position);
scene.add(light);
Furthermore, the light follows the camera when it moves.
Do you have any suggestions on how to enhance the overall lighting and appearance of the model?