📅  最后修改于: 2023-12-03 15:15:32.550000             🧑  作者: Mango
Houdini Blendshape VEX is a powerful tool for creating and manipulating blendshape deformations in Houdini. It allows you to blend different versions of a mesh together to create subtle or dramatic changes in shape.
Houdini Blendshape VEX works by creating a set of blendshapes, each of which represents a specific deformation of the base mesh. These blendshapes can then be combined in various ways to create different versions of the mesh.
The basic workflow for creating blendshapes in Houdini involves:
One of the major advantages of using Houdini Blendshape VEX is its flexibility. You can create complex blendshapes that would be difficult or time-consuming to achieve using other deformation techniques.
Blendshape VEX also allows you to easily adjust the strength and influence of individual blendshapes, giving you fine control over your final mesh.
Here is an example of a simple blendshape setup using Houdini VEX:
float eyeOpen = ch("eyeOpen");
float mouthSmile = ch("mouthSmile");
vector posEyeOpen = point(1, "P", @ptnum) * (1-eyeOpen) + point(2, "P", @ptnum) * eyeOpen;
vector posMouthSmile = point(3, "P", @ptnum) * (1-mouthSmile) + point(4, "P", @ptnum) * mouthSmile;
@P = mix(@P, posEyeOpen, 0.5) + mix(@P, posMouthSmile, 0.3);
In this example, we have two blendshapes: one for opening the eyes, and another for smiling. We use the ch()
function to get the values of these blendshapes from user-defined parameters (in this case, sliders).
We then use the point()
function to retrieve the positions of the deformed meshes, which we store in vectors. We blend these vectors together using the mix()
function, which takes a third parameter (0.5
and 0.3
, respectively) to determine the strength of each blendshape.
Finally, we combine the blended vectors with the original position of the mesh to create the final, blended mesh.
Houdini Blendshape VEX is a powerful tool for creating and manipulating blendshapes in Houdini. With its flexibility and precision, it's an essential part of any 3D artist and programmer's toolkit.