The focus of this posting is to show Unity artists how easy it can be to add true reflections and shadows to their content using our hybrid rendering techniques. The PowerVR OverDrive game runs live, rendering with a PowerVR ray tracing GPU installed in a Linux-powered computer.
Using an Xbox 360 controller, you drive around in a monster truck, smash into stuff and enjoy the pretty reflections. Oh and there are gnomes subtly and not so subtly added in! Warning: the game can be somewhat addictive. Before you get too excited, I need to mention that the technology used here is a prototype intended as a proof of concept. You cannot (yet) acquire this game in the Unity asset store.
The engineers at Imagination Technologies need in the field demonstrations like this game to test and tune the ray tracing components of the new PowerVR Wizard hardware. This latest GPU is very much a critical requirement for rendering PowerVR OverDrive in real time.
The rest of this posting will describe the steps in creating this game but first let’s define some terms. A GPU (graphic processing unit) is specialized hardware which processes and displays an image. The new GR6500 ray tracing GPU combines one of Imagination’s mobile PowerVR GPUs with additional hardware specifically built for ray tracing. Ray tracing refers to mathematically tracing the influence of light in a world made of 3D geometry.
This game uses a hybrid rendering pipeline. Hybrid rendering in this context separates the ray tracing calculations needed for reflections, refractions and shadows from the primary display of the objects. The idea behind hybrid rendering is to take advantage of the extreme performance capabilities of the standard and new components of this GPU. The standard parts are blazing fast at displaying 3D geometry while the new parts are specifically optimized for ray tracing. Because they are integrated into a single ray tracing GPU, this makes it easy to start with rasterized graphics in the usual way then add on great ray traced effects. It’s an incredibly quick and easy way to get dynamic reflections, shadows, etc into your game.
I started designing this game in Maya doing the dynamics with the built-in Bullet physics engine. The monster truck was a royalty-free 3dsMax 3D model acquired from this website. I imported the truck into Maya and made minor modifications to the original truck model to conform to Unity’s preference of double sided geometry. I then modelled the obstacle course and dynamic objects of the game set. The game environment was purposely designed to produce complex reflections which are difficult if not impossible with screen based reflection tricks. Since the PowerVR ray tracing hardware provides ample memory I could keep all my models at high detail.
Next I exported all the geometry from Maya to FBX files which Unity handily imported with all the organizational hierarchy intact. Luckily, Unity 5 comes with a very capable car demonstration game. This car game includes a midsized drivable vehicle with scripts that enabled full on physical dynamics. It also included an obstacle course of static and dynamic objects.
This meant I had everything I needed to create my game.
I replaced the car with my monster truck and the course geometry with my new obstacles. For the truck this did require some sensitive tweaking of the wheel colliders and dynamics settings. Again luckily, the internet provided lots of help from more experienced Unity artists. In a matter of hours my new game was ready for the addition of ray traced effects..
Imagination Technologies has produced a prototype hybrid rendering plugin kit for Unity. This kit runs with the Unity 5 editor and provides a clickable pulldown to build game bundles for Linux. The kit comes with a suite of surface materials especially meant for reflective surfaces. The PowerVR OverDrive game only uses one of those materials called hybridclearcoat. The attributes of this material are loosely based on those in the Unity standard material so Unity artists will feel at home with the naming conventions. Included are inputs to control surface color, highlight color, ambient intensity, bump mapping and reflection attenuation. The plugin currently only allows for one light which is this case was a directional light. There are camera scripts that engage the Unity Hybrid ray tracing pipeline that also provide controls for image post processing for tone mapping and glow effects. This post processing makes sure the final image is nicely exposed and produces an atmospheric haze that enhances the look. Finally the plugin game kit provides a direct interface to build the player game bundle for Linux. Within an hour I had the Unity project ready. I transferred the Linux game bundle to our PowerVR GR6500 system and started playing PowerVR OverDrive in all its reflective glory.
This disruptive technology is literally a game changer. It means that artists can dedicate much more of their time to content aesthetics rather than feeding the complex processes intended to trick the viewer into seeing true reflections.
The next few days were spent refining the game dynamics, surface properties and skybox environment image. Luckily several of the engineers on our team are avid gamers and offered great advice on enhancing the experience. Initially the game only worked through keyboard hot keys. After adding the hooks for an Xbox360 game controller playing was a lot more fun. Below is an image describing the button mappings.
The kit allows you to save snapshots during gameplay. I’ve included multiple screenshots in this article; in addition, you can find a live recording of the PowerVR OverDrive game on our YouTube channel.
If you are attending GDC 2016, you can learn more about the PowerVR graphics and ray tracing technologies by attending our idc16 event or visiting our booth.Follow @ImaginationTech