meadhunt-mesh-backplate

Mead & Hunt BackPlate

BackPlate Screenshot

Inspiration

BackPlate was created based on the inspiration of the Maya image plane and Martin Breidt’s imagePlane maxscript.

It also provided me a chance to create a tool that is lacking in AEC Visualization, while learning Python, USD, and Kit APIs/workflows. Tools like Enscape, Twinmotion, and Lumion don’t really have ways to easily align a real photo with your digital world and all lack a way to extend the tool. With Omniverse we have a way to extend our visualization tools, and BackPlate was born out of this.

About

This tool was created so users can place a card with a background image (BackPlate) which is linked to the camera. These cards are typically used to align Omniverse cameras and models with real images. The card will match the original aspect ratio of the selected Texture and the user can select to maximize the Height or Width of the card to align with the viewport canvas. The card will properly scale based on the distance from the camera to ensure proper alignment. All materials are created by the tool using a custom emissive-only MDL file.

Usage

After installation the dialog can be opened from Window > Mead & Hunt > BackPlate.

BackPlate UI

Cameras: Drop-down of all available perspective cameras.

Image: Path to the texture to be assigned to the BackPlate object. Folder button will open FilePickerDialog filtered to image formats supported by Omniverse.

Preview: Preview of image selected.

Distance: Controls for adjusting the distance from the Camera.

Name Root: 'BackPlate' (default) String added at the beginning of the mesh name followed by underscore and camera name, ex BackPlate_Camera.

Canvas Fill: Drop-down of canvas fit methods.

Auto Create: Toggle creating a BackPlate on the selected camera on any settings adjustment.

Double Sided: Toggle Double Sided option on the BackPlate material.

Cast Shadows: Toggle Cast Shadows on the BackPlate Mesh object.

Invisible To Secondary Rays: Toggle Invisible To Secondary Rays on the BackPlate Mesh object.

Image Preview: Toggle Preview below the image input field.

Set BackPlate: Button to manually create a New BackPlate.

Delete BackPlate: Button to manually delete the BackPlate and assigned Material attached to selected Camera.

Adding This Extension

To add this extension to your Omniverse app:

  1. Go into: Extension Manager -> Gear Icon -> Extension Search Path
  2. Add this as a search path: git://github.com/ericcraft-mh/meadhunt-mesh-backplate.git?branch=main&dir=exts

To-Do List

If app folder link doesn’t exist or broken it can be created again. For better developer experience it is recommended to create a folder link named app to the Omniverse Kit app installed from Omniverse Launcher. Convenience script to use is included.

Run:

> link_app.bat

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 create

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

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

Contributing

The source code for this repository is provided as-is, but I am accepting outside contributions.

Issues, Feature Requests, and Pull Requests are welcomed.