Unity Integration Demo Projects
The Unity integration Demo Projects show the possibilities of combining Unity and Vortex. See Integrating Vortex Studio with Unity for more information about Unity integration packages.
The Unity projects that are the sources for these demo are located in the C:\CM Labs\Vortex Studio Content <version>\Demo Scenes\UnityProjects
How to use the Unity demo projects
Before opening the Unity Hub, make sure Vortex Studio is installed, along with the Vortex Studio Demo Scene.
Open the Unity Hub and click ADD on the Projects tab.
Â
There is a sample Unity project in the Vortex Demo Scene package. Navigate to C:\CM Labs\Vortex Studio Content 2022.X\Demo Scenes\UnityProjects and add a project to Unity Hub. You can then open the project by clicking it in the list.
Â
Â
Important Note
The Unity demo projects need one of the Vortex Studio Unity Integration packages supplied with the Vortex Studio installation.
By defaults, the demo projects expect the packages to be found at C:\CM Labs\Vortex Studio <version>. In case Vortex Studio is installed elsewhere (e.g. on another drive), it is possible to make a symbolic link pointing to the expected installation folder.
It is also possible to change the path of the Vortex package with Unity Package Manager (see https://cm-labs.atlassian.net/wiki/spaces/e2fc25eb639843a7aea9229d2c48d89c/pages/1012856544/Installing+the+Vortex+Studio+Package+in+a+Unity+Project#Method-%232-Use-the-Package-Manager).
UnityIntegrationDemoProject
This Unity project uses com.cmlabs.vortex.integation.unity. The full integration of Unity with Vortex Studio offers the advantage of the standalone integration - full Unity workflow, two-way communication between Vortex and Unity (through VHL interfaces), etc. - in addition to the advantage of the integration for distributed simulation - distributed simulation, cable system, earthworks, etc. The integration can be added to any HDRP Unity project by installing the package com.cm-labs.vortex.integration.unity.
For more information, see Integrating Vortex Studio with full Unity workflow - com.cm-labs.vortex.integration.unity.
Â
Previous integration packages
We also continue to support our older integration package.
IntegrationDemoProject
This Unity project uses com.cmlabs.vortex.integration.
For more information about this integration, based on using Asset Bundles, see Integrating Unity as Graphics Renderer in a Vortex distributed simulator - com.cmlabs.vortex.integration. Asset Bundles for the Excavator demo can be generated from this project.
StandaloneDemoProject
This Unity project uses com.cmlabs.vortex.integration.standalone.
The standalone integration gives all the control to Unity, but requires extensive scripting for communication between Vortex and Unity. More details at Integrating Vortex Studio in a standalone Unity project - com.cmlabs.vortex.integration.standalone
Using the Vortex Launcher
The Unity Integration Demo Projects can also be used to create executables that can be started by the Vortex Launcher. See https://cm-labs.atlassian.net/wiki/spaces/e2fc25eb639843a7aea9229d2c48d89c/pages/1012832467/Vortex+Studio+Demo+Scene+package#Use-Vortex-Launcher.
Unity Integration Demo
This demo contains three separate exercises, the Mobile Crane Demo, the Unity Terrain Demo, and the Excavator Demo. These exercises/scenes are all made in the UnityIntegrationDemoProject project, using the com.cm-labs.vortex.integration.unity package.
Mobile Crane Demo
This exercise showcases how content created for Vortex Studio can easily be used to create a simulation using Unity. It uses the assets that were created for https://cm-labs.atlassian.net/wiki/spaces/e2fc25eb639843a7aea9229d2c48d89c/pages/1012832467/Vortex+Studio+Demo+Scene+package#Mobile-Crane.
Unity Terrain Demo
This exercise exemplifies the seamless integration of Vortex within a Unity Scene. The terrain, along with various physical objects, is seamlessly transferred from Unity to Vortex.
The demonstration comprises distinct areas:
a parkour section featuring obstacles navigable by an off-road vehicle
roads with diverse materials
a cityscape complete with streets, sidewalks, buildings
a construction site
extensive interconnected roadways.
Both the terrain and static elements like roads, barriers, sidewalks, posts, and obstacles are exclusively crafted within Unity using standard workflows and practices.
During simulation playback, Unity colliders are transmitted to the Vortex simulation, enabling interaction with Vortex Mechanisms. Additionally, Unity physics objects like cones can engage with Vortex dynamics components.
The scene houses multiple Vortex mechanisms ready for operation, including an M-ATV off-road military vehicle, a mobile crane, and a truck with a trailer.
Highlights
The scene showcases a vast terrain in Unity, complete with a parkour area, a cityscape, and extensive roads.
During simulation in Vortex, the terrain and static colliders from Unity seamlessly transition into the simulation environment.
Integration of the Unity scene with Vortex was effortlessly achieved by incorporating Vortex mechanisms. Within the scene, you will find an M-ATV, a mobile crane, and a truck with a trailer.
The terrain comprises multiple layers including grass, wet asphalt, asphalt, ice, mud, gravel, snow, and sand. Each layer corresponds to a specific physics material in Vortex, dictating unique contact properties that influence how Vortex vehicles interact within the Unity setting.
Colliders in Unity, paired with physics materials, are accurately mirrored in Vortex objects with proper materials.
The truck and trailer are equipped with various tire models, leading to distinct driving experiences on different surfaces like roads, grass, or ice.
The truck has the capability to be detached and attached to the trailer.
Additionally, the scene incorporates cones created as unity rigid bodies, allowing them to interact seamlessly with Vortex mechanisms.
Running the Simulation
The simulation can be experienced either in the Unity editor or through the Vortex Launcher.
By default, users assume the role of a truck driver. However, it is feasible to switch roles to operate other mechanisms by accessing the role seat page in the Vortex window while simulating in the Unity editor or by pressing Ctrl+D when logged in as an administrator using the launcher. Refer to https://cm-labs.atlassian.net/wiki/spaces/e2fc25eb639843a7aea9229d2c48d89c/pages/1012847551/Simulator+Setup+User+Guide#Seats-and-Roles and The Roles and Seats Tab for more details about roles.
All vehicles are operable using a gamepad such as the Logitech Rumble Gamepad F510.
Control Presets for the Truck use new device mapping scripts to operate aspects of the truck with a variety of different controls without having to customize the mechanism. See, https://cm-labs.atlassian.net/wiki/spaces/e2fc25eb639843a7aea9229d2c48d89c/pages/1012848030/Control+Mapping#Control-Presetsand https://cm-labs.atlassian.net/wiki/spaces/e2fc25eb639843a7aea9229d2c48d89c/pages/1012848030/Control+Mapping#Device-Mapping-Script-(Technical-preview) for more information.
Keyboard
Gamepad
Within the Unity editor, users have the option to utilize the configuration file "C:\CM Labs\Vortex Studio XXXX.X\resources\config\VortexIntegration_DynamicsDebug.vxc". This file will introduce an additional 3D window displaying the data streamed from Unity to Vortex.
More information can be found here Debugging the simulation content
Â
Â
Â
Excavator Demo
This exercise demonstrates that Asset Bundles created for the previous integration are still supported, see https://cm-labs.atlassian.net/wiki/x/24BpHw. The Asset Bundles for this exercise were generated from https://cm-labs.atlassian.net/wiki/spaces/e2fc25eb639843a7aea9229d2c48d89c/pages/edit-v2/1012832699#Unity-Asset-Bundle-Integration-Demo.
Asset Bundle Excavator Demo
This demo was created with the legacy Asset Bundle only Unity integration, see https://cm-labs.atlassian.net/wiki/x/bQEjAQ for details. New projects should instead use https://cm-labs.atlassian.net/wiki/x/AQA6Cw.
The Unity project for this demo is the IntegrationDemoProject and it uses the uses the legacy com.cmlabs.vortex.integration package.
Unity Standalone Demo
This demo was created with the legacy standalone Unity integration, see Integrating Vortex Studio in a standalone Unity project - com.cmlabs.vortex.integration.standalone for details. New projects should instead use https://cm-labs.atlassian.net/wiki/x/AQA6Cw.
The Unity project for this demo is the StandaloneDemoProject and it uses the uses the legacy com.cmlabs.vortex.integration.standalone package.
Â