backfaceCulling == false 时背面为黑色
Back is black when backfaceCulling == false
导入我的网格后,我正在制作一个红色标准 material,将其应用于网格并关闭 backFaceCulling,但内部是漆黑的。如何使网格内部与外部相匹配?
mesh = newMeshes[0];
var mat = new StandardMaterial("red", scene);
mat.diffuseColor = new Color3(1,0,0)
mesh.material = mat;
mesh.material.backFaceCulling = false;
我从文档的这一部分得到了提示 https://doc.babylonjs.com/how_to/custom
Since a material is no longer being used, backFaceCulling cannot be set and so the camera will have to be rotated for the far facet to be seen. The far facet will remain black despite whatever color is applied as all light is still being absorbed by this facet.
所以我添加了第二个光源(另一个点光源可以,但我最终使用半球来提供更多的全局照明。
导入我的网格后,我正在制作一个红色标准 material,将其应用于网格并关闭 backFaceCulling,但内部是漆黑的。如何使网格内部与外部相匹配?
mesh = newMeshes[0];
var mat = new StandardMaterial("red", scene);
mat.diffuseColor = new Color3(1,0,0)
mesh.material = mat;
mesh.material.backFaceCulling = false;
我从文档的这一部分得到了提示 https://doc.babylonjs.com/how_to/custom
Since a material is no longer being used, backFaceCulling cannot be set and so the camera will have to be rotated for the far facet to be seen. The far facet will remain black despite whatever color is applied as all light is still being absorbed by this facet.
所以我添加了第二个光源(另一个点光源可以,但我最终使用半球来提供更多的全局照明。