Dear NVIDIA,
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.
Thanks in advance for consideration!
cc @wilfried.rakow
@dennis.lynch any comment? :)
Thanks for the feedback, I’ll note it and also forward your contact to someone on our Developer Relations team
This would be very useful, to be able to load MDL files from script just like we can load other USDs into scene.
@Turowicz You might be able to use omni.replicator.core.randomizer.materials
on some dummy prims once at the start of a script. Then reference those MDLs that get generated from your script.
rep.randomizer.materials(materials=[
'omniverse://localhost/NVIDIA/Materials/vMaterials_2/Fabric/Cotton_Denim.mdl',
'omniverse://localhost/NVIDIA/Materials/vMaterials_2/Fabric/Cashmere_Wool_Suiting.mdl',
'omniverse://localhost/NVIDIA/Materials/vMaterials_2/Masonry/Sandstone_Brick_Vintage.mdl',
])
Ordinarily I would do this in python like so:
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.
In 4.0.0
:
- Opening stages has been added!
- Less warnings on replicator startup!
Any progress on directly loading MDL files without having to wrap them in USD?