We have recently picked up Omniverse Replicator here at Surveily and have some initial thoughts on using it. We have chosen the new YAML workflow in attempt of having non-engineers be able to manipulate our templates to create new scenarios.
It would be helpful if the following features were added to the workflow:
Input YAML validation. Currently if someone misspells a property name or function name we will learn about that mistake later in the process of generation. Having a YAML schema that is validated upfront would be very helpful.
Allow for opening stage. Currently the only option is to load from usd but that is not the equivalent. We get different paths and settings.
Allow for loading MDL files to the World. Currently the only option is to add them to the usd file and load it.
Better error information. Currently when something goes wrong there are just some random python errors and noone is the wiser. Especially when using randomizer.material with a list of materials.
Fix your warnings. Currently running a simple YAML against the ISAAC container produces many warnings.
mat_list = ['omniverse://localhost/NVIDIA/Materials/vMaterials_2/Masonry/Facade_Brick_Grey.mdl','omniverse://localhost/NVIDIA/Materials/vMaterials_2/Masonry/Facade_Brick_Red_Clinker.mdl', 'omniverse://localhost/NVIDIA/Materials/vMaterials_2/Masonry/Sandstone_Brick_Vintage.mdl']
# The paths in the scene where the materials are generated on setup
scene_mat_paths = []
# Small one-time setup function to get the mls name from the mat_list
def find_mat_name(full_string, first, last):
first_index = full_string.rfind(first) + 1
last_index = full_string.rfind(last)
return full_string[first_index: last_index]
# Create materials in the scene, one per mdl entry in the mat_list
for mat in mat_list:
mat_name = find_mat_name(mat, '/', '.mdl')
mat_path = "/World/Looks/" + mat_name
success, matpath = omni.kit.commands.execute('CreateMdlMaterialPrimCommand', mtl_url=mat, mtl_name=mat_name, mtl_path=mat_path)
if success:
print(mat_path)
scene_mat_paths.append(mat_path)
We have a ticket for this, and its come up as something needed for others as well. So its being tracked.
@pcallender I tried the randomizer.material approach originally with pointing to URLs of *.mdl files but they wouldn’t get loaded. It would be nice if that worked as simply as what you say.
Currently the only solution was to have a dummy USD file with those materials linked and then load it into the scene.