为什么导出的OBJ模型的顶点数量为三个
When I tried to export a plane obj model in blender, I found it in three JS, the number of vertices has increased,
obj model
Blender Model
renderer After Renderer
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
流浪的三角形使我认为,您所看到的是,您所看到的是网格中的一个或多个n gon(具有三个以上侧面的面孔)在搅拌机的出口商或三个进口商中被错误地被三角剖分。
搅拌器可以处理N-Gons(面孔超过三个侧面),但是像三个。如果您试图将其提供N型而不是三角形,则出口商或进口商都会尝试以三角剖分,有时不幸的结果。
有多种方法可以手动进行三角测量。这只是一个。
在Blender中,选择您的对象,然后按选项卡⭾输入编辑模式。按 3 进入面部选择模式,然后 a 选择所有面孔,然后 f ( pertex »从顶点的新边缘/脸部将它们合并成单个脸。这可能不是严格的必要条件,具体取决于我未知的网格的细节,但它使我们进入下一步的已知状态。
现在,您的网格将有一张脸,并且将被选中。按 ctrl t ( face » triangulate faces ),而单个脸将分为几个三角形看起来像以下内容。
三角形的确切布置在您自己的模型上可能有所不同;但是,重要的是,模型上的所有面孔现在都是三角形。
如果您将模型从搅拌机导出并以三分为单位导入,则应如预期出现。
The stray triangles make me think that, rather than additional vertices, what you're seeing is that one or more n-gons in your mesh (faces that have more than three sides) are being triangulated incorrectly somewhere in Blender's exporter or Three's importer.
Blender can handle n-gons (faces that have more than three sides), but a real-time renderer like Three.js thinks in triangles; if you try to give it n-gons instead of triangles, either the exporter or the importer will try to triangulate them by itself, with sometimes unfortunate results.
There are multiple ways to manually triangulate a mesh; here is just one.
In Blender, select your object and press Tab ⭾ to enter Edit Mode. Press 3 to enter Face Selection Mode, then A to select all faces, then F (Vertex » New Edge/Face from Vertices) to merge them into a single face. This may not be strictly necessary depending on particulars of your mesh that are unknown to me, but it gets us to a known state for the next step.
Now your mesh will have one face, and it will be selected. Press CtrlT (Face » Triangulate Faces), and that single face will be split into several triangles, which will look something like the following.
The exact arrangement of the triangles may be different on your own model; what's important, though, is that all of the faces on the model are now triangles.
If you export the model from Blender and import it in Three.js now, it should appear as expected.