Houdini 20.5 Nodes VOP nodes

Karma Pyro Shader VOP node

Flexible, production-quality smoke, cloud, fire, and explosion shader.

On this page

Overview

This shader can be used to create realistic renders of smoke, fire, and explosion simulations or procedurally generated volumes based on MaterialX.

Smoke and Emission

The combination of these two components make up the final volume render. Some renders such as chimney smoke, dust clouds, and other generic smoke elements only need to be shaded as smoke. Smoke is mainly controlled by its density and color. Emission on the other hand, controls the overall intensity and color of light emitted by the fire.

Each of these components relies on a set of volumes to do its work. A density volume is usually bound to the smoke component, and parameters in the Smoke tab control its resulting look. You can use up to two emissive elements with this shader: scatter, fire.

Scatter uses a scatter volume produced by the Pyro Bake Volume SOP, which can have the effect of internal scattering pre-baked. Although this scattering is an approximation to true behavior, this approach is much cheaper to render compared to using volume lights and a high number of volume bounces. It also gives you greater artistic control over the look.

Fire provide a more traditional set of controls that mirrors Pyro Shader - Classic. In particular, it needs an intensity and a color field, governing the amount and color of the emitted light, respectively. Similar to scatter, fire can also be masked by another volume.

Tip

All range settings should consider the range of values in their respective bound volumes. The Pyro Solver will write the minimum and maximum values for each exported volumes into primitive attributes when Compute Min/Max Values is enabled on the Export tab.

Emission Masking

The Pyro Shader has the ability to mask scatter and fire by another field. By default, the mask field is set to density, and its effect is to reduce emission in areas with higher density. Masking is especially useful when rendering explosions, since it can introduce crunchy details to the soot. When used correctly, the volume will appear to glow internally, with this glow peeking through cracks in the smoke.

The following image shows the smoke, scatter, scatter mask, and the final combined image.

Scatter, Fire

The three possible emissive components are combined together for the final render, but they all serve different purposes.

  • Scatter is mainly used to emulate light scattering inside an explosion and it relies on a special scatter volume that can be generated by Pyro Bake Volume.

    Smoke and scatter versus just smoke:

  • Fire can be used for shading fire and flames. By default, it uses temperature volumes for both emission intensity and color. Masking can also be applied to this component.

    Smoke and fire versus just smoke:

Clouds

Clouds exhibit strong multiple light scattering dominated by scattering in the light direction. This means rendering realistic clouds requires high anisotropy value (around 0.877) and multiple volumetric ray bounces, therefore are much more complicated and expensive to evaluate.

Cloud Render with Multiple Volumetric Ray Bounces

The image of the left side shows a billowy cloud with Anisotropy set to 0.877, however the Volume Limit on Karma Render Settings is set to 0, as a result, it renders the cloud black. To let more light through the cloud, the image on the right uses Volume Limit of 32. This is a step towards the right direction; however, the render time already considerably increased. Setting Volume Limit to 100 or even above 200 would further improve the cloud look, however render times would increase drastically.

Luckily, there are some tricks we can utilize to improve the quality of the cloud look, while lowering render time and keeping the Volume Limit at 32.

  • Density Adjustment

    We can exponentially decrease the cloud density with each volumetric ray bounce using by increasing the Extinction Falloff parameter on the shader. This helps to brighten the shadowed regions since the rays are less attenuated and exit the medium sooner with a fewer number of ray bounces. This effect helps to reduce rendering time for clouds that otherwise need many more ray bounces.

    While it is very tempting to considerably increase Extinction Falloff to shorten render time, the look of the cloud must be considered.

    In the following video, the Extinction Falloff is animated from 0 to 1. Notice, at first the cloud brightened, specially the shadowed regions. In this example, the cloud reaches its peak brightness at values roughly between 0.127-0.21. Any value within this range is ideal to work with, while further increase will only make the cloud less bright with little contrast.

  • Anisotropy Adjustment (Roughness)

    Similarly to the density adjustment, we can also control anisotropy based on the number of volumetric ray bounces. One way to do this is to enable Roughness for anisotropy, which will exponentially lower the anisotropy towards zero with each volumetric ray bounces.

    This video shows the effect of increasing Roughness when the Extinction Falloff is set to 0.21. With increasing value, the cloud brightens, and we achieve the typical white powder like billowy look. The larger the roughness, the denser the cloud and sharper the details will become.

    The two images compare Extinction Falloff values against the same amount of Roughness. The right side of the image uses too high (0.75) extinction falloff value making the cloud pale with less contrast.

  • Anisotropy Adjustment (Secondary Anisotropy)

    As an alternative, instead of Roughness, enable Use Secondary Anisotropy to blend between two anisotropy values.

    The image on the left side shows a render using Roughness set to 1, while the image on the right side rendered with secondary anisotropy enabled, and uses 0.5 as Secondary Mix and 0 as Secondary Anisotropy. The image on the left side is considerably smoother, with less sharp details. This can be helped to an extent by increasing Roughness. On the other hand, the image on the right side seems to drastically increase the brightness of areas with less density.

    This video shows the effect of changing the Secondary Mix. Notice how the render becomes much noisy with various mix values, which is not an issue when using Roughness to change anisotropy.

Parameters

Smoke

Enable Smoke

Enables the smoke aspect of the volume. Smoke absorbs and attenuates light traveling through it. Use Smoke Volume to identify the volume storing the smoke’s density.

Density

Density Scale

Controls the overall density of the smoke. Increasing this value will give the smoke a thicker appearance. Reducing it will make the smoke less opaque. To remap the thickness of the smoke, change the menu on the right side of this parameter from Constant to Use Ramp.

Density Range

Specifies the horizontal extent of the Density Ramp, which is evaluated to get the transformed smoke density.

This parameter is available when the menu next to Density Scale is set to Use Ramp.

Density Ramp

Controls how the smoke’s density values are remapped. The horizontal axis of this ramp spans Density Range.

This parameter is available when the menu next to Density Scale is set to Use Ramp.

Control Range

The values of Density Control Volume are remapped from this range to Scale Range before the result is multiplied by density values.

Scale Range

Controls the range of multipliers that can be applied to density by the control volume. Set the menu on the right to Use Ramp if you want to control the mapping. When this menu is set to Constant, mapping is linear.

Control Ramp

Determines how the control volume values are mapped to density scales. The horizontal and vertical axes of this ramp span Control Range and Scale Range, respectively.

This parameter is available when the menu next to Scale Range is set to Use Ramp.

Color

Smoke Brightness

Controls the overall smoke brightness. This value acts as a multiplier on top of the smoke color. Increase this value to get brighter smoke.

Smoke Color

Controls the overall color of the smoke. To get more natural looking smoke, change the menu on the right side of this parameter from Constant to Use Ramp. This will allow you to vary the smoke’s color with its density.

Source Range

The minimum and maximum values (given by Smoke Color Source Volume) to map to the left and right endpoints of the Density Color Ramp.

Shadow Color Ramp

Controls how the values (given by Smoke Color Source Volume) are mapped to its smoke color. The horizontal axis of this ramp spans the Source Range.

Absorption Color

The color that is absorbed as light travels through the volume.

Source Range

The minimum and maximum values (given by Absorption Color Source Volume) to map to the left and right endpoints of the Absorption Color Ramp.

Absorption Color Ramp

Controls how the values (given by Absorption Color Source Volume) are mapped to its absorption color. The horizontal axis of this ramp spans the Source Range.

Shadow Color

The color of shadows cast by the volume. Change the menu on the right side of this parameter from Constant to Use Ramp to change the color of the shadow based on smoke density.

Source Range

The minimum and maximum values (given by Shadow Color Source Volume) to map to the left and right endpoints of the Shadow Color Ramp.

Shadow Color Ramp

Controls how the values (given by Shadow Color Source Volume) are mapped to its shadow color. The horizontal axis of this ramp spans the Source Range.

Shadow Density

This multiplier applies on top of Density Scale when the volumes are lit. Increasing this value will result in less light penetrating the volume, without affecting the smoke’s opacity to the viewer. Decreasing this value reduces the light’s absorption, without changing how opaque the smoke appears.

Tint Smoke Color with Cd

When turned on, the smoke color set by the Smoke Color parameter is multiplied by Cd color volume (given by Cd Volume) if it exists to obtain the final smoke color.

Mix Smoke Color with Cd using Alpha

When turned on, the Alpha volume is used to blend between the Smoke Color and the Cd volume (given by Cd Volume) instead. Where alpha has a value of 1, it will use the color from the Cd volume and where Alpha is 0, it will use the color set by Smoke Color. When this checkbox is turned off, the smoke color is the product of these two values instead.

Anisotropy

Anisotropy

Controls the direction in which light entering the volume is scattered. At the default of 0, light scatters evenly in all directions (isotropic scattering). Positive values up to 1 scatter more and more in the same direction as the incoming light. Negative values down to -1 scatter backwards. For clouds use a value around 0.877.

Roughness

Use this to control how fast the a none-zero anisotropy value (given by Anisotropy) changes to 0 based on the number of volumetric ray bounces. This is used for cloud rendering when the Anisotropy value is set to a large forward scattering value (around 0.877). The larger this value, the brighter, sharper, and less noisy the cloud will render. Larger density clouds require larger values as well. To render a volume with multiple volumetric ray bounces, increase the Volume Limit on the Karma Render Settings LOP.

The video shows the effect of increased roughness on a cloud volume:

Use Secondary Anisotropy

Enables a secondary phase function, which is blended linearly with the primary anisotropy. This allows the phase function to include both forward (positive values) and backwards (negative values) scattering. This can improve cloud rendering where you can fill in the cloud with backwards scattering, while maintaining the silver lining on the edges with forward scattering.

Secondary Mix

Controls the blend between the primary (given by Anisotropy) and secondary anisotropy (given by Secondary Anisotropy).

This video shows the effect of changing secondary mix:

Secondary Anisotropy

Controls the secondary scattering that can improve cloud rendering. To preserve a silver lining on the edges of the cloud, make the primary scattering (given by Anisotropy) largely positive, while using 0 or lower values for this parameter to make the center of the cloud look more 'dark'.

Multiscatter

Extinction Falloff

When the number of volumetric ray bounces reached the Start Level, the extinction coefficient is scaled by the power of this value. A value of 0 has no effect, while a value less then 1.0 exponentially reduces the extinction coefficient, which helps to brighten the shadowed regions since the rays are less attenuated and exit the medium sooner with a fewer number of ray bounces. This effect helps to reduce rendering time for clouds that otherwise need many more ray bounces. To render a volume with multiple volumetric ray bounces, increase the Volume Limit on Karma Render Settings .

The video shows the effect of increased falloff on a cloud volume:

Albedo Contribution

A constant multiplier for the albedo that is used in phase function. This helps to increase the direct lighting contribution. Values above 1.0 might appear softer and more translucent. To render a volume with multiple volumetric ray bounces increase the Volume Limit on Karma Render Settings .

Start Level

This number of volumetric ray bounces must be reached before the Extinction Falloff and Albedo Contribution multiplier takes effect. To render a volume with multiple volumetric ray bounces increase the Volume Limit on Karma Render Settings .

Scatter

Enable Scatter

Enables the scattered emission aspect of the volume. Use this for shading explosions. This will generate the Scatter Volume, which is also used for rendering. Use Source Volume to identify the volume that controls this emission.

Explosion viewed with and without scatter enabled (Enable Mask is turned off).

Scatter

Intensity Scale

Sets the emission intensity for the scatter. Increase this value to make the scatter brighter.

Hot Core Scale

Scales the emission intensity for the scatter where the luminance of the scatter is bright. As the explosion fades off over time, you will see the effect of this parameter less and less even with very large values because over time the luminance of the scatter value is getting less and less. It is good to boost your explosion brightness at the beginning of the explosion. Increasing the value of Hot Core Scale brightens the explosions fissures.

Color Correct

Turns on the color correction controls for the scatter color.

Hue

Rotates the color hue, with values wrapping at 0-1 boundaries.

Saturation

Adjust the color saturation.

Masking

Enable Mask

Masks the emission based on the Mask Volume using a threshold range. Mask Center and Mask Width control the masking range. By default, where the mask volume is at the minimum and maximum of this range, the additional emission multiplier is 1 and 0, respectively. Emission is reduced in areas where the mask value is larger. Masking is useful for bringing out crunchy details for an explosion.

Scatter with and without masking.

Mask Center

In conjunction with Mask Width, this parameter controls the range of values used for masking emission. The effective range of mask values is from Mask Center - Mask Width * 0.5 to Mask Center + Mask Width * 0.5. When set to a lower value, more of the emission will be masked and the explosion will glow less brightly. When set to a higher value, the volume will appear to glow internally, with this glow peeking through cracks in the smoke.

The video shows the effect of increasing this parameter while keeping Mask Width fixed.

Mask Width

Controls the range of values used for masking emission, in conjunction with Mask Center. The effective range of mask values is from Mask Center - Mask Width * 0.5 to Mask Center + Mask Width * 0.5.

Use Mask Ramp

Use a ramp to set how the emission changes between the minimum and maximum mask threshold (as set by Mask Center and Mask Width).

Mask Ramp

Sets how the emission changes between the minimum and maximum mask values (as set by Mask Center and Mask Width). White means full emission and black means no emission.

Note

The default white to black ramp will produce the exact same results as having Use Mask Ramp turned off.

When the ramp is set white to black from left to right:

When the ramp is set black to white from left to right:

Fire

Enable Fire

Enables a secondary emission component. Fire is mainly used for fire and flame type simulations.

This component is very similar to scatter. The only differences are that scatter has to use the same field for emission intensity and color, and scatter offers blurring to spread out the emission.

Fire simulation viewed with and without fire enabled (Enable Mask is turned off).

Fire simulation viewed with fire enabled and with scatter enabled on top.

Intensity

Intensity Scale

Sets the emission intensity for the fire. Increase this value to make the fire brighter. Set the menu on the right side of this parameter to Use Ramp to remap the intensity.

Source Range

The minimum and maximum source values to map to the left and right endpoints of the Fire Intensity Ramp. Increase the minimum source value to reduce the emissive parts of the volume.

By increasing the minimum value from zero, the area of the fire will shrink (Enable Mask is turned off).

Fire Intensity Ramp

Controls how the raw Intensity Volume values are mapped to effective intensity. The horizontal axis of this ramp spans Source Range.

Color

Color Mode

Sets how the color is calculated for the fire. Color Ramp will map the colors using Fire Color Ramp from the given Source Range. Choose Physical Blackbody or Planck Backbody to compute color based on the temperature of an incandescent blackbody.

Note

Planck Blackbody incorporates emission power into the calculated color. The power scales rapidly at high temperatures, so you might need to reduce emission intensity to compensate. To use the pure physical blackbody color, set emission intensity to constant 1.

Source Range

The minimum and maximum source values to map to the left and right endpoints of the Fire Color Ramp.

Fire Color Ramp

Controls how the Color Volume values are mapped to emission color. The horizontal axis of this ramp spans Source Range.

Temperature Scale

Scale applied to the Color Volume values before they are mapped to blackbody color.

Masking

Enable Mask

Masks the emission based on the Mask Volume using a threshold range. Mask Center and Mask Width control the masking range. By default, where the mask volume is at the minimum and maximum of this range, the additional emission multiplier is 1 and 0, respectively. Emission is reduced in areas where the mask value is larger. Masking is useful for bringing out crunchy details for an explosion.

Scatter with and without masking.

Mask Center

In conjunction with Mask Width, this parameter controls the range of values used for masking emission. The effective range of mask values is from Mask Center - Mask Width * 0.5 to Mask Center + Mask Width * 0.5. When set to a lower value, more of the emission will be masked and the explosion will glow less brightly. When set to a higher value, the volume will appear to glow internally, with this glow peeking through cracks in the smoke.

The video shows the effect of increasing this parameter while keeping Mask Width fixed.

Mask Width

Controls the range of values used for masking emission, in conjunction with Mask Center. The effective range of mask values is from Mask Center - Mask Width * 0.5 to Mask Center + Mask Width * 0.5.

Use Mask Ramp

Use a ramp to set how the emission changes between the minimum and maximum mask threshold (as set by Mask Center and Mask Width).

Mask Ramp

Sets how the emission changes between the minimum and maximum mask values (as set by Mask Center and Mask Width). White means full emission and black means no emission.

Note

The default white to black ramp will produce the exact same results as having Use Mask Ramp turned off.

When the ramp is set white to black from left to right:

When the ramp is set black to white from left to right:

Bindings

Smoke

Density Volume

The name of the volume to be used as smoke. Usually you should leave this as density.

Density Control Volume

The control volume used to modify smoke density values. This volume is used if Scale by Control Volume is turned on. Use tempearture or flame for fire effects, where you want the density scaled according to your emissive volume.

Smoke Color Source Volume

Selects the volume that is used for mapping the smoke color. Setting this to Smoke Density will use the modified smoke density by the shader. Otherwise, Geometry Volume will use the specified incoming volume from the geometry.

Custom Volume

The volume that is used for mapping the smoke color.

Absorption Color Source Volume

Selects the volume that is used for mapping the absorption color. Setting this to Smoke Density will use the modified smoke density by the shader. Otherwise, Geometry Volume will use the specified incoming volume from the geometry.

Custom Volume

The volume that is used for mapping the absorption color.

Shadow Color Source Volume

Selects the volume that is used for mapping the shadow color. Setting this to Smoke Density will use the modified smoke density by the shader. Otherwise, Geometry Volume will use the specified incoming volume from the geometry.

Custom Volume

The volume that is used for mapping the shadow color.

Cd Volume

The name of the volume to be used as the color volume. Usually you should leave this as Cd.

Alpha Volume

The name of the volume to be used as the alpha volume. Usually you should leave this as Alpha.

Anisotropy Control Volume

Scatter

Scatter Volume

The name of the volume to be used for the scatter color. Usually this volume is created by the Pyro Bake Volume node.

Mask Volume

Selects the volume that is used for masking the scatter emission, when Enable Masking is on. Setting this to Smoke Density will use the modified smoke density by the shader. Otherwise, Geometry Volume will use the specified incoming volume from the geometry.

Custom Volume

The volume that is used for masking the scatter emission.

Alpha Volume

Selects the volume that is used for multiplying the scatter emission, when Enable Masking is on. Setting this to Smoke Density will use the modified smoke density by the shader. Otherwise, Geometry Volume will use the specified incoming volume from the geometry.

Alpha Volume

When Enable Mask is on, the scatter emission is multiplied by this volume.

Fire

Intensity Volume

The name of the volume to be used for the intensity of fire.

Color Volume

The name of the volume to be used for the color of fire.

Mask Volume

Selects the volume that is used for masking the fire emission, when Enable Masking is on. Setting this to Smoke Density will use the modified smoke density by the shader. Otherwise, Geometry Volume will use the specified incoming volume from the geometry.

Custom Volume

The volume that is used for masking the fire emission.

Alpha Volume

Selects the volume that is used for multiplying the fire emission, when Enable Masking is on. Setting this to Smoke Density will use the modified smoke density by the shader. Otherwise, Geometry Volume will use the specified incoming volume from the geometry.

Custom Volume

When Enable Mask is on, the fire emission is multiplied by this volume.

See also

VOP nodes