The PR enables objects with a displacement map to correctly cast shadows without using a custom depth/distance material. I’m not sure if objects correctly receive shadow if vertices are displaced with a respective map.
Will do, thanks! But again I saw the PR, I’m not looking to display burger shadow on the plane with displacement but just to see the plane itself in the way I can understand what’s going on with some gradient. I hope I’m explaining it well.
One thing to check here, if you remove the ambient light what result do you get? It’s a large scene, perhaps the point light needs to be more intense, or a higher distance cutoff… Ambient lights have no distance limit.
Here is another example.
It uses shadow with MeshStandardMaterial and Three r132.
No normalMap used in this example.
The plane is both casting and receiving shadow so you will need to manage the lights shadow.bias.
This is new in r132 and it looks really good.
Also, I am using a directionalLight
Thank you for this example! So If I understand correctly, the displacement doesn’t work well with shadows , the workaround is to have a normal map that has the shadow pattern so the scene will look more realistic.
the displacement map works fine with shadows by default since Three r132. I.e.,you don’t need to create a specific THREE.ShadowMaterial anymore.
The displacement map is more about changing vertices than changing the normals that are used when calculating lighting effects. Bumpmap and Normalmap are good for that.
However, you can avoid a displacement map by displacing your geometry in blender and exporting it as obj or gltf. That way it should contain normals already and gradient shading will work if you use a light and material that supports it. eg, pointLight with meshStandardMaterial.