This extension for NVIDIA Omniverse allows users to create defects and apply them to prims within an Isaac Sim simulation environment. The extension also provides the means to generate annotated images with customizable domain randomization effects.
![]() |
![]() |
---|
- Copy the Target Prim Path:
- Open the extension within NVIDIA Omniverse.
- Click on the prim(s) to which you wish to apply defects, and then click
Copy
. - Click
Apply
to add the necessary primvars to the selected prim(s).
- Import the Directory Containing the Defect Folders:
- Click the
Open
button and select the directory. The folder should have the following structure:
- Click the
data_defects/
├── crack/
├── hole/
└── scratch/
- Customize and Add the Desired Defects:
- Click on the dropdown menu for one of the three defect types.
- Choose the semantic label that the defect will be assigned to in the
Defect Semantic
text box. - Customize the ranges of the width,and length (or radius) randomization for the defects by entering values in the
Min
andMax
text boxes. - Customize the ranges of rotation randomization, affecting the
X-axis
in normal mode, and theX, Y, Z axes
when theUse Advanced Rotations
checkbox is ticked. - Determine the number of instances for this specific defect configuration by entering a value in the
Count
text box. - Click on the
+
sign to add the configured defect to the list. - The defect information will be indexed by the assigned semantic label.
- Import and Export Defect Configuration:
- The added defects will appear under the corresponding prim path in the
Params
section. - Click the
Load
button next to a defect object entry to load a defect configurationJSON
file into the object entry. - Click the
Select
button next to a defect object entry to make the selected object the current target prim for defect additions. - Click the
Export
button next to a defect object entry to save the defect configuration of that object into aJSON
file. - Click the
Garbage Can
icon in the top right corner of a defect object entry to remove the object from theParams
list. - Click the
Garbage Can
button to right the of a defect entry within a defect object to remove that entry from the object's params.
- The added defects will appear under the corresponding prim path in the
- To activate a specific type of randomization tick the checkbox next to the desired randomization type, these include
Light, Camera, Color/Texture
randomizations.
-
Light Randomizations:
- Click on the
Light Randomization Parameters
drop down to show/hide the light randomization UI. - Customize the light intensity, and rotation randomization ranges by changing the
Min
andMax
text boxes next to theLight Intensity
andLight Rotation
labels. - Modify the RGB color randomization ranges by altering the
Min
andMax
rows containing a text box for theR, G, B
channels separately (Note that the ranges are normalized between [0,1]). - Alter the light scale, and position by changing the
Min
andMax
text boxes next to theLight Scale
andLight Position
labels. - Specify the number of lights present in the scene by inputting that number in the
Count
text box.
- Click on the
- Camera Randomizations:
- Click on the
Camera Randomization Parameters
drop down to show/hide the camera randomization UI. - Choose the distance range that the camera will maintain by changing the
Min
andMax
text boxes next to theCamera Distance
label (Note that this distance applies only when aScattering Prim
is not specified). - Choose a combination of scattering and look at prims by selecting prims from the scene, and pressing the
Copy
button next to theScattering Prim
andLook At Prim
labels, then finally pressing theAdd
button (Note that the scattering prim and look at prim need to be different). - Press the
Reset
button to remove the copied scattering and look at prims. - Designate a range of coordinates for the camera to look at instead of a prim by ticking the checkbox next to the
Use Manual Look At Randomization
then changing theMin
andMax
textboxes next to theX,Y,Z
labels. - Use the
Reset All
button to delete all camera randomization entries after adding at least one entry. - Each combination of scattering and look at prim is handled by the extension uniquely, the following is a breakdown of each combination:
- When a
Scattering Prim
andLook At Prim
are both chosen from the scene using theCopy
buttons, a camera will be created and randomly scattered on the surface of the scattering prim, while looking at a random point on the look-at prim. - When a
Scattering Prim
is chosen using theCopy
button but the user chooses to insert a manual look at range using theUse Manual Look At Randomization
checkbox, a camera will be created and scattered randomly on the surface of the scattering prim while looking at a random point within the range of look at specified. - When a
Scattering Prim
is chosen using theCopy
button but theLook At Prim
is left empty a camera will be created for every object containing a defect in the scene, these cameras will scatter on the surface of the scattering prim while looking at a random point on their designated look at prim. - When a
Look At Prim
is chosen using theCopy
button but theScattering Prim
is left empty a camera will be created and scattered inside the volume of a sphere centered on theLook At Prim
. The camera will then look at a random point on thatLook At Prim
. - When a look at range is specified using the
Use Manual Look At Randomization
option but theScattering Prim
is left empty a camera is created and scattered inside the volume of a sphere centered on the specified look-at range. The camera will then focus on a random point within that range. - When both the
Scattering Prim
andLook At Prim
are left empty, a camera will be created for every object containing a defect in the scene. These cameras will be scattered within the volume of spheres centered on the defect objects, while focusing on a random point on each object.
- When a
- Click on the
- Color Randomizations:
- Click on the
Color Randomization Parameters
drop down to show/hide the color randomization UI. - Apply the color randomization to the textures of the specified prims by ticking the checkbox next to the
Texture Color Randomization
. - Specify the prim for which you want to set the color randomization parameters by selecting the prim and pressing the
Copy
button next to theColor Prim
label. - While the prim is still selected, continuously add colors to the randomization pool by using the
RGB Color Picker
and pressing theAdd
button. - Press the
Reset
button to empty theColor Prim
textbox. - Press the
Reset All
button to delete all color randomization entries after adding at least one entry.
- Click on the
- Click on the
Material Randomization Parameters
drop down to show/hide the material randomization UI. - Select the prim for which you want to apply material randomizations to in the stage, and press the
Copy
button next toMaterial Prim
in the UI. - To select the materials you want to randomize, there are two options that can be used either separately or together:
- To use materials already found in the stage, check the
Select From Stage
checkbox. A new section calledMaterials from stage
will appear, where you can select the materials from the stage and press theCopy
button. - To Browse for materials in your nucleus or local directories, simply click the
Browse
button next toMaterial Folder
and select the material folder of your choice.
- To use materials already found in the stage, check the
- After selecting the material folder and material prim to apply the randomization on, click the
Add
Button. A UI with the selected Prim Paths and Material folder Paths will appear. - To remove a material folder for a specific prim, click the
Reset
button. - To remove all material folders for all prims, click the
Reset All
button. - Finally, click the
Load Materials
button to load all the selected materials in the stage, and create those that are not in the stage.
Note: Material randomization and color randomization can be applied together, meaning the color of the newly selected materials will be randomized as well. To do this, make sure you select Texture Color Randomization
in the Color Randomization Parameters, and add the colors for the prim you would like to have the randomizations on. It is important to note that randomizing the colors of these materials is done by searching through a list of common color attributes found in color_attributes.json in exts/defect.generation/defect/generation/utils/color_attributes.json, and applying the selected colors to the found attributes.
-
Import the Output Directory:
- Click the
Open
button and select the directory where you wish the captured images to be written.
- Click the
-
Choose the Writer and Annotations:
- Select the
BMW Format
checkbox if you want the output in the BMW JSON format. - Select the
Segmentation
checkbox if you want your output to include semantic segmentations. - Select the
Bounding Box
checkbox if you want your output to include 2D bounding box annotations. - The output directory will contain a
RenderProduct
folder for each camera capturing within the scene (in case of multiple cameras), as follows:
- Select the
output_directory/
├── RenderProduct_Replicator_1/
│ ├── images/
│ ├── labels/
│ └── semantic_segmentation/
├── RenderProduct_Replicator_2/
│ ├── images/
│ ├── labels/
│ └── semantic_segmentation/
├── RenderProduct_Replicator_3/
│ ├── images/
│ ├── labels/
│ └── semantic_segmentation/
└── ...
In case there is only one camera in the scene, the output directory will look as follows:
output_directory/
├── images/
├── labels/
├── semantic_segmentation/
-
Select the Replicator Frame and Subframe Count:
- Enter the number of rendered subframes in the
Render Subframe Count
textbox; to guarantee proper rendering of defects, this value should be between 50 and 100. - Enter the number of images you want to capture from the scene in the
frame(s)
textbox.
- Enter the number of rendered subframes in the
-
Build the Defect Layer and Run the Scene:
- Click the
Create Replicator Layer
button to create the replicator xform with all the configured defects. - Click the
Preview
button to test your scene and the domain randomization. - Click the
Run for
button to execute the replicator for the number of frames set, which will start capturing images and randomizing the scene and defects. - Click the
Delete Replicator Layer
button to remove theReplicator
xform, the/World/Looks
xform, and everyProjection
xform created in all defect objects.
- Click the
- Joe Khalil, BMW TechOffice, Munich, Germany
- Jason El Khoury, BMW TechOffice, Munich, Germany
- Angelo Yaghi, BMW TechOffice, Munich, Germany