我有一个现有的3D应用程序,该应用程序是在3JS R92时代开发的,该应用程序使用单独的Alpha图来模拟在木板中切开的孔。这允许在所有型号中重新使用高质量的木制纹理,同时使用易于压缩的黑白图像在木板中创建“孔”。
现在,我已经开始将项目迁移到当前的GLTF格式,我发现现在必须将基本颜色和α映射组合在一起。我的项目的结果是,现在每个130多个木板中的每个都需要自己的“木纹 + alpha”纹理,而不是能够共享单个木纹纹理。
从我的所有研究中,似乎没有GLTF使用GLTF的这种情况。 alpha地图纹理?
在这一点上,最好的前进方法似乎是避免使用GLTF并返回使用对象载体,这是一种痛苦,因为GLTF的二进制对象是一个巨大的优势。
I have an existing 3D application that was developed back in the days of the ThreeJS r92 that made use of a separate alpha map to simulate holes cut in wooden panels. This allowed re-use of a high quality woodgrain texture across all models, while using easily compressible black and white images to create the 'holes' in the wooden panels.
Now that I have begun migration of the project to the current glTF format, I find that the base color and alpha map now have to be combined. The result for my project is that now each of 130+ wooden panels will need their own "wood grain + alpha" texture, rather than being able to share a single wood grain texture.
From all my research, it seems like there are no obvious options to this situation using glTF.. my question now is - does anyone know of ANY workaround using glTF that allows me to separate the base color texture from the alpha map texture?
At this point the best way ahead sadly seems to be to avoid glTF and go back to using ObjectLoader, which is a pain as the binary objects of glTF are a huge plus.
发布评论
评论(1)
您只能以基本颜色导出GLTF。一旦导入三分。 “ nofollow noreferrer”>材料的
.alphamap
属性。文档指出因此,它不必是黑白。
You could export the GLTF with only the base color. Once imported into Three.js, you can manually assign the black/white texture as the material's
.alphaMap
property.The docs state that only the green channel is used so it doesn't have to be black and white.