Geometry
General geometry processing utilities
Best View
The direction from which the most selected points have a clear line of sight past the occluding meshes, as a camera transform
Finds the direction from which the most selected points can be seen past the occluding meshes. Directions spread over a sphere are scored by casting a ray from each selected point back towards the camera and counting the rays that hit nothing, then refined on shrinking rings around the best. Ties go to the direction that shows the selection broadest. Plug a style’s output into Occluders so the view is judged against what will render; point clouds and instances do not block rays. Transform is a camera transform at the centre of the selection, looking down its local -Z along Direction. Stickiness and Previous Direction penalise turning away from a direction already on screen, which is always scored as a candidate. Hysteresis keeps Previous Direction unless the best direction sees that share of the selected points more, so small differences between searches do not move the view.
Inputs
| Name | Type | Description |
|---|---|---|
| Target | Geometry |
Geometry whose points should be seen, such as the atoms |
| Selection | Bool |
The points of Target that should be seen, such as a ligand |
| Occluders | Geometry |
Meshes that can block the view, such as the output of a style. Point clouds and instances do not block rays |
| Up | Vector |
Direction kept upright in the view |
| Stickiness | Float |
Share of the selected points a turn of 180° away from Previous Direction must gain to be worth it. Shorter turns cost proportionally less |
| Previous Direction | Vector |
Direction currently looked along, which Stickiness favours and which is always scored. Zero for none |
| Hysteresis | Float |
Share of the selected points the best view must see beyond Previous Direction before leaving it |
| Directions | Int |
Directions spread evenly over the sphere in the first pass |
| Refine | Int |
Rings of refinement around the best direction, starting 10° away and shrinking by 0.4 each time |
| Offset | Float |
How far in Å towards the camera each ray starts, to clear the point’s own geometry |
Outputs
| Name | Type | Description |
|---|---|---|
| Transform | Matrix |
Camera transform: located at the centre of the selection and looking down its local -Z along Direction |
| Rotation | Rotation |
Camera rotation looking along Direction |
| Direction | Vector |
Direction the camera looks along |
| Centre | Vector |
Centre of the selected points |
| Visible | Int |
Selected points with a clear line of sight |
| Count | Int |
Selected points |
API Reference: nodes.geometry.BestView
Centre on Selection
Offsets the input points so that their calculated Centroid is on the world origin. If the Group ID input is used this offset is applied on a per-group basis. If the selection is used, only the selected points contribute towards the calculation of the centroid, but all points are still moved
Inputs
| Name | Type | Description |
|---|---|---|
| Atoms | Geometry |
Atomic geometry that contains vertices and edges |
| Selection | Bool |
Selection within the groups to calculate the centroid for, which then affects all other points in the group |
| Group ID | Int |
Optionally centre the points separately for each group based on the Group ID input |
Outputs
| Name | Type | Description |
|---|---|---|
| Atoms | Geometry |
Atoms that have been moved to object origin based on their group’s calculated centroid |
| Offset | Vector |
The calculated vector offset that was applied to the points |
API Reference: nodes.geometry.CentreOnSelection
Check Geometry
Inputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
|
| Message | String |
Outputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
API Reference: nodes.geometry.CheckGeometry
Clear Instance Transforms
Inputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
|
| Selection | Bool |
|
| Realize All | Bool |
Realize all levels of nested instances for a top-level instances. Overrides the value of the Depth input |
Outputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
API Reference: nodes.geometry.ClearInstanceTransforms
Contains Geometry
Check if a geometry contains geometry in any of the domains
Inputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
Outputs
| Name | Type | Description |
|---|---|---|
| Not Empty | Bool |
True when the input contains some geometry |
| Empty | Bool |
True when the input contains no geometry |
API Reference: nodes.geometry.ContainsGeometry
Curve Visualize
Visualize curves, instancing Gimbals with the resulting curve rotation and positions
Inputs
| Name | Type | Description |
|---|---|---|
| Curve | Geometry |
|
| Selection | Bool |
|
| Position | Vector |
|
| Normal | Vector |
|
| Handles | Bool |
|
| Value | Float |
|
| Arrow Size | Float |
Outputs
| Name | Type | Description |
|---|---|---|
| Instances | Geometry |
API Reference: nodes.geometry.CurveVisualize
Evaluate on Instances
Inputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
Geometry to split into two parts |
| Closure | Closure |
Outputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
API Reference: nodes.geometry.EvaluateOnInstances
Evaluate Ordered Bundles
Inputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
|
| Bundles | Bundle |
|
| Prefix | String |
Outputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
API Reference: nodes.geometry.EvaluateOrderedBundles
Evaluate While Planar
Inputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
Geometry to transform |
| Selection | Bool |
The parts of the geometry that contribute to the planar calculation |
| Closure | Closure |
|
| Positive Space | Bool |
Also shift the planar geometry so that all of it has positive coordinates, starting at Padding. Grids built inside the closure then only need OpenVDB tree nodes on one side of each axis, which is faster |
| Padding | Float |
Distance from the origin to the planar geometry’s bounding box when Positive Space is enabled. Should cover anything the closure grows beyond the geometry, such as surface offsets |
Outputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
API Reference: nodes.geometry.EvaluateWhilePlanar
Fade Geometry
Fade geometry in and out by multiplying the alpha of its Color attribute on the point and instance domains. Place it after a style node and animate Fade from 1 to 0 to fade that style out of a scene, or from 0 to 1 to fade it in. The node multiplies the existing alpha, so geometry that is already partly transparent stays proportionally more transparent. Only materials that read the alpha show the fade: Default, Squishy and Ambient Occlusion do, while Flat and Transparent ignore it.
Inputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
Geometry to fade, such as the output of a style node |
| Fade | Float |
Multiplier for the alpha of the Color attribute. At 1 the geometry is passed through unchanged, at 0 it is removed |
Outputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
Geometry with the faded alpha stored in Color |
API Reference: nodes.geometry.FadeGeometry
Fallback Geometry
Fallback geometry for when the input geometry is empty in all domains
Inputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
|
| Fallback | Geometry |
Outputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
API Reference: nodes.geometry.FallbackGeometry
Geometry to Planar
Inputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
Geometry to transform |
| Selection | Bool |
The parts of the geometry that contribute to the planar calculation |
Outputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
|
| Transform | Matrix |
API Reference: nodes.geometry.GeometryToPlanar
Lag Geometry
Inputs
| Name | Type | Description |
|---|---|---|
| Input | Geometry |
|
| Selection | Bool |
The parts of the geometry that go into the first output |
| Count | Int |
Number of frames to lag. |
| Realize All | Bool |
Realize all levels of nested instances for a top-level instances. Overrides the value of the Depth input |
Outputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
|
| Lag Index | Int |
|
| Index | Int |
API Reference: nodes.geometry.LagGeometry
Mesh Contours
Inputs
| Name | Type | Description |
|---|---|---|
| Mesh | Geometry |
ISO surface geometry output |
| Value | Float |
|
| Color | Color |
Color to apply to the selected atoms |
| Material | Material |
Outputs
| Name | Type | Description |
|---|---|---|
| Mesh | Geometry |
API Reference: nodes.geometry.MeshContours
Offset Curve
Inputs
| Name | Type | Description |
|---|---|---|
| Curve | Geometry |
|
| Points | Float |
Number of points to offset and sample position and normal by. Fractions sample between the points along the curve. |
Outputs
| Name | Type | Description |
|---|---|---|
| Curve | Geometry |
|
| Factor | Float |
The pre-offset factor for the curve’s point |
API Reference: nodes.geometry.OffsetCurve
Orient to Best View
Rotate the geometry about the selection so the camera sees it from its Best View
Rotates the geometry about the centre of the selection so the camera sees the selection from its Best View. The meshes of Geometry are the occluders, so put it after the styles. The node follows Camera, or the scene’s active camera when that is empty: orbiting the camera turns the geometry with it, and Factor blends from the original orientation. Turn on Smoothing::Boolean to ease towards each new best view instead of jumping, for trajectories or an animated camera: every simulation step moves the translation and rotation separately by a = lerp(a, b, 1 - 2^(-dt / Half Life)), so the remaining gap halves every Half Life seconds at any frame rate. Stickiness makes the search favour views near the one on screen: each direction loses that share of the selected atoms, scaled by (1 - cos θ) / 2 of its angle θ from the current view, so turning around must gain the whole share. Hysteresis holds the view on screen until a new one sees that share of the selected atoms more. Both work with or without smoothing, and like smoothing they only advance during playback. Turn off Move Geometry::Boolean to leave the geometry in place and move a camera instead: Camera Transform is where the camera goes, relative to this object, for the same view. Store it on the first point of the output and give a second camera a Geometry Attribute constraint that reads it (type 4x4 matrix, Apply Target Transform on). That camera must not also be Camera or the active camera the node falls back to, or each depends on the other.
Inputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
Geometry to rotate. Its meshes are what can block the view |
| Atoms | Geometry |
Atoms holding the points that should be seen |
| Selection | Bool |
The atoms that should be seen, such as a ligand |
| Camera | Object |
Object to orient towards |
| Factor | Float |
Blend from the original orientation to the best view |
| Move Geometry | Bool |
Rotate the geometry to the best view. Turn off to leave it in place and move a camera with Camera Transform instead |
| Smoothing | Bool |
Ease towards each new best view over the simulation instead of jumping. Only advances during playback |
| Half Life | Float |
Seconds for the remaining gap to the best view to halve |
| Stickiness | Float |
Favour best views near the one shown: the share of the selected atoms a turn of 180° must gain to be taken. Works with or without Smooth, and only advances during playback |
| Hysteresis | Float |
Hold the view shown until a new best view sees this share of the selected atoms more. Works with or without Smooth, and only advances during playback |
Outputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
|
| Transform | Matrix |
Transform applied to the geometry |
| Camera Transform | Matrix |
Where the camera goes, relative to this object, to see the unmoved geometry from the best view. Store it on a point and copy it to another camera with a Geometry Attribute constraint |
API Reference: nodes.geometry.OrientToBestView
Plexus
Find points that are within a given distance of each other and create an edge between them
Inputs
| Name | Type | Description |
|---|---|---|
| Points | Geometry |
|
| Sort | Bool |
Sort the resulting points so their Index matches the input geometry |
| Distance | Float |
|
| Radius | Float |
Outputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
API Reference: nodes.geometry.Plexus
Primitive Arrow
A simple arrow geometry
Inputs
| Name | Type | Description |
|---|---|---|
| Vertices | Int |
|
| Height | Float |
|
| Ratio | Float |
|
| Value | Color |
|
| Material | Material |
Material to apply to the resulting geometry |
Outputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
API Reference: nodes.geometry.PrimitiveArrow
Primitive Gimbal
A 3-axis gimbal made of Primitive Arrows, useful for visualisation and debugging
Inputs
| Name | Type | Description |
|---|---|---|
| Vertices | Int |
|
| X | Color |
|
| Y | Color |
|
| Z | Color |
|
| Material | Material |
Material to apply to the resulting geometry |
| Height | Float |
Outputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
API Reference: nodes.geometry.PrimitiveGimbal
Separate First Point
Separate the first point for each Group ID and return only those points. Optionally sort by the Group ID as well
Separate out the first point for each group in the Group ID
Inputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
|
| Sort | Bool |
Sort by Group ID after separating |
| Group ID | Int |
Outputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
API Reference: nodes.geometry.SeparateFirstPoint
Slice Edge Instances
For position based selections, realise the instances that cross the selection and then separate the selected points from within the selection
Inputs
| Name | Type | Description |
|---|---|---|
| Instances | Geometry |
|
| Selection | Bool |
Outputs
| Name | Type | Description |
|---|---|---|
| Instances | Geometry |
|
| Realized Points | Geometry |
API Reference: nodes.geometry.SliceEdgeInstances
Split to Centred Instances
Same as Split to Instances, but with the origin point of the instance being the calculated Centroid for each Group ID. The Selection determines the points which contribute to the Centroid calculation, but all points are still offset and split into their instances
Inputs
| Name | Type | Description |
|---|---|---|
| Geometry | Geometry |
The input geometry containing points |
| Selection | Bool |
Selected points will be used to calculate centre point for Instance |
| Group ID | Int |
The Group ID which will determine how the points are split into their different instances |
Outputs
| Name | Type | Description |
|---|---|---|
| Instances | Geometry |
The points that have been split into their instances |
API Reference: nodes.geometry.SplitToCentredInstances
Visualize Angle
Inputs
| Name | Type | Description |
|---|---|---|
| Points | Geometry |
|
| Selection | Bool |
|
| Position | Vector |
|
| Angle | Float |
|
| Length | Float |
|
| Up | Vector |
|
| Axis | Vector |
|
| Radius | Float |
Outputs
| Name | Type | Description |
|---|---|---|
| Mesh | Geometry |
|
| Curve | Geometry |
API Reference: nodes.geometry.VisualizeAngle
Visualize Points
Inputs
| Name | Type | Description |
|---|---|---|
| Points | Geometry |
|
| Selection | Bool |
|
| Target | Vector |
Vector that is the target |
| Position | Vector |
Position of the current point |
Outputs
| Name | Type | Description |
|---|---|---|
| Instances | Geometry |
API Reference: nodes.geometry.VisualizePoints