Pointlight Won't Illuminate Anything
EDIT: Now I have two barebone examples using first MeshBasicMaterial and second MeshLambertMaterial: PointLight_sucks__MeshBasicMaterial.html PointLight_sucks__MeshLambertMaterial.
Solution 1:
THREE.MeshBasicMaterial()
is not affected by light. Change it to THREE.MeshLambertMaterial()
or THREE.MeshPhongMaterial()
EDIT:
In addition THREE.PointLight()
does not affect THREE.MeshBasicMaterial()
as per http://threejs.org/docs/#Reference/Lights/PointLight.
As per the PointLight()
and the interaction with MeshLambertMaterial()
you have an error in your code:
The lines
light1.position.set = new THREE.Vector3(0, -120, 150);light2.position.set = new THREE.Vector3(0, 120, 150);
should be
light1.position.set (0, -120, 150);
light2.position.set (0, 120, 150);
Solution 2:
MeshBasicMaterial is not affected by light, use other material type as suggested by gaitat.
It happens to me quite often that light is too small to be noticeable or it is placed too far from the mesh I want to illuminate. Maybe this is your case too.
Post a Comment for "Pointlight Won't Illuminate Anything"