Use pointValues to sample per-point values as texture outputs that can connect to compatible Maya shading inputs. In the current implementation, the input array contains one value for each point of a polygon mesh. This lets a material respond to live deformation values.
Create a pointValues setup
- Select the deformed mesh.
- Choose
Deform > Dynamic Geometry Attributes....
- Choose
Tension or
Delta, depending on the value you want to sample.
- Enable Point Values.
- Choose the start and end geometry states.
- Choose the
Source Channel to sample.
- Click
Create.
Maya creates the required graph, including pointValueArray and pointValues, and makes pointValues available in the Node Editor.
Connect the sampled value
- In the Node Editor, locate the
pointValues node.
- Connect
outColor to a compatible color input, or
outAlpha to a compatible scalar input.
- Adjust the source deformation and evaluate the shader result in the viewport.
Performance: Texture Resolution controls the texture resolution used for viewport shader evaluation. The slider range is 64-2048. You can enter values up to the hard maximum of 8192. Values above 2048 may affect performance, so use the lowest resolution that produces the required viewport result.
Smoothing: For low-resolution meshes with high-detail deformation, enable
Smoothing to reduce faceting. Smoothing is disabled when the checkbox is off or when
Smoothing Iterations is 0, so it adds no smoothing cost in either state. Increasing iterations can improve the result but adds evaluation cost, especially on larger meshes
Use DGA values in an Arnold shader
Use
pointValues to connect DGA values directly to compatible Arnold shader inputs. You can also use
pointValueArray with a custom varying attribute and an
aiUserDataFloat node.
Connect pointValues directly
- Create a pointValues setup for the DGA value that you want to use.
- In the Node Editor, connect pointValues.outColor to a compatible color input or pointValues.outAlpha to a compatible scalar input on the Arnold material.
- Modify the source deformation and evaluate the Arnold shader result.
Use a custom varying attribute
- Create a
pointValueArray node.
- Expand
Output Attributes on the DGA calculation node, then connect the output values that you want to use to pointValueArray.Input Double Values.
- Connect the mesh geometry to
pointValueArray.Input Geometry.
- Create a custom double-array attribute on the display mesh using the mtoa_varying_[attr_name] naming pattern.
For example, run the following MEL command, replacing
yourMeshShape with the display mesh shape:
addAttr -ln "mtoa_varying_tension" -dt "doubleArray" yourMeshShape;
- Connect pointValueArray.Output Double Array to the custom attribute.
- Add an
aiUserDataFloat node to the Arnold material. Set Attribute to
tension to match the
[attr_name] portion of mtoa_varying_tension.