|On this page|
This node simulates rays cast on geometry from a direction (or from multiple point sources from the second input), creating a point attribute on the output geometry based on which parts of the geometry are hit by the rays.
Many nodes allow you to scale/limit their effect by an attribute on the geometry. You can use this node to create a "mask" on the effect of these other nodes. For example, the Scatter and Align lets you use an attribute to control where on a surface to scatter points. You can use this node to mask the scatter, for example if you want plants to grow on the tops of things, but not in the dark areas below them. Or if you want to use ambient occlusion to scatter rocks into the cracks of other objects.
With this node selected in the network editor, press Enter in the viewer or click the Handles tool to see the handles for this node.
Use the viewport handles to set the light direction visually.
Tips and notes
Ambient occlusion measures how much "ambient" light (that is, light coming from "outside" in all directions, not from a specific light source) falls on each surface in a scene. This can be useful for finding the "underside" of surfaces, shadows, as well as dark corners and cracks. Use the controls in the Ambient Occlusion group to compute occlusion on the surface geometry.
You can add additional geometry that casts shadows (that is, occludes the mask) by connecting geometry to the node’s third input.
If you are using points as "light sources", you can use a
pscaleattribute on the points to give each source its own radius of influence. See the Max Radius parameter under Direction ▸ Sampling.
The parameters in the Remap group let you use a ramp to remap the output of any of the masks. You can use this, for example, to boost (or crush) the highs or lows, increase contrast, and other effects.
The geometry to create the mask on.
An optional set of points representing light sources.
Additional Shadow Casters
Geometry that can prevent rays from reaching the geometry in the first input, creating "shadows" in the mask.
Which primitives (polygon faces), points, or vertices (see Group Type below) to create the attribute on from the first input. This can be a named group or primitive numbers in group syntax. If this is blank, the attribute is created on all geometry in the first input.
Whether the names/numbers in Group refer to primitives (polygon faces), points, or vertices. The default is Guess from Group, which automatically picks the level where any given group names/numbers make sense.
Turn on the checkbox next to mask type to create that attribute on the output geometry.
Create an attribute showing the combined results of directional rays and and ambient occlusion, with shadowed areas cut out of the mask.
Create an attribute showing only the hits from direction rays. This mask does not include the results of shadowing.
Create an attribute showing only shadowed areas.
Ambient Occlusion Mask
Create an attribute showing only the hits from ambient occlusion rays. This mask does not include the results of shadowing.
Controls how the node casts rays onto the geometry.
Cast parallel rays along a single direction, controlled by a vector.
Cast rays from the points in the second input (you can select which points to use with the Source Points parameter below).
When Direction from is Point Cloud, which points in the second input to use as light sources. This can be a named group or primitive numbers in group syntax. Leave this blank to use all points in the second input.
When Direction from is Point Cloud, limit the number of light sources checked for each point on the surface to this many.
When Direction from is Vector, the direction along which the rays travel. For example,
0, 1, 0 (the default) casts rays down from above. You can use this node’s handles to set the direction interactively.
(The rays are parallel, with the source effectively placed at infinity.)
Calculate Directional Mask
Whether to compute a mask based on rays from the direction/point sources hitting the surface.
The maximum angle between the ray and the surface normal that will affect in the mask. The more you decrease this angle (below
90, the default), the less shallow "glancing" angles affect the mask, and the more the mask is concentrated on "direct" hits.
These parameters are visible when Direction from is Point Cloud.
Clamp Mask at 1.0
Clamp any attribute values greater than
Falloff by Distance
Turn this checkbox on to make the "light" (really, influence on the mask) from point sources decrease with distance from the source.
Turn on the checkbox and set the maximum distance "light" (really, influence on the mask) from point sources can travel. If a point source has a
pscale attribute, the node multiplies this value by it, so you can use
pscale to give each point source a different radius.
When Max Radius is on, this ramp controls how the "light" from point sources falls of with distance. The horizontal axis represents distance, from the point source on the left to the Max Radius on the right. The vertical axis represents how much the source affects the mask at a given distance.
Whether to subtract occluded (shadowed) areas from the mask. This includes both self-shadowing and shadows cast by geometry in the third input.
Number of Samples
How many shadow rays to cast for each point in the surface geometry. The more rays you cast, the more accurate the shadows, but the slower the node runs. You can smooth jagged shadows caused by few samples using the Cone Angle or Blurring Iterations to fuzz the shadow edges.
How much blur to apply to shadows.
Blur Influence Type
Burring requires reading the attributes on a point’s neighbors. This parameter controls how to decide which points are a given point’s neighbors.
Neighbors are points connected to the current point by an edge.
Neighbors are points close to the current point in space.
You can set the maximum number of neighbors to find with Blur Max Neighbors, and the maximum search radius with Blur Proximity Radius.
Blur Proximity Radius
When Blur Influence Type is Proximity, the maximum search distance for point neighbors.
Blur Max Neighbors
When Blur Influence Type is Proximity, the maximum number of neighbors to find.
Maximum Ray Distance
The maximum distance that rays can travel without hitting a surface before giving up.
The maximum angle jitter added to rays.
The position offset of rays from the surface of the geometry in the Light Direction, or the direction toward Light Source Points.
The seed used for the random jitter added to the rays.
Calculate Ambient Occlusion
Whether to calculate ambient occlusion on the geometry.
Number of Samples
How many AO rays to cast for each point in the surface geometry. The more rays you cast, the more accurate the occlusion measurement, but the slower the node runs. You can smooth jagged shadows caused by few samples using the Cone Angle or Blurring Iterations to fuzz the occlusion edges.
Shifts the resulting occlusion values. Values closer to
0 give stronger ambient occlusion.
How much blur to apply to ambient occlusion values.
Blur Influence Type
Blur Proximity Radius
Blur Max Neighbors
Turn on the checkbox to show a ramp to remap the output of this mask.
Use this ramp to change the values output to the attribute. The horizontal axis represents the curent value (from the lowest values on the left to the highest values on the right). The vertical axis represents the new remapped value. You can use this, for example, to boost (or crush) the highs or lows, increase contrast, and other effects. The default ramp (a horizontal line from lower left to upper right) makes no change to the output (low values stay low, high values stay high).