Mutable#
If the pair is a dictionary with a key type
, it’s a mutable. There are three types of mutables:
Each mutable consists of attributes. Each key-value pair of a mutable is an attribute. An attribute can be a Mutable Attribute, which mutates per frame.
Available attributes of mutables are:
Name |
Type |
Description |
---|---|---|
type |
string |
The type of the mutable, |
count |
int |
The number of identically defined mutables |
tracked |
bool |
If the mutable is tracked, its 2D/3D bounding boxes will be output, and it will have a corresponding highlighted color on the segmentation mask. |
transform_operators |
list |
The transformation of the object. |
Transform operators
Specially, to define its pose in space, the mutable can define a sequenced list of transform operators. A transform operator is also a key-value pair, in which the value can be a mutable attribute.
Shader attributes
In Omniverse, a shader has many attributes describing how a mesh is shaded. For example, diffuse_texture
that points to the RGB image, and texture_rotate
that specifies how its texture should be rotated. In ORO, you can control these attribtues just like any other mutable attributes. For example, the following description randomizes the tint, and rotates and scales the texture:
mesh:
type: geometry
subtype: mesh
usd_path: omniverse://content.ov.nvidia.com/NVIDIA/Assets/ArchVis/Residential/Furniture/Desks/Desk_01.usd
transform_operators:
- rotateXYZ:
- -90
- 0
- 0
shader_attributes:
texture_rotate:
distribution_type: range
start: -180
end: 180
diffuse_tint:
distribution_type: range
start:
- 0
- 0
- 0
end:
- 2
- 2
- 2
texture_scale:
distribution_type: range
start:
- 0.2
- 0.2
end:
- 0.7
- 0.7
Specially, we can do common computer vision operations such as color mapping to a mesh that has a RGB image as diffuse texture by doing:
shader_attributes:
diffuse_texture:
distribution_type: texture
operation: color_map
Available options are: color_map
, transform
, add_noise
, apply_blur
, color_shift
, invert_color
, sobel_edges
, and random_mutation
.
Name, count and index
A mutable has a name
which is the key in the key-value pair, and potentially an index, if defined in group with a count
attribute. For example, this mutable:
mesh:
count: 2
...
During initialization stage, two mutables are initialized after the description is parsed. For example:
mesh_0:
count: 2
index: 0
name: mesh_0
...
mesh_1:
count: 2
index: 1
name: mesh_1
...
The count
is still there so that you can access how many mutables are in the group. You can use these values to define macros.