# Volumetric Noise algorithms:

In video games, noise algorithms are used whenevery randomness is required. For example water movement is often simulated using a noise function. For such application, it is sufficient to have a noise function which generates a 2D output.

2D noise functions can be used for volumetric datasets if it should only affect the height like terrain height in minecraft. However the disadvantage is the unability to describe the inner structure of the volumetric dataset. Therefore 3D noise algorithms are needed.

When working with 3D Textures, having an good editor is must have as it is difficult to visualize results. One method is to just apply it as a material like in the right screenshot. Another important point is that the genartion of such textures are huge datasets so it is recommended to use the GPU for the generation process.

## Available noise algorithms:

There is various existing work already available as they are used many times. The orginal code was provided by Patricio Gonzalez Vivo in GLSL which I have converted to an Unity Compute Shader. The github page contains a list of common noise algorithms like Perlin, Voronoi or Simplex.

Another source of Noise function is from Keijiro Takahashi which inludes compute shaders to calculate common noise functions. Allthough they are made for Unity, they are in HLSL and GLSL and also had to be converted into compute shader in order to generate 3D Textures..

Next is Ashima which also offers unusual 4D noise algorithms. 4D algorithms are needed when the volumetric dataset should animate. The fourth dimension would be the timeline.

The last source of useable algorithms is Wombat which is a free noise libary written in GLSL

Below is a list of currently implemented noise algorithms. The mesh for the visualisation is a simple fractal which I have created with the fractal generator so it is easier to see the inner structure of a 3D texture.

### Noise 1: Pseudo Randomness

The first sample is a simple generic noise algorithm tested, It produces decent results.

Original Source code was provided by Patricio Gonzalez Vivo

### Noise 2: 3DPerlin

This is a sample of the 3DPerlin function from Wombat. The difference between the first one and this is almost diminishing especially when octaves are included.

### Noise 3: Cellular

This is a cellular noise algorithm or worley. The original source is from Ashima,

### Noise 4: Classic

This is another classic noise function provided by Keijiro Takahashi.

### Noise 5: Lines

This was an attemt to implement a noise function according to this tutorial. However it seems that something went wrong here. However the resullt is pretty interesting and yield concrete like results when done with octaves,

### Noise 6: Simplex

The last one is a sample of a simplex noise algorithm. The original sourcecode is from Ashima

### Conclusion:

There are many algorithms for the generation of random noise and these are the most common one. The next post will contain infomation about octaves which improve the detail of noise algorithms.