You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes some issues that came up while writing the tests:
* counter gets a default value
* interpolate float has been replaced by remap
* loop tooltip updated
* ray_mesh_intersection should be in the Sense category
Also updated the documentation a bit.
Copy file name to clipboardExpand all lines: documentation/RemixLogic.md
+18-12Lines changed: 18 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,17 @@ By connecting Components in different ways, you can create sophisticated behavio
12
12
13
13
**Important:** Components must be connected in a way that has a clear starting point and doesn't create loops - each Component can only use information from Components that come before it in the chain.
14
14
15
+
# Creating Graphs
16
+
17
+
This page is primarily intended for people who wish to create their own custom components in c++. If this is your first introduction to Remix Logic, you should probably see the [Remix Toolkit documentation](https://docs.omniverse.nvidia.com/kit/docs/rtx_remix/latest/docs/howto/learning-logic.html) for a high level overview and graph creation tutorials.
18
+
15
19
# Component List
16
20
17
21
Documentation for each component is available here: [Component List](components/index.md)
18
22
19
23
# Types of Components
20
24
21
-
There are three major categories of components:
25
+
There are four major categories of components:
22
26
23
27
## Sense Components
24
28
@@ -53,29 +57,28 @@ These components alter the renderable state.
53
57
* Swap which replacements are applied to a given mesh hash
54
58
* Alter the time multiplier (pausing or slowing all animations)
55
59
56
-
#Creating Graphs
60
+
## Const Components
57
61
58
-
Graph creation should be done in the Remix Toolkit. The graph editor there is still in development.
62
+
These components simply output a single constant value of a given type. This can be useful for sharing a value between multiple components, but primarily exist as a way to set properties with a flexible type.
59
63
60
64
# Component Data Types
61
65
62
66
The component system supports the following data types as defined in `rtx_graph_types.h`:
63
67
64
68
| Type | C++ Type | Description | Example Values |
|`Bool`|`uint8_t`| True or False boolean values (stored as uint8_t for variant compatibility) |`true`, `false`|
67
-
|`Float`|`float`| A number, including decimal places. Single precision floating point |`1.0f`, `-3.14f`|
70
+
|`Bool`|`uint32_t`| True or False boolean values (stored as uint8_t for variant compatibility) |`true`, `false`|
71
+
|`Float`|`float`| A number, including decimal places. Single precision floating point |`1.0`, `-3.14`|
68
72
|`Float2`|`Vector2`| 2D vector of floats |`Vector2(1.0f, 2.0f)`|
69
73
|`Float3`|`Vector3`| 3D vector of floats |`Vector3(1.0f, 2.0f, 3.0f)`|
70
-
|`Color3`|`Vector3`| RGB color (3D vector) |`Vector3(1.0f, 0.5f, 0.0f)`|
71
-
|`Color4`|`Vector4`| RGBA color (4D vector) |`Vector4(1.0f, 0.5f, 0.0f, 1.0f)`|
72
-
|`Uint32`|`uint32_t`| A positive whole number |`42`, `1000`|
74
+
|`Float4`|`Vector4`| 3D vector of floats |`Vector4(1.0f, 2.0f, 3.0f)`|
75
+
|`Enum`|`uint32_t`| A selection from a limited list of options |`InterpolationType::Linear`, `LoopingType::Loop`|
73
76
|`String`|`std::string`| Some text |`"hello"`, `"world"`|
74
77
|`AssetPath`|`std::string`| Path to an asset file |`"textures/myfile.dds"`|
75
-
|`Hash`|`uint64_t`| 64-bit hash value |`0x123456789ABCDEF0ULL`|
76
-
|`Prim`|`uint32_t`|USD prim identifier |`101`, `102`|
77
-
|`Number`|`std::variant<float, int32_t, uint32_t, uint64_t>`| Flexible numeric type (resolved at load time) |`1.0f`, `42`|
78
-
|`NumberOrVector`|`std::variant<float, Vector2, Vector3, Vector4, int32_t, uint32_t, uint64_t>`| Flexible numeric or vector type (resolved at load time) |`1.0f`, `Vector2(1.0f, 2.0f)`|
78
+
|`Hash`|`uint64_t`| 64-bit hash value |`0x123456789ABCDEF0`|
79
+
|`Prim`|`PrimTarget`|Identifies another object - a mesh, light, material, particle effect, graph, etc. |`</RootNode/meshes/mesh_123456789ABCDEF0/mesh>`|
80
+
|`NumberOrVector`|`std::variant<float, Vector2, Vector3, Vector4>`| Flexible numeric or vector type (resolved at load time) |`1.0f`, `Vector2(1.0f, 2.0f)`|
81
+
|`Any`|`std::variant<...>`| Flexible type that supports all non-flexible types |`1.0f`, `true`, `"textures/myfile.dds"`|
79
82
80
83
Components with flexible types may not accept all combinations of those types - i.e. you cannot check if a Float is greater than a Vector3.
81
84
@@ -134,6 +137,9 @@ Available options include:
134
137
*`property.optional` - Whether the component functions without this property being set
135
138
*`property.oldUsdNames` - For backwards compatibility when renaming properties
136
139
*`property.enumValues` - For displaying as an enum in the UI
140
+
*`property.isSettableOutput` - Used for `const` components, use this on an Input property to create an output property which can be set in the toolkit's property panel.
141
+
*`property.treatAsColor` - If set on a Float3 or Float4, this indicates to the toolkit that a color picking widget should be displayed for this property.
142
+
*`property.allowedPrimTypes` - Allows for filtering of `Prim` properties, if the target must be of a specific type (i.e. `PrimType::UsdGeomMesh` or `PrimType::OmniGraph`)
Copy file name to clipboardExpand all lines: documentation/components/Counter.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Counter
2
2
3
-
Counts up by a value every frame when a condition is true\.<br/><br/>Increments a counter by a specified value every frame that the input bool is true\. Useful for tracking how many frames a condition has been active\.
3
+
Counts up by a value every frame when a condition is true\.<br/><br/>Increments a counter by a specified value every frame that the input bool is true\.Use \`Starting Value\` to set the initial counter value\.Useful for tracking how many frames a condition has been active\.
4
4
5
5
## Component Information
6
6
@@ -15,6 +15,7 @@ Counts up by a value every frame when a condition is true\.<br/><br/>Increments
Copy file name to clipboardExpand all lines: documentation/components/Loop.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ The value with looping applied\.
61
61
62
62
### Is Reversing
63
63
64
-
True if the value is in the reverse phase of ping pong looping\. If passing \`loopedValue\` to an\`interpolateFloat\` component, hook this up to \`shouldReverse\` from that component\.
64
+
True if the value is in the reverse phase of ping pong looping\. If passing \`loopedValue\` to a\`Remap\` component, hook this up to \`shouldReverse\` from that component\.
Copy file name to clipboardExpand all lines: documentation/components/Remap.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Remap
2
2
3
-
Smoothly maps a value from one range to another range with customizable easing curves\.<br/><br/>Remaps a value from an input range to an output range with optional easing\. Values will be normalized \(mapped from input range to 0\-1\), eased \(changed from linear to some curve\), then mapped \(0\-1 value to output range\)\.<br/><br/>Note: Input values outside of input range are valid, and easing can lead to the output value being outside of the output range even when input is inside the input range\.<br/><br/>Inverted ranges \(max < min\) are supported, but the results are undefined and may change without warning\.
3
+
Smoothly maps a value from one range to another range with customizable easing curves\.<br/><br/>Remaps a value from an input range to an output range with optional easing\. Values will be normalized \(mapped from input range to 0\-1\), eased \(changed from linear to some curve\), then mapped \(0\-1 value to output range\)\.<br/><br/>Note: Input values outside of input range are valid, and easing can lead to the output value being outside of the output range even when input is inside the input range\.<br/><br/>Inverted ranges \(max < min\) are supported\.
Copy file name to clipboardExpand all lines: documentation/components/index.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,6 @@ This documentation provides detailed information about all available components
36
36
|[Equal To](EqualTo.md)| Returns true if A is equal to B, false otherwise\.<br/><br/>For floating point values, this performs exact eq\.\.\.| 1 |
37
37
|[Floor](Floor.md)| Rounds a value down to the previous integer\.<br/><br/>Returns the largest integer less than or equal to the \.\.\.| 1 |
38
38
|[Greater Than](GreaterThan.md)| Returns true if A is greater than B, false otherwise\.| 1 |
39
-
|[Interpolate Float](InterpolateFloat.md)| Smoothly maps a value from one range to another range with customizable easing curves\.<br/><br/>Interpolates\.\.\.| 1 |
40
39
|[Invert](Invert.md)| Outputs 1 minus the input value\.<br/><br/>Calculates 1 \- input\. Useful for inverting normalized values \(e\.g\.\.\.\.| 1 |
41
40
|[Less Than](LessThan.md)| Returns true if A is less than B, false otherwise\.| 1 |
42
41
|[Loop](Loop.md)| Wraps a number back into a range when it goes outside the boundaries\.<br/><br/>Applies looping behavior to a\.\.\.| 1 |
@@ -45,7 +44,6 @@ This documentation provides detailed information about all available components
45
44
|[Multiply](Multiply.md)| Multiplies two values together\.<br/><br/>Vector \* Number will multiply all components of the vector by the n\.\.\.| 1 |
46
45
|[Normalize](Normalize.md)| Normalizes a vector to have length 1\.<br/><br/>Divides the vector by its length to produce a unit vector \(le\.\.\.| 1 |
47
46
|[Previous Frame Value](PreviousFrameValue.md)| Outputs the value from the previous frame\.<br/><br/>Stores the input value and outputs it on the next frame\.\.\.\.| 1 |
48
-
|[Ray Mesh Intersection](RayMeshIntersection.md)| Tests if a ray intersects with a mesh\.<br/><br/>Performs a ray\-mesh intersection test\. Currently supports bo\.\.\.| 1 |
49
47
|[Remap](Remap.md)| Smoothly maps a value from one range to another range with customizable easing curves\.<br/><br/>Remaps a val\.\.\.| 1 |
50
48
|[Round](Round.md)| Rounds a value to the nearest integer\.<br/><br/>Rounds to the nearest whole number\. For example: 1\.4 becomes\.\.\.| 1 |
51
49
|[Select](Select.md)| Selects between two values based on a boolean condition\.<br/><br/>If the condition is true, outputs Input A\.\.\.\.| 1 |
@@ -66,6 +64,7 @@ This documentation provides detailed information about all available components
66
64
|[Light Hash Checker](LightHashChecker.md)| Detects if a specific light is currently active in the scene\.<br/><br/>Checks if a specific light hash is pr\.\.\.| 1 |
67
65
|[Mesh Hash Checker](MeshHashChecker.md)| Detects if a specific mesh is currently being drawn in the scene\.<br/><br/>Checks if a specific mesh hash wa\.\.\.| 1 |
68
66
|[Mesh Proximity](MeshProximity.md)| Measures how far a point is from a mesh's bounding box\. This can be used to determine if the camera \.\.\.| 1 |
67
+
|[Ray Mesh Intersection](RayMeshIntersection.md)| Tests if a ray intersects with a mesh\.<br/><br/>Performs a ray\-mesh intersection test\. Currently supports bo\.\.\.| 1 |
69
68
|[Read Bone Transform](ReadBoneTransform.md)| Reads the transform \(position, rotation, scale\) of a bone from a skinned mesh\.<br/><br/>Extracts the transfo\.\.\.| 1 |
70
69
|[Read Transform](ReadTransform.md)| Reads the transform \(position, rotation, scale\) of a mesh or light in world space\.<br/><br/>Extracts the tra\.\.\.| 1 |
71
70
|[Rtx Option Layer Sensor](RtxOptionLayerSensor.md)| Reads the state of a configuration layer\.<br/><br/>Outputs whether a given RtxOptionLayer is enabled, along \.\.\.| 1 |
@@ -102,8 +101,8 @@ This documentation provides detailed information about all available components
Copy file name to clipboardExpand all lines: src/dxvk/rtx_render/graph/components/counter.h
+40-20Lines changed: 40 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -29,38 +29,58 @@ namespace components {
29
29
30
30
#defineLIST_INPUTS(X) \
31
31
X(RtComponentPropertyType::Bool, false, increment, "Increment", "When true, the counter increments by the increment value each frame.") \
32
-
X(RtComponentPropertyType::Float, 1.0f, incrementValue, "Increment Value", "The value to add to the counter each frame when increment is true.", property.optional = true)
32
+
X(RtComponentPropertyType::Float, 1.0f, incrementValue, "Increment Value", "The value to add to the counter each frame when increment is true.", property.optional = true) \
33
+
X(RtComponentPropertyType::Float, 0.0f, defaultValue, "Starting Value", "The initial value of the counter when the component is created.")
33
34
34
35
#defineLIST_STATES(X) \
35
36
X(RtComponentPropertyType::Float, 0.0f, count, "", "The current counter value.")
36
37
37
38
#defineLIST_OUTPUTS(X) \
38
39
X(RtComponentPropertyType::Float, 0.0f, value, "Value", "The current counter value.")
39
40
40
-
REMIX_COMPONENT( \
41
-
/* the Component name */ Counter, \
42
-
/* the UI name */"Counter", \
43
-
/* the UI categories */"Transform", \
44
-
/* the doc string */"Counts up by a value every frame when a condition is true.\n\n" \
45
-
"Increments a counter by a specified value every frame that the input bool is true. " \
46
-
"Useful for tracking how many frames a condition has been active.", \
47
-
/* the version number */1, \
48
-
LIST_INPUTS, LIST_STATES, LIST_OUTPUTS);
41
+
42
+
// Manually declaring the class to allow for custom initialize method
0 commit comments