As the name says. When I shoot the current scene, everything works fine. Only the shadow of the white monkey is cropped. How can this happen, and is there any permission for this?
Here is the site: http://hammer.bz/test/ and the screen;)
http://i.stack.imgur.com/6jd0h.png
I think this is due to the camera or the lights .. so here they are:
renderer.shadowMapEnabled = true; renderer.sortObjects = false; renderer.shadowMapWidth = 3072; renderer.shadowMapHeight = 3072 renderer.shadowCameraNear = 2; renderer.shadowCameraFar = 40000; renderer.shadowCameraFov = 50; renderer.shadowMapBias = -0.00022; renderer.shadowMapDarkness = 0.55; renderer.shadowMapSoft = true; renderer.physicallyBasedShading = true; renderer.setClearColorHex( 0x999999, 1 ); camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 0.1, 40000 ); camera.position.x = x; camera.position.y = y; camera.position.z = z; camera.rotation.x = -0.8; scene.add( camera ); var light = new THREE.DirectionalLight( 0xffffff, 1 ); light.position.set( -2, 5, 2 ).normalize(); light.shadowCameraNear = 0.01; light.shadowCameraFar = 1000000; light.castShadow = true; light.shadowDarkness = 0.5; light.shadowCameraVisible = false; scene.add( light );
Thanks in advance!
Bram
EDIT: Received:
just use THREE.SpotLight . That was a dumb question.
Just set shadowCameraVisible = true; to see the light, and it will work. Feeling a little silly right now for this question haha;)
Bram hammer
source share