Houdini 21.0 Nodes Copernicus nodes

Height to Shadow Copernicus node

Creates shadows using a virtual light source.

On this page
Since 21.0

This node generates shadows using a virtual light source. The node provides approximate shadows based on the given height field. This node is useful for shading and texture synthesis.

For each pixel, this node applies a light source and then determines how occluded that light source is based on the height values of its neighboring pixels. For example, if you're standing on pixel (450, 450) and that pixel’s in a valley with mountains around it, the light source is occluded because the mountains block the sun’s rays.

This node is similar to the Height to Ambient Occlusion COP (especially when its Sample Count is 1), but also lets you control the light position.

Tip

Wire a noise node like the Fractal Noise COP into this node.

Parameters

Height

Height Scale

The amount (in image space) to scale the height values of the input layer’s pixels, which controls the length of the shadows. Higher values increase the height of the pixels and darken their grayscale. Lower values decrease the height of the pixels and lighten their grayscale.

You should set this parameter to lower values since Copernicus uses image space.

Note

Though lower values can make the pixel appear flat (all similar shades of white), the pixel may be elevated. Use the pixel inspector to confirm whether the pixel is flat.

For example, if you set Height Scale to 1 and your input’s width is a value of 2, the result is that black to white is an increase in elevation to the same height value as half of the image’s width (1). To preview the Height Scale, you can wire your output into the Preview Material COP’s height input (see the following example image).

Quality

View Radius

The distance (in image space) to send rays to determine if a pixel’s occluded. Higher values increase the distance you send the rays and provide more accurate measurements, but may slow cooking. Lower values decrease the distance you send the rays.

The default value is 0.2.

Step Scale

How many steps (in buffer space) to take along the rays to determine if a pixel’s occluded. Higher values create less steps and therefore cook faster, but may miss thin features since the steps are more spread out. Lower values create more steps, which are closer together.

The default value is 0.5.

Light Source

Type

The light source profile to use.

Disk

Sets the virtual light source as a disk, which distributes lights over the area of a disk. This corresponds to an area light as used in rendering engines.

Sphere

Sets the virtual light source as a sphere, which distributes lights along the outside surface of a sphere. This corresponds to a sphere light as used in rendering engines.

Directional

Sets the virtual light source as a directional light, which emits a point light source at infinity. This corresponds to a directional light as used in rendering engines.

Coordinates

The coordinates to use to control the position of the light source.

Spherical

Use spherical coordinates , which use distance and two angles to define a point.

Cartesian

Use Cartesian coordinates , which are the X, Y, and Z locations along the axes.

Distance

When Coordinates is Spherical, this is the distance in image space between the origin and the light source.

Altitude

When Coordinates is Spherical, this is the angle in degrees of the light source relative to the Z-axis.

Azimuth

When Coordinates is Spherical, this is the angle in degrees of the light source relative to the X-axis on the XY-plane.

Position

When Coordinates is Cartesian, this is the 3D position of the light source.

Radius

The radius in image space of the light source.

Lock Normal

Lets you configure the fixed normal vector of the Disk's light source.

Normal

The fixed normal vector of the Disk's light source, which adjusts the angle between the light source and the surface plane.

Inputs

height

The original height layer from which to calculate shadows.

Outputs

shadow

The shadowed layer.

See also

Copernicus nodes