多种材料的状态如何? [英] What is the status on Multiple Materials?
问题描述
我找不到关于多种材料的任何文档 - 我知道 MultiMaterial 已被弃用,但它现在如何工作?
I cannot find any documentation on multiple materials - i know MultiMaterial has been deprecated but how does it work now?
three.js 是否支持这个,如果支持,faceVertexUvs 如何映射到多种材质(我的意思是请举个例子)
Does three.js support this and if so how does faceVertexUvs map to multiple material (i mean a practicle example please)
推荐答案
要将多种材质应用到一个对象,您现在可以将它们作为数组分配给材质属性.
To apply multiple materials to an object, you are now able to assign them just as an array to the material property.
mesh.material = [material1, material2, material3];
MultiMaterial
已被删除.改用数组.
MultiMaterial
has been removed. Use an Array instead.
faceVertexUvs
是一个多维数组,第一个索引代表材质索引.
The faceVertexUvs
is a multidimensional array, where the first index represents the material index.
geometry.faceVertexUvs[ materialIndex ][ faceIndex ][ vertexIndex ]
(参考:three.js -geometry.faceVertexUvs[0][0][index] 与 geometry.vertices[index])
在这两种情况下,Three.js Docs 确实可以做得更好.
The Three.js Docs could be indeed a bit better in both cases.
这篇关于多种材料的状态如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!