|On this page|
The Ray operator projects rays from each point of the first input geometry in the direction of its normal, and then moves the point to any geometry the ray hits from the second input.
You can use this node to drape clothes over surfaces, shrink-wrap one object with another, and other similar effects.
Click the Ray tool on the Model tab.
Select the points or primitives to project and press Enter to confirm your selection.
Select the primitives to project on and press Enter to confirm your selection.
This tool works best when smaller surfaces are projected onto larger surfaces.
Place a Grid node, set its Orientation to “XY Plane”, and translate it in Z by 2.5. Turn its template flag on.
Append a Point node to the Grid and change Keep Normal to Add Normal on the standard tab of the parameter editor.
Place a Sphere node, set its geometry type to NURBS, set its radius to 2,2,2, and translate it in Z by -2.5 .
Turn on the display of point normals in the viewer’s right side toolbar.
Append a Ray node to the Point node and connect the Sphere to the right input. Turn on its display flag.
Turn the Intersect farthest surface checkbox on to move the projected plane onto the “back” of the sphere.
The Ray op will move the points of the Grid in the direction of the point normals. The first surface of the Collision Source (right input) will be where those points of the grid will rest. You can make those points rest on the other side of the sphere by enabling the Intersect Farthest Surface option. This means that the points should continue to project to the farthest surface of the collision source.
Group of primitives or points to project.
Project points or primitives.
Group of primitives to project on.
Points are projected along their normals until intersecting with collision geometry.
Points are placed on the closest point on the collision geometry. This method does not use point normals. Use it to shrinkwrap or project one primitive onto another.
Note: Distances to packed primitives and sphere/tube/circle primitiives with non-uniform scales may not represent the actual closest point as the closest point is found in the untransformed space.
How to determine the direction to send rays.
A ray direction vector is explicitly provided.
Normals are computed, if necessary, on the input and used as the ray direction.
A given attribute is used. It should be a 3-float vector attribute giving the direction to send the rays in.
Direction to project rays from each point.
The point attribute to use to determine ray direction.
Show Guide Geometry
Controls if the geometry being instanced onto is drawn. Does not affect the behavior, only the viewport.
Move the intersected geometry.
Intersect Farthest Surface
Ray source is projected to farthest collision surface instead of the closest.
Point Intersection Normal
Ray point normals gets value of collision normals at points of intersection. These are the surface normals and not interpolated point normals. If you want the interpolated point normals, you will need to turn on Import Attributes from Hits and specify the N attribute. In that case, this option will have no effect.
Point Intersection Distance
Ray point dist attribute gets value of distance to collision source.
Set this to make rays fire in the direction opposite to the normals.
Controls the tolerance of the ray intersection. Due to numerical round off, otherwise watertight geometry might let rays pass through it. The ray tolerance decreases the chance of ray leakage by allowing near misses to count as hits. For very small geometry, you may want to decrease the default to avoid false positives. Likewise, very large geometry may need a higher value.
When transforming points scale the intersection path.
Offset surface in normal direction after the points have been transformed to their new locations.
The minimum distance along the normal from the original position of the point where the rays will look for intersections. This allows you to offset the starting position of the rays.
The maximum distance from the original position of the point the rays will look at. No ray intersections outside this range will be detected. If Method is Minimum Distance, any points farther from the surface than this will not be moved.
Number of rays sent per point. If greater than 1, rays are randomly perturbed and combined using the method specified in Ray Combiner.
Controls perturbation of extra rays.
This option lets you specify how information from extra rays is used.
The fired rays that hit the second input’s geometry are averaged. The point is then moved along its normal direction by the average distance. If you turned on Point Intersection Normal, the resulting normal is also the average from all the fired rays.
The median length ray that hits the second input’s geometry is found. The point is then moved along its normal direction by the median ray’s length. If you turned on Point Intersection Normal, the resulting normal is taken from the median ray.
The shortest ray that hits the second input’s geometry is found. The point is then moved along its normal direction by this ray’s length. If you turned on Point Intersection Normal, the resulting normal is taken from the shortest ray.
The Longest ray that hits the second input’s geometry is found. The point is then moved along its normal direction by this ray’s length. If you turned on Point Intersection Normal, the resulting normal is taken from the longest ray.
Seeds the random number generator.
Create Point Group
Point group of all successful intersections.
Ray Hit Group
Name of the point group.
Prim Num Attribute
When enabled, an attribute will be output indicating the number of the primitive hit by each point. Enable this and Prim UVW Attribute for use with Attribute Interpolate, to have the points stick on deforming geometry.
Prim UVW Attribute
When enabled, an attribute will be output indicating the coordinates where each point hit, in the parameter space of the primitive each point hit. Enable this and Prim Num Attribute for use with Attribute Interpolate, to have the points stick on deforming geometry.
Import Attributes from Hits
This allows you to extract point attributes from the hit surface. The extracted attribute will take on an interpolated value according to where the surface is hit. This option works with the Ray Combiner option: the attribute value will either come from the average attribute value from all the hits or the value associated with the median length, shortest or longest ray. The interpolated attribute values are not normalized.
Specify the point attributes from the second input that you want to extract. If the attributes you specify do not exist in the first input, they will be created. If the attributes you specify have the same name but a different size or type in the first input, they will be overwritten. If you specify the normal attribute here (N), the Point Intersection Normal option will have no effect and the final normal set to each point will be computed by interpolating the point normal from the target surface.
Ray points or primitives
The geometry to project onto the geometry in the second input. This geometry must have point normal attributes (use the Point operator to add them).
The geometry on which to project.
The Ray SOP projects one object over the surface contours of another.
It does so by calculating the collisions of the projected object’s normals with the surface geometry of the collided object.
In this example, a Grid is wrapped over the surface of a deformed Sphere using the Ray SOP.
A Facet SOP is used to correct the normals of the wrapped Grid after it is deformed over the surface.