Portal lights are not actual light sources, but a method to optimize dome lights and speed up the render process. Dome lights encompass the entire scene and send light rays in all directions. A typical example is light that passes through a window into a room. In such a scene, most of the light rays will illuminate the outside of the room. With a portal light you can instruct Karma to consider only those rays that will actually contribute to the illumination of the room’s interior.
The analogy of portal lights with windows is very close, because portals are always rectangular, but you can define their aspect ratio. You can transform a portal like any other geometry.
-
The node provides a Transform parameter for exact numerical values.
-
Hover the mouse over the viewport and press Enter to turn on the edit mode. Now you can use handles to scale, rotate and position the gizmo. When you're ready, press ⎋ Esc to leave the edit mode.
-
On the node’s Base Properties tab you can define the portal’s aspect ratio with Width and Height.
The Portal Light LOP facilitates the creation of portal lights. It lets you scale and position the portals. On the
Dome Light LOP, you have a Portals parameter where you add a Scene Graph Tree path to one or more portal nodes. With Houdini’s default settings, a typical path is
-
/lights/portallight1
.
You can add as many portal nodes as required, but you can also assign portals to different dome lights. The portal lights can be upstream or downstream of the dome light. It’s, for example, possible to have a room with three windows and each portal is connected to a different dome light: one light is red, the other one yellow, and the third light source carries an HDR. Of course, you can also work with different intensities or shadow settings. This way you can achieve complex light patterns and illumination scenarios. If you want to add multiple portals to the Portals parameter, use a space-separated list like:
-
/lights/portallight1 /lights/portallight2 /lights/portallight3
.
The image below shows a cube with windows. One side was completely removed to get a better view of the room’s interior. The render also shows what you get without a portal. You can see that the cube’s outside walls are evenly lit.
The next screenshot illustrates how the room looks with a single dome light that’s connected to three portals - one for each window. You can see that the outside walls are now unlit, while the interior is correctly illuminated.
The next example illustrates the scenario that is described above with three dome lights. Each light source is tied to a different portal.