©BBB3viz

Table of Contents

Overview


This tutorial is part of a guide that walks you through the process of importing and rendering Houdini simulations in 3ds Max using V-Ray. Chapter 3 is focused on equalizing the settings between the Pyro shader and the V-Ray Volume Grid.

In this last chapter, we take a closer look at Houdini's Pyro shader and how its settings can be translated to the V-Ray Volume Grid for a similar looking image.

We take a look at 3 cases:

  1. A simple smoke simulation with no fire, created with the Billowy Smoke preset
  2. A simple fire simulation without smoke, created with the Smokeless Flame preset
  3. A smoke + fire simulation, created with the Fireball preset

Before we start, one major difference between the Pyro shader and the V-Ray Volume Grid should be cleared.

When rendering fire with the Pyro shader, you would typically use the Heat field for the fire's intensity, and the Temperature for the fire's color. At the time of writing this tutorial, the Volume Grid can use either one or the other, but not both. In many cases this is not an issue but there are instances where you might need this kind of control (for example, when the Temperature field is noisy because of Disturbance applied to it in the simulation). We will take a look at one possible way to work it through.


You can download the assets for this chapter from the button below:

Download Assets for Chapter 3


Smoke Only: Billowy Smoke preset


We start by looking at how to equalize the settings for the simplest possible simulation. The provided .hip file in this tutorial contains the discussed setup.

Here's a rendered image of the simulation, with the Pyro settings to the right.

The Density Scale parameter is set to 1, with the Smoke Color set to pure White (1, 1, 1).

On the Smoke Field tab, the Fit Range is enabled with the Input Range set to 0-10.

Use Lookup Ramp is also enabled, with the point at position 0.1 set to a value of 0.5.

In the next steps we see how to translate those settings to the V-Ray Volume Grid.




Start off by creating a V-Ray Volume Grid and loading the cached .vdb sequence.

When prompted to choose a preset for the loaded sequence, select the No Preset option.

Open the 3rd Party Channel Mappings dialog from the Input rollout → "..." button to make sure the mapping is correct.

Enable Flip Up Axis in the Input rollout to flip the Volume Grid in the correct orientation.




Open the Preview rollout and enable the GPU Preview. This will be incredibly helpful to preview the effect of your parameter changes.




Open the Volumetric Render Settings window from the Rendering → Volumetric Options... button.

Disable the rendering of fire by setting the Based on parameter to Disabled in the Fire rollout. This is not strictly necessary, but otherwise you will encounter a message related to Probabilistic rendering when the Fire Opacity Mode is set to Fully Visible (which is the default).




Open the Smoke Color rollout and set the Constant Color to White (1, 1, 1) to match the Smoke Color parameter on the Pyro shader.




In the Smoke Opacity rollout, set the Based on parameter to Smoke. This will expose the Opacity diagram, allowing you to match the Pyro shader setup.

Because the Fit to Range's Source Range on the Pyro Shader is set to 0-10, you should feed the same settings in the Opacity diagram by setting the left point to [X,Y: 0, 0] and the right point to [X,Y: 10, 1].

Recall that Use Lookup Ramp is enabled on the Pyro shader, and there is a third point on the ramp at position [X,Y: 0.1, 0.5]. Therefore, you need a point on the Opacity Diagram at coordinates [X,Y: 1, 0.5].

The Lookup Ramp in Houdini is using the Remapped Range from the Fit to Range operation. To get the same result with the Volume Grid's Opacity diagram, you need to keep in mind that its range is 0 to 10, not 0 to 1 as the remapped Pyro shader ramp. This is why we put the point at [1, 0.5] instead of [0.1, 0.5].




Here's how a rendered image looks so far, compared to Mantra's output:

There are a couple of issues to note:

  1. There is some information missing from the rendered image when comparing to Mantra. This is caused by the Minimum Visible Opacity setting which defaults to 0.001. This option is an optimization that speeds up the volumetric rendering by culling the voxels, whose opacity is below the threshold. Another reason for this could be the default X,Y coordinates of the leftmost point on the Opacity Diagram. By default, its X,Y coordinates are [ 0.1, 0 ], not [ 0, 0 ]. Be sure to check for this.
  2. There are artifacts in the Alpha of the rendered image. Those are caused by the Scale Opacity by Scene Units option. This should always be disabled when rendering VDBs - it's used for Phoenix FD's .aur cache files, ensuring that the Smoke Opacity rendering settings produce the same result at different unit scales.




Set the Minimum Visible Opacity to 0 and make sure the leftmost point on the Opacity diagram is sitting at X,Y: [ 0, 0 ]. The missing pixels should now show up in the image.




Disable the Scale Opacity by Scene Units option. You will immediately notice that the smoke looks much denser now. This is not just a Viewport preview quirk - it will actually render much denser as well.

The way to fix this is to reduce the Y coordinates of each point to its current value divided by 100. Here's how the coordinates should change:

Point 0: No change required

Point 1: goes from X,Y: [ 1, 0.5 ] to X,Y: [ 1, 0.005 ]

Point 2: goes from X,Y: [ 10, 1 ] to X,Y: [ 10, 0.01 ]




Here's how a rendered image looks now, compared to Mantra's output:

If you open both images, stack them one over the other and take a look at their difference. You'll notice that there's a negligible difference (less than 0.05 in value) in the alpha plane, and it is spread all over - not restricted to specific areas.

For all intents and purposes, those 2 are pretty much identical.




Finally, to recap:

  1. The equivalence of the Smoke Brightness parameter is the Master Multiplier under the Smoke Color rollout.
  2. Smoke Color is the same as Constant Color under the Smoke Color tab. Please note that you can also use the Smoke channel / Density field to modulate the color by setting the Based on parameter to Smoke and tweaking the Color gradient.
  3. The Opacity of the smoke is controlled from the Smoke Opacity tab, and the equivalence of the Density Volume parameter is the Based on option.
  4. The functionality of the Fit to Range and Use Lookup Ramp options can be reproduced by tweaking the Opacity diagram.
  5. You need to disable the Scale Opacity by Scene Units option - this is used for the Phoenix FD .aur cache files.
  6. When you disable Scale Opacity by Scene Units, you'll have to reduce the Y coordinate of each point by a factor of 100.
  7. Make sure the leftmost point of the Opacity diagram is 0.0, if the same is true for your Houdini setup.
  8. If you notice missing information in your rendered image, set the Minimum Visible Opacity to 0 - it defaults to 0.001 and may clip some of the smoke.


Fire Only: Smokeless Flame preset


In this section, the Volume Grid settings for rendering fire are discussed. The provided .hip file in this tutorial contains the Houdini setup.

Here's a rendered image of the simulation, with the Pyro settings to the right.

Below are the settings in the Smoke Field, Fire Intensity Field, and Fire Temperature Field tabs.




Much like with the smoke example, your goals should be in this order:

  1. Equalize the Alpha
  2. Equalize the intensity of the fire
  3. Equalize the color of the fire

Here are the Pyro shader settings for this simulation. Note that:

  1. The Density field is heat – in other words, the smoke and alpha will be generated based on the heat field. This immediately tells that you should use the Heat field as "Smoke" in the Volume Grid.
  2. The heat field is used in the Fire Temperature tab. This means that the color of the fire is driven by the heat field. Furthermore, the field is remapped to go from (0 - 3) to (0 - 1).
  3. The color of the fire is based on a ramp - you should copy the colors and positions of the ramp, keeping in mind the remapping in the Fire Temperature tab.
  4. The temperature field is used in the Fire Intensity tab. Therefore, the intensity of the fire is based on the Temperature field. With this particular simulation, you won't notice much of a difference if you were to simply use the heat field instead (which is what we are going to do in 3ds Max and V-Ray), especially since there is no remapping going on, and no noises are applied to the field. There are situation where this could be a problem, though, and we will take a look at one of those in the last section.




Add a V-Ray Volume Grid and load the VDB sequence.

Open the 3rd Party Channel Mappings dialog:

  1. Set the Smoke channel to Heat.
  2. Set the Velocity X / Y / Z to vel.x / y / z

Make sure to enable the Flip Axis option to fix the orientation of the grid.

Enable the GPU Preview from the Preview tab of the Volume Grid.




Open the Volumetric Render Settings window from the Rendering rollout and set the Fire → Based on to Disabled.

We will first focus on obtaining an alpha similar to the one rendered by Mantra.

Set the Constant Color parameter to black (0, 0, 0). If you don't do that, the Smoke channel (remember, this is actually the Heat field) will be rendered with a constant color and added on top of the fire.

Set the Based on to Simple Smoke - this option does a simple 0-1 mapping of the Smoke channel between 0 and (Simple Smoke Opacity value) in this case: 0.004.

Disable Scale Opacity by Scene Units to avoid possible alpha artifacts.

Set Minimum Visible Opacity to 0 to make sure the voxels are ignored during rendering.

Set Simple Smoke Opacity to 0.004 or so. This parameter corresponds to the Smoke Density Scale on the Pyro shader. It should usually be set to a value of about 100 times lower than the Density Scale but in this particular case, it had to be bumped up to ~0.004 for the alphas to match.

Fire itself produces no alpha when rendering with both Mantra and V-Ray Volume Grid (in Fire Opacity Mode: Fully Visible).

In this Pyro shader setup, the alpha is produced by the Smoke Density Scale parameter which is actually using the heat field.

To achieve something similar with V-Ray, we will set the Smoke Opacity Based on option to Simple Smoke - the Simple Smoke option uses the Smoke field (which we remapped the Heat field to), essentially giving us the same setup as with the Pyro shader. This will produce an alpha for the fire without any visible smoke.




Here's how things look so far:

  1. Both the Mantra and the V-Ray renders are black in the Color plane (when Pyro → Fire Intensity Scale is at 0 and Volume Grid → Fire Based on is Disabled).
  2. Both the Mantra and the V-Ray renders have the proper alpha.

Now we need to take care of the Fire.




Open the Fire rollout of the Volume Grid and set the Based on parameter to Smoke. Remember, the Smoke channel is actually the Heat field.

Disable Emit Light for now - the Emit light options work similar to Houdini's Volume Light and will affect the color of the smoke based on the intensity and color of the fire.

Make sure that the Fire Opacity Mode is set to Fully Visible. Using any of the other 2 options will make it very hard to replicate the result from the Pyro shader. The Fully Visible option is actually what could be called 'physically correct'. In the real world, fire is not opaque which is also the reason why both Mantra and V-Ray don't produce an alpha for you with those settings. In Houdini, we circumvent this by using the Heat field as density and setting the Smoke Color to black. With the V-Ray Volume Grid, we did the same by using the Smoke channel for Smoke Opacity and setting the Constant Color to black.

Set the Physically Based option to 0. This parameter relies on physically-correct temperature values in Kelvin being present in the channel fed to the Based on parameter. Physically-correct means in the hundreds, typically 800 to 2000.

Lastly, you need to copy the Ramp color values from the Pyro shader to the Color and Intensity graph.

Don't forget to scale the graph based on the Pyro shader's Fire Temperature Field → Fit to Range Settings. In this example, the Source Range is set to 0 to 3, therefore the second point on the Color and Intensity Graph is moved to X,Y: [ 3, 1 ].

Furthermore, you need to make sure to properly place the color swatches as well. If the position of a color value on the Pyro shader's Fire Ramp is 0.33, you should place it at 0.99 in the Color and Intensity ramp to keep things consistent.

If you made any changes to the Lookup Ramp on the Pyro shader → Fire Temperature Field, you should make those exact same changes to the Color and Intensity ramp - and again, keep in mind the remapping coming from the Fit to Range operation.




Here's a comparison between the results coming from Mantra and V-Ray. There is only a barely perceivable difference in the RGB plane.










Fire and Smoke - Fireball preset



In this final section we work on equalizing the render settings between Pyro and the VVG for a Fireball simulation.

As mentioned in the first part of this final chapter, the Volume Grid can use either the Temperature field or the Heat field, but not both. We will take a look at a possible way to work around this case.

The default Fireball preset has been intentionally modified to apply Disturbance to the Temperature field (the default setting is Velocity). This causes random noise to appear in the entire Temperature field. If you were to attempt to use it as is in the V-Ray Volume Grid, you will find it quite difficult to get rid of the noise while preserving the detail in the fire.

We take a look at a possible solution.




Of course, the most straightforward thing to do is to use the Heat field as Temperature in the Volume Grid.

If this is undesirable with your particular setup and you would prefer to still get that extra kick-in detail from utilizing the temperature field, your best option would likely be to clean up the noise in the temperature by using the heat as a mask.

Drop a Volume Wrangle SOP before the VDB Convert node and set the fuel equal to the temperature multiplied by the heat. This will set the temperature in the container to 0 where the heat field is 0, add some extra randomization to the heat, and store the result in the Fuel field. The downside is that you will inevitably lose some of the lingering temperature that stays behind as the heat dissipates. On the bright side - you've still got your heat and temperature fields intact - the modified heat is stored in the Fuel field.

If you are using the Temperature field to drive the color of the smoke in the Volume Grid, the noise may be an issue there. As a workaround, you should probably consider adding a Cd / RGB field instead of relying on post-simulation tweaks.

 Please check the Flipbook to the right for comparison.




Here's how the setup looks. A Volume Wrangle SOP is used to remap the Temperature field to the 0-1 range, multiply this by the Heat field, and store the result in the Fuel.




Here's a comparison image showing the difference between two Mantra renders:

  1. The image on the left shows a Pyro shader setup using the Heat as Fire Intensity, and the Temperature as Fire Color.
  2. The image on the right is rendered using only the modified Fuel field storing the result of heat * temperature.

While undoubtedly there is a difference between the two, you may find that this setup is good enough for your purposes.




Here's a V-Ray Volume Grid render using the modified Fuel field for the Fire Based on parameter. As you can see, it's identical to the Mantra render when using the Fuel field for intensity and color.

Let's wrap up the workflow shown in the previous chapters.

  1. Disable the fire and equalize the smoke opacity - make sure to disable Scale Opacity by Scene Units, set the Min. Visible Opacity to 0, and transfer any remapping happening in the Pyro shader. Recall that the Y-values for the Opacity diagram points are magnitudes lower than those in Houdini - for a Smoke Density of 1 on the Pyro shader, you would typically use 0.01 in the Volume Grid.
  2. Equalize the Smoke Color. If you're using a color field in Houdini, set the Based on option to RGB (making sure that the 3rd Party Channel Mappings in the Input tab are correct).
  3. Disable the smoke by settings the Smoke Color → Based on option to Disabled.
  4. Equalize the fire color and intensity under the Fire tab. Disable Physically based and copy over the colors from the Pyro shader's color ramp and don't forget to scale them accordingly if the Fire Temperature field on the Pyro shader is remapped with a Fit Range or a Ramp. Reduce the Fire Multiplier until the intensity looks correct - this would typically be 0.1 for an Intensity Scale of 1 on the Pyro shader.


Make sure to disable Emit light under the Fire rollout during this process - the Emit light options work similar to Houdini's Volume Light and will affect the color of the smoke based on the intensity and color of the fire.


The images are rendered with a default headlight