javascript - How to avoid shadows on unlit faces with three.js -


It seems that three With JS, facing face away from a face still receives shadow due to the other meshes in between this face The Spotlight. How can we avoid this type of shadow?

For example see. In this example, we have a simple sight with a spotlight, ambient light, cube, a spherical and a camera, the spotlights are visually frustrated with the shadow camera.

As we can see, there is a shadow on the farthest face of the cube from the spherical area, but it looks wrong because it is facing the face, away from the spotlight and does not illuminate it. I would like to avoid it.

Please note that this is a simplified version of what Jeffedal would like to achieve. In the actual code, the size of the mesh is more complex and the camera has been moved around, and neither of these, do not turn off the shadow nor reduce the shadow. CameraEfter is an option for me.

Here is the link to jsfiddle above which I think the most relevant part of the code is for the full code.

  sphereMesh.castShadow = true; ... cubeMesh.receiveShadow = true; ... light.castShadow = true; Light.shadowCameraVisible = true; Light.shadowCameraNear = 200; Light.shadowCameraFar = 1000; Light.shadowCameraFov = 30; Light.shadowBias = 0; Light.shadowDarkness = 0.5; Light.shadowMapWidth = 2048; Light.shadowMapHeight = 2048; ... view.ed (new three. Ambient light (0x404040)); ... var randerer = new three. WebGill Renderer (); ... renderer ShadowMapEnabled = true; Renderer.shadowMapType = Three PCFShadowMap; The third person seems to clarify the same issue in  

, but this is not the main point of that question, and I do not get the answer to my question in response to that question.


Comments