Implicit Surface Raycast¶
Dependencies¶
This node requires SciPy library to work.
Functionality¶
This node implements ray casting onto an arbitrary implicit surface; in other words, given a point in 3D space and ray direction vector, it will find a point where this ray intersects the given surface first time.
Implicit surface is specified by providing a scalar field and it’s value, used to define an iso-surface.
This node uses a numerical method to find the intersection point, so it may be not very fast. If you happen to know how to find the intersection point for your specific surface by some formula, that will be faster and more precise.
Inputs¶
This node has the following inputs:
Field. Scalar field, which defines the iso-surface to find the intersection with. This input is mandatory.
Vertices. Source point(s) of the ray(s). The default value is
(0, 0, 0)
.Direction. Direction vector of the ray. The default value is
(0, 0, 1)
.IsoValue. The value of the scalar field, which defines the iso-surface in question. The default value is 0.
Parameters¶
This node has the following parameters:
First solution only. If checked, the node will output only first intersection of the ray with the implicit surface. Otherwise, it will output all intersections. Checked by default.
N Sections. To search for intersection, the node subdivides the ray into N segments, and checks for intersection in each segment. The number of segments defines maximum number of solutions which can be found. The default value is 10.
On fail. This parameter is available in the N panel only. This defines what the node should do if the ray does not intersect the surface. The available options are:
Fail. If any of rays does not intersect surface, the node will fail (become red) and processing will stop.
Skip. Just do not output anything for such rays.
Return None. Return None value for such rays.
The default option is Fail.
Outputs¶
This node has the following outputs:
Vertices. Intersection points in 3D space.
Distance. Distance between ray source point and the intersection point.
Example of usage¶
Generator-> Segment
Generator-> Plane
Generator-> Box
Fields-> Attractor Field
Matrix-> Matrix In
Surfaces-> Marching Cubes
Viz-> Viewer Draw
Generator-> Box
Curves->Curve Primitives-> Ellipse (Curve)
Curves-> Evaluate Curve
Surfaces-> Marching Cubes
Modifiers->Modifier Make-> UV Connection
Number-> A Number
Number-> List Input
Matrix-> Matrix In
Viz-> Viewer Draw