A-Frame/THREE.js, 无纹理简化 gltf[glb] 模型 [英] A-Frame / THREE.js, no textures simplified gltf[glb] models

查看:51
本文介绍了A-Frame/THREE.js, 无纹理简化 gltf[glb] 模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用这篇文章中的答案成功简化glb后.

中的纹理不再应用于模型(它看起来完全黑色且不反射(无材料)

The textures in are not being applied to the model any more (it appears completely black and unreflective(no material)

我如何以编程方式让纹理与这个新的简化几何体一起工作?

How would I programmatically get the textures to work with this new simplified geometry?

我认为这与紫外线有关,但如果可能的话,我不确定如何根据简化的几何图形使其工作.

I think its something to do with the uv's but im not to sure how to have it work according to simplified geometry, if even possible.

推荐答案

THREE.SimplifyModifier 当前不保留几何体中的 UV,您需要使用它来使纹理工作.请参阅:https://github.com/mrdoob/three.js/issues/14058.该问题中建议了一种解决方法(通过对 SimplifyModifier 的更改),但正如那里所讨论的,结果中可能会看到一些工件.如果您可以在 Blender 或其他建模工具中进行简化,您可能会对过程有更多的控制,并可以获得更好的结果.

THREE.SimplifyModifier currently does not preserve UVs in the geometry, which you'll need for textures to work. See: https://github.com/mrdoob/three.js/issues/14058. There is a workaround suggested in that issue (via changes to SimplifyModifier) but as discussed there, some artifacts will likely be visible in the result. If you can do the simplification in Blender or another modeling tool, you may have more control over the process and can get better results.

这篇关于A-Frame/THREE.js, 无纹理简化 gltf[glb] 模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆