HI,I have a question about usd that bothers me, I hope someone can help me solve it.
I am making an indoor scene. I made some materials myself and “Export to MDL” to the local disk “D:\OM\Materials_Pbr\XXXXX”, added it to the indoor scene stage, and applied it to a certain Mesh. It’s good.
When I “Collect asset” the scene, when I open it again using the same computer, the objects to which these materials are applied turn red and are lost. I want to know how to solve this problem. It doesn’t seem to be collected.When I look at his path, it automatically changes to “./D:/OM/Materials_Pbr/XXXXX”, (the third picture below) which looks completely wrong.
@fsb0147 i am just another user, but i would encourage you to look into the USD Paths utility and how you can repath your assets. if it’s not already installed in Issac Sim, you should be able to find it in the Extension Manager.
i suspect you are on the right track by noticing the added
./ in the front of your paths. normally when you see
../, that usually indicates that the asset(s) is using relative paths instead of absolute paths. thus, it has broken your shaders, which is shown in standard red.
The collection method I use is Home.usd, right-click “Collect Asset”, and in the options, I have tried them all, and selected “Group By MDL”, “Group By USD”, and “Flat” in Flat Collectio
Home.usd was imported from Unreal. Some of its materials are incompatible, resulting in red color. Then I did some work and made some very basic PBR materials with Unreal, exported them to my disk “D:\OM\Materials_Pbr\XXXXX”, and used them in Home.usd, and it worked very well. But when I “Collect Asset”, it doesn’t work, the materials are lost. I tried many methods, but nothing works. I don’t know what the problem is. It now shows red and white materials. You can see my screenshot. I guess the white one means that the texture cannot be found. The red one means that the MDL cannot be found. But I don’t know how to solve this problem. In addition, USD Paths is turned on and used by default.
I hope you can help me solve my doubts, thank you very much!
alright, am here. have you tried using the USD Paths extension based on the tutorial i linked earlier in this thread?
@Simplychenable Since I see it’s turned on by default, I’m sure it is. When it is open, I use two methods to collect. The first is to right-click the mouse, Home.usd, “Collect Asset”, and the other method is to use python. But the result is the same, still lost. So I don’t know if there is any other way to do the collection.Is there a third way to collect?
from omni.kit.tool.collect.collector import Collector
async def collect_async(input_usd, output_dir, usd_only, flat_collection, mtl_only, prog_cb, finish_cb):
"""Collect input_usd related assets to output_dir.
input_usd (str): The usd stage to be collected.
output_dir (str): The target dir to collect the usd stage to.
usd_only (bool): Collects usd files only or not. It will ignore all asset types.
flat_collection (bool): Collects stage without keeping the original dir structure.
mtl_only (bool): Collects material and textures only or not. It will ignore all other asset types.
prog_cb: Progress callback function
finish_cb: Finish callback function
collector = Collector(input_usd, output_dir, usd_only, flat_collection, mtl_only)
await collector.collect(prog_cb, finish_cb)
asyncio.ensure_future(collect_async(r"omniverse://localhost/Projects/Home57.usd", r"C:/Users/Administrator/Desktop/Collected_Home57", False, False, False, None, finished))
we aren’t going to be using the collector just yet; i just wanted to see if we can fix the file first before we collect. if the paths weren’t set up correctly, collecting project will not automatically fix the paths.
you do have the “USD Paths” extension activated, yes, but you will want to use it. and that’s what i was inquiring about - whether you’ve watched the video in the documentation page because it walks you through how to fix multiple assets at once after using asset collection.
I made some attempts based on the video. I found some problems, and I think they are much more complicated than I thought.
First, I did some tests based on the video and some problems occurred. If the material path is under “omniverse://localhost” or in “stage”, “Collect Asset” can work. If the texture cannot be found, it can also be found according to the video. For example, if the material of this floor is in “omniverse://localhost”, there will be no problems with it. If the material of the TV cabinet is in “D:\OM\Materials_Pbr\XXXXX”, you will encounter the problem of not working.
The problem is that if the material exists in the PC path, for example my MDL is in the path “D:\OM\Materials_Pbr\XXXXX”, it doesn’t work. It will prompt an error and the corresponding material in the scene will turn red. Even if I specify the texture path, it doesn’t work. Compile Error.
In addition, I copied my MDL file to another computer, and the path was exactly the same as the source path. Manually adding materials also failed. The error message is the same as above. Compile Error. I have uploaded the screenshot. How do I share my MDL with other colleagues?
Now I think it’s not a problem with the textures, but a problem with the PC’s MDL file not working after “Collect Asset”. I don’t know how to solve it.
I tried “export to MDL” for the wood material, go to the Omniverse://localhose path, and then use wood.mdl, but it still failed. I think there is a compilation error, not a path problem. If you export the MDL and then use it, it will not work. I can’t think of any other way to solve it. I think it’s a bug.
do you have the MDL in question that you can upload/share so i can evaluate on my end (along with the texture)?
looking at the texture in the property from your first image, you see there’s a
./ in front of it? that means it’s relative path to the USD file. and in your initial screenshot, it’s displayed as
./D:/, which is an incorrect syntax
this is something you’ll want to evaluate and fix using USD Paths in bulk. you should either see
D:/but not combination together.
Thank you very much for helping me solve the problem. I uploaded my MDL file “Materials_Pbr”. Its original path is “D:\OM\Materials_Pbr”. It can work in my computer, but I will copy it directly to you. I don’t think it will work, I tested it, but it works as research.
As you said, “you should either see ./, …/ or D:/but not combination together.” I think it is correct, it cannot be combined, it can only be used one way.
If I make MDL in “localhose”, “CollectAsset” can be used. However, the MDL used in combination cannot be used in "D:\OM". The object using its material is red and an error is reported. .
If I use “CollectAsset” and “Flat Collection”, the MDL in “localhose” cannot be used and is red. But it can be used in "D:\OM".
So I think, can’t they be used in combination?
But this will encounter a problem, how do I share the MDL I made with another computer? Directly copying the MDL to another computer probably won’t work.
These "D:\OM" are exported from Unreal, then placed on stage, and finally right-click “Export to MDL”
Materials_Pbr.rar (22.0 MB)
are the wood MDL samples from the zip the direct export from UE or were they imported into OV then exported from Issac Sim as MDLs? also, can you let me know which version of Issac Sim you are using?
@Simplychenable wood.Mdl is exported from UE into OV, and then exported as MDL from IsaacSim.
The version of IsaacSim is 2022.2.1
If I export directly from UE without any modification, the MDL is not exported. If you share it with other people or use it on other computers, the material can be used. For example, the floor material in the screenshot. The problem with this is that I can’t make any edits.
Hi @fsb0147 - Are you seeing the same issue with latest USD Composer version as well?
I am very happy to finally receive your reply. The latest version I have in Omniverse Launcher is 2022.2.1, and I can’t see any other version updates. Isn’t this the latest version? I want to know, how can I get the latest version?
Hi @fsb0147 - Yes, that is the latest version of published Isaac Sim version, but my question was for USD Composer. Can you try to install the latest version of it and test the above issue? let me know if you see the same issue with that as well.