[FEATURE REQUEST] Area Light Portals for Ray Tracing


yesterday I’ve downloaded the new archviz interior demo as I was very curious how Epic managed to achieve fully dynamic ray traced interior scene with reasonable framerate on today’s still limited hardware. As soon as I opened the scene, it was obvious. The scene was built with lots of fakery to make that possible. The kind of fakery which makes this specific project okay looking but would severely limit artistic freedom on most of other types of projects.

The biggest part were area lights placed just inside the windows, combined with multiple windows from multiple angles. This means that A, most of the scene is light directly by area lights, and there is a very small amount of purely indirectly lit surfaces occupying camera views and B, due to this, interior illumination has nothing at all to do with the exterior one, so having for example sky atmosphere out there and changing time of day would have little to none effect on interior lighting conditions aside from the direct light angle changing.

I went ahead, disabled the area lights, fixed other (painfully obvious beginner) mistakes in the scene setup, and proceeded to try the scene with just a skylight and a direct light. While the results were still quite impressive given the state of today’s hardware, it was nowhere near good as with area lights. Especially combined with the fact that SkyLight Ray Traced shadow accuracy has been completely devastated since 4.23 (showcased here ) making it look worse than low res shadow maps.

This ultimately means that when using sky light, any fine contact shadows such as around the wall picture frames or near the feet of chairs on the floor are mostly absent. I am still perplexed about what is the point of having ray traced environment map shadows so inaccurate they are inferior to legacy shadowmaps. I would love someone from Epic to explain.

Anyway, this brings me to my main point. Efficient illumination of interior spaces using dynamically changing exterior lighting conditions is a solved problem in ray traced rendering - LIGHT PORTALS! So here I propose adding a single option to area lights simply called “Sky Light Portal”, which would be frozen/grayed out if cast ray traced shadows is disabled. This option would simply texture ray traced area light with a color of the environment sky light map in a direction opposite of the emitted area light ray.

Ultimately, this would allow scenes such as archviz interior example to perform as well as it does now, but gain much needed accuracy of being lit with the actual light of environment outside of the room, rather than random values inexperienced artist has randomly entered in the area light intensity settings. Furthermore, it would also reduce beginners mistakes such as one seen in the archviz interior example, where artist had way too low exterior exposure compared to interior illumination, so he “solved” that by boosting cinematic bloom kernel power value to like 1000 :rolleyes:


Alright, so I’ve built myself a little proof of concept FAKE portal lights :smiley: They are not like the real portals would be, since they just project texture flat from the area light surface position unlike real portal which would project the environment in the actual direction of the ray, but it still works convincingly enough! :slight_smile:

I think real, proper area lights would not be an issue in terms of performance as long as updating the captures for the portals were done carefully and not all the time, and it would allow us to have a win/win scenario: Ability to light interior scenes with area lights in windows for optimal ray tracing performance but at the same time we don’t need to give up realism by our interior lighting being unrelated to lighting conditions outside of the window.

If someone wants to play with the fake setup, here’s how to do it:
Just make sure to rotate scene capture 2D 180 degrees along its Z axis to get pinhole camera like mirroring, and and I had to make render target format 8bit otherwise it was capturing the bright sun disc and projecting it into the scene too. That being said, proper portals would handle this much better :slight_smile: