Interpolate To
Computes the value “Result” after moving “Delta Seconds” forward in time at a given “Speed” from the “Current” value in the direction of a “Target” value. The interpolation provides an eased approach to the “Target”, with options to adjust the “Speed” and “Exponent” to tweak the curve. The formula is: result = current + (target - current) * (1 - clamp(0, speed * deltaSeconds, 1))^exp. For quaternions, the node performs a spherical linear interpolation (SLERP) with alpha = (1 - clamp(0, speed * deltaSeconds, 1))^exp Vectors and arrays are interpolated component-wise, and interpolation can be applied to decimal types.
Installation
To use this node enable omni.graph.nodes in the Extension Manager.
Inputs
Name |
Type |
Descripton |
Default |
---|---|---|---|
Current (inputs:current) |
|
The initial value at which the dependent variable (i.e. the variable that’s being interpolated over) begins its current interpolation step. |
None |
Delta Seconds (inputs:deltaSeconds) |
|
The time step for the interpolation (in seconds). |
0.0 |
Exponent (inputs:exponent) |
|
The blend exponent, which is the degree of the ease curve (1 = linear, 2 = quadratic, 3 = cubic, etc). |
2.0 |
Speed (inputs:speed) |
|
The peak speed of approach (in units per second). |
1.0 |
Target (inputs:target) |
|
The target value that the dependent variable will eventually reach (given enough time). |
None |
Outputs
Name |
Type |
Descripton |
Default |
---|---|---|---|
Result (outputs:result) |
|
The value of the dependent variable being interpolated after a single time-step. |
None |
Metadata
Name |
Value |
---|---|
Unique ID |
omni.graph.nodes.InterpolateTo |
Version |
2 |
Extension |
omni.graph.nodes |
Has State? |
False |
Implementation Language |
C++ |
Default Memory Type |
cpu |
Generated Code Exclusions |
None |
uiName |
Interpolate To |
Categories |
math:operator |
Generated Class Name |
OgnInterpolateToDatabase |
Python Module |
omni.graph.nodes |