GPU Interop Example: RpResource Deformer
Example node showcasing the deformation of a set of prims in a pre-render graph. The node is meant to be used together with RpResourceExampleAllocator and RpResourceExampleHydra. The deformation function translates the input points on a sinusoidal path against the z axis.
Installation
To use this node enable omni.graph.nodes in the Extension Manager.
Inputs
Name |
Type |
Descripton |
Default |
---|---|---|---|
Deform Scale (inputs:deformScale) |
|
Multiplier used to control the scale of the deformation. Incresing the value beyond 1 will increase the offset between the position at rest and the deformed position, for a given deformation. Negative values will flip the point posion agains the displacement axis. |
1.0 |
Point Counts (inputs:pointCountCollection) |
|
Point count for each prim being deformed. The size of the array is equal to the number prims being deformed. |
[] |
Position Scale (inputs:positionScale) |
|
Determines the offset applied on the deformed points in each iteration of the node compute. Larger values will result in a more pronounced deformation over multiple frames. |
1.0 |
Prim Paths (inputs:primPathCollection) |
|
The paths of the prims being deformed. |
[] |
Resource Pointer Collection (inputs:resourcePointerCollection) |
|
Pointers to the allocated RpResources. Two resources are expected per prim: one for the rest positions and one for deformed positions. |
[] |
Run Deformer (inputs:runDeformerKernel) |
|
If true, performs the deformation of the prims. Can be toggled off to stop the deformation at an arbitrary point in time. |
True |
Simulation Frame Time (inputs:simTime) |
|
The time difference since the last simulation frame. May suffer from loss of precision and cannot be used as a deterministic identifier, for example for fetching data from Fabric during the node compute. |
0.0 |
Stream (inputs:stream) |
|
The CUDA Stream used to order the CUDA commands scheduled by this graph execution. |
0 |
Time Scale (inputs:timeScale) |
|
Determines the offset applied on the deformed points in each iteration of the node compute. Larger values will result in a more pronounced deformation over multiple frames. |
0.01 |
Verbose (inputs:verbose) |
|
If true, the node will log detailed messages during the execution. Can negatively impact performance. |
False |
Outputs
Name |
Type |
Descripton |
Default |
---|---|---|---|
Point Counts (outputs:pointCountCollection) |
|
Point count for each prim being deformed. The size of the array is equal to the number prims being deformed. |
None |
Prim Paths (outputs:primPathCollection) |
|
The paths of the prims being deformed. |
None |
Resource Pointer Collection (outputs:resourcePointerCollection) |
|
Pointers to the allocated RpResources. Two resources are expected per prim: one for the rest positions and one for deformed positions. |
None |
Stream (outputs:stream) |
|
The CUDA Stream used to order the CUDA commands scheduled by this graph execution. |
None |
State
Name |
Type |
Descripton |
Default |
---|---|---|---|
Sequence Counter (state:sequenceCounter) |
|
Represents the time T of the deformation computation. Stores the number of frames since the start of the deformation if the ‘Simulation Frame Time’ attribute is 0. If the ‘Simulation Frame Time’ attribute is not 0, the value of this state attribute is equal to the simulation time. |
0 |
Metadata
Name |
Value |
---|---|
Unique ID |
omni.graph.nodes.RpResourceExampleDeformer |
Version |
1 |
Extension |
omni.graph.nodes |
Has State? |
True |
Implementation Language |
C++ |
Default Memory Type |
cpu |
Generated Code Exclusions |
None |
uiName |
GPU Interop Example: RpResource Deformer |
__tokens |
{“points”: “points”, “transform”: “transform”, “rpResource”: “rpResource”, “pointCount”: “pointCount”, “primPath”: “primPath”, “testToken”: “testToken”, “uintData”: “uintData”} |
Categories |
examples,graph:preRender |
Generated Class Name |
OgnRpResourceExampleDeformerDatabase |
Python Module |
omni.graph.nodes |