[Tutorial] Lighting and Tone Mapping In Iray

10 min read

Deviation Actions

SickleYield's avatar
Video is now live at YouTube!

I forgot to mention f-stop on the scene cameras and the exposure value chart on that one, so it may be worth looking at the bottom of this one for that even if you wait to watch the video.

Here is the infographic I used.
  Special thanks to fuseling and Lyoness1 for helping me find online resources.

This tutorial will discuss adding more realism to your lighting by balancing your light and tone mapping settings.  It is not identical to the YouTube tutorial, but it will cover the same information.

I. Render Settings, Default HDR Lighting And Tone Mapping

a. Camera And Render Settings

First let me discuss the camera and render settings, though render settings in general is where you will find nearly all of the controls relevant to this tutorial.

Always render through a "Default Camera" or add one; do not use the view cameras (Perspective, Left, Right, etc.) as you have no ability to turn off their HeadLamp.  Always turn off the HeadLamp in your Parameters settings before you begin.  If the scene goes black, hit CTRL+L to turn off the OpenGL lighting simulation and show you what's going on in the scene.

There is a button to the upper right in your Render Settings tab called "Defaults" that will reset all values.  This can be useful when experimenting.  Just remember that it will turn off your OptiX Prime Acceleration, and you will need to go to the Advanced tab and check that box to get your speed back.  This can make a huge difference to speed without hurting the render's appearance at all; I think the only reason it's optional must be because it only applies to Nvidia hardware.  Make sure your Instance Optimization is set to Speed in the Optimization tab (Speed seems to be the default now, which is good).  This is another one that generally has no downside and speeds things up, although I have not been able to track down documentation on what it specifically does.

Remember that if you want to render at a specific ratio that is not among the existing presets, you can set the height and width of your image and click "save" just to the right of that to save a preset.  Then you can quickly get back your render ratio if you've reset to defaults.  I have several of these, including the DAZ promo 1000x1300, 1300x1000, and the 2000x3000 I use for many recreational renders.  The golden ratio is already there for you if you prefer to use that and are not doing promos.

b. The Default HDR

The version of DS 4.8 Pro Public Beta that is current as of this writing comes with an on-board HDR, a simple, blurry picture of a blue sky, a sun and some mountains.  Starting with just this HDR in the Environment Map channel is a good baseline as you look at the Tone Mapping settings under the Render Tab's Editor--Tone Mapping section, but it is not a good backdrop for creating a full scene, and is not really intended for that use. 

You can get other HDRs for free online, including at Rift3D and HDRMaps.  I link those specifically because their licenses allow for commercial use.  You can find others online that require credits.  If you're using the HDR for just lighting, and not for a backdrop, the RedSpec GTX freebie on this site is also a great one which I have often used for skin testing.  I can't recommend using the old IBLs from the UberEnvironment lights - they are small and will yield blurry results in many scenes.  Put the .hdr or .exr file into your Environment Map channel in Render Settings-Editor-Environment Map, unless you need to use it as a background; some have a separate large .jpg for that use (the .hdr will be less focused but more intense for lighting).

My recommendation is that you always use at least one photometric spotlight or mesh light (an object in the scene with its Emission channel set to white and then luminance values set) in any render with visible skin that is not in the far distance.  If you experiment you will see why; it greatly enhances the appearance of specularity in particular compared to HDR alone.

c. The Default Tone Mapping And What It Means

The default tone mapping is set to ISO 100, aperture 1/128 and f-stop 8.00.  These are settings that a good camera has to control how much light reaches the lens, and how.  Let's take them one at a time.

ISO:  This controls how sensitive a camera is to light that reaches it.  The lower the ISO, the less sensitive the camera is.  DAZ Studio's default ISO of 100 is intended for bright lights.  If you were to add just one photometric spot to the default HDR, it would need to be set at 100,000 lumens or so to show up.  This is still highly recommended for the reason cited above (it looks much better on skin).

In the latest version of DS, you use Create--Spotlight.  The lights are now merged so that they will be photometric in Iray and default in 3Delight.

In a camera, very high ISO (that is, making the camera very sensitive to light, usually for night renders) produces a very grainy image.  In Iray this is not usually the case; instead you will get a very dull, desaturated render instead.  If everyone in your scene looks bleached but you feel the lights aren't that bright, your ISO may be too high.  If you want very saturated colors turn down the ISO to 50 or so and add lots of light.  I would only do that for specific stylization, not for every render.

Aperture or F-stop: In a camera, this controls how large or small is the opening through which light enters the camera.  This number is also called f-stop (the setting name in Iray's render settings).  A high f-stop means a smaller hole that lets in less light; a low f-stop means a bigger hole that lets in more light.  Just remember that smaller f-stop, darker render, turn the lights up higher to get the same brightness.  A value of 8 as in the default settings represents a moderate f-stop where 1/4 is a "small" one and 32 is a "large" one.

Shutter Speed: In a camera, this measures how long the camera's sensor is exposed to light.  It is measured in fractions of a second, which is why the value in Iray says "1/x" (the default value of "128" is actually meant to represent 1/128 of a second).  A "fast" shutter speed is something like 1/1000 and a "slow" shutter speed is something like 1/2.  On a real camera, leaving the shutter open longer results in more blur on anything that is moving (this is what is meant by "high speed" photography being used to photograph hummingbirds and so on - the camera that is used is capable of very fast shutter speed).  Iray is not photographing moving objects, so instead a faster shutter speed just lets less light in while a slower one lets in more.

II.  Applying Tone Mapping To Lighting: Sunny 16, Looney 11, and Exposure

Applying camera settings to a render engine can seem confusing at first.  In fact, it's often confusing on a camera at first, too, so there are rules and guidelines that can help.

a. Sunny 16

The Sunny 16 rule says that on a sunny day, set your f-stop to 16, and set your shutter speed to the reciprocal of your ISO (that is, one over your ISO).  In Iray, you can test this by setting f-stop to 16, leaving ISO at 100 (as if on a sunny day with a camera), and setting shutter speed to "100" (which is actually 1/100, the reciprocal of the ISO).  You will need to turn up a photometric that is 100,000 to around 1,000,000 in lumens, mainly because we've changed the f-stop in a way that would make the scene darker.  This can produce a very nice impression of outdoor lighting.

b. Looney 11

This rule is for shooting in moonlight, but can be used to suggest a night scene in Iray.  To use this, set your f-stop to 11 and use the reciprocal rule again, but set your ISO and shutter speed higher (say to 300 or 400).  This will make things in your scene dimmer and less saturated, and you may need to turn down lights to avoid whiting out the scene (say from 100,000 to 20,000 lumens), since the increased ISO will make the render engine more sensitive to the scene's lights.  This combined with blue-tinted photometrics is a good way to simulate "Hollywood night," where everything is blueish and dim but you can still see objects relatively clearly.

c. The Exposure Value

Exposure value is a number that represents the result of the f-stop number and the shutter speed inserted into a formula.

I haven't talked much about this because Iray will set it automatically when you change the other settings.  If you would like to set exposure instead, Iray will set the other two numbers for you.  There is a useful chart on Wikipedia suggesting different exposures.  In particular, scroll down to the Lighting Conditions section, where it suggests probable exposures for different times of day and places.  This can be a useful shortcut if you do not want to play with specifically ISO and shutter speed yourself.  In real-life photography a light meter is often used that gives specific values of exposure for the photographer to use, but we are creating the lighting environment rather than just responding to it.

III.  Note: F-Stop On The Scene's Camera

The camera in both 3Delight and Iray has the option of using depth of field (DOF) to center the focus on a subject in the scene.  If you turn this to "On" and look through any camera other than the one with DOF turned on, you will see planes that represent the area of focus.  It's easy to figure out DOF area using the sliders in Parameters Tab just by looking at where the planes go.  In the camera's DOF settings, the f-stop represents the size of the area of focus.  Turning it up makes the focus area larger; turning it down makes the focus area smaller and the scene around it more blurry.  This is completely independent of the f-stop in render settings and it is completely valid to set them to different values.
© 2015 - 2024 SickleYield
Join the community to add your comment. Already a deviant? Log In
Cyprine2013's avatar

i must be blind but i cannot find the OptiX Prime Acceleration option (using version 4.21).