Morph targets Three.js

I'm trying to get started with morphing and three.js goals. However, there seems to be not much documentation on this topic.

As I look at the source code:

morphTargetInfluences []

seems magical ... how does it work? How to use it? Is a value of 1 full power? How can I distinguish different morphing targets on the same model? I'm just trying to figure out:

morphTargetInfluences[]. 

Thanks in advance

+8
javascript blender webgl morphing
source share
2 answers

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

Morphic targets are sets of geometry vertex points for automatic interpolation between them. You can change the appearance of the geometry in real time using different vertex positions recorded in morphTargetInfluences[0], morphTargetInfluences[1], morphTargetInfluences[nSet] . You can mix multiple geometry images (morphTargetInfluences) at the same time. The best way is the JSONLoader format, which you can export from 3DSMax, for example: frame0 as morphTargetInfluences[0] , frame1 as morphTargetInfluences[1] , ect.

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

+7
source share

I would be careful in pursuing such an approach. This seems to be based on an incomplete understanding of technology.

  • The meaning of the Morph target values ​​is not that you can animate by replacing individual vertices, but you can use an alternative shape (the same grid with the same vertices, but each can be in a new location) as the target deformation for your model. (for example: neutral face and smile)

  • The morphTargetInfluence function does not contain vertices. This is an array of scalar values ​​that represent the weight assigned to each target during morphing. In the above example, Faces [0.3] may have a timid smile like Mona Lisa, while [0.9] will be a reliable grin.

0
source share

All Articles