Skip to main content

Pragma Renderer

The Pragma renderer is significantly faster than the raytraced renderers, however there are several prerequisite steps you have to take to get the best possible rendering quality.

If you're planning on using the Cycles or LuxCoreRenderer renderers instead, these steps will not make a difference for the final render.

Reflection Probe

A reflection probe contains a cubemap image of the scene, which contains lighting information used by reflective objects. Without a reflection probe, reflective objects will look unnatural.

Fortunately setting up a reflection probe is very simple:

Placement

There should be one reflection probe in your scene, somewhere close to the camera and near the center of your scene. Make sure the probe is not within any objects or close to any walls and that most of your scene is visible from the reflection probe's position.

The easiest way to place it is to move the work camera to where you want to move the reflection probe, then right-click the probe in the actor editor and choose "Move actor to work camera".

Reflection probes are not visible in the viewport, but you can see its location by selecting it in the actor editor, and entering move mode by pressing the pragma_2022-07-16_20-26-30.png button:

probe_location.png

The rotation of the probe does not matter.

Baking

Once the reflection probe is in place, it will have to be baked. To do so, select the "reflection_probe" component in the component list, and press the "Bake reflection probe" button:

bake_refl_probe_button.png

The baking process may take a minute or more, make sure not to deselect the component while this is happening or the process will be cancelled.

Once baking is complete, a window like this should pop up:

refl_probe_window.png

If all of the static actors in your scene are visible, the baking process was successful. You can now close the window and save the project.

The reflection probe will have to be rebuild if you move any of the static actors or add any new static actors to the scene. For this reason it's best to do it right before you're about to do the final render of your scene.

 

Lightmap Baking

lightmap_comparison.png

(Left = With Lightmaps, Right = Without Lightmaps)

IfLightmaps are very important if you have any static props in your scene, baked lightmaps are very importantscene and will have a huge impact on the quality of the render. Unfortunately you will have to render the lightmaps first, which can take several hours depending on your GPU, but it's a one-time process and overall still significantly faster for animations than rendering with raytracing.

Setup

First, ensure that all of the static props (and only the static props) in your scene have a light_map_receiver component:

light_map_receiver_component.png

Depending on how the actor was created, the component may already be there and you can skip this step. If the component doesn't exist, you can add it manually. Only actors with this component will considered. Do not add this component to any actors that move around in the scene or that are otherwise visibly animated (e.g. skeletal or facial animations).

Lighting

Next up, place some point light sources in your scene. Place as many as you like, but do not animate them in any way. These lights will be baked using the Cycles renderer, you can can render a preview image of your scene in the Render window to get an idea of what it will look like. These light sources will only be used for the baking process and will only affect static actors.

Do not check the castShadows property for these light sources. Baked light sources always cast shadows and enabling the property would consume significant GPU resources for no reason.

You can also use other light types (e.g. spot-lights) for baking, but point lights are usually the easiest way to evenly light a large scene.

Once you're satisfied with the result, make sure to check the baked property of all of the light sources you've placed. You'll notice they disappear from the viewport, which is intentional.

Bake

When your scene is set up, you will also have to place a Lightmapper actor in your scene:

lightmapper_actor.png

Defining Bounds

This step is optional and is only needed if only a small portion...

Final Bake

Now all you have to do is actually bake the lightmaps. To do so, select the pfm_baked_lighting component of the Lightmapper actor and click the Bake lightmaps button. Please note that this can take a significant amount of time (i.e. several hours). Do not deselect the component, or the render process will be cancelled.

If you make any changes to the scene in the future, such as moving, deleting or adding new static actors, you will have to bake the lighting again. For this reason, this step should be reserved for when you're about to do the final render of the scene.

Map

 

Map -> Convert

Rule of thumb: The smaller the area, the higher quality the lightmaps will be. The area should encompass your scene as tightly as possible, and it should only include objects that will be visible in the render. Objects that are not in the field of view of the camera should not be included.

 

Ambient occlusion baking

<TODO>

 

Shadowed light sources

<TODO>