View Full Version : Outdoor Lighting in MR and Maya
01 January 2013, 11:34 PM
I'm sorry to drag this up again but I've turned over every stone and can't seem to find any light (Ha). It seems that what I need doesn't (easily) exist within Maya and MR but I thought I'd throw out one last line before I give up. I've spent all day trying to work out the best technique for lighting an outdoor environment in Maya and mental ray to absolutely no avail.
I'm pretty comfortable using Maya's physical S&S system but for my final univeristy project I'm hoping to push it on a bit. I would happily switch to Max and/or vRay but due to time and finacial constraints I'm stuck with Maya and MR.
Onto the crux of the matter. I came across this beautiful and excellent "making of" by Ludvik Koutney entitled "The making of Esherick's house" (which uses MR) a few days ago and ever since then I've been trying to take his techniques from Max into Maya but as I'm not a Max user the process is lost in translation.
So far I have tried various techniques but each has it's issues that may be down to my inexperience. You see, I need to create a minute(ish) long fly through of my environment but how do I light this in Maya? I have tried IBL which creates the lighting variation that seems perfect, but has no distinct sun direction and no hard(ish) edged shadows. I am also unaware of how to incorporate IBL into a Linear Workflow.
The physical sun and sky option creates these shadows perfectly and I know how to use this in LWF, but it's light is rather uninteresting. The sky on both these options is also either too boring, blurry or too clear, so to remedy this I considered a Skydome but that appears very basic and primitive.
I know it's possible in Maya and MR, Allesandro Prodan's Mies van der Rohe Farnsworth House is tentiment to this.
I'm not sure whether Ludvik Koutney (Esherick's house) uses a "skydome" or something similar in his workflow as it is unclear in his walkthrough but one thing that strikes me as rather important is Max's "Skylight". What exactly is this? Can it be recreated in Maya? I'm most interested in the "Sunset Lighting Scenario" of Ludvik's Making Of (in part 3).
Jeff Patton uses just a HDR image with a skylight in his tutorial using iRay to create beautiful results but again his process is unclear. I've sent emails and etc. to various CG artists and have had very little response although I wasn't expecting any at all, I know how busy you all are.
Lighting is my last hurdle in 3D and one I'm dying to jump over.
Thank you x1,000,000 in advance, you may save my sanity.
Jeff Pattons iRay blog
Ludvik Koutney's Eserick's House
Alessandro Prodan's Mies van der Rohe Farnsworth House
01 January 2013, 01:02 AM
For exterior lighting just use the Native IBL.
What version of Maya are you using?
This is NOT the same as the Maya 'emit light" function. It's easier to tune and much faster. It also generates correct shadows from the HDR itself.
You can then greatly reduce FG accuracy and quality for exterior scenes, in some cases just 8 rays and get clean detailed and flicker free lighting.
The Native IBL is coincidentally an iray technology.
01 January 2013, 01:11 AM
I highly recommend this tutorial if you want to learn IBL in Maya/MR
01 January 2013, 01:13 AM
Thank you for the reply Bitter.
Is Native IBL the option that can be switched on in the same way Physical Sun and Sky is activated? I would prefer to use this but could this also be used as an acceptable background image or would a sky image or sphere also have to be incorporated and if so would its appearance be subject to the mia_photographic node? Usually I'd try this out but I'm away from home at the moment.
01 January 2013, 01:18 AM
Thank you Panupat. Is this tutorial is applicable to exterior renders? I'm usually a constant member of DT but my subscription literally just expired. Before I re-subscribe would Alex Alvarez's Outdoor Rendering tutorial on the gnomon workshop be a good option? I've enjoyed Alex's tutorials before.
01 January 2013, 01:18 AM
Basics for the Native IBL:
It is a set of string options you can add to Maya through the miDefaultOptions node. The IBL will 'bake' whatever is attached as an environment on your camera. This includes the Maya IBL texture.
Create and add an HDRI to the Maya IBL. Check the appropriate render flags for visibility. DO NOT check 'emit light'
We've added it to the Maya 2013 UI here: Updated UI Version (http://elementalray.wordpress.com/2013/01/16/updated-ui-version/)
The things you need to understand are:
Quality: Scalar slider for quality/grain control. Many scenes with sufficient texturing/complexity can get away with as little as 0.3. Increasing this value decreases grain at the cost of speed, more shadow rays are traced.
Scale: Multiplier for the light. Used to control tint/shade and brightness (value) The visible environment is not changed, only the light contribution. Environments are typically assumed to be comped later.
Shadow: Optimization, solid shadows are faster but treats all objects as opaque. Off is no shadows cast.
Cache: on/off, this creates an acceleration structure for faster lookup on complex lighting. This means the lighting lookup is done through a non-texture mechanism. Reflections may show artifacts at insufficient baking resolution (described below) but should light faster. Off = baked to texture with the usual implications/mechanisms for texture lookups.
Resolution: The lower the resolution, the faster the baking, less memory usage, and quicker rendering at the cost of details in reflection and lighting. (Works with iray as well)
Shader Samples: When baking the IBL, this will take more samples before baking to avoid missing details or little hotspots. Useful with complex HDRI or small resolution settings (Works with iray) This isn't typically important with low contrast or low detail maps/procedurals. A ramp for example, will not benefit from more samples. Use this if you find that you are missing some small light sources or shadow details suffer.
01 January 2013, 01:22 AM
I do not know if the Digital Tutors uses Native IBL. My guess is no, it's not exposed.
Below is a sphere lit with Native IBL and an HDRI, there is NO final gather in this image or other lighting.
Notice the automatic multiple shadows and occlusion-like effect of the light. This has been around since mental ray 3.7 (4 years or more) and it works great. Combine this with Unified Sampling (http://elementalray.wordpress.com/category/unified-sampling/) and you can render quickly and with good quality.
01 January 2013, 01:26 AM
Wow this seems excellent! I won't be home until Thursday but now I wish I was home now! So this technique is usable in animation?
01 January 2013, 01:30 AM
Yes, and insufficient quality is seen as grain in the image. You can increase the quality parameter of the light or Unified Sampling to solve it. But a little grain in motion is fine.
If you use Final Gather where the majority of light comes from the Native IBL, remember to reduce the accuracy rays. You are no longer lighting with FG and instead the direct lighting of the native IBL.
FG is now only responsible for object to object interaction (secondary diffuse bounces) which makes it more stable and easier to deal with.
You still need high quality FG for concave surfaces not lit by the IBL (like the interior of an open building not lit by Native IBL, or car interiors, or even regular interiors where you should still use the portal lights.)
For exteriors, VFX set integration, cars, etc, this works very quickly and automatically.
01 January 2013, 01:59 AM
Thank you bitter. I wish I had posted this before I wasted a good few days. Is Unified Sampling a new option in Maya? I am using Maya 2013 x64.
01 January 2013, 02:11 AM
Example file found here (http://db.tt/vBaoxGSI) with Native IBL and Unified Sampling, add your own HDRI to the Maya IBL and hit 'render'
File: native IBL Maya 2012 file (http://db.tt/vBaoxGSI)
Unified Sampling should supersede all other forms of image sampling in mental ray, the previous link to the UI will unlock a superior UI for rendering inside Maya 2013. Sidenote: Maya 2013 has the user_ibl_env shader (http://elementalray.wordpress.com/2012/05/07/the-user_ibl-shaders-pt1/) but we tend to prefer the Native IBL since it generates less noise usually.
Some nice test IBLs here: hdrlabs (http://www.hdrlabs.com/sibl/archive.html)
01 January 2013, 10:20 AM
This is very kind of you Bitter, Thank you. I'll let you know how I get on as soon as I return home.
01 January 2013, 05:32 PM
We've updated the rendering UI to include the Native IBL
Updated UI here. (http://elementalray.wordpress.com/2013/01/16/updated-ui-version/)
01 January 2013, 01:43 PM
Back home now. So to implement this in my workflow I would just download the zip file from your most recent reply (mr-rendersettings v0.3, Maya 2013) un zip the files and move it's contents into the scripts folder in Maya?
Although I'm getting beautiful lighting as before I can't seem to recreate the harsh sunlit shadows using IBL.
Is this just down to my choice of HDR?
01 January 2013, 05:45 PM
Correct. The range of your HDRI will affect the quality of the shadows.
If your light source(s) are not in a high range the shadows will be softer.
A happy medium is good because too high a range will be difficult to resolve on reflections. So we typically clamp them and process in Nuke to a desired limit. And occasionally we augment with an area light. But this typically resolves environment lighting instantly and we fill the rest in with some light settings on Final Gather.
01 January 2013, 06:44 PM
I moved the scripts into the script folder but I was given a strange error. Also the UI of my normal render setting window was completely blank. I assume I have done it wrong. Is this something simple to fix I take it?
01 January 2013, 07:35 PM
The UI doesn't currently work with 2013.5 (Subscription Advantage Pack or SAP) because Autodesk removed some .res files.
It works in 2013, SP1, and SP2 (SAP includes SP2 I think but has some changes)
You can still access the controls in the file by going to the miDefaultOptions and looking under the String Options rollout.
You can select the miDefaultOptions by using the Select By Name bar in the menu and typing: miD*
You can make that a button if you want.
01 January 2013, 11:27 PM
Hmmm, I was using the scene with IBL and I was getting these grainy shadows, so I switched to my sun and sky for texturing and I appear to be getting some strange spotted results on my black shaders. Just simple a simple black (gamma corrected) mia_material_x.
My physical sun and sky settings are RGB set to 0.318 with mia_photographic as it's exposure. I then gamma correct each texture (even the base colours) to 0.454. All my render settings are the base. I started working from the scene that I downloaded from your kind self, could this be the problem?
01 January 2013, 11:49 PM
Grainy shadows are a result of insufficient Quality either in the environment lighting setting or Unified Sampling.
High contrast and/or complex HDRIs may need more Quality to sample enough and reduce variance.
That scene was set to 0.3, I would increase slowly in steps like 0.35 0.4, 0.45, or maybe a binary search, 0.6 then 0.4, then 0.5 if 0.4 is too little, setting it at the halfway mark each time till it's a good setting. Not too high (slow) but acceptable noise.
I'm not a fan of Sun & Sky honestly. It's good for some basic things but I don't use it for production for lots of reasons. The Native/Builtin IBL will bake the Sun & Sky environment though.
01 January 2013, 08:47 AM
You can find a tutorial on the Native/Builtin IBL as it's exposed in our UI here:
Native/Builtin IBL (http://elementalray.wordpress.com/2013/01/18/the-native-builtin-ibl/)
The UI can be found here (http://elementalray.wordpress.com/2013/01/16/updated-ui-version/).
01 January 2013, 10:52 AM
Thank you, I'll check that out ASAP. I've decided to switch back to 2012 as I couldn't work out how to get rid of those crushed blacks. I thought it was the exposure_photographic node but even in a fresh scene it was still happening. No idea as to why.
The graininess doesn't seem to be the shadows, it seems almost as if my render cannot show black without making the texture grainy. The rest of my colours seem fine, it is just my black textures. Very strange.
01 January 2013, 10:52 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.