[Tutorial] Creating Dust And Atmosphere in Iray

4 min read
SickleYield's avatar
By SickleYield
352 Favourites
129 Comments
38K Views
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!
Published:
© 2015 - 2020 SickleYield
Comments129
anonymous's avatar
Join the community to add your comment. Already a deviant? Log In
Kervala's avatar
KervalaHobbyist General Artist

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
SickleYieldProfessional Digital Artist

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

Kervala's avatar
KervalaHobbyist General Artist

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

Balsam-fir's avatar
Balsam-firHobbyist Digital Artist

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
SickleYieldProfessional Digital Artist

You are very welcome! :)

AgroCoders's avatar
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?

Thanks.
SickleYield's avatar
SickleYieldProfessional Digital Artist
Hallo hallo!  What are the refraction settings on the godray cube?  
AgroCoders's avatar
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
SickleYieldProfessional Digital Artist
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.
AgroCoders's avatar
OK, thanks. That is interesting to learn. I've been wanting to try making fog like in the early morning hours.
ThessianCG's avatar
ThessianCGHobbyist Digital Artist
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
SickleYieldProfessional Digital Artist
It really is great :)
katzengeist's avatar
katzengeistHobbyist Digital Artist
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.

www.renderosity.com/mod/galler…
SickleYield's avatar
SickleYieldProfessional Digital Artist
Nice job!  Looks like it worked! :)
Grim-Red's avatar
Grim-Red Digital Artist
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
SickleYieldProfessional Digital Artist
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
Grim-Red Digital Artist
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. ^^;

SickleYield's avatar
SickleYieldProfessional Digital Artist
With the transmapped godrays you don't use the volumetrics at all, you turn down the opacity a bit and add emission (if you're talking about the pre-Iray one; we did do an Iray version later).  In this image I used Expanded Godrays Iray out of the box (again, I may have turned down opacity even a little more).

Mature Content

Burning (TW: Man On Fire) by SickleYield

Grim-Red's avatar
Grim-Red Digital Artist
Hold me... I'm scared. by Sinister-Starfeesh
Terrific.
I have wishlisted it, for now i have to stick with the complicated rays, but the positive side is that i am learning something new. :aww:

Thank you once again for your super useful tips and tutorials, changing engine is offering quite a challenge, lol.
SickleYield's avatar
SickleYieldProfessional Digital Artist
I also have a free version for 3Delight, but it should be easy to use in Iray too:

Grim-Red's avatar
Grim-Red Digital Artist
Yep, already used them and discovered that they works well even when not converted for Iray. :)
tkdrobert's avatar
tkdrobertHobbyist Digital Artist
After watching your video, I finally was able to produce God-rays.  I never could so it just folowing the text.  I had to do some post-work to get it to look the way I wanted, but I finally got it.
SickleYield's avatar
SickleYieldProfessional Digital Artist
Great, I'm glad it helped. :)
tkdrobert's avatar
tkdrobertHobbyist Digital Artist
I’m doing another render to see if I can get the effect from Terra Dome 3 atmosphere.  I’ll tag you when I upload the final results.  Thank you for the video.
anonymous's avatar
Join the community to add your comment. Already a deviant? Log In