The Ray SOP is used to project one surface onto another. Rays are projected from each point of the input geometry in the direction of its normal. This can be used to drape clothes over surfaces, shrink-wrap one object with another, and other similar effects.
Parameters - Page
group - If there are input groups, specifying a group name in this field will cause this SOP to act only upon the group specified. Accepts patterns, as described in Pattern Matching.
method - ⊞ - Select the method of projection for the Ray SOP.
- Minimum Distance
minimum- 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 primitve onto another.
- Project Rays
project- Points are projected along their normals until intersecting with collision geometry.
dotrans - If selected, it will transform the input points as defined below. Leave this off when only interested in updating the source point attributes.
Intersect Farthest Surface
lookfar - If selected, this option allows the user to choose between intersecting with the closest intersecting object or the furthest. See example, below.
Point Intersection Normal
normal - ⊞ - If selected, updates each point in the source geometry with the normal at the collision surface it intersects with. If the point doesn't intersect at the collision surface, a normal of (0,0,0) is used.
- Source Normal
- Collision Normal
- Reflected Ray
Save Bounce Geometry
Point Intersection Distance
putdist - If selected, updates each point intersected with the distance to the collision surface. If the point doesn't intersect at the collision surface a distance of 0 is used. This value is placed in the
$DIST point attribute, accessible from the Point SOP.
scale - A value of zero will leave the input point unaffected. A value of one will land the point on the intersection surface. Negative values and values > 1 are also valid.
lift - This value further offsets the surface input by offsetting it in the direction of its normal.
sample - This value determines the number of rays sent per point. If greater than one, the remaining rays are perturbed randomly, and averaged.
jitter - Controls the perturbation of the extra sample rays.
seed - Allows a different random sequence at higher sampling rates.
Create Point Group
newgrp - If selected, it will create a point group containing all the points which were intersected successfully.
Ray Hit Group
hitgrp - Specifies the name of the above point group.
- Place a Grid SOP and translate it in TZ by 2.5. Turn it's template flag on.
- Append a Point SOP to the Grid and enable the Create Point Normals option.
- Place a NURBS Sphere with a Radius of 2,2,2 and translate it in Z by -2.5 .
- Display point normals by enabling the option in the Viewport > Display Options.
- Append a Ray SOP to the Point SOP and connect the Sphere to the right input. Make it the display SOP.
- Toggle the Intersect Farthest Surface button on and off.
The Ray SOP 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.
- Input 0 -
- Input 1 -