Note: This is an archived version of the Blender Developer Wiki (archived 2024). The current developer documentation is available on developer.blender.org/docs.

User:OmarSquircleArt/GSoC2019/Final User Report

This page provides an overview and examples of the features that have been implemented in the GSoC project.

Vector Socket

The Vector Socket is now drawn expanded by default:

GSoC 2019 Report Vector Socket.png

Vector Math

Added Multiply, Divide, Project, Reflect, Distance, Length, Scale, Snap, Floor, Ceil, Modulo, Fraction, Absolute, Minimum, and Maximum operators to the Vector Math node. The Value output has been removed from operators whose output is a vector, and the other way around.

Snap, for instance, can be used to easily create cell noise:

GSoC 2019 Report Cell Noise.png

Or it can be used to easily resample images through quantization of space:

GSoC 2019 Report Resampling.png

Modulo can be used to repeat patterns, for instance, creating a dot pattern:

GSoC 2019 Report Dots.png

Modulo and Snap, together, can be used to create a stippling pattern:

GSoC 2019 Report Stippling.png

Mapping Node

The Mapping node is now dynamic, taking variable inputs:

GSoC 2019 Report Mapping.png

For instance, given the following radial pattern:

GSoC 2019 Report Radial.png

We can deform the pattern by rotating the space based on the distance to the origin as follows:

GSoC 2019 Report Radial Deformed.png

Or we can evaluate a noise at this space to get a vortex texture:

GSoC 2019 Report Deformed Noise.png

We can also achieve shearing through variable translation as follows:

GSoC 2019 Report Shear.png

Or we can shift the previously created dots in an alternating pattern as follows:

GSoC 2019 Report Shifted Dots.png

The max and min options have been moved outside of the node to the max and min operations of the Vector Math node:

GSoC 2019 Report Clip Image.png

Map Range

A map range node similar to that of the compositor’s was added:

GSoC 2019 Report Map Range.png

Clamp Node

A clamp node was added:

GSoC 2019 Report Clamp.png


White Noise

A new White Noise node was added. The node can operate in 1D, 2D, 3D, or 4D space.

GSoC 2019 Report White Noise.png

Voronoi Texture

The voronoi node was rewritten to support much more modes of operation. Each of the following sections describe one of those modes of operations.

Dimensions

The node can now operate in 1D, 2D, 3D, or 4D space.

1D

One dimensional voronoi can be used, for instance, to create a brick texture with random width:

GSoC 2019 Report 1D Voronoi.png

2D

Two dimensional voronoi can be used to create a somewhat accurate 2-distances to voronoi cells. Something that was otherwise hard/impossible to get with 3D voronoi. This can be used to create cracks with uniform width:

GSoC 2019 Report 2D Voronoi.png

3D

We already had 3D voronoi before, so nothing was added here.

4D

Four dimensional voronoi can be used to animate voronoi in 3D space. In other words, the fourth dimension can be a function of time:

GSoC 2019 Report 4D Voronoi.gif

Or it can be used create a loopable animated voronoi in 2D space. This gif loops!

GSoC 2019 Report 4D Voronoi Loop.gif

Jitter

The new jitter input controls the uniformity of the voronoi cells:

GSoC 2019 Report Voronoi Jitter.gif

Features

In general, we fixed some symmetry issues and improved precision. The node lets you select what voronoi feature you want to compute. The following features are supported.

F1

This is the standard F1 feature we had before. However, we now provide the position of the voronoi cell as an output:

GSoC 2019 Report Voronoi Cell Position.png

The position can be used to compute local texture coordinates in voronoi cells as follows:

GSoC 2019 Report Voronoi Cell Coordinates.png

The significance of this local texture coordinates will become apparent later.

Smooth F1

Voronoi can't be used in organic textures due to the hard discontinuities at the cell edges. For that reason, we introduced a smoothed voronoi textures. A comparison between normal F1 distance and smoothed F1 distance is shown below:

GSoC 2019 Report Smooth Voronoi.png

The smoothness is more apparent if the node was used as a displacement texture. Both of the following textures are smooth with different smoothness values:

GSoC 2019 Report Smooth Voronoi Shaded.png

The ID color of the voronoi cells is also smoothed, introducing a new type of noise. Different smoothness values are shown below:

GSoC 2019 Report Smooth Voronoi ID.png

In fact, it is just a Value Noise:

GSoC 2019 Report Smooth Voronoi Value.gif

Yes, we just got Value Noise free of charge. The cell position is also smoothed:

GSoC 2019 Report Smooth Voronoi Position.png

Such smoothness can be utilized to create all sorts of patterns. The difference between smoothed F1 and F1, for instance, can be used to create a beveled voronoi cell pattern:

GSoC 2019 Report Smooth Voronoi Beveled Cells.png

A high smoothness value with color based masking can produce a water droplets texture:

GSoC 2019 Report Smooth Voronoi Water Droplets.png

The isolines of the smoothed distance is meta-ball like:

GSoC 2019 Report Smooth Voronoi Isolines.gif

F2

This is just the standard F2 we had before. The primary purpose of F2 is to compute the well known F2-F1 pattern for non-euclidean distance voronoi:

GSoC 2019 Report Voronoi Difference.png

F3 and F4

F3 and F4 were deprecated.

Distance To Edge

This is mode of operation computes the distance to the voronoi cells edges. This is a much more accurate version of the cracks feature we had before, which was an F2-F1 algorithm.

GSoC 2019 Report Voronoi Distance To Edge.png

GSoC 2019 Report 2D Voronoi.png

Only euclidean distance is supported for now. Manhatten and Chebyshev distances may be supported in the future while Minkowski will not be considered.

N-Sphere Radius

This mode of operation computes the radius of the n-sphere inscribed in the voronoi cells. In other words, it is half the distance between the closest point and the point closest to it. Consequently, it is the max radius of the bounding n-sphere that each cell is allowed to have to avoid intersection.

The simplest example would be as follows. Notice how the n-spheres never intersect:

GSoC 2019 Report Voronoi NSphere Radius.png

A more practical example would be:

GSoC 2019 Report Voronoi NSphere Radius Extra.png

We can use this setup to create a very robust and highly efficient scatter node, which I shall show now. We are going to use the local coordinates we previously computed:

GSoC 2019 Report Voronoi Cell Coordinates.png

And we are going to scale the local coordinates based on the n-sphere radius and rotate it based on the cell color along the z axis. Finally, we are going to evaluate the required texture to scatter at this texture coordinates:

GSoC 2019 Report Voronoi Distribute.png

And voila, we just created a scatter node! Here is 3D sphere packing:

GSoC 2019 Report Voronoi Packing.png

Noise Texture

1D, 2D, and 4D versions of perlin noise were added.

1D

1D noise can be used as a general noise function when only a single axis is varying:

GSoC 2019 Report Noise 1D.gif

This axis can be time, in which case, the noise act as a 1D wiggle:

GSoC 2019 Report Noise 1D Wiggle.gif

More specifically, it can be used, for instance, to create a brushed metal texture:

GSoC 2019 Report Noise 1D Brushed Metal.png

2D

2D perlin is almost two times faster than 3D perlin, so in cases where 3D perlin may not be needed, like terrain generation, using 2D perlin should noticeably speed up your scene.

Additionally, 2D perlin can be used to animate 1D perlin:

GSoC 2019 Report Noise 2D.gif

Or to make 1D perlin C¹ continuous at i / scale for any integer i:

GSoC 2019 Report Noise 1D Continuous.gif

4D

Primarily, 4D perlin can be used to animate 3D perlin:

GSoC 2019 Report Noise 4D.gif

Or loop a 2D perlin animation:

GSoC 2019 Report Noise 4D Loop.gif

Musgrave Noise

Musgrave noise was also extended to 1D, 2D, and 4D dimensions. Since it is very similar to perlin, the aforementioned examples also apply and I shall not showcase it further.

Volume Info Node

A Volume Info node was added. The node provides the color, density, flame, and temperature of smoke domains:

GSoC 2019 Report Volume Info.png

Vertex Color Node

A Vertex Color node was added. The node provide a nice interface to select the target Vertex Color:

GSoC 2019 Report Vertex Color.png

Vertex Color Alpha

The alpha value of the vertex colors is now exposed:

GSoC 2019 Report Vertex Color Alpha.gif

Object Color

The object color property is now exposed through the Object Info node. This is particularly useful when using a tool like Animation Nodes, where colors are computed in Animation Nodes and needs to be passed to the render target. For instance:

GSoC 2019 Report Object Color.gif