Today, I tried out to implement light portals in Cycles, and it worked out really cool!
For those who don’t know about light portals (like me two days ago :evilgrin:): Essentially, they are guides placed in indoor scenes that help the renderer to “find” environment lighting. For a forward path tracer like Cycles, they are only useful for environment light, not for sunlight (that needs bidirectional transport, as in Lux).
A quick example here:
An example scene, just diffuse materials, lit by a single-color background light, 16 samples: http://www.pasteall.org/pic/83488
The same scene, just with two portals in the wall gaps: http://www.pasteall.org/pic/83487
And for reference, an equal-time comparison (no portals, same rendertime as the image with portals): http://www.pasteall.org/pic/83489
It also works well with HDRI maps, not just with a single-colored background:
Same scene, now with an environment texture: http://www.pasteall.org/pic/83496
Same scene, with Multiple Importance sampling enabled (so, essentially the best you can get with “regular” Cycles):http://www.pasteall.org/pic/83497
Same scene, now with both MIS and light portals: http://www.pasteall.org/pic/83498
Same scene, only Portals now, no MIS: http://www.pasteall.org/pic/83499
And, of course also an equal-time comparison (no portals or MIS): http://www.pasteall.org/pic/83500
You can get a build for testing here (Win64): https://dl.orangedox.com/CqmcYSd7e5XyAL2Sfr/Blender_2.73_Win64_MSVC12_AS6_TM3_P1_CUDA.zip
To add a portal, add an area lamp that covers a light entry and check “is portal” in the lamp settings. Other types of lamps won’t work. This setting also makes Cycles ignore the lamp for rendering, so the rest of the settings is actually completely useless if portal is activated. That’s only a temporary solution, I’m not so sure how to improve this.
As for the placing: You don’t need to cover every single entry, but uncovered ones will still contribute noise. Also, one bigger portal is better that tons of small ones. Too many portals can produce a significant slowdown.
So, if you’re interested, try it out! Please post feedback, bugs, problems etc. here, I need it to create a “perfect” version for review
PS: If you’re interested in technical details, the sampling uses the area-preserving code for area lamps that was introduced in 2.73, which produces significantly better quality than the regular uniform surface sampling. That’s the main reason for using area lamps ATM.