Parallel Universe — A Unity3D Tech Demo

胡琦
Hu Chi

--

TL;DR — This is an article about one of my 2017 Unity project. Here you will know see the story, the concept trailer, VFX demonstration and the codes behind it, photo mode, and some screenshots. The walkthrough video of the gameplay demo is at the end of the article.

✍︎ Outline of this article:

✍︎ Introduction / Concept Trailer
✍︎ Building the Scene
✍︎ Fracturing the Scene
✍︎ Photo Mode
✍︎ Full walkthrough / Work in Progress
✍︎ Assets Used

The world around you is actually nothing more than an elaborate fabrication of some unknown superior intelligence. — Stephen Hawking

INTRODUCTION / CONCEPT TRAILER

In the near future, a war occurred. The government is secretly operating researches of parallel universe to summon so-called “shadow” armies from other dimensions. The experiments goes wrong, and all researchers in the lab in charge are sucked into an unknown dimension. Only their “traces of lights” and shadows remain.

The story is to challenge between realism and science fiction. The idea of manipulating light using Particle System is from “Everybody’s Gone to the Rapture,” where the residents of a village suddenly disappeared after an incident, and their memories are visualized with floating lights. Since the time to work on this project is limited, representing humans with lights seems to be a simple way to implement, hence the concept of this idea of parallel universe.

Concept trailer
Title screen

BUILDING THE SCENE

Messing around with the editor layout for building the scene.

The concept of the gate has evolved from a checker-styled tiling background to a more solemn design of huge light strips. The gate itself is a portal to other dimensions, and currently the white lines represent some sort of power cables to power up the portal.

A screenshot of the runtime footage

FRACTURING THE SCENE

Another effect I always want to try is the fracture-like constructing and deconstructing objects, like the effect seen in the Assassin’s Creed franchise when the game loads from a checkpoint. This also matches this project’s theme of constructing and deconstructing a simulated world.

However, there seems to be no tutorials of how this effect can be done, I have consider using an image shader that takes the depth buffer as input but I know very little about coding shaders so it is currently not an option. My final solution is to directly modify the mesh in realtime. After a day of research (There are many great lessons on how mesh geometry, I started from Unity’s own manual.) I came up with the following concept:

The concept of the explosive mesh effects
The inspector of the script
More into the codes: All vertices are stored in an array, and by changing three parameters (displace distance, chunk size and displacement vertices) we can simulate the effect of fragmenting objects, which is unfortunately a very inefficient and expensive method.
Demonstration (GIFs): Left - Chunk Size = 3, Vertices = 3; Right - Chunk Size = 3, Vertices = 1

PHOTO MODE

For this project, I also implemented an in-game photo mode that allows players to pause the game and play with the free camera, adjusting all kinds of PostProcessing Stack parameters including chromatic aberration, field of view, depth of field and focal length. This photo mode is tested on both keyboard and PS4’s DualShock 4 joysticks.

Realtime demo of the photo mode
Some images taken using the photo mode (click to enlarge)

FULL WALKTHROUGH / WORK IN PROGRESS

This visual effect is very hard to implement and to make it look really good, it requires camera movement and dynamic mesh displacement (I never know the exact term to describe this effect), so currently the things I have worked on are static objects, lighting, post processing and cinematic.

Below is the full demo walkthrough of the game, feel free to tell me your thoughts! :)

Full demo walkthrough

ASSETS USED

All assets in this project are free.

This article is modified from an original version posted on Unity Connect as a part of Unity’s Neon Challenge.

Unity version: 2017.2

--

--