Skip to content

lams3/GoThrough

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoThrough

An Unity plugin that enables it's users to easily add transformative portals to their scenes.

A House of Mirrors made using GoThrough

Introduction

GoThrough is an Unity Plugin developed to enable the usage of transformative portals in the Universal Render Pipeline.

The tool supports an arbitrary number of portals that can be recursivelly rendered up to a maximum recursion depth.

Installation

  1. Install Unity 2019.4LTS;
  2. Create a new project using the Universal Render Pipeline (URP);
  3. Download GoThrough's Unity Package;
  4. Import GoThrough's Unity Package into your project.

Usage

Setup the PortalManager

The first step to have GoThrough Portals working in your scene, is to place an instance of the PortalManager prefab on it. The prefab can be found at the GoThrough/Prefabs folder.

Drag the PortalManager prefab.

Setup a PortalRenderer

To properly render Portals, a camera must have an PortalRenderer component attached to it. This component is responsible for managing all the resources needed to correctly render Portals. Recursion depth and the maximum number of textures allocated can be changed through the inspector.

Add a PortalRenderer component to the Camera. PortalRenderer component added.

Setup Travellers

In order to travel through Portals, GameObjects need to be properly configured as Travellers. The Player prefab in GoThroughSamples/Common will be used as an example.

First, any graphical part (meshes) of the GameObject should be moved to a separate child object. The materials in those meshes should also use one of the shaders in the GoThrough/Shaders/Traveller folder.

The Player prefab with the graphics object selected.

Then a Traveller component must be added to the GameObject with a reference to it's graphics child previously created.

The Player prefab.

GoThrough's Traveller Component doesn't currently support rigged meshes as part of the graphics GameObject.

Setup Portals

Portals can be placed using the Portal prefab in GoThrough/Prefabs. After placing a Portal in the scene, it's destination should be referenced through the inspector. A Portal's size can be adjusted by scaling it's screen GameObject.

The Portal prefab.

Limitations

  • Only works in the Universal Render Pipeline.
  • Only tested in Unity 2019.4LTS.
  • Traveller graphics does not support rigged meshes.

License

GoThrough is freely available for free non-commercial use, and may be redistributed under these conditions. Please, see LICENSE for further details. Interested in a commercial license? Contact Voxar Labs at voxarlabs@cin.ufpe.br.

Authors