Hello and welcome to another V-Ray feature short demonstration. In a
previous video
Volumetrics part 1 – we talked about the VRayEnvironmentFog and VRayAerialPerspective
In this second part, we'll examine the VRayVolumeGrid,
which allows for loading and rendering volumetric cache files such as OpenDVB
Field3D and PhoenixFD aura files. As its name suggests the VRayVolumeGrid
is a three-dimensional grid which contains volumetric data. This data is
typically generated by fluid simulation software and stored as cache files.
The most common formats include OpenDVB, generated in Houdini ; Field3D, generated in
FumeFX; and Aura generated Phoenix FD. The data consists of many equally
sized cubes called voxels.
Each voxel holds a value that can have different meanings: such as density,
temperature, velocity and many others.
Those are called channels.A cache file can contain a great number of voxels and for
each of them there could be a multiple channels. The VRayVolumeGrid reads all
this data and uses it to apply different shading to the voxels at render time. For
example, the density channel can drive the opacity and the temperature channel
the self-illumination. In addition, there are possibilities for remapping the
cache data for a greater artistic freedom.
Let's take a closer look at the VRayVolumeGrid. It is a container that
provides the interface for loading and shading volume data. When a volume cache is
loaded, VRayVolumeGrid suggests loading a preset for the most common
formats. This adjusts the grid’s settings, so that the volume data renders correctly.
Those presets provide a great starting point for shading. Since the cache file has
information for the fluid data only and no shading information,
manual adjustments may be required if closely matching look is desired.
In this particular example, an OpenVDB file is loaded, so the “Houdini Fire/Smoke”
preset is chosen. On a successful load the grid is resized to the cache’s dimensions.
If you would like to apply a preset after the cache has been loaded, you can
do so by using the “Render Presets…” button. The “Frame Info” rollout contains
general information
dimensions (measured in voxels) and available channels. By default, non-empty
voxels are displayed as color coded triangles.
If the viewport performance degrades, the “Detail reduction” setting can be
increased.
That preview downsizing can be done by Phoenix automatically. A great way to
analyze the value range is adjusting the preview limits and their colors... enabling
the "Auto Range" checkbox... or previewing only a slice of the grid.
Alternatively, a GPU preview can be enabled for a better viewport
visualization.
Let's have a look at the render. The rendering process could be accelerated
by a couple of optimizations.
Let's increase the rendering steps to the point just below artifacts appear.
The step size is measured in percentage of the size of a single voxel. In this
case a value of 2000 % would suffice.
And since there is some detail in the shadows a value of 500 %
will be used.
In addition, as of V-Ray 3.3 Probabilistic shading can be utilized for faster
volumetric rendering.
As mentioned earlier, different shading aspects for each voxel can be
controlled.
This can be done through the "Volumetric Options" dialog. The "Fire" rollout controls
the self-illumination of the voxels. The "Smoke color" controls their color when
illuminated by lights [their albedo]. And "Smoke opacity" sets the visibility of each voxel. These
can be set using a single value for every voxel.
Let's change the "Smoke color"
In addition, a channel from the cache can be used to give each voxel a different
value. Let's set the color to be driven by the Temperature channel. In this case
a remapping ramp can be used to fine tune or greatly alter the appearance of
the fluid. In the ramp the existing volume data is represented with a cyan band.
Currently it's in the 0 to 46 range.
That's why the ramp needs to be re-adjusted. The color flags have a
number below them which corresponds to the values from the volume data. Voxels
containing that value in the "Temperature" channel would be filled with the
corresponding color. Using the same approach, we can adjust the emissive part
of the shader - The Fire.
Depending on your set up the emission strength may have to be increased by this
multiplier.
A similar approach can be used for remapping the opacity.
However, a curve is used instead of a ramp. Let's base it on the Smoke data
channel and make it more transparent.
Now, let's increase the opacity for the lower values only. This way a fine
smoke look, such as a cigarette smoke, can be achieved.
Lastly, all the emission, color and opacity can be modulated by a 3D texture.
There are several parameters controlling how light is scattered inside the grid.
By adjusting the multipliers, different effects can be achieved. Since emission
relies on GI to illuminate other objects, it is often a computationally expensive
effect. That's why the VRayVolumeGrid automatically generates lights with the
appropriate color and intensity, that match the emissive part. This speeds up
the rendering and improves the quality.
Another functionality of the VRayVolumeGrid is its multiple rendering modes.
They interpret the volume data differently. For example, the "Mesh" and
"Implicit surface" generate hard surface based on the level threshold.
And the "Ocean" mode generates infinite flat surface, meant to complement a
water surface simulation.
However, this is not the case in this particular example and artifacts appear
so let's switch back to Mesh mode. For preview purposes, "Show Mesh" can be
enabled. This way, if deforming modifiers are applied, their effect can
be seen in both the viewport and the render. Let's apply a "Relax" and "Twist"
modifiers.
A refractive material can be applied, so that the grid renders as a transparent
liquid.
Let's change the coloration of the liquid as well.
Additionally, a displacement effect can be enabled, which will provide even finer
control over the surface. Note that the displacement works only for Volumetric
modes.
There are some more advanced modes such as the "Volumetric Heat" and "Volumetric geometry"
that are used in specific situations. Let's load up a more complex
scene, so we can see the VRayVolumeGrid in context. In this short video tutorial
we have covered how the VRayVolumeGrid object in V-Ray can be used to load
volumetric data and render it as fire smoke, surface and infinite ocean.
I hope you have found this video useful and helpful. Make sure you check out more
V-Ray featured videos. Thank you for watching.