• Image
  • Image
  • Image
  • Image
  • Current Version: 1.2.3: 2022-10-28T13:25:53Z
  • First Published: 2017-09-20T23:23:23Z
  • Size: 89680
  • Supported Unity Versions: 2020.3.41
tools camera

OffAxisCamera

(7 Votes)
$4.99 $4.99

Off-axis perspective projection is often used in VR/XR applications where you need to render a perspective that matches the viewpoint of a spectator relative to a display. It can be used in conjunction with head tracking, providing the illusion of a dynamic view into a 3D scene, similar to looking through a window.


The view and projection matrices are applied using Unity's physical camera properties (2018.4 LTS and up), supporting Unity's native rendering.


Use case examples

- Panorama multi display setups.

- Cubic VR CAVE display setups.

- Building facade video projection setups.


Disclaimers

- Some post effects are incompatible with multiple edge-aligned cameras. See possible workarounds below.

- Although the off-axis perspective is applied correctly to URP and HDRP cameras, don't expect a flawless merge between edge-to-edge aligned cameras. Rendering in HDRP and URP does not seem to take into account this use case scenario, and it is likely that some features are incompatible (Sept 2020).

- The package does not include any head/eye tracking functionality, but it can easily be combined with tracking software by setting the camera position dynamically.

- The package does not include any four corner perspective correction functionality. This is needed for example in a VR CAVE setup, where you need to adjust the video projection areas to fit your physical surfaces.


Known issues with multiple edge-aligned cameras

When using multiple cameras that are aligned edge to edge, you may experience different brightness in each camera image and/or visible gradient at borders. Here are some workarounds:


Active post effects settings:

- Disable Vignetting.

- Reduce or disable Bloom and Ambient Occlusion. These effects are computed by sampling neighbouring pixels, so edges won't be perfect. Alternatively, render extra margin and crop in post after these effects.


HDRP specific active post effects settings:

- Disable Exposure or set its Mode setting to Fixed so that all camera are exposed evenly.

- Visual Environment, HDRI Sky and Fog works together, and they do not respect off-axis perspectives. If you can live with a minor brightness misalignment, then for Visual Environment set Type to Gradient Sky, and for Fog disable Anisotropy, otherwise disable all of them.


Also note:

- Shadow distance fadeouts works "as expected" which may not be what you desire for off-axis projection where different edges of the camera view can have radically different distances.


Add to cart
This site contains affiliate links, which means that we can receive a commission if you click on a link and buy something that we have recommended.
Although clicking on these links will not cost you anything, they will help us finance our development projects while recommending good products!