[Tutorial] Lighting and Tone Mapping In Iray
|10 min read
SickleYield's avatar
By SickleYield   |   
201 52 25K (1 Today)
Published:
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.
Comments52
anonymous's avatar
Join the community to add your comment. Already a deviant? Log In
Tagan3D's avatar

i read your tutorial and saw the video, but i think daz3d did many things wrong. doing tests, I set the day 1 June 2020 at 21.30 (9.30 PM) latitude and longitude of Rome.

now, with an Reflex, the correct freehand settings, without artificial lighting, would be ISO 3200 / F2.0 / shot 1/30 more or less.

if you put these settings in DAZ, a white image comes.

Also for a portrait, if you set ISO 100 and f1.4 which has a very narrow depth of field, you do not have visibility of the DOF, but you have to act on the DOF of the camera and F22, does not correspond to an F1.4 of an 85mm lens .

In the final, I realized that it is better to do by eye !!!! :cries:

I have tried in every way to understand what relationships existed between the camera of Daz Studio and a Reflex, but still I have not succeeded

however, nice tutorial

SickleYield's avatar
SickleYieldProfessional Digital Artist

Nope. It makes zero sense as an actual camera. I don't like that either, but it's what we've got to work with. XD

Daventaki's avatar
DaventakiHobbyist Digital Artist

SickleYield Thank you so much! Seems like anytime I go looking for information I can find a tutorial by you!! Very informative!!

SickleYield's avatar
SickleYieldProfessional Digital Artist

:)

MyVivaciousVixens's avatar
MyVivaciousVixensHobbyist Digital Artist
Love your tutorials. They help us amateurs a lot.

A few questions:

1) You mention adding a spotlight to the scene. Does the spotlight have to be pointing at your subject or just be in the scene? I have one preset from DM's InspireArt2 that I have used that had a spotlight pointing off away from the scene and originally thought that it was unused ... but now I am wondering if it is there for the purpose you mentioned. (FYI - I have a few Renders from this setup as Fog Shoot on my Deviant Art page. Would love some feedback if you have the time)

2) I have been reading about "Nominal Luminance" which is somewhat new I think. I set it at 100 based on a forum post to help with Firefly issues and found that my rendering time was cut significantly. I also read elsewhere that you should turn off Tone Mapping when using it. When I did that the Render time jumped way up. Do you know what is appropriate?

3) This tutorial seemed to cover exterior scenes where an HDR would impact the lighting. I am working on stuff right now that is completely inside with no windows. So, I changed it to Scene only. Do you have any tutorials that cover indoor settings as far as Tone Mapping and Lighting?
SickleYield's avatar
SickleYieldProfessional Digital Artist
1) It depends on what you want to use it for, just like if you were posing lights for a photo shoot in real life.  I'm not familiar with that specific DM product, but if it's a spotlight facing away and it's for Iray it's probably being used as a fill or bounce light (to increase the overall light in the scene, not to light a specific area or object).  If you want it to light a person or object, it needs to be aimed at that person or object.

2) I don't know a thing about nominal luminance yet!

3) The rules are not different for indoor, except that I would remove a wall if you can and still use Dome and Scene.  Iray really, really does not like fully enclosed geometry and renders more slowly under these circumstances (which is why using a physical skydome mesh is not recommended).
MyVivaciousVixens's avatar
MyVivaciousVixensHobbyist Digital Artist
Thanks! I'll try removing a wall.

Edit:
Wow! Removed the wall behind the camera and added a nighttime HDR. I then rendered Looney 11 with all four combinations of ISO & Shutter Speed at either 300 or 400. All four looked better than what I had.
Dangerguy01's avatar
Dangerguy01Hobbyist Digital Artist
Just found this (and the video). Great information, thanks!

I have one question about this line in "Shutter Speed": "Iray is not photographing moving objects, so instead a faster shutter speed just lets more light in while a slower one lets in less." Wouldn't this be the other way around, or is Iray's logic the opposite of what I'd expect?
SickleYield's avatar
SickleYieldProfessional Digital Artist
No, you are right, a faster shutter speed in Iray really does let in less light.  I'll fix it!
Blades-123's avatar
Blades-123Hobbyist Digital Artist
Extremely useful, thank you!
GaiusCaesarII's avatar
Thanks a lot :)
RAMWolff's avatar
RAMWolffHobbyist Digital Artist
Thank you so much! Very helpful!
Wraith3d's avatar
Wraith3dHobbyist Digital Artist
thank you.. this will come in very handy!
SickleYield's avatar
SickleYieldProfessional Digital Artist
:)
Joltrast's avatar
JoltrastHobbyist Digital Artist
Awesome. I picked up loads of tips, some of them not even related to Tone Mapping! :D (Big Grin) Clap 
PizmoSF's avatar
PizmoSFHobbyist Digital Artist
Excellent!  Thank you, you are a true goddess.
fractal2cry's avatar
i think i need to try iray!
Kooroe's avatar
KooroeHobbyist Digital Artist
Nice, Looking forward to trying this in my free time.
Wendy-The-Red's avatar
Wendy-The-RedProfessional Digital Artist
I've noticed a bit of blurriness in wider shots in Iray and find myself wondering if the f-stop in it doesn't actually have some minor DOF or if it is, as has been suggested, because the default pixel filter is gaussian. Have you noticed any of this and have you done any experimenting along these lines?
SickleYield's avatar
SickleYieldProfessional Digital Artist
I haven't, because I'm generally using actual DOF and wide shots would have blurry backgrounds anyway.  Looking into pixel filters and what they do is on my list!
Wendy-The-Red's avatar
Wendy-The-RedProfessional Digital Artist
I did a render of a large spaceship and posted it in the Iray render thread. It along with a few renders I haven't posted showed a slight blur on figures that are further from the camera despite me not turning on DOF in the camera. This leads me to suspect there is some subtle DOF at play in Iray itself. That same thread also mentioned the gaussian filter which I've changed to mitchell in my recent renders in an attempt to see if that affects anything.
SickleYield's avatar
SickleYieldProfessional Digital Artist
Did it make a difference?  I haven't had a chance to investigate the pixel filters and what they entail yet.
Wendy-The-Red's avatar
Wendy-The-RedProfessional Digital Artist
If it did it's subtle. 
john-reilly's avatar
john-reillyHobbyist Artist
Thank you for taking the time to make this tutorial, I found it very useful :)
anonymous's avatar
Join the community to add your comment. Already a deviant? Log In