/omniverse-material-manager-extended

This extension will let you quickly switch materials for your object in just a blink of an eye!

Primary LanguagePython

Material Manager Extended

welcome

About

This extension will let you quickly toggle between different materials for the static objects in your scene.

Quick links

Installation

To add a this extension to your Omniverse app:

From Community tab

  1. Go to Extension Manager (Window - Extensions) — Community tab
  2. Search for Material Manager extension and enable it

Manual

  1. Go to Extension Manager (Window - Extensions) — Gear IconExtension Search Path
  2. Add this as a search path: git://github.com/Vadim-Karpenko/omniverse-material-manager-extended?branch=main&dir=exts
  3. Search for Material Manager extension and enable it

A new window will appear alongside the Property tab:

start window

Restrictions

  • Some vegetation can cause problems, but most should work just fine.

  • Currently has no support of instanced meshes (they usually greyed out and aren't accessible).

  • Your object needs to have the following structure:

    Structure example

    Most objects already have this structure, especially from Nvidia Assets tab, but in some custom cases, you might need to change your object so it corresponds to the structure from above. Note: Looks folder can be empty, and your original textures located somewhere else, it just tells the extension that this is a separate object.

    Example:

    Structure example 2

  • It will not work with the primitives, because it does not corresponds to the structure from above.

How to use

  • Navigate to your viewport and select any static object on your scene
  • Once an object is selected and is valid (see restrictions), the window will be changed into something similar to this:

step 1

  • Click Add new variant at the bottom of the window. A new variant called Look_1 will appear in the list. You can create as many as you need, and if you need to rename your variant you can do it by renaming appropriate folder in Looks/MME/your_variant

step 2

  • You will see a viewport window on top of your model. Change material or replace it completely while your variant is active

step 3 step 4

  • Now you can toggle between those variants

step 5 step 6

  • More complex Xform's are also supported. This means that the extension will toggle all the materials for every mesh at once under this Xform.

step 7

Linking with an Omniverse app

For a better developer experience, it is recommended to create a folder link named app to the Omniverse Kit app installed from Omniverse Launcher. A convenience script to use is included.

Run:

> link_app.bat

There is also an analogous link_app.sh for Linux. If successful you should see app folder link in the root of this repo.

If multiple Omniverse apps is installed script will select recommended one. Or you can explicitly pass an app:

> link_app.bat --app code

You can also just pass a path to create link to:

> link_app.bat --path "C:/Users/bob/AppData/Local/ov/pkg/create-2022.1.3"

Contributing

Feel free to create a new issue if you run into any problems. Pull requests are welcomed.