three.js, clothing and shape keys

谁说胖子不能爱 提交于 2019-12-10 18:50:25

问题


How can I dress a human body?. I have imported the body model and t-shirt in two separated meshes. The human body includes shape keys.

But when I modify the morphTargetInfluences key of the body, the t-shirt doesn't fit in the new body shape. How can I make the T-shirt fits when the key change the value?, How can I do that using three.js?

I'm using the version 1.4.0 of the Three.js exporter (three.js r71) and Blender 2.75a


回答1:


The point is, your morph targets are only present in your character model and won't magically fit the cloth unfortunately. Apply the morph to the cloth too in your editing tool and morph both equally, this would work without extra effort.

I'm actually also working on a solution for wearable cloth, i'll give shared vertex buffers a try where the vertices "connects" to the vertices of the domain model with a relative offset, so you would just have to take care about assigning the cloth once, instead applying and exporting whole morph target sets at all.

The downside would be, your vertices has to stay the same, once you modify the mesh, you'd have to export all related cloth again. This can be basically solved by a automated process, like one which searches for nearest vertices, but cloth is usually extruded from the base mesh to perfectly "fit" without intersections, so this isn't really a surprising thing.



来源:https://stackoverflow.com/questions/31667615/three-js-clothing-and-shape-keys

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