Parsing wavefront obj file consists of polygons in three.js

情到浓时终转凉″ 提交于 2019-12-11 11:13:22

问题


In my 3D object; I have several boxes like;

But if I try to load and display obj and mtl file with three.js, 5-sided or more-sided objects not loaded properly ( like below ) . Then; I discover that three.js supports only 3-sided or 4-sided faces.

Is there any solution to divide these faces in object file and load them ?


回答1:


You need to triangulate your model before exporting it. Most 3D editors out there have this option. Some editors have that as option in the OBJ exporter options. If that's not an option you can make a copy/backup of the model, triangulate that, export then delete/hide.



来源:https://stackoverflow.com/questions/14342093/parsing-wavefront-obj-file-consists-of-polygons-in-three-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!