[Tutorial] Creating Dust And Atmosphere in Iray

4 min read

Deviation Actions

SickleYield's avatar
A video version is here.

I learned this method from jag11 on the DAZ3D forums, who is thanked for permission to use it in this tutorial!

In 3Delight there's no way to create atmosphere or godrays (the rays that are visible when light passes through dust or particles).  There are products to facilitate (one of them mine), but most are either not the easiest to use or ultimately just a faking of a feature the engine lacks.  Many artists use postwork instead.

DAZ Studio 4.8 Beta's new Iray engine also lacks a native mechanism for creating atmospheric volumes - but it can be easily convinced to produce them!  They will come from your lights and react to objects in your scene.  I did a test image of Jack Tomalin's Chapter House Iray scene (free to Plat Club members).

Iray Atmosphere Test 01 by SickleYield

The method is:

1. Load your scene into DAZ Studio 4.8 Beta.

2.  Set the Environment to Sun and Sky in your Render Settings.

3.  Jag11 says to set time of day to 12 noon. I set it to 3 p.m. in the above test.  I think what matters is that you set the SSS direction properly for the light direction (below).

4.  Make sure that your camera headlamp is set to OFF.  This is in the camera's parameter settings; you must render through a "real" camera and not the perspective, top, right, etc. views.

5.  Create --primitive--cube.  Other shapes will probably work.  The important thing is that you scale it up large enough that your camera cannot see past its outer edges, ideally as big as your room (or if outdoors, really, really huge).  The camera must be outside the primitive. 

6.  Select the cube in Scene Tab and look at its surface in Surfaces tab.  Select the surface.  Apply the Uber Iray Base shader.  Turn OFF all the glossy settings (glossiness, glossy layered weight, etc.)

7.  Scroll down to the Refraction.  Set the amount to maximum and the index number to 1.00 (I believe it's 1.5 by default). 

8.  Scroll down to the Thin Walled setting.  Set it to OFF.

9.  Scroll down to the SSS settings.  Jag11's recommended settings are

Scattering Measurement Distance: 50
SSS Amount: .03
SSS Direction: 0.5

For the huge room in Jack's Chapter House scene, I used:

Transmitted Measurement Distance: 100 (same as the Scattering, leaving it at 0.1 produces black renders)
Scattering Measurement Distance: 100 (I reasoned that the rays needed to go further into the room)
SSS Amount: .05
SSS Direction: -0.45 (which, as it turns out, was wrong; in the version shown I've corrected it to 0.5.)

Adding a higher SSS amount will make your atmosphere more dusty.  I used an incorrect value of SSS direction at first. According to DAZ's docs, "Negative numbers (-) backscatter to the direction of the light source. Positive numbers (+) forward scatter away from the direction of the light."

Here's a scene you can use to test this, and a copy of the most successful version of the shader I used.

Freebie Iray Godray Testing Scene by SickleYield

So really, you should always use a positive number of SSS direction for this.  This is probably why I didn't get very defined rays in my scene until the second try (the version you see for the Chapter House scene now).

In the second scene, the Park Side High Lobby, I used an HDR for fill and spotlights for lighting; there is no "Sun" light.  So that is definitely not mandatory as a lighting method to get these rays.

I look forward to your renders using this method!
© 2015 - 2021 SickleYield
Join the community to add your comment. Already a deviant? Log In
perlk's avatar

This is really wonderful. I used this to create this image:

The Annunciation
SickleYield's avatar

I'm so glad it worked for you! Nice render :)

perlk's avatar
Posyomismo's avatar

Thanks for the tutorial, this is something that I wanted to do since long time :D It's a perfect combo with the experiments that I am doing with "laser" lights for sci-fi environments :D https://cdn.discordapp.com/attachments/459394234093535252/847216179328057404/laser_lights_experiment_test3.png

SickleYield's avatar

Oh cool, nice dust effect with those!

Posyomismo's avatar
Experimentoso's avatar

Thank you! This opens up a lot of possibilities.

Kervala's avatar

Thank you so much :hug:

I purchased "The Ruins of Angkor Wat" by Merlin and wanted to make a render of it. I noticed all surfaces were using 3Delight shaders so I converted them to iRay and noticed there was a prop to create fake "God Rays" so I remembered your excellent tutorial (this journal) and wanted to give a try by replacing the fake by real ones :D

I made a lot of renders to check all SSS parameters and I find results very good :love:

ruins_29 direction 0

I used :

- Distance : 1000

- Amount : 1

- Direction : 0.5

I noticed if we decrease both Distance and Amount, the result can be almost identical (for example : 500 and 0.1) but perhaps it's because it's an outside scene :D

I also used a very strong Distant Light (500k Lumens and 4500 K).

SickleYield's avatar

How lovely, thank you for sharing your results! :)

Kervala's avatar

You're welcome, thanks to you to share your experience :hug:

Balsam-fir's avatar

Awesome tutorial, thank you! I was fighting with a bought volumetric tool from the Daz site, then stumbled on this and your way of doing it works much, much better. :)

SickleYield's avatar

You are very welcome! :)

Hey, thanks. You have been so helpful with your tutorials.

When I use these godray cubes as you've recommended they work great except I'm at a loss at how to deal with what I think is a lensing effect (like a telescope or eye classes).

I have two situations.

a) Outside the window of a room I'm trying to make godrays in is a real 3D model, eg Merlin's The Church is seen out the window, but when I make the godray cube the church models shifts way to the left and shifts much close to the window than it really is. I have to manually adjust it's position multiple times, do a render, adjust again, because I can't tell have far the the shift is until I render.

That situation is at least manageable but the next I don't know what to do.

b) I have a nice 2D background of Manhattan from on an image search on one of the search engines. I set it as the Environment background & visible in render. I position the set so that the camera gets a good view out the window of the NYC skyline. Without god rays it looks great but when I do the godrays the NYC background on the other side of the window (uses a UberIRay glass shader) disappears and all that is scene is like when you do Sun-Sky with no 3D set so that the sky is white and at the bottom below the horizon line the ground is grey.

How to I remedy such a problem?

SickleYield's avatar
Hallo hallo!  What are the refraction settings on the godray cube?  
Hey thanks.

The Godrays Cube

a) All the glossy is turned off.
b) Refraction Index =1.00 / Refraction Weight = 1.00
c) Transmitted Measurement Distance = 5.0
d) Scattering Measurement Distance = 5.00
e) SSS Amount = 0.0050
f) SSS Direction = 0.33
g) SSS Node = Mono / Thin Walled = off

I should note that I can make the room super dusty or relatively dust free by adjusting TMD & SMD or the SSS Amount. There is a lot of leeway in adjusting those before the effect busts. So that part of your tutorial is fine. It's just this unintended effect.

Also the set I'm using is the Window Seat (www.daz3d.com/window-seat) and I should not that if I use the original glass shader material applied to the window glass that in some iRay renders it causes the backdrop to disappear too. So that problem is not unique to these Godrays cubes. That's why I replaced the glass shader material supplied with that set with the DAZ UberIRay glass shader material, which doesn't have that problem (when no Godray cubs are in use).

For the glass on the window the refraction index is 1.55 and the Refraction Weight is 1.00. The glossiness settings are left on for glass reflections. Thin Walled is On so those over Godray cube values aren't relevant.

Maybe I should lower the cutout opacity on the window glass to 0.0? That will rid any reflection in the window though. 

Maybe I need to make a skydome for the whole scene instead that can be modified to cause godrays?

Oh, I can also make the Window Seat invisible during the render and see if a lensing effect has simple shifted the background way out of sight of the window's view.


Well OK,

a) I hid the Window Alcove and rendered and the NYC background was nowhere to be found.
b) I showed the Window Alcove again but set the cutout opacity of the glass on the window to zero and still the NYC background disappeared.

So I can try making a skydome that will make godrays but I also think that won't work.

I think a workaround that should work is if I create a DAZ primitive plane the same dimensions as the NYC background and make the background the texture for that plane. Then I position the plane in the window were I need it. I think I will possibly need to turn on the emissive surface for that plane though.


Well the backdrop on a DAZ primitive plan does work. The lenses effect magnified to be about 33% closer to the camera. I also had to turn the emissive surface on (default values I left alone then) to make the plane look like it was 3D geometry lit by ambient light rather than a picture on a 2D plane in a 3D scene.

The plane I created 1mx1m and then scale to 4928 x-axis, 3264 z-axis, 0.01 y-axis because that was the pixel resolution of the original background image. Because of the 33% magnification of the image I doubled the scale on the x & z axises and double the z distance to the camera.

Thanks so much! I will mess with volumetrics in scene encompassing skydomes and godrays in those after I finish these renders! 
SickleYield's avatar
I'm glad you found something that works for you already!

Refraction is literally light being bent as it passes through something.  As a result, even using refraction at 1.0 (a very "low" value) can still result in images being displaced from a given point of view.  You can turn refraction down or off completely and just use cutout and transmitted distance/scattering distance to determine thickness of the fog, just be aware that the fog defaults to really very thick without refraction on.
OK, thanks. That is interesting to learn. I've been wanting to try making fog like in the early morning hours.
ThessianCG's avatar
I have to fav this so badly. Worship La worship Worship 

And downloaded...La la la la 

... just watched.  Hey, hey hey, SY using Karen's Replicator too. Such a great little tool. It saved my bottom so many times. Nod  
SickleYield's avatar
It really is great :)
katzengeist's avatar
Thanks a lot for the guide which was very helpful!
I tried it with one of my very first picture .. I am a newbie with 3d.

SickleYield's avatar
Nice job!  Looks like it worked! :)
Grim-Red's avatar
After fighting for some years with godrays and volumetrics, finally i have found the Grail!
Thank you, your video is also extremely helpful. :D
SickleYield's avatar
You're very welcome!

I tend to fake them with transmaps myself most of the time because it's faster, but if you want "real" in-engine volumetrics, it at least is possible!
Grim-Red's avatar
I have tried pre made volumetric cameras as well, and aside for losing my sanity i haven't obtained the same result as i did following your tutorial.

I have also your easy Godrays, but my experiments with Iray ( my fault) haven't worked well yet...i may try to apply the same criteria ( of the video) on those surfaces though.
Since i am no expert on mapping, i am afraid, lol. ^^;

Join the community to add your comment. Already a deviant? Log In