Houdini 16.5 Nodes VOP nodes

Surface Model Shader VOP node

A powerful, highly flexible, general model for surface shading.

On this page

Overview

This node is a fully featured model of surface shading. It supports diffuse, specular, and refractive components and computes direct lighting (from light sources) and indirect lighting (lighting bouncing off other objects in the scene).

Since the Surface Model itself takes care of lighting and simulates most physical properties, simply connecting the Surface Model VOP to the output would create an "uber-shader" capable of simulating most surfaces.

For more information on building a material shader with VOPs, see creating materials.

These are the main features:

  • Diffuse reflection

  • Specular reflections with 2 separate layers

  • Refraction

  • Subsurface scattering

  • Emission controls

In non-physically based renders, this node adds support for the following:

  • Per-light exports

  • Variance antialiasing support for area lights

  • Variance antialiasing support for raytracing

Tip

Most of the parameters are available as inputs but are hidden by default. See working with VOPs for information on connecting hidden inputs.

Reflectivity

This node uses reflectivity (or intensity) to scale the different contributions. For example, the default look reflects 50% of the incoming illumination as diffuse and 10% as specular reflection. The remaining 40% is absorbed by the surface and not reflected into the scene. Using reflectivity makes it easy to model real materials and ensure energy is conserved (that is, to ensure the surface shader does not increase the amount of light in the scene). It also lets you accurately predict how much indirect light will be present in a physically based render.

This is significantly different from how you specify diffuse and specular amounts in older shaders such as the plastic shader or the Lighting Model VOP. In those nodes, varying the specular highlight size by changing the roughness would have a dramatic effect on the surface reflectivity, making it difficult to predict the amount of light in the scene when using physically based rendering. With this node, you can vary the specular highlight size and anisotropy without having any effect on the total amount of light reflected by that component.

The side effect of this design is that the maximum intensity of the specular highlight varies as you change the roughness and anisotropy. For this reason, sharp specular highlights you create with the Surface Model node often appear much brighter.

Tip

To measure the actual reflectivity of a material, place a sphere under a default white environment light, and inspect the color of the surface under this simple lighting. The average pixel color is the actual shader reflectivity.

Reflectivity and point/spot lights

The default diffuse reflectivity (or intensity) of the surface model is 0.5. However, when rendering using light sources with non-physical attenuation (for example, a default point light), pixels can have values higher than 0.5, especially where the light hits the surface directly. Even though the image appears brighter, the actual surface reflectivity is still 0.5 – the brighter image is the result of a higher default intensity for these light types.

In particular, the following non-physical light source types will do this:

  • Point/spot lights with No Attenuation on.

  • Distant/sun lights

  • Area lights with No attenuation and Normalize Light Intensity to Area on.

If you increase the reflectivity above 0.5 for physically based renders, the maximum brightness in the image can be above 1 if you use these light types. To reduce the brightness of the image in these cases, decrease light intensities (instead of decreasing Diffuse Intensity), since changing light intensity doesn’t affect the proportion of reflected light in the scene for physically based renders.

Anisotropic highlights/reflections

Anisotropic materials have different physical properties in one direction. Classic examples are hair, brushed metal, and record albums (ask your parents, kids!), which all have "stretched" reflections/highlights along one direction because of how light interacts with microscopic grooves in the material.

  • The Specular anisotropy parameter on the Reflect tab controls the direction of the highlights. Negative values stretch the highlight along the V direction. Positive values stretch the highlight along the U direction.

  • The Tangent style controls how the node decides which directions on the object correspond to U and V. You can use the inherent tangents, world or local space, UV attributes, or for complete control hook up the U tangent (utan) and V tangent (vtan) inputs.

Exporting image planes

This node exports a large number of variables you can use to create extra image planes when rendering to the OpenEXR format. It is often useful for compositing and special effects to have, for example, the diffuse and specular output of the shader as separate images.

For example, you can export the shader’s direct/indirect/combined diffuse/reflect/refract output, scattering, samples, and so on. You can export the total output for each variable, or separate per-light exports.

See the Extra image planes parameter of the mantra render node for more information.

Parameters

Diffuse

This tab controls diffuse reflection (in simple terms, the overall color of the surface). The default values reflect 50% of the incoming light.

Enable Diffuse

Enables diffuse reflection.

Diffuse Intensity

The proportion of incoming light reflected back as the diffuse component, from 0 (no diffuse reflection) to 1 (all incoming light is reflected). Non-attenuated lights such as point lights and spot lights may produce brighter pixel values than this value.

(Old shaders such as the VEX Plastic shader implicitly have a reflectivity of 0.5 when the shader’s diffuse coefficient is set to 1.)

Diffuse Minimum

When Fresnel Blending is on, controls the minimum amount of reflection that will not be blended with the Fresnel factor. Diffuse components are blended with the transmissive Fresnel component.

Fresnel blending of the diffuse component only makes sense when one or both specular reflection layers are on. If there is no specular reflection, you should turn off Fresnel Blending.

Diffuse Color

The color reflected by the object (technically, the reflectivity of red, green, and blue color components).

Oren-Nayar Roughness

A floating point value used to control the size or spread of the diffuse component. Higher values make the surface look less glossy with flatter color.

Diffuse Component

Specifies a label for the BSDF component. This can be used to export contributions from this component to a separate image plane.

Subsurface

This tab controls subsurface scattering. This node provides a subset of the interface of the Physical SSS node. If you need even more control over subsurface scattering, you may want to create a Physical SSS node yourself.

Enable Subsurface Scattering

Simulate subsurface scattering of light through the object.

Subsurface Albedo

The overall proportion of light that is scattered, from 0 (no scattering) to 1 (all light is scattered). Higher subsurface albedo values will produce more multiple scattering and a greater scattering distance.

Subsurface Color

The dominant color in lit areas of the surface.

Subsurface Minimum

The minimum scattering intensity.

Attenuation Density

How quickly the light intensity decreases as it scatters. Higher values make the lighting level decrease faster. Available when Parameter mode is Artist.

Attenuation Color

The color tint that light takes on as it’s scattered under the surface. In practice, this controls the "far side" color of subsurface scattering.

Scattering Phase

Controls the nature of the scattering. Positive values give forward scattering, 0 gives isotropic scattering, and negative values give backscattering. Range is -1 (full backscattering) to 1 (full forward scattering).

The value depends on the type of material you are trying to model. For example, skin is highly forward scattering, while marble is backscattering.

Enable RGB Spectral Scattering

Enables independent scattering of the red, green, and blue color components. When enabled, an independent scattering and absorption coefficient will be used for each color component, leading to more accurate renders - though the results can sometimes show colors that are complementary to the attenuation color. For example, with a blue attenuation color, shorter scattering distances will render with a yellow tint. To partially eliminate this unpredictable effect, disable this toggle.

Enable Single Scattering

Enable/disable contribution from light that scatters exactly once in the surface. Certain types of surfaces (such as skin) gain little contribution from single scattering and so disabling this option will reduce computation time with little impact on accuracy.

Single Intensity

A scaling factor for the contribution of single scattering to the surface color, from 0 (no contribution) to 1 (full contribution).

Single Quality

The number of samples for single scattering. Increase this option to decrease noise at the expense of slower shading.

Enable Multiple Scattering

Enable contribution from light that scatters more than once in the surface. For low albedo materials (low Subsurface Albedo), multiple scattering contributes little to the image and can be disabled to reduce computation time.

Multi Model

Controls the way in which multiple scattering is computed. Normally you should use the Local And Global mode if you are planning to use a point cloud, and Ray Tracing to compute multiple scattering without a point cloud. Using a point cloud can produce smoother and faster results, but it requires precomputation of a point cloud and computation of irradiance for each point in the cloud (once per render).

Ray Tracing

Use ray tracing rather than a point cloud to approximate multiple scattering. This option avoids point cloud calculations but may require more sampling to eliminate noise.

Full Ray Tracing

When an single object is made of multiple packed primitives (i.e. multiple Alembic shape nodes), each shape will have local multiple scattering. With Full Ray Traced, all individual packed primitives will be considered when computing multiple scattering.

Local BRDF

Only use a BRDF function to compute the multiple scattering contribution. This is the fastest option, though no subsurface diffusion will be produced.

Global Point Cloud

Use a point cloud to compute the multiple scattering contribution. This option requires a precomputation stage to generate the point cloud and to calculate and cache the surface irradiance values in the point cloud.

Local And Global

Use the BRDF function to compute the local contribution and the point cloud to compute the global contribution, with the Local Radius Scale parameter controlling the local radius. This option will usually produce more accurate results than using a point cloud alone, especially for short scattering distances.

Path Tracing

Simulate subsurface scattering by path tracing through it as a volume. This options is slow and noisy but will produce the most accurate results - so it may be used to produce ground truth images for comparison with the other techniques.

Point Cloud Mode

Controls how the shader generates a point cloud. The simplest option is to select Generate At Render Time. This will create a new point cloud for every render. To reduce computation time, you can first use Write To File mode and then re-use the point cloud using Read From File mode on subsequent renders. This is also the recommended approach when rendering animations because the shader will smoothly interpolate the point cloud across frames. The exception to this is when the model’s topology changes (two joined polygons are separated, for example). In this case, a new point cloud must be generated. Note that in Write To File mode, the file will be overwritten if it already exists. Cancelling a render before it completes in Write To File mode may result in an unusable point cloud file.

See managing point clouds for more information.

Generate At Render Time

Always regenerate the point cloud whenever the node renders. This is convenient since you don’t have to worry about file management, and can be useful when you are modifying the shader and model at the same time. However, for efficiency you should cache the point cloud, especially when rendering animation.

Read From File

Read the point cloud from a file (specified in the Point Cloud parameter below), generated using the Write To File mode.

Write To File

Write the point cloud to the file specified in the Point Cloud parameter below.

Point Cloud

Controls the file the point cloud is written to/read from when Point Cloud Mode is Write To File or Read From File. The point cloud is based on surface UVs, so it is not necessary to write a new point cloud file for each frame unless the topology of the model is changes.

Multi Intensity

A scaling factor for the contribution of multiple scattering to the surface color, from 0 (no contribution) to 1 (full contribution).

Multi Quality

Controls the number of samples in the point cloud. Low values give fast renders but a sharper, less accurate look. High values give slower renders but a blurrier, more accurate look.

Base / Coat Reflection

This tab lets you add one or two layers of specular reflection. The Enable reflection layer checkbox on each tab turns each layer on or off. Turning on both layers does not blend between them, the node simply adds them together.

Enable Reflection Layer

Enables this reflection layer.

Reflect Lights

Light sources (including environment lights) will be reflected. Light source reflections are commonly known as "Specular Highlights".

Specular Model

The mathematical model used to simulate glossy reflections. For each viewing angle and surface normal, the model defines from which directions and at what intensity light is reflected. This is what shapes specular highlights and reflections in general.

The overall glossiness, and with it the size of highlights, is controlled by Roughness. The available models simulate the effects caused by Roughness with varying degrees of physical accuracy, with GGX currently being the most accurate.

The chosen model has no effect when Roughness is 0, since this causes light to be reflected from a single direction at full intensity, making the model irrelevant.

See Roughness for more information.

The figure below shows the result produced by various specular models across a range of roughness values.

Note how rough surfaces look more natural with the GGX model because the interaction of light with the rough surface is modeled more accurately.

Specular Intensity

The proportion of light that is reflected by this specular layer, from 0 (no light reflected) to 1 (all light is reflected).

Specular Minimum

When Fresnel Blending is enabled, controls the proportion of specular reflection that will not be blended with the Fresnel factor. Increasing this parameter will cause a minimum amount of reflection to appear even for rays perpendicular to the surface.

Specular Color

The tint of the specular highlight (technically the reflectivity for the red, blue, and green color components). For example, setting the specular color to 1, 0, 0 will reflect only red light, giving red highlights.

Specular Metallic

Controls how metallic reflections appear. This uses a different method of calculating reflection intensity that is physically correct for conductive materials.

Metallic Edge Tint

Controls the tint color used for the metallic reflection model. This controls the color around the edges of objects (where the surface is seen at a grazing angle). Metals typically have a slightly different tint in these regions.

Specular Roughness

This is a measure of how bumpy a surface is at the microscopic level. The most obvious effect is that reflections become glossier as Roughness increases. At a value of 0, the surface is perfectly smooth and produces perfect mirror reflections. A value of 1 simulates a very rough surface, which results in very blurry reflections, similar to diffuse reflection.

In more accurate Specular Models like GGX, reflections on rough surfaces are also darkened at grazing angles. This is due to Masking-Shadowing effects, where parts of the surface are hidden from view and/or not reached by light due to microscopic grooves and spikes in the surface. Note that this is simulated using a simplified mathematical model, rather than using actual additional geometry.

The visual change when transitioning from 0 to 1 is close to linear.

Specular Anisotropy

Causes reflections to be stretched in the direction defined by Anisotropy Direction.

This simulates microscopic bumps with a directional bias, causing light to be scattered more in the defined direction. This is typical of brushed metals.

The effect of this parameter increases with Roughness. It has no effect at all when Roughness is 0.0.

Anisotropy Direction

Controls the direction of Anisotropy relative to the UV coordinates of the surface. At 0.0, reflections are stretched in the U direction. At 0.5, the direction is rotated by 90 degrees to the V direction. 1.0 equals 180 degrees. Since the effect is symmetrical this produces the same result as 0.0.

The direction of rotation also depends on the UV layout. When the UVs are layed out such that textures appear on the surface without mirroring, higher values rotate counter-clockwise.

The effect of this parameter diminishes with decreasing Roughness and Anisotropy.

Reflect Objects

This reflection layer will reflect other objects in the scene, using raytracing.

Separate Object Reflection Parameters

Enables separate roughness, intensity, and color parameters for object reflections, independent of the parameters for specular reflections. This lets you create artistic (physically unrealistic) differences between the object reflections and light reflections.

Reflection Intensity

The intensity to use for object reflections, when Separate object reflection parameters is on. This overrides Specular Intensity.

Reflection Color

A tint color for object reflections, when Separate object reflection parameters is on. This overrides Specular Color.

Reflection Roughness

The roughness used for object reflections when Separate Object Reflection Parameters is enabled.

Reflection Component

Specifies a label for the BSDF component. This can be used to export contributions from this component to a separate image plane.

Refract

This tab contains parameters for refraction (light bending as it travels through the object, such as in glass or water). Refraction is off by default. If you turn it on the surface will refract light proportional to the Refraction intensity.

For physically plausible results with refractions, you should also turn on Fresnel Blending and Conserve Energy.

Enable Refractions

Turns on simulation of light refracting through the object.

Refract Lights

Light sources (including environment lights) will appear in refractions.

Refraction Model

The mathematical model used to simulate glossy refractions. For each viewing angle and surface normal, the model defines from which directions and at what intensity light is refracted. This is what shapes highlights and refractions in general.

The overall glossiness, and with it the size of highlights, is controlled by Refraction Roughness.

The chosen model has no effect when Refraction Roughness is 0, since this causes light to be refracted from a single direction at full intensity, making the model irrelevant.

Refraction Intensity

The proportion of light refracted by the surface, from 0 (no light refracted) to 1 (all incoming light is refracted).

Refraction Minimum

When Fresnel Blending is on, controls the proportion of refraction that will not be blended with the Fresnel factor. Increasing this parameter will cause a minimum amount of refraction to appear even for rays that graze the surface (and so would normally not refract).

Refraction Color

A tint for the refracted light (technically, the refraction amount for different color components). For example, setting the refraction color to 1, 0, 0 will cause the surface to refract only red light.

Refraction Roughness

Roughness is a measure of how bumpy a surface is at the microscopic level. The most obvious effect is that refractions become glossier as roughness increases.

At a value of 0, the surface is perfectly smooth and produces perfect refractions like glass. A value of 1 simulates a very rough surface, which results in very blurry refractions, like milky glass.

The visual change when transitioning from 0 to 1 should be close to linear.

Refraction Anisotropy

The direction and amount of anisotropy in the refraction. Values less than 0 will sharpen the refraction in the U direction while values larger than 0 will sharpen the refraction in the V direction. When the Refraction Anisotropy is -1 or 1, refractions will have a width of 0 in the other direction.

Refraction Anisotropy Angle

The angle to rotate anisotropic refrations. A value of 0 will align it directly with the parametric directions while other angles rotate clockwise.

Refract Objects

Show refractions of objects. You should normally leave this option on (otherwise no refractions will appear) unless you are simulating a single sheet of reflective material, and you still want light to filter through the object.

Enable Attenuation

Tint the refractions based on the distance the light traveled through through the object, with rays that travel further through the object being more opaque.

Attenuation Density

The density of the material, for calculating attenuation (see above). Larger density values make the material appear more opaque. Setting the density to 0 is the same as turning off attenuation.

Attenuation Color

The color to tint light passing through the object. Technically, this is the inverse of the color that is absorbed (the opacity).

Thin Film Refraction

Treat the surface of the shaded object as a thin refractive film rather than the boundary between the outside of the object and a solid interior. Turn this on to simulate hollow and/or thin refractive objects such as bubbles or windows. The node still uses the refractive index to calculate the proportion of reflection and refraction for fresnel blending, but the transmitted ray will not change direction.

Refraction Component

Specifies a label for the BSDF component. This can be used to export contributions from this component to a separate image plane.

Emission

Enable Emission

Add a constant amount of diffuse light emitted from the surface. For example, with emission on, the object would be visible in the render even if none of the light objects were shining on it. This may be useful in some circumstances, but normally you should simply use an Area Light to add light to the scene more efficiently and controllably, especially if you need to add a lot of light.

Emission Intensity

The amount of emission.

Emission Color

The color of the emitted light.

Emission Illuminates Objects

The light emitted by this object will brighten the surfaces of other objects. When this option is off, the emitted light will be visible in the camera, but will not fall on other objects in the scene.

Opacity

The parameters on this tab control the rendered opacity of the surface, useful for fake transparency effects such as sprite rendering and fake caustics.

Opacity Scale

Scales the value of the Opacity parameter. This is useful as a single number to manipulate rather than having to change all three components of the Opacity parameter together.

Opacity

The opacity for each color component.

Enable Fake Caustics

Transmissive objects produce semi-transparent shadows that attempt to approximate the amount of light that would be transmitted if real caustics were rendered. If you're rendering real caustics using an Indirect Light, turn this parameter off.

Min Shadow Intensity

The minimum shadow intensity to use for fake caustics. Increase this to darken the lightest part of the shadow.

Max Shadow Intensity

The maximum shadow intensity to use for fake caustics. Decrease this to lighten the darkest part of the shadow.

Enable Opacity Falloff

Blend between different opacities for parts of the surface that are perpendicular (head-on) to the camera and parts that are parallel (edge-on).

Parallel Opacity

The opacity to use for rays that are parallel to the surface normal, when Enable opacity falloff is on.

Perp Opacity

The opacity to use for rays that are perpendicular to the surface normal (rays that graze the surface), when Enable opacity falloff is on.

Opacity Rolloff

Controls the blending point between parallel and perpendicular opacity. Values larger than 1 give more parallel opacity, values smaller than 1 give more perpendicular opacity.

Settings

Inside IOR

The interior index of refraction for use in physical Fresnel computations. Water has an index of refraction around 1.33.

Outside IOR

The exterior index of refraction for use in physical Fresnel computations. Air has an index of refraction near 1.

Conserve Energy

Ensures that the surface reflects no more light than it receives. This is important in physically based rendering and raytracing to ensure the illumination in the scene does not increase as the number of raytracing bounces increases. For example, a surface that reflects twice as much light as it receives (by turning off Conserve Energy and setting the Specular Intensity to 2) would produce a unnaturally bright render as you increase the Reflect Limit.

This setting conserves energy by scaling the BSDF by the inverse of its reflectivity when the node detects the reflectivity is greather than 1. This reduces all components of the surface model by the same factor, linearly darkening of the surface.

You can calculate the total reflectivity of a surface (assuming Fresnel Blending is off) by summing the Diffuse Intensity, Specular Intensity (for each layer) and Refraction Intensity. For predictable results, you should try to conserve energy manually by limiting the intensity or reflectivity parameters.

Fresnel Blending

Turns on Fresnel blending, where the reflection and/or refraction amount varies based on the viewing angle to the surface. This allows you to simulate materials such as glass and water. You can control the proportion of Fresnel blending for each component through the "minimum" parameters on the different tabs (for example, Diffuse Minimum on the Diffuse tab).

Diffuse and Refract components use the transmissive component for Fresnel blending, while Reflect components use the reflective component.

Fresnel Style

How the Fresnel blending factor is calculated, either from parameters or the Fresnel input.

Physically Based

Calculate Fresnel factors from the Inside IOR and Outside IOR parameters. These parameters let you simulate the Fresnel properties of real-world physical materials/media by entering their index of refraction values.

Use Connected fresnel

Use the Fresnel input if it is connected. The fresnel input should be the reflective Fresnel coefficient. The transmissive component will be calculated automatically as 1-Fresnel.

If the fresnel input is not connected, uses Inside IOR and Outside IOR blending instead.

Ensure Faces Point Forward

Automatically flip normals if necessary so planal surfaces are diffuse shaded the same way regardless of normal direction. This setting does not apply to refractions and Fresnel reflections since they rely on the normal direction to define inside and outside for Fresnel blending.

Note

If normal maps exported from another software package look strange with this option on, it may be because the normal map was output with flipped normals.

Tangent Style

Controls how this node calculates the direction of anisotropic reflections/highlights.

Use Geometric Tangents

Use the geometric tangents (dPds, dPdt) automatically defined for the type of geometry being rendered. Since the geometry defines the tangents, the highlight is stable as the geometry moves and/or deforms. However, for polygonal geometry, this style of tangent calculation will have discontinuities / artifacts along edges.

Intrinsic World Space

Calculate tangents in world space. Tangents will be smooth across all types of geometry, but the highlights will change if the object moves through space.

Intrinsic Object Space

Calculate tangents in the shaded object’s local space. Tangents will be smooth across all geometry, but the highlights will change if the object deforms.

Compute From UV

Calculate tangents using UV attributes on the object. The U and V tangents will point in the directions of increasing U and V coordinates. As long as the UV coordinates are consistent and smooth, the highlight is stable as the geometry moves/transforms and smooth over polygonal surfaces.

Use Connected utan, vtan

Use the tangent values from the connected utan and vtan inputs. This option allows you to use VOPs connected to the inputs to compute the tangents yourself for maximum flexibility.

Max Ray Distance

For reflections and refractions in non-PBR renders, treat rays that travel farther than this distance (in Houdini world space units) without intersecting any geometry as missed rays.

Inputs

None of these inputs need to be connected for correct operation of the Surface Model node - when left disconnected, the correspondingly named global variable or attribute will be bound automatically.

P

Surface position, used as the origin for raytracing operations from the surface.

N

Surface normal. You can override N to enable bump mapping.

I

Incident ray direction.

uv

Parametric coordinate, for tangent vector calculation when the Tangent Style is set to "Compute From UV". When disconnected, the "uv" parameter will be assumed.

utan

U Tangent vector to use when Tangent Style is "Use Connected utan, vtan".

vtan

V Tangent vector to use when Tangent Style is "Use Connected utan, vtan".

fresnel

Reflective fresnel blending coefficient to use when Fresnel Style is "Use Connected fresnel".

Outputs

The output values can be connected to the output variables in the surface context of the same name.

Cf

The shaded, lit surface color for use in micropolygon rendering and raytracing rendering engines.

Of

The surface opacity.

F

The surface BSDF.

Examples

RainbowGeometryLight

This example highlights several features:

  • Geometry area lights

  • Attenuation ramp controls

  • Surface model specular layers

The example consists of a geometry light based on a wireframe of nurbs curves. The attenuation on the light uses colored keys, allowing for different light colors to be produced at different distances from the light. The ground plane shader uses a surface model with two specular components - one wide component and another narrower glossy component to give a multi-layered appearance.

See also

VOP nodes