Houdini 20.5 Nodes Geometry nodes

Blend Shapes 2.0 geometry node

Computes a 3D metamorphosis between shapes with the same topology.

On this page
Since 17.0

Overview

This node blends between its inputs using the average weights of each input’s respective channel. It also interpolates point colors and/or texture co-ordinates between shapes.

How to

To...Do this

Example 1: Set up a basic blend shape

This procedure shows how to set up a blend shape to create the effect where a source shape morphs into the shape of a target shape.

  1. Make sure to bring into your scene the geometry you want to add the blend shapes to (source geometry) and the geometry (can be multiple) you want to use as the blend shapes (target geometry) into your scene.

    There are many ways to bring in or import geometry with SOPs. For example, you can use an Object Merge SOP node, a File SOP, a Stash SOP, an Alembic SOP, and so on.

  2. Create a Blend Shapes SOP node.

  3. Do the following:

    • Connect the geometry node you want to use as the source geometry to the first input (input 1) on the Blend Shapes SOP node.

    • Connect the geometry node(s) you want to use as the target geometry to the second input (input 2) on the Blend Shapes SOP node.

    Example: Simple blend shapes network
  4. Adjust the Blends Shape SOP node’s parameters as desired. You can now use the Blends Shape SOP's Blends sliders to adjust and animate the node’s blend shape weights.

    Example: Shape morphing from the source shape (100% red torus, blend=0) to the target shape (100% blue torus, blend=1)

Example 2: Use painted masks and mask blending with blend shapes

This procedure shows how to set up 2 blend shapes and 2 painted masks, and then use the Scale From Attribute masking and blend sliders to create the effect where the painted regions of a source shape grow/shrink into the shapes of the target shapes.

  1. Make sure to bring into your scene the geometry you want to add the blend shapes to (source geometry) and the geometry (can be multiple) you want to use as the blend shapes (target geometry) into your scene.

    There are many ways to bring in or import geometry with SOPs. For example, you can use an Object Merge SOP node, a File SOP, a Stash SOP, an Alembic SOP, and so on.

    Example: Blend shape source and target shapes
  2. Create an Attrib Paint SOP node for each target shape, and then connect the outputs of the target shape nodes to the inputs of the Attrib Paint SOP nodes.

  3. Select each Attrib Paint SOP node and then do the following:

    • In the Parameter Editor, select the Attributes tab, use the Attributes multiparm to create a new entry, and then type the name of the attribute you want to use for your blend shape mask into the Attribute Name multiparm field.

      Example: Attrib Paint SOP > Attributes multiparm
    • Switch to the Brush tab, set the parameter settings you desire, click in the viewport and press Enter to enter the Attrib Paint SOP's viewport state, and then paint the mask values you desire on the target geometry.

      Example: Painted masks for the target shapes
  4. Create a Blend Shapes SOP node.

  5. Do the following:

    • Connect the geometry node you want to use as the source geometry to the first input (input 1) on the Blend Shapes SOP node.

    • Connect the geometry node(s) you want to use as the target geometry to the second input (input 2) on the Blend Shapes SOP node.

    Example: Blend shape mask blending network
  6. In the Parameter Editor, do the following:

    • Set the Blend Masking parameter to Scale From Attribute. This will cause the areas of the source shape to increase/decrease in size based on the regions of your painted masks.

      Example: Blend Masking parameter
    • Type the name of the attribute you entered in the Attribute Name multiparm field on the Attrib Paint SOP node into the Blend Mask Attribute field, and then select From Each Input from the drop-down list next to the field.

      Example: Blend Mask Attribute parameter
    • Create a Blends multiparm for each target shape input and then use their blend mask sliders to adjust and animate the blend shape weights for each target.

      Example: Mask blend weighting sliders
      Example: Adjusting and animating blend shape mask blends
    • (Optional) If you want to control the blend mask weighting per channel with a different attribute, then do the following:

      • Select either Custom Mask From This Input or Custom Mask From First Input from the Per-Blend Mask Options next to the blend mask’s slider.

        Example: Per-Blend Mask Options button
      • Type the name of the custom attribute you want to use in the blend mask slider’s new Mask field.

        Example: Custom mask attribute

Parameters

Group

Specifies a subset of the input geometry to be blended.

Group Type

Sets the type of geometry that is in the specified Group. If this is not set to Guess from group, the all the geometry in the group must be the indicated type.

Selection Index

Specifies which input to use when generating the cooked selection.

Differencing

When on, exaggerate blends between objects where values above 1 or less than 0 will result in over-scaled shapes.

Cache Input Deltas

When on, compute and cache differences between attributes to speed up subsequent cooks if input geometry does not change (like when only blend weights are changing).

This parameter is only available when Differencing is turned on.

Treat Packed Primitives As Shapes

When on, packed primitives from the inputs are treated as if they are the input shapes. The weights used for each packed primitive are taken from a float attribute named weight in the input and multiplied with its corresponding Blend parameter value. The weight attribute is typically a primitive attribute but it can also be a vertex or point attribute for the corresponding packed primitive. If it is a global attribute on the input, then that single value is used for all of its packed primitives.

Treat Packed Primitives From First Input As Shapes

When on, the packed primitives from the first input are treated as shapes. This setting only has an effect when all the primitives from the first input are packed. Otherwise, this setting is ignored. When off, all the geometry from the first input is considered to be the first shape.

This parameter is only available when Treat Packed Primitives As Shapes is turned on.

One Blend Weight Parameter per Packed Primitive

When on, if packed primitives are being treated as inputs, then each blend weight parameter corresponds to an input packed primitive. When off, each blend weight parameter corresponds to a real input, and all of the packed primitives in that real input. In either case, if a weight attribute is present, the each value is multiplied with the corresponding blend parameter value to determine the true weight for each packed primitive.

This parameter is only available when Treat Packed Primitives As Shapes is turned on.

Attributes

Specifies the space-separated list of names/patterns for attributes to interpolate. Attributes that don’t match the listed names/patterns are switched instantly when the whole part of the input number changes rather than smoothly interpolated. The default * value instructs the nodes tos interpolate all attributes.

Point ID Attribute

Specifies the name of the point attribute (string or integer) the node will use to match up points between the different inputs. For example, using the id attribute will match particle points even if some particles are deleted. If you leave this field empty or the specified attribute does not exist, then the node will use point numbers to match up points.

Primitive ID Attribute

Specifies the name of the primitive attribute (string or integer) the node will use to match up primitives (for example, volumes) between the different inputs. For example, using the name attribute will match volumes in a fluid system even if the volumes are reordered. If you leave this field empty or the attribute doesn’t exist, then the node will use primitive numbers to match up points.

Voxel Blend

Determines how your voxel data will be blended between volumes or VDBs.

None

Do not blend volume data.

By Grid Index

The voxels are matched by absolute voxel number (not spatial position) so matching volumes should have the exact same dimensions.

By Voxel Position

The voxels are matched by their spatial position. The grid of one volume will be extended to include the other volume, which might change the resolution of the grid.

Interpolate Rotation of Normals, Quaternions, and Transforms

When on, use spherical linear interpolation for smoother transitions of attributes marked as normals, quaternions, and transforms, as well as for primitive transforms. When off, all blends are component-wise, meaning the transition can be abrupt when the input changes.

Blend Masking

Determines which masking behavior to use for blending.

None

No masking. Sets a single blend weight for the entire object from the Blends slider.

Set From Attribute

Selects blend weights for individual points from a provided attribute.

Scale From Attribute

Selects blend weights for individual points from a provided attribute and scales them by the Blends slider value.

Blend Mask Attribute

Specifies the name of the attribute that is used to dictate the local weighting of the blend. The mask will affect any attributes of the same class as the named attribute. If the mask attribute is not found on a given input or class, attributes will be blended by the input’s Blends slider value instead.

From Each Input

Reads the mask attribute from, and applies it per, each input.

From First Input

Reads the mask attribute from the first input and applies it to every input.

Update Channel Names From Inputs

Updates the Blends multiparms based on the current input nodes and their names.

Blends

Multiparms that control the percentage of the contributions of the geometry inputs (blend shape targets).

Per-Blend Mask Options

Determines the masking behavior per geometry input. Use the custom input Mask fields and attribute options to specify custom mask attributes per slider.

No Mask
Use the slider value and ignore the default mask.
Default Mask
Use the default mask set above.
Custom Mask From This Input
Set a custom masking behavior and attribute for this input.
Custom Mask From First Input
Set a custom masking behavior and attribute for this input.

Examples

BlendColors Example for Blend Shapes geometry node

This network utilizes the Blendshapes SOP to morph one geometry’s colors into another’s color.

Two input blend shapes act as inputs for the Blendshapes SOP.

The Blendshapes SOP interpolates all designated attributes, in this case “Cd” between the various inputs.

Play the animation to see the effect.

PolyBlend Example for Blend Shapes geometry node

The Blendshapes SOP is used to blend shapes and/or attributes from input geometry.

In this case, three input morph targets are used by the Blendshapes SOP with the Differencing and Blend Position options checked.

The blend values of the input morphs is keyframed for specific effects. Play the animation to see the results.

See also

Geometry nodes