Stripped shadows on collada objects

不问归期 提交于 2019-11-28 01:59:18

You are getting self-shadowing because the rays of the directional light are exactly parallel to some of the faces of your geometry. Move the directional light to a slightly different location. For example,

directionalLight.position.set( 250, 500, 200 );

Usually, light.shadow.bias is used to remedy self-shadowing problems, but it is not going to be effective when the light ray and face are parallel, as in your case.

Also, set shadow.bias to be negative to help alleviate artifacts on other faces.

directionalLight.shadow.bias = - 0.01;

This unfortunately will result, as it usually does, in another artifact: "Peter Panning".

These kinds of trade-offs are common. You are just going to have to find an acceptable compromise. (Maybe set the bias based on camera position.)

three.js r.75

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!