I am currently utilizing three.js to develop a scene featuring a model. The scene includes a plane that the model is positioned on, as well as a spotlight illuminating the model.
The model is comprised of various objects, all of which have been configured to both receive and cast shadows. Interestingly, shadows are being cast on the model itself by other parts of the model.
However, the plane does not seem to be receiving shadows, and I am uncertain as to why that is.
I have made adjustments to the spotLight.shadowCameraNear
and spotLight.shadowCameraFar
properties to ensure that both the model and plane are within the shadow area, but the issue persists.
Attached below is a screenshot of the model with the spotlight clearly visible. https://i.sstatic.net/fBDon.png
Additionally, the shadowmap has been activated and set to soft maps:
renderer.shadowMap.enabled = true; // Shadow map enabled
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
Here is the code snippet:
<script>
// Code snippet for three.js here
</script>