Overview

Line Kit uses noise to add breaks and imperfections to the lines. Currently, there are two types of noise-driven distortion types used in the effect: Line Breaks and Line Shifts.

Line Breaks

Found in the Line Appearance group of parameters of Line Kit Settings file.

Noise adds the breaks and imperfections to the otherwise continuous lines. This makes the effect look more hand-drawn and natural.

Line Kit uses a 3D texture to modulate the line appearance. The default texture can be overridden in the Noise group of parameters.

Noise interface

Noise interface

The noise texture is overlaid on the scene in 3D. When lines are rendered, the noise texture is sampled at the line’s position. The sampled value is then used to modulate the line appearance - higher values erase the line, while lower values make it more visible.

The texture needs to be tileable. This means that the texture can be repeated infinitely in all directions without any visible seams.

Why use a 3D texture?

  • Any 2D noise would visibly “stick” to the camera and move with it. 3D noise, on the other hand, stays in place as the camera moves.
  • Sampling a texture is faster than procedurally generating the noise. Since the texture is generated offline and is sent to the GPU once, we can use it in the shaders without a performance hit.

There are a few apps that can generate 3D textures. We recommend using Mixture by Alexandre Le Lièvre. It is a free and open-source node-based procedural texture generator. It works right in the Unity editor and can be used to generate 3D textures for Line Kit.

3D Perlin Noise Texture

Example 3D noise texture, generated in Mixture

Only the red channel of the texture is used. If present, the other channels are ignored.

To better see how noise overlays in 3D, select Noise in the Debug Output.

Noise selected in Debug Output

Noise being selected in Debug Output

Parameters of Line Breaks

  • Noise - Toggles the noise effect.
  • 3D Noise Texture - The 3D texture used for the effect.
  • Scale - The scale of the noise texture. Lower values make the noise appear larger, while higher values make it smaller.
  • Contrast - The sharpness of the noise texture, i.e. how hard or soft the line gaps produced by the noise are.
  • Strength - The intensity of the noise effect, i.e. how much gaps the noise produces.
  • Offset - The offset of the noise texture in 3D space. This can be used “move” the noise texture around the scene to find the best position for it.

Line Shifts

Line Shifts adds multiple displaced copies of the line on top of each other. This makes the effect look more hand-drawn.

Line Shifts is an animated effect — the copies are shifted over time. This makes the effect look more organic and less static.

Line Shifts interface

Line Shifts interface

Parameters of Line Shifts

  • Repeats - The number of times the lines are layered on top of each other.
  • Scale - How stretched the noise texture is. Higher values make the noise more granular. Lower values make the noise more stretched out.
  • Strength - Controls how visible the noise is.
  • Framerate - The speed at which the noise shifts.