three.js,服装和形状键 [英] three.js, clothing and shape keys

查看:315
本文介绍了three.js,服装和形状键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我该如何打扮人体?我已经在两个分开的网格中导入了人体模型和T恤.人体包括形状键.

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.

但是当我修改身体的morphTargetInfluences键时,T恤不适合新的身体形状. 密钥更改值时如何使T恤适合?,如何使用three.js做到这一点?

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?

我正在使用Three.js导出器(three.js r71)和Blender 2.75a的1.4.0版本

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

推荐答案

要点是,变形目标仅出现在角色模型中,不幸的是不会神奇地适合衣服.在您的编辑工具中也将变形应用到布料上,然后将两者均等变形,这将不费吹灰之力.

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.

这篇关于three.js,服装和形状键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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