本文介绍了变形目标Three.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用morph目标和three.js.但是,关于此主题的文档似乎很少.

I'm trying to get started with morph targets and three.js. However, there doesn't seem to be much documentation on this subject.

在查看源代码时:

morphTargetInfluences []

似乎是魔术...这是如何工作的?我该如何使用呢?值是1的全部强度吗?如何在同一模型上区分不同的变形目标?我只是想了解:

seems to be the magic...how does this work? How do I use this? Is a value of 1 full strength? How can I differentiate between different morph targets on the same model? I'm just trying to understand:

morphTargetInfluences[].

预先感谢

推荐答案

http://threejs.org/examples/webgl_morphtargets.html

变形目标是一组几何顶点位置,用于在它们之间自动内插.您可以使用morphTargetInfluences[0], morphTargetInfluences[1], morphTargetInfluences[nSet]中编写的不同顶点位置实时更改几何外观.您可以同时混合多个几何外观(morphTargetInfluences).最好的方法是JSONLoader格式,例如,您可以从3DSMax导出:frame0为morphTargetInfluences[0],frame1为morphTargetInfluences[1],等等.

Morph targets are sets of geometry vertices positions for automatic interpolation between them. You can change geometry appearance in real time, using different vertices positions written in morphTargetInfluences[0], morphTargetInfluences[1], morphTargetInfluences[nSet]. You can mix many appearances (morphTargetInfluences) of geometry at the same time. Best way is JSONLoader format, wchich you can export from 3DSMax for example: frame0 as morphTargetInfluences[0], frame1 as morphTargetInfluences[1], ect.

原始几何顶点保持不变,您可以使用geometry.computeBoundingBox(); geometry.boundingBox();

The original geometry vertices are untouched, which you can check using geometry.computeBoundingBox(); geometry.boundingBox();

这篇关于变形目标Three.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-10 01:42