Using Unity as Graphics Renderer
Here's a short overview of how it works:
- In a Vortex simulator, each graphics slave node must run a Unity application which can load Vortex content (i.e. Graphics Galleries, Mechanisms, Assemblies, Scenes). VortexUnityApp is the default application to do this, but you can also create your own.
- When this application loads any Vortex document in the simulator, it will also load a Unity Asset Bundle of the same name, and instantiate a Game Object matching a Vortex graphics object.
- A Vortex setup file must be adapted to allow using a Vortex-Unity application as an executable on a graphics slave node in a distributed simulator.
See Integrating Vortex Studio with Unity if you want to use Vortex Studio within a single process Unity integration, without distributed simulation.
Vortex Integration Package for Unity
A Unity package for Vortex was made which can be included in your own custom Unity project. These are its main features:
- Includes Vortex-specific components for common asset types such as cables.
- Easily package assets into asset bundles to be used during simulation.
- Test these assets directly in the Unity Editor by loading Vortex documents.
- Build a Unity application which can be used on graphics nodes of a distributed simulator.
To install this package, refer to: Installing the Vortex Studio Package in a Unity Project
A Unity project using this package is now present as example in the Vortex Studio bin directory: VortexUnityTools.
Managing Assets
To benefit from Unity graphics in a Vortex simulator, Unity assets must be made. There must be a correspondence between Vortex documents and Unity Asset Bundles, as well as between Vortex graphics extensions and Game Objects.
To get started, refer to: How to associate Vortex Objects with Unity prefabs
Preparing a Vortex Distributed Simulator with Unity Graphics
To use your assets in a distributed simulation launched via the Vortex Director, some specific changes must be made inside your Vortex setup document.
Read a step-by-step guide here: How to set up a Vortex Distributed Simulator for Unity
Debugging the simulator
The same tools for debugging can be used on a distributed simulator with Unity rendering.
The Remote Debugger can be set up to inspect the internal state of the simulation (contacts, collision geometries, etc.) See Remote Debugger User Guide.
For profiling the simulation, you can add the Profiler Page extension to you setup file. Please see The Profiler Tab and Measuring Performance Using the Content Debugger and Profiler