Unite LA 2018 Keynote
In Los Angeles, there was a lot of interest in ECS and the Burst Compiler. Building on the Nordeus demo from Unite Austin, our Game Code and FPS Sample teams produced Megacity, a dynamic futuristic cityscape. Megacity exploits our Data-Oriented Technology Stack (DOTS), the name for all projects under the Performance by Default banner, including ECS, Native Collections, C# Job System, and the Burst Compiler.
It takes a village...
to build a Megacity. To produce this sample, we tapped teams and technology across all of Unity R&D, including the latest features like nested Prefabs and the Scriptable Render Pipelines as well as many existing ones such as Scene editing, World-building, Cinemachine, and the Post-Processing Stack. We also leaned on some in-development features, coming your way in 2019:
- Workflows for (very) large scenes
- C# audio system
- HLOD system
- ECS culling system
- Asynchronous scene streaming
- Asynchronous entity instantiation
- Improvements to ECS tooling and debugging features
Megacity on Mobile
A few developers from Nordeus took on the Megacity demo to show how DOTS and the Lightweight Render Pipeline (LWRP) can help seamlessly scale a PC project down to mobile platforms. The goal was to maintain the graphics complexity of the PC version but run it on mobile devices with a very fast frame rate.
To achieve this, they used LWRP which is coming out of preview in 2019.1. Their takeaway: “When you are working on a game that is supposed to stretch the limits of PCs, and then you decide to port it to mobile later, you usually have to rework large parts of it due to performance limitations of mobile platforms. DOTS enabled us to use the same exact code running gameplay logic and rendering on a PC and seamlessly scale it down to mobile platforms.”
Megacity Soundscape (experimental)
DSPGraph is a new Audio rendering/mixing engine built on top of Unity’s C# Job System. It’s completely extensible in C# and can be used with the Burst Compiler. In Megacity, it powers 100,000 uniquely scattered 3D/spatial sound emitters, including neon signs, air-conditioning fans, and cars, producing a rich, realistic soundscape.
Note that DSPGraph is an internal experimental API that we plan to polish and publish as a Preview package later this year. This will be the foundation of the upcoming Data-Oriented Technology Stack audio system. If you have questions or suggestions about DSPGraph please join the discussion in the official DOTS audio forum thread.
Building the Megacity
ECS designed to power massive game worlds
One of our major goals with Megacity was to show how the Entity Component System is perfect for streaming huge numbers of scene elements.
For example, Megacity contains 4.5M mesh renderers, 5000 dynamic vehicles and 200,000 unique building objects. The vehicles fly on spline-based traffic lanes, never colliding, and there are 100,000 unique audio sources, including neon signs, air-conditioning fans, and cars producing unique sounds to form a rich, realistic audioscape