View Full Version : HDRI lighting and rendering woes

06 June 2010, 01:27 AM

I'm currently a student and this year i've taken on the role of creating the visual effects for a short film which will involve compositing 3D elements into real footage. Unfortunately my university specializes in mainly modelling and animation so I've been teaching myself 3D camera tracking and mental ray over the past 6 months.

Many of the resources i've been using are quite old and some are conflicting with each other. Basically I'll be using the production shaders and from I gather the best way to do lighting/reflections is through image based lighting with an HDRI image? As it's nearing shooting date I have some questions and clarifications:

-For my HDRI, I take around 5 exposures of a mirror ball and merge them into an hdr using photoshop CS4 and crop to the sides of the ball before saving as a 32bit radiance file. Correct?

-When I create an IBL lighting setup (through the render settings) I should immediately place an exposure simple node onto the camera? When adding any shaders to meshes I need to place a gamma correct (0.455) node onto the color of the shader/texture under diffuse? I also set degammer to 2.2 for the mip_cameramap node (using mip cameramap and matteshadow).

Is this correct as far as keeping a linear workflow or am I doing something wrong?

-When I add a light into the scene for casting shadows after setting up my hdri lighting, the hdri lighting all of a sudden appears a lot darker and underexposed and I struggle to bring the brightness back up again (I normally tick 'enable final gather color effects' and adjust the color gain for IBL node to try to make it brighter). Emit light is not ticked as it slows render time tenfold. Why does bringing in a light suddenly make my hdri lighting so dark and underexposed?

-Finally here is one particular example (maya 2011), reason I'm asking these questions is that I've done a lot of these experiments with unsatisfying results. This is using a still image that I have matched and want to replicate the milk jug (image plane is overexposed due to exposure shader I realise). I am using an .hdr image for the lighting that is made up of 7 photos and when I add in a spot light for shadows, the hdri lighting as usual falls apart. Also the reflections don't look nearly the same as the real jug (using mia material x set to chrome preset).

Here is what the lighting should look like:

If you guys could tell me where I'm going wrong or what I need to be doing instead it would be much appreciated. I'm starting to get very bogged down and frustrated with the learning curve and technicalities of mental ray!


06 June 2010, 08:05 PM
I dont normally use the production shaders because I prefer to doing my compositing in post rather than trying to make it all happen right in the render view. But if I had to venture a guess, Id say its your spotlight thats the source of the problem. Im not sure it would be the appropriate light type, given the apparent lighting in the plate. Try using an area light with a quadratic decay and add some samples to keep the noise out of the shadows. Adjust the intesity so your white ball more matches the example pic you have.

06 June 2010, 09:00 PM
Take a look at Master Zap's blog at There you'll find a lot of information on using the production shaders. For information on linear workflow search the forum, it's been a well discussed matter. The reason your ibl seems weaker when you add a light is that you are using a mia simple exposure lens shader. It's more lika an "auto" setting. If you want to set camera settings manually you can use mia photographic exposure shader instead.

06 June 2010, 07:45 AM
Thanks for the replies. I understand the concept of linear workflow but just wasn't sure about what to do exactly in maya. I found some good info on these forums and it seems I was on the right track, except I was gamma correcting (.455) for ALL my shaders instead of just the ones with 8bit textures.

Changing the light source to quadratic decay makes a significant difference. My reflections I was able to make look better by tuning the shader attributes, my only problem is my reflections (from the hdri) are very flat. Is there a way to increase the contrast of the hdri reflections so my blacks are darker (at the moment they are light grey)?


CGTalk Moderation
06 June 2010, 07:45 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.