gpt4 book ai didi

actionscript-3 - Away3D Material 中的奇怪线条

转载 作者:行者123 更新时间:2023-12-04 05:21:51 27 4
gpt4 key购买 nike

我正在尝试获取对象具有的原始 Material 并添加场景中的定向光:

protected function onMeshComplete(event:AssetEvent):void {

if (event.asset.assetType == AssetType.MESH) {
myMesh = event.asset as Mesh;
for each (var m:SubMesh in myMesh.subMeshes){
var mat:MaterialBase = m.material;
mat.lightPicker = staticLightPicker;
m.material = mat;
}
}

}

结果,正如预期的那样,我拥有原始 Material 和定向光。但我的问题是我有一些奇怪的线条,如下图所示。

enter image description here

是我代码的问题吗?离开3D代码?还是3D模型?
谢谢!

最佳答案

正如 Fabrice Closier 向我解释的那样,解决方法是对 Material 使用 repeat:true。
这是他给出的完整答案:

Its not strange. Its because your model has uv’s values lower or exceeding 0-1. You need to set repeat:true to your material. The lines that you see are the pixels of your map (in this case the default engine bitmapdata) being stretched.



Here is the link.

谢谢你,法布里斯,非常感谢!

关于actionscript-3 - Away3D Material 中的奇怪线条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13604196/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com