Houdini 22.0 Nodes Copernicus nodes

Refract from Height Copernicus node

Refracts an image through a height layer.

On this page
Since 22.0

This node treats a height input as the surface of a transparent medium and a source image as a layer on the ground below it. Use this node to create images seen through water, glass, thin ice, or other transparent surfaces.

The node traces view rays through the surface, refracts (bends) the rays using the surface normal, and then samples the source image at the position where the rays reach the ground.

Note

When you wire in a normal input, the node uses that normal input for surface normals instead of computing them from the height's derivatives.

When you wire in a ground input, the node ray traces against that ground height layer. Otherwise, the node uses a flat ground plane.

Wire in an envmap input to add Fresnel-style reflection (which varies based on the viewing angle to the surface) from an environment map. When the source has an alpha and you wire in an envmap, the transparent sections of the source reveal the refracted environment behind it.

How to

For example, use the following steps to refract an image through a transparent medium.

Note

Only the source input is required for this node to work.

  1. Wire the image that you want reflected in the water into the Refract from Height COP’s source input.

    For example, connect a File COP configured with the default.pic butterfly image.

  2. Wire a noise COP into the Refract from Height COP’s height input.

    For example, connect a Fractal Noise COP that has low Amplitude and Roughness. This is a basic setting and reflects the fact that caustics are often under a gentle water surface.

  3. Set the Refract from Height COP’s Material to Water and configure the Color parameters to adjust the color and lighting of the transparent medium.

    Tip

    Since height is the water surface, you can further adjust how the water distorts the source image with the Refract from Height COP’s Height parameters.

You now have an image that’s reflected in water. Adjust the view ray direction (View Azimuth and View Altitude) or position (View Position) to alter the display location of the image.

Parameters

Signature

The layer type that the source accepts.

See Signatures for more information.

Filter

The method used to sample the source image.

See Filters for more information.

Space

The space to use for the view ray direction or position.

Local

Use the source input’s local space for the view ray direction or position.

World

Use world space for the view ray direction or position.

Normal Type

The format of the connected normal input.

See Normals for more information.

Signed (-1 to 1)

Treat the input as signed normals, which are compatible with geometry attributes.

Offset (0 to 1)

Treat the input as offset normals, which are compatible with normal maps.

Directional

Traces rays from a directional view. When off, the node uses a point view position.

View Azimuth

The horizontal angle (in degrees) of the directional view ray.

View Altitude

The vertical angle (in degrees) of the directional view ray above the horizon.

View Position

The position of the point view ray in the set Space.

Height

Index of Refraction

The index of refraction of the transparent medium, which determines how much to bend the light when it enters the surface (height).

The default value (1.33) approximates water.

Height Offset

The amount to add to the height before tracing rays. When you wire in a normal input but no height input, this sets the flat surface height.

Height Scale

The amount by which to multiply the height before tracing rays. This turns off when you connect a normal input.

Compute Derivative outside Image

Lets the Derivative COP in the node’s subnetwork read outside the image bounds when it calculates the height surface. This affects the surface normals used for refraction.

Kernel Size

The Kernel Size of the Derivative COP in the node’s subnetwork when it calculates the height surface.

Ground

These parameters control the ground input. If this input isn’t connected, the node uses a flat ground plane.

Index of Refraction

The index of refraction of the medium below the ground surface.

The default value (1.0) approximates air.

Ground Offset

The amount to add to the ground's height before tracing ray intersections.

Ground Scale

The amount by which to multiply the ground's height before tracing ray intersections.

Ray Trace Iterations

The number of Newton iterations to use to approximate where refracted view rays intersect with the ground height layer.

Compute Derivative outside Image

Lets the Derivative COP in the node’s subnetwork read outside the image bounds when it calculates the ground layer. This affects the ray-ground intersection solve.

Kernel Size

The Kernel Size of the Derivative COP in the node’s subnetwork when it calculates the ground layer.

Color

Material

The transparent material used for spectral dispersion and absorbance, which samples wavelengths using that material’s dispersion model. Higher Number of Colors values create smoother dispersion.

Water

Uses water-like dispersion and absorbance.

Glass

Uses glass-like dispersion and absorbance.

Diamond

Uses diamond-like dispersion and uniform absorbance along the entire wavelength.

Medium Color

The tint (color) of the transparent medium.

Light Absorbance

The amount of light absorbed as rays travel through the medium. Higher values darken the deep or long paths and increase how much the medium’s material and color affects those paths.

Dispersion

The amount of spectral dispersion. Higher values increase the separation between wavelengths so the individual RGB bands expand.

Number of Colors

The number of wavelength samples used for dispersion. Higher values create smoother spectral dispersion, but take longer to cook.

Reflection

Strength

The strength of the reflected environment.

Bias

The distribution of the reflection. Lower values broadly spread the reflection across the surface, while higher values concentrate the reflection near stronger Fresnel highlights.

Color

The tint (color) of the reflection.

Saturation Scale

The amount by which to multiply the saturation of the reflected environment.

Environment Map Offset

When you connect an envmap input, this is the amount to rotate the environment map projection that’s used for reflection and refracted background lookup.

Inputs

source

The source layer to sample through the height refractive surface.

height

The height layer that represents the refractive surface of the transparent medium. When you wire in a normal input, the node uses that normal input for surface normals instead of computing them from the height’s derivatives.

ground

An optional height layer that represents the ground surface on which the source image is sampled.

normal

An optional RGB layer that stores the surface normals in Signed or Offset format (set by Normal Type).

envmap

An optional environment map used for surface reflection and for the refracted background behind transparent source pixels.

Outputs

result

The final RGB image that’s refracted and reflected.

refract

The RGB image that contains the refracted source image.

reflect

The RGB image that contains the reflected environment.

See also

Copernicus nodes