Skip to content
Aleksandr Krotov edited this page May 4, 2022 · 2 revisions

Plugin that allows you to create fantastic viewport projection

This documentation is corresponds only latest plugin version (usually last 3 UE versions have it because marketplace don't allow updates for older versions). To see what is happening in older versions check changelog

Getting started

Installation

Plugin is served via UE Marketplace: ArchViz Camera (Fantastic Perspective)
To install it you need to buy it and press button in Epic Games Launcher->Unreal Engine->Library->Vault->ArchViz Camera (Fantastic Perspective)->Install to Engine

Project setup

To make plugin work game you need to change Local Player Class in Project Settings to FantasticPerspectiveLocalPlayer
This is the same as modifying Config/DefaultEngine.ini:

[/Script/Engine.Engine]
LocalPlayerClassName=/Script/FantasticPerspectivePlugin.FantasticPerspectiveLocalPlayer

Restart Engine to apply this setting

Basic example

  1. Create any level and place some cubes there (or use your own level)
  2. Add actor Fantastic Perspective Manager to level
  3. Add Fantastic Perspective Manager Component to it. Since UE5 plugin selects active component from world-wide manager
  4. Change some setting in component details. For example set Fantastic Perspective->Settings->Frustum->Lens Shift->X to 0.5
  5. Press Play button and see that image looks different than before

Basic plugin usage

Ways to apply settings

To apply settings you should place actor Fantastic Perspective Manager in the world to affect all cameras or add component Fantastic Perspective Manager to the actor to apply to specific actor. The rules are:

  1. If image is being rendered for Player Controller:
    1. Apply settings from active Fantastic Perspective Manager Component in active view target (for example, possessed pawn with a camera or any camera that is being rendered on screen) if any
    2. Otherwise apply settings from enabled Fantastic Perspective Manager component in Player Controller if any
  2. Otherwise apply settings from Fantastic Perspective Manager actor if any
    • It applies settings from active Fantastic Perspective Manager Component in world-wide actor since UE5

Modifying settings via code

In the simple case any settings can be modified using Blueprints or C++ code. For Blueprints there are useful nodes like Set members in ... to modify settings. For specific rendering logic or dynamics effects there is another feature (introduced in plugin version 2.0 that is available for UE4.22 and above)

Scene capture 2d

Since Scene Capture 2D is rendering scene on its own it is not possible to specify settings without creating custom Scene Capture 2D (what I don't want to do) the only way is to apply view matrix by hands. So the algorithm is:

  1. Somehow get MinimalViewInfo (it can be made from camera using node Get Camera View or you can Make MinimalViewInfo it)
  2. Get view origin vector from it or use your own. To get it from MinimalViewInfo: Get Origin (Matrix)(MinimalViewInfo.View Matrix * Screen to World Conversion Matrix) (convert matrix because rendering have different coordinate system than game logic)
  3. Apply any effects using methods Apply * (you can use multiple in a row) and pass inputs:
    • Get Origin (Matrix) to View Origin
    • View Matrix to View Rotation Matrix
    • Projection Matrix to Projection Matrix
  4. Use Apply to Scene Capture 2D on outputs but notice that it will change component rotation and location so don't use them as input for this algorithm

Cinematic

When using cinematic make sure that plugin affects camera that being rendered (according to rules from basic plugin usage)

Sequencer

Since plugin version 2.4 (available on UE4.23 and above) settings are marked as interpolable and can be passed directly to Sequencer. Unfortunately settings are too deep in hierarchy so it is not possible to add them using the button Add Track. To add an option open sequence and find desired option in Details tab on level screen and click the button next to the option name.

Movie Render Queue

Movie Render Queue is supported since it was introduced in UE4.25 but it was not completely designed in its first revision and UE4.25 requires an additional plugin (see usage in its readme). Since UE4.26 Movie Render Queue uses view extensions and plugin works with it natively.

NVIDIA Ansel support

NVIDIA Ansel is supported when using Frustum settings mode (when frustum is modified). It is not supported in Points mode because there is no access to direct Ansel state (what part we are capturing right now) so it is not possible to create frustum from scratch (what Points mode does) and apply unknown coefficients

Changelog

UE5

Fantastic Perspective Manager actor now applies one of it's Fantastic Perspective Manager Component (active one by default) instead of applying settings from it's own settings