How to share Omniverse Project?

Currently, the texture maps for materials in the Omniverse project are linked from my computer. Can you please guide me on how I can export the project or compile it into a single file to share with other people? Currently, I am using Omniverse Create and View.

Hello,

I believe there is an option called “File<Save Flattened As”

This packages referenced assets as you described.

See here: Save all the imported stuff into one single "package"?

Thanks a lot for sharing the info. But I am still not able to resolve my issue. The texture maps in OmniPBR materials are still being linked from my computer. I read the link you shared and tried doing the same, but it doesn’t work for the texture maps for me.

HI @user126100! @LMTraina99 is correct. Save as Flattened should save the current USD file while merging all components to one mesh. I’m not sure why your texture maps / OmniPBR materials aren’t exporting.

I have informed the dev team about this issue and I will report back when I have more information.

hello @user126100 -
From the content pane, right lick on the asset (usd) and select “collect asset”, make sure you check the box for flattened. When it finishes, you will have a folder created that you can download and move to another PC. All refs/materials should be collected such that no back refs to your orig PC.

collect1
collect2

1 Like

Thanks a lot for sharing the information. I did as you suggested. It created a new folder in which all assets were collected. But I faced two issues, 1) Some of my textures map filenames were the same, so they were not collected in the folder. 2) In the USD file in Omniverse Create, the paths of the texture maps are still from my PC.

1


hello @user126100 - looking into your new issues now

hello @user126100
Since you have the same “name” for several texture maps, this will be a problem for the collection mode i gave you. Do the same collection method, but do no check the “flat connection” checkbox. This will allow you to have the same named files.

once this is done, please open the usd main asset in the collected folder.

Hello,

I am trying to export a usd file with all its embedded/reference materials from nucleus to local storage by code. I need first to to use the collect assets feature first. I would like to know how can I call this function from my python script.

Thank you

Anthony

Hello @toninsemaan! I am having trouble finding this in our documentation so I decided to look at the extension itself. If you go to Window > Extensions and type in “Project Collector”, you should see the omni.kit.tool.collect extension

If it helps, I was able to view the python scripts that make up this tool by clicking on the Folder icon and opening Omni > Kit > Tool > Collect.

I’ve asked @mati-nvidia to take a look and add any additional information that might help!

Hello @WendyGram,
Yep I checked it but it seems too complex to refactor it and have this functionality work as a standalone script without integrating it with the GUI. I was checking if there is any option to do that by code with simple reference to the extension itself.

thank you!
Anthony

Hi @toninsemaan. Here’s an example:

import asyncio
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.

    Args:
        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)
    
def finished():
    print("Finished!")

asyncio.ensure_future(collect_async(r"C:\Users\mcodesal\Downloads\bookcases.usd", r"C:\Users\mcodesal\Downloads\test_collect", False, False, False, None, finished))

I’ll be reviewing this live this Friday if you want to join in and ask follow-up questions live: Live Q&A About Developing for NVIDIA Omniverse - YouTube

Hello, yep sure.
I will be joining the session.

Thank you for your help!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.