Welcome to this V-Ray feature short demonstration.
In this video, we'll take a closer look at how we can use "VRayEnvironmentFog" to create
a volumetric effect known as "god rays".
There are different circumstances, that may lead to the formation of crepuscular rays,
also known as "God rays", in the atmosphere.
As an example, light passing through clouds in the sky could cause this effect.
Also, light passing through dusty or foggy atmosphere could cause the "God rays" effect
as well.
For the sake of this demonstration I have prepared an interior environment.
It's an old ship interior which would be lit mainly by the moonlight together with some
extra light sources to highlight certain parts of the ships interior.
Our goal is to simulate an atmosphere through which the light would travel and create the
desired "God rays" effect.
First, let's render the scene to see what we are dealing with.
Currently, all of the scene lights are enabled.
To make things easier to handle, let's temporarily disable all of the additional lights, and
leave the moonlight only since this is the light source that would be responsible for
the desired "God rays" effect.
Let's open up the render settings and under the "Global Switches" rollout uncheck the
"Hidden Lights" checkbox.
This way we can toggle the lights on and off by simply hide them and unhide them.
Let's select all of the lights except for the moonlight and simply hide them.
Let's render the scene once again before we create the "God rays" effect.
At this point we can adjust the position and some of the settings of the moon light source
if necessary.
The light source itself is a "VRaySun" with lowered intensity and a bluish tint which
makes it appear more like a moon light.
We are going to create the "God rays" effect by creating an atmosphere using "VRayEnvironmentFog".
Open up the "Environments and Effects" window, and under the "Atmosphere" section, click
on the "Add" button and select "VRayEnvironmentFog" from the list.
For an in-depth information about the "VRayEnvironmentFog" and all of its parameters
you can check out the "Volumetrics" tutorial.
Let's render the scene with the default environment fog settings so we can have some sort of a
starting point.
Clearly, the fog height is too low and the fog itself appears to be too dense.
Let's increase the "fog distance" parameter to make the fog more transparent.
Also, let's increase the "fog height" parameter to make sure it covers the entire ship's
interior.
After we've done those adjustments let's render the scene again to see what it looks like.
At this point we can make adjustments and re-render until we are happy with the result.
In this particular example, I find the color of the fog to be too bright.
Let's change the fog color to a darker gray.
Also, let's enable all the additional lights in the scene.
Since, we want only the moon light to be responsible for the "God rays" effect we should exclude
the contribution of all the additional light sources from the "VRayEnvironmentFog".
Under the "VRayEnvironmentFog" nodes section, there is "Use all lights" option that is turned
on by default.
We can turn it off and add only the light sources we'd like.
In this example, I would add only the moon light source.
Once we are happy with all of the settings we can render out the final image.
In this video, we went over the method of creating "Godrays" effect using the "VRayEnvironmentFog".
We have covered a simple step-by-step workflow of how to set up an atmosphere and use a light
source to create the desired effect.
I hope you have found this video useful and helpful.
Please give us your feedback, comment, or share it.
If you'd like to follow along this tutorial, please download the scene from the link provided
in the video's description.
Make sure you check out more of the V-Ray feature videos and be on the lookout for new ones.
Thank you for watching.