Note that there are some explanatory texts on larger screens.

plurals
  1. POthree.js shadow cutoff
    primarykey
    data
    text
    <p>As the title says. When i render the current scene everything works fine. Only the shadow of the white monkey gets cut off. How can this happen, and is there a resolution for it?</p> <p>Here is the site: <a href="http://hammer.bz/test/" rel="noreferrer">http://hammer.bz/test/</a> and a screen ;)<br/> <a href="https://i.stack.imgur.com/6jd0h.png" rel="noreferrer">http://i.stack.imgur.com/6jd0h.png</a></p> <p>I guess it has to do with the camera or with the lights.. so here are they:</p> <pre><code>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 ); </code></pre> <p>Thanks in advance!<br /> Bram</p> <p>EDIT: got it:</p> <p>just use <code>THREE.SpotLight</code> instead. It was a dumb question.</p> <p>Just put on <code>shadowCameraVisible = true;</code> to see the light and it will work. Feeling a bit dumb now for this question haha ;)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload