ThreeJS: is it possible to simplify an object / reduce the number of vertexes?

蹲街弑〆低调 提交于 2020-01-13 11:23:10

问题


I'm starting to learn ThreeJS. I have some very complex models to display.

These models come from Autocad files that my customer provides.

But sometimes the amount of details in the model is just way too much for the purpose of the website.

I would like to reduce the amount of vertexes in the model to simplify the display and enhance performance.

Is this possible from within ThreeJS? Or is there maybe an other solution for this?


回答1:


There's a modifier called SimplifyModifier that works very well. You'll find it in the Three.js examples

https://threejs.org/examples/#webgl_modifier_simplifier

Here's another demo of it in action

http://www.blurspline.com/labs/3d/bunny/




回答2:


If you can import the model into Blender, you could try Decimate Modifier. In the latest version of Blender, it features three different methods with configurable "amount" parameters. Depending on your mesh topology, it might reduce the poly count drastically with virtually no visual changes, or it might completely break the model with even a slight reduction attempt. Other 3d packages should include a similar functionality, but I've never used those.

.

Another thing that came into mind: Sometimes when I've encountered a too high-poly Blender model, a good start has been checking if it has a Subdivision Modifier applied and removing that if so. While I do not know if there's something similar in Autocad, it might be worth investigating.



来源:https://stackoverflow.com/questions/15871031/threejs-is-it-possible-to-simplify-an-object-reduce-the-number-of-vertexes

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