Sunday, November 11, 2007

Portal Light: Part 1

So, I've been fiddling with the new Portal Light shader in Maya2008. Heard about it in the promo materials, and wanted to see what it did. Well, it's pretty useful. Here's the run-down:

mib_portal_light functions as a tool to focus FG rays. At it's most basic level, it can improve performance and quality for the age-old architectural lighting trick of placing area lights in windows. This trick has long been a way to imitate indirect soft lighting from window sources, in an otherwise dark room. Here is an example:

The above image uses 2 area lights scaled to the windows. Each has identical settings, as seen below. I also used a single bounce in my FG options.


So that is pretty traditional. The quality shown is low, so most users would push the FG quality up far beyond default (the above render is defualt FG settings btw). They might also use some FG filtering. Quickly your render tests will become coffee breaks with such wasted rays;)

So now for the portal light. in Maya2008, this is a light shader and should be connected to an area light. Here are the connections.


As shown, connect to both the Light shader and the Photon shader. If you plan to use GI, this is critical. We'll only really need the light shader, but do it anyway, cause it's only right;)

The portal_light now becomes the root of your light control. So I fiddled with the intensity multiplier (set to 5) to imitate the general look of my earlier area lights. The result is below. I've also reposted the original image below the new one, to compare.


You can see the original image has FG issues like discernible ray splotchiness. The new portal image cleans up these issues with roughly the same render time.

Now, what is really going on? The portalLight's greater function is not really being touched on in this tutorial. It is meant to be used in conjunction with an environment input, like physical sky/sun. This will be covered in another post. But here, the portalLight is left without an environment input, so it defaults to a white area light. It acts as a FG focus. normally, FG will send out lots of rays that will only occasionally see the windows. Portal Light can more efficiently focus those rays. In this basic setup, it highly reduces the amount of FG rays you need for a quality architectural render. Thus its value is great, even without going any further. But further we will go...

4 comments:

Jeremy said...

Cool tut...I look forward to your next lightportal extra - cheers!

Jack said...

i dont get it T_T
its not working with me for some reason, every time when i apply the portal light to the area light it turn the whole render to black. as well i am getting error like
"PHEN 0.3 error: Shader 'mia_portal_light' must be applied to a VISIBLE rectangular area light to work correctly!"
"PHEN 0.3 error: Shader 'mia_portal_light': Light direction must be 0 0 z"
which I google it a bit and got rid off....however it still black.....why???

Daniel said...

This is the first clean straightforward tutorial on this subject I found. Very nice work. Also looking forward to the next...

Thank you!

Smokedogg said...

I am having a huge problem with how my lights interact in my scene by doing the following: When I connect the portal light into both custom shader slots of the area light, why when I render I keep getting this error: getting photon emission shader returned miFALSE: aborting photon tracing. But when I dont have the portal connected, no error come up? Could someone please explain. Thank you.