Projects one surface onto another.
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.
Using Ray
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.
Note
This tool works best when smaller surfaces are projected onto larger surfaces.
Example
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.
Parameters
| Group | Group of primitives or points to project. | ||||||||
| Entity | Project points or primitives. | ||||||||
| Collision Group | Group of primitives to project on. | ||||||||
| Method |
| ||||||||
| Transform Points | 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 Get Point Attributes 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. | ||||||||
| Reverse Rays | Set this to make rays fire in the direction opposite to the normals. | ||||||||
| Ray Tolerance | 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. | ||||||||
| Scale | When transforming points scale the intersection path. | ||||||||
| Lift | Offset surface in normal direction after the points have been transformed to their new locations. | ||||||||
| Bias | 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. | ||||||||
| Max Ray Dist | The maximum distance from the original position of the point the rays will look at. No ray intersections outside this range will be detected. | ||||||||
| Sample | Number of rays sent per point. If greater than 1, rays are randomly perturbed and combined using the method specified in Ray Combiner. | ||||||||
| Jitter Scale | Controls perturbation of extra rays. | ||||||||
| Ray Combiner | This option lets you specify how information from extra rays is used.
| ||||||||
| Seed | Seeds the random number generator. | ||||||||
| Create Point Group | Point group of all successful intersections. | ||||||||
| Ray Hit Group | Name of the point group. | ||||||||
| Get Point Attributes | 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. | ||||||||
| Point Attributes | 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. |
Inputs
| 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). |
| Collision primitives | The geometry on which to project. |
Examples
| RayWrap | Load | Launch |
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. | |
Other examples that use this node
| Example for | Example name | |
|---|---|---|
| Magnet Force | SimpleMagnets | Load | Launch |
| ||
| RBD Pin Constraint | Chainlinks | Load | Launch |
| ||
| Ripple Solver | RippleGrid | Load | Launch |
| ||
| Voronoi Fracture Solver | FractureExamples | Load | Launch |
| ||
| Dop Import | LowHigh | Load | Launch |
| ||
| TimeShift | PlateBreak | Load | Launch |
| ||