Adding an Atmosphere in Iray
NOTE: This Tutorial requires DAZ Studio 4.8 (or higher)
Adding an atmosphere to your Iray renders can help towards making your final image appear more realistic. Not every situation calls for godrays or a hazy atmosphere but often even a subtle effect is key to adding depth and realism to an image.
I have created a simple scene subset for DAZ Studio which you can load into your project and add an atmosphere when using Iray. As mentioned above this atmosphere isn't going to work in all situations but for most outdoor sun lit scenes it should be effective.
Before going into details you can download the Scene File from my DROPBOX
Once you have downloaded and installed the files you should have a file called Iray Atmosphere located in your library under; My Library>Environments>Iray Atmosphere
After starting a new empty scene load the Iray Atmosphere and then your chosen Scene props. The Iray Atmosphere will load with a few items; an "Atmosphere", "Distant Camera", "Main Camera" and a "Sun" camera.
The "Atmosphere" is a simple cube with an SSS shader applied which partially scatters light rays as they pass through it.
The "Sun" camera will be used as a Sun Node and we can set that up later on.
Then we have two regular cameras that just give you a couple of options for rendering.
Once your scene props and the atmosphere are loaded the first thing you want to do is configure the Environment Settings so that the "Sun" camera is acting as our main light source. Navigate to the Render Settings and firstly ensure NVIDIA Iray is selcted as your render engine. Next select the "Environment Tab" and ensure your "Environment Mode" is set to "Sun-Sky Only".
Sun-Sky Only Mode gives you several options for changing Sky and Sun settings. For this tutorial we want to set ensure Dome Mode is set to Infinite Sphere, Draw Dome is ON and Environment Lighting Blur is OFF. Next we need to set the SS Sun Node; Click the box that says None and select the "Sun" camera and accept in the box that pops up. Setting the Sun node as a camera gives us an easy way to determine where the sun is pointing. By simply viewing the scene through the Sun camera, like you do with any normal camera, you can direct the light in whatever direction the camera is facing.
The "Sun" camera I have included is set far enough away from the centre of the scene that it is outside the Atmosphere cube which is important as it ensures the light is affected by the SSS material as it passes through the cube. If the camera/Sun was inside the cube you wouldnt' see the effect.
Now that the Environment settings are complete you can try out your render. Remember to change your viewpoint to a different camera for rendering e.g. the Distant Camera.
Your result should look something like this (results will vary depending on your scene props)
For reference here is the exact same scene with the Atmosphere Cube hidden (or deleted)
There are several adjustments you can make to increase or decrease the intensity of the Atmosphere within your scene.
Firstly the amount of light affects the visibility of the atmosphere. Within your Environment settings adjusting the Environment Intensity or the Sun Disk intensity will give you control over how bright the two elements of the Environment are. Adjusting the Environment Intensity will affect the overall ambient lighting and will affect the intensity of the haze as there is light rays penetraiting the cube froma ll directions. If your Environment is set high the image will become foggy and the godray effect will be less visible. The Sun Intensity will affect the visibility of the god rays effect. Generally I set the environment Intensity lower than the Sun by around half. So if your Sun is at 1.00 set the Environment to 0.50.
To adjust the actual Atmosphere strength you need to adjust the SSS material applied to the cube. In the Surfaces tab locate the SSS settings (Usually highlighted with purple). There are a few ways to adjust the thickness of the atmosphere but the easiest way is to adjust the "Scattering Measurement Distance". Increasing this number reduces the intensity and decreasing this number makes the haze thicker.
Here is the same scene as above with a "Scattering measurement Distance" of 25. The haze is a lot thicker.
And again but this time with it set at 1000. Here the effect is very subtle.
I hope you found this tutorial and the Iray Atmosphere files useful. If you have any questions or run into any issues let me know.
Also if you are successful in creating some awesome god rays drop a link to your image in the comments below.