Inputs two compatible fields (node data only) and blends (interpolates) between the two using a ratio value. A ratio of 0.0 outputs the first field's node data. A value of 1.0, outputs the second field's node_data. Values inbetween will produce an output containing node data linearly interpolated between each corresponding node. For example, a value of 0.3 will use 70% of the first field, and 30% from the second field.
Name | Type | Description | |
&in1 | Node_Data | First input node data | |
&in2 | Node_Data | Second input node data | |
The following lists all of the parameters found in the parameter block BlendParams, which are accessed by the module BlendNodeData and the UI Macro BlendUI.
Name | Type | Description | UI Control |
ratio | float | Ratio for interpolation between in1 and in2 | Blend Ratio |
Name | Type | Description | |
out | Node_Data | Output data containing interpolated node data | |
The blend_node_data macro may be used to linearly interpolate node data from two compatible input fields. Only node data is required for the inputs, but these must have the same number of components and nodes, and each component must have the same data type and vector length.
The output node data is of equal size and consists of the same components. Only the actual node data values themselves are changed. The linear interpolation is only performed on the values of the input node data, and does not take into account the coordinate position of the nodes. As such it used instead of the existing interpolate macros/modules in AVS/Express which perform interpolation based on coordinate space (by placing a probe mesh into an existing field).
The ratio parameter is used to determine the balance between the first and second inputs, and hence the value placed into the output node data. At 0.0, only the data from the first input is used. As the ratio value increases towards 1.0, the second input has more influence.
One possible use for blend_node_data is to augment the animate_filename IAC project, so that interpolation may be performed between successive input files in a sequence of files.
&in1
First input Node_Data which is processed by the module.
&in2
Second input Node_Data which is processed by the module, and must be compatible with the first input field (as detailed above).
ratio
The blending ratio for generating the output node data. The ratio ranges from 0.0 to 1.0, with 0.0 corresponding to 100% of input 1, and 1.0 corresponding to 100% of input 2.
out
Output of the blended (linearly interpolated) node_data.
The low-level BlendNodeData module is used in this User Macro blend_node_data.
An example application BlendNodeDataEg is provided, which inputs two sample fields, and bounces (loops) the ratio between 0.0 and 1.0, and outputs the interpolated field to the surf_plot macro. The example shows blending between the figures '1' and '2'.
iac_proj/blend/blndmacs.v contains the blend_node_data User Macro, the Blend Functional Macro, the BlendUI UI Macro, and the example application BlendNdeDataEg V definitions.
The BlendNodeDataMacs library inherits its process. As this library contains no procedural code, the process is not important. The low-level BlendNodeData module, executes under the process specified in its library, not the process defined in the high-level library.
Paul G. Lever International AVS Centre
International AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL
BlendParams, BlendUI, Blend and BlendNodeData.