Move mouse to change view point
Far in the clouds of north mountain, recluse chill and sing.
## learned today Feb 10th 2017
Practicing the shadow and multiplying objects in three js
This approach differs from older approaches in that instead of using approximations for the way in which light interacts with a surface, a physically correct model is used. The idea is that, instead of tweaking materials to look good under specific lighting, a material can be created that will react 'correctly' under all lighting scenarios.
In practice this gives a more accurate and realistic looking result than the MeshLambertMaterial or MeshPhongMaterial, at the cost of being somewhat more computationally expensive.
shadow in three js
Shadows are disabled by default
renderer need to be enabled shadow
mesh objects, plane use ShadowMaterial
PointLight set to be able to cast shadow
need to setClearColor instead of using default black
renderer.shadowMap.enabled = true; renderer.shadowMap.type = THREE.PCFSoftShadowMap;
pointLight.castShadow = true; pointLight.shadow.mapSize.width = 1024; pointLight.shadow.mapSize.height = 1024;
shapeOne.castShadow = true; shapeOne.receiveShadow = true;