How to import .mtl material file?

I’ve already imported my custom robot using urdf importer. However, I have no idea how to import my own .mtl material file into the IsaacSim.

@Hammad_M

It seems that ur10 has its physical material, but how to import my own mtl material into IsaacSim?

@newuhe, are you importing using an obj file or something else?
.mtl file import is supported for .obj files, and like you saw for ur10 they are imported automatically. It is not possible to import a .mtl file on its own.

if you have a custom material, you can add it manually through the create->material menu

link to omniverse materials documentation

I imported my custom robot using URDF importer. I guess the MTL file has to be defined in the urdf file if I want to import the robot with material?

The mtl file needs to be used by an obj mesh file included in the urdf

I’ve already included mtl file in my obj file, and the obj file is rendered correctly with material in meshlab. However, its material is dismissed after imported using URDF importer.

@Hammad_M

@newuhe if you import this urdf (files attached), do you see a red cube?

test_mtl.mtl (229 Bytes) test_mtl.obj (948 Bytes) test_mtl.urdf (299 Bytes)

@Hammad_M, I tryied to import test_mtl.urdf, while the sim throwed the problem and crashed.

[NvIsaac::Info] Stream Importing robot from '/home/flexivsu/Downloads/test_mtl.urdf'
[NvIsaac::Debug] Importing: /home/flexivsu/Downloads/test_mtl.obj
[NvIsaac::Debug] Importing from cached file: /home/flexivsu/isaac-sim/_build/target-deps/kit_sdk_release/_build/linux-x86_64/release/data/cache/@_home_flexivsu_Downloads_test_mtl_obj_DE71DD149BE574E5.ch
[NvIsaac::Debug] Skipping non-physical link 'cube'
Model test_mtl loaded!
2020-12-18 02:57:50 [55,425ms] [Warning] [omni.usd] Warning: in AppendProperty at line 844 of /buildAgent/work/da639afa0455b478/USD/pxr/usd/lib/sdf/path.cpp -- Can only append a property 'defaultPrim' to a prim path (/)

Fatal Python error: Segmentation fault

Current thread 0x00007f828e79f740 (most recent call first):
  File "/home/flexivsu/isaac-sim/_build/linux-x86_64/release/exts/omni.isaac.urdf/omni/isaac/urdf/scripts/extension.py", line 60 in _select_picked_folder_callback
./isaac-sim.sh: line 4: 20093 Segmentation fault      (core dumped) "$SCRIPT_DIR/../../target-deps/kit_sdk_release/_build/linux-x86_64/release/omniverse-kit" --config-path "$SCRIPT_DIR//experiences/isaac-sim.json" $@

However, it doesn’t crash when importing my own robot urdf.

I think your isaac sim version is old, can you confirm you are on the latest? Isaac Sim 2020.2.2