问题描述
限时送ChatGPT账号..我正在查看这里的示例:http://threejs/examples/#webgl_decals一个>
I'm looking at the example here: http://threejs/examples/#webgl_decals
如果我在嘴唇上拍摄贴花,调整轨道控制最小距离,然后进入网格内部,我可以看到网格内部的贴花.有没有办法防止这种情况?我试图将贴花用于其他不希望在两侧都显示贴花的地方.由于 THREE.DoubleSide 不是默认设置,我不确定这是如何发生的.
If I shoot a decal on the lips, adjust the orbital controls minimum distance, and go inside the mesh, I can see the decal on the inside of the mesh. Is there a way to prevent this? I'm trying to use the decal for something else where it is not desireable to have the decal show on both sides. Since THREE.DoubleSide is not the default, I'm not sure how this is happening.
推荐答案
创建材质时,只需使用 THREE.DoubleSide、THREE.FrontSide(默认)或三.BackSide.查看材料对象了解更多信息...
When you create your material, simply set which side (or both) you want the decal to appear on using THREE.DoubleSide, THREE.FrontSide (default) or THREE.BackSide. Look at the material object for more info...
var decalMaterial = new THREE.MeshPhongMaterial( {
map: decalNormal,
transparent: true,
depthTest: true,
depthWrite: false,
polygonOffset: true,
polygonOffsetFactor: - 4,
side: THREE.DoubleSide
});
这篇关于防止贴花显示在网格内部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论