How do light portals work in Corona Renderer?


Note: This article applies only to Corona Renderer 5 and older. Starting with Corona Renderer 6, a new adaptive environment sampler is enabled by default, greatly improving image quality without the need to use portals. This means that portals are now obsolete and they are ignored by the renderer. It is not possible to create them any more, and if an older scene with portals is loaded, they will not affect image quality or rendering performance at all. 



In most cases, light portals greatly speed up the rendering. Adding them is essential when rendering interior scenes with relatively small window openings.

In Corona Renderer, light portals are not light sources. They will not change the final appearance of your scene in any way. Portals only tell Corona how to sample light more efficiently. By doing this, they help get rid of noise much faster than by just randomly sampling the whole scene.


Example


Image rendered with a portal placed in the window hole. Fixed render time - 15 minutes:

(Click to enlarge)


Exactly the same scene rendered without the portal. The same fixed render time - 15 minutes:

(Click to enlarge)


Crops:



How to use portals?


Here are the rules to follow:

  1. Each portal should be added as a plane with no thickness capping the window hole. Simply create a plane and assign CoronaPortalMtl to it.
  2. Portals should be added to all of the window holes. Not only those which are visible within the current view.
  3. Portals work most efficiently when they are perfectly capping the window holes from the outside. They may be also placed slightly outside of the window hole, but shouldn't be placed inside the window hole as this may even slow down rendering in some cases.
  4. Direction of normals does not matter for portals in Corona Renderer.



Examples


Below is a simple guide on adding portals:



1. Room without portals:

-very slow noise reduction
-not correct if the window hole is small





2. Portal perfectly capping the window hole from the outside:

-fastest noise reduction
-correct




3. Portal inside the window hole:

-slower noise reduction
-may introduce errors

-not a big mistake but may sometimes cause problems




4. Portal not aligned with the window hole:

-slower noise reduction
-may introduce errors
-not correct




5. Portal slightly outside of the window hole:

-slightly slower noise reduction
-not a mistake




6. Portal slightly outside of the window hole, bigger than the window hole:

-slightly slower noise reduction
-not a mistake




7. Portal smaller than the window hole:

-slower noise reduction
-not correct





8. Objects in the area of the window hole.

Portal capping the window hole from the outside, behind the objects, like in example 2:

-fastest noise reduction
-correct




9. Objects in the area of the window hole.

Portal inside of the window hole, in front of the objects, like in example 3:

-slower noise reduction
-not correct