← All ideas
  • Published 20 Aug 2018

Spline Info Node

Cycles provides no way to efficiently shade splines. I propose a new Spline Info Node that provides some essential information about splines and their attributes.

Spline Info Node

The node outputs five types of data, each of which will be discussed in one of the following sections. Each section includes a use case as a convincing argument and a demonstration.

Index

Description

The index is an integer representing the index of the spline in its curve object. It is important that the order is identical to that of the spline list provided through the python API.

Use Case

Random Spline Coloring

The index can be used to compute a random color for each spline which can be used on procedurally created splines used in motion graphics.

Spline Info Node Example 1

Other examples are provided below in combination with other data.

Number Of Splines

Description

The number of splines is an integer indicating the number of splines in the curve object the spline belongs to, subsequently, this number is constant for all splines of the same object.

Use Case

The most obvious use case is normalizing the index of the spline as shown in the following example.

Streamline Visualization

A student is studying computational fluid flow and performed some simulations recording the streamlines and the velocity at each point on them. The student exported those data and parsed them in blender resulting in an object containing the streamlines as splines. Having no way to pass the color information to cycles---Which is very unfortunate but that's for another proposal, he encoded them in an NxM image where M is the number of splines and N is the number of sample points. The student constructed a texture coordinates such that the U value is the normalized arc length provided by the parameteric coordinates output which we shall discuss later on and the V value is the normalized index of the splines. By evaluating the image at that texture coordinates, the student gets the required color output.

Radius

Description

The radius is a float representing the radius of the spline at each point.

Use Case

Music Visualization

A music visualizer is constructed such that the radius of the spline is controlled by the intensity of a specific band of frequency. In order to control the color of the spline based on the radius, the spline info node is used.

Spline Info Node Example 2

Tilt

Description

The tilt is a float representing the radian measure of the tilt of the spline at each point.

Use Case

Procedural Texture Distortion

A procedural texture of a group ropes held together is created. An animation of twisting the group of ropes at some part is performed by animating the tilt of the spline at that part. In order to take into account the distortion due to twisting in the procedural texture, the tilt info is used.

Spline Info Node Example 3

Parametric Coordinates

Description

The parametric coordinates is exactly the same as the spline UV coordinates if Use UV For Mapping is enabled in the curve texture space panel. It is provided in this node for convenience. The U value is the normalized arc length and V value is the normalized radial angle. The user needn't enable anything and can use the output directly.

Use Case

As described above beside its conventional use.

Extras

Random

One might propose to include a random output analogous to that of the object info node. Such output is easily replicated through noise node or a custom random function using the index of the spline. Moreover, having no control over a seed render it partially useless if one didn't like the direct output. So, while it is not needed, it can still be included for faster workflow.

Spline Length

An output indicating the length of the spline might be of need. While its applications might not be as numerous as other outputs. It might be worth adding.

Thanks !

Spline Info Node Example 1.png

100%

Development Status: Open

Upvote 116 Downvote 0
omar.squircleart
20 Aug 2018

12 Comments

karlis.stigis

Yes, Yes Yes! We need this!

1
manuelgrad.at

top-notch proposal!

1
rawalanche

Shouldn't this be moved to Done? It's not possible with Geometry Nodes generated attribute used in the material editor.

camplowell

YES YES YES

ttelos

Yes, I quite agree! And, also, it would be great if we could treat hair strands as splines!

niranjanraghu96

+1 as always

00Ghz

very good idea

luja19

Great idea!

wissammax

I like this +1

Nizar

yes please !

laaameche

+1 i support it too

luciano

this is sick cool!, i support it!