22. September 2023

Spline Plane from Noise

This example is a more complex variation of a previous one

Previous, simpler, example

The key differences are the nested iterations, assembling of iterated geometries and a more complex UI. Also the resulting object is a bit more useful.

This is the result of the setup

It is a Noise based generator that creates a spline with a user defined number of segments, each segment running along the Z axis. The number of Segments can be defined as well as the Precision, number of points, of them.

On the left there are two identical setups, bot turn an iteration from 0 to a given number into a float value between 0 and 1. This is done to allow for the easy sampling of the Noise as well as an easy mapping on the final point positions derived from these values.

Sample Noise expects sample positions in the (0,0,0) to (1,1,1) range, you can use any other scale as well, but the resulting noise might be scaled to large or to small for practical purposes.

Since Sample Noise offers a Time control a switch was added that allows to enable this for an animated spline. In principle it is not necessary to use a Switch here, a default of 0 would prevent any animation, but it is good practice to have nodes like Time, that change continuously, in a separate branch to make sure it is not unnecessarily evaluated. If the use of Time is switched off, the node graph is automatically optimized in a way that the Time node is never evaluated.

The two blue connection lines from the Range nodes indicate scopes. Where they end the respective iteration ends.

For the lower one this is the assembly of the positions for one segment, the result of this loop is one array of positions per segment.

The upper Range nodes Scope output controls the assembly of the multiple segments into the final Spline. The Loop Carried Value node is evaluated once for each segment and adds the spline segment to the already existing spline geometry.

Inside of the LCV node the array of positions is converted to a spline, this could be done outside of the LCV as well, it makes no difference. Then the spline is added as a segment to the geometry already assembled from previous segments.


The Initial value for Variable 1, the geometry, could be primed with any spline the user wants, it would become the first segment of the resulting spline. By leaving this port unconnected an empty geometry is used to start with.

Spline-Primitive-Noise-Plane.c4d