V-Ray emFluid Volume Shader Overview


VRay emFluid Volume Shader is the root shader for rendering emFluid5 simulations with V-Ray. It will only work on pointclouds with valid emFluid data. emFluid5 for Softimage (third party plug-in) is a grid based fluid simulator using ICE to control the simulation. For more information about emFluid refer to:

 http://www.mootzoid.com/

VRay emFluid Volume Shader


 “VRay emFluid Volume Shader” is used to render emFluid simulations.

Grid

There are three ports for each of the Emission, Diffuse and Density parameters. If you want to use data from one or more of the emFluid grids, you'll have to plug in a grid shader, either VRay Fluid Transformed Color or Vray Fluid Transformed. You can also mix the grid shaders with any number of processing nodes and procedural textures.

Parameters

Use light cache for diffuse lighting – Enables light caching for each point of the grid, and this way speeds up rendering considerably. However, this feature may produce artifacts when the smoke is very dense.

Render step ray marching step

Scatter – Controls how the light rays are scattered inside the volume.

  • Enabled - If using GI, enables the scattering of light rays.
  • Disabled - Disable scattering.
  • Analytic - Without actually altering the rays, an analytic formula is used to calculate the contribution of the scattering to the illumination.
  • Analytic and shadow - Same as Analytic, but geometry is also affected via the shadows.

Maximum GI bouncesthis limits the number of GI bounces that will be calculated inside the volume. It can be used to increase the rendering performance.

Camera visibility - when on, the surface is visible in the view and renders.

Reflections visibility - when on, the surface reflects in reflective surfaces.

Refractions visibility - when on, the surface refracts in transparent surfaces.

Shadow visibility - turns on the shadow casting ability of the surface.

Shadow opacity - tweaks the opacity of the shadow of the volume. When set to 0, the volume will not produce shadows.

VRay Fluid Alpha


 “VRay Fluid Alpha” is used to set the transparancy of a grid.

Parameters

Grid Texture Scalar grid texture

Fluid Transparency The transparency of the grid

VRay Fluid Transformed(Color)


“VRay Fluid Transformed" and “VRay Fluid Transformed Color” nodes are used to get Scalar and Vector(Color) Simulation Grid from the emFluid simulation. The only difference between them is the provided output port - respectively scalar and color output port.

Grid

Automatically choose Grid When true VRay selects automatically which emFluid grid to use for rendering with the following rule: For “Diffuse grid” it gets the “Color” em grid; for “Emission grid” it gets “Heat” em grid; for “Density grid” it gets “Waste” em grid.

Simulation grid Specify which grid to get from the emFluid simulation. Note that for the “VRay Fluid Transformed" and “VRay Fluid Transformed Color" grids here you can choose between different lists of possible grid names.

Noise

Enable noise - when checked, the parameters below will have effect

Noise The fluid's noise texture

Noise gain – Tells how much of the noise should be blended with the grid/gradient values.

Motion Blur

Motion blur type – determines the way motion blur modes

  • disabled - no motion blur will be used
  • blend - use simple fade out between two states of the fluid.

To avoid problems with motion blur the grid resolution should be kept constant for the whole animation.

Parameters

Interpolation type - determines the function that will be used for the interpolation

  • linear - It is faster, but voxel borders may be visible
  • quadratic - This is slower, but voxel borders are much less likely to be visible

Fluid value scale - Multiplier for the value taken from the simulation grid

emFluid simulation example setup


Setting up a basic emFluid simulation

  • To set up a simple scene first you need a Null object and an Empty Point Cloud.

  • For the point cloud you need to set up an ICE tree and a Simulated ICE tree.

  • Connect a “f5t Clear 64 Bit Pointers” node to a port of the ICE tree.

  • Connect a “f5x explode me _Combustion Basic” node to a port of the ICE Simulated tree.

  • Connect a “f5o Draw Null” node to the “Draw Fuel operator 0” port of the “f5x explode me _Combustion Basic” node. Then connect a “Get Data” (using “Out Name” outputport) node to the “In Null Name” port of the “f5o Draw Null” node. And for the “Get Data” node, pick up the Null from the scene.

  • Move the Null to (0, 2, 0) position and play the sequence.

  • The simulation grid should be visible in the viewport.

Setting up the VRay emFluid shaders

  • Assign a material to the Point Cloud and connect a “VRay emFluid Volume Shader” to the volume port of the material.

  • Now you may choose which grids will be used for rendering. The V-Ray shader needs to know at least which grids to use for the density of the volume and the diffuse color of the grid.

There are two types of grids in emFluid: scalar grids (one float value per cell) and vector grids (3 float values per cell).

In VRay for Softimage we have two nodes which are used to get grids from emFluid - “VRay Fluid Transformed” (for scalar grids) and “VRay Fluid Transformed Color” (for vector grids).

“VRay Fluid Transformed Color” node can be plugged directly to one of the ports of “VRay emFluid Volume Shader”. For example, if there is a Color grid in the emFluid simulation, you can plug “VRay Fluid Transformed Color” (choosing the color grid) to the Diffuse grid port.

“VRay Fluid Transformed” cannot be plugged directly to the ports of the “VRay emFluid Volume Shader”.

  • In the example simulation there are “Waste” and “Heat” scalar grids, We will use the “Waste” grid for “Density grid” and “Heat” grid for the “Emission grid” in “VRay emFluid Volume Shader”.

  • Attach “VRay Fluid Transformed” node to “VRay Fluid Alpha” (used to set the transparency of the grid) and “VRay Fluid Alpha” node to “Density grid” parameter of “VRay emFluid Volume Shader”.

  • In “VRay Fluid Transformed” PPG's “Grid” tab turn off Automatically choose grid and for Simulation Grid drop down choose “Waste”.

The “Heat” grid in combination with “Gradient” could be used to set the emission for every cell.

  • Use “Mixers – Processing”/“Gradient” node and connect to its input port the “VRay Fluid Transformed” node.

  • Connect the “Gradient” node to “VRay emFluid Volume Shader”/ Emission grid parameter.

  • In “VRay_Fluid_Transformed1” PPG(Property Page) choose “Heat/Temperature”.

  • Play the sequence in Softimage from the first frame. Stop in the middle. Then render and you should see something similar to this.