I made my own noise function

David Delassus
8 min readAug 29, 2023

📝 What is a “noise function”?

In Computer Graphics, a “noise function” refers to a mathematical function that produces a seemingly random, but deterministic, output.

We often use those functions to procedurally generate textures, terrains, and other visual elements.

The most commonly used noise functions might be Perlin noise and Simplex noise.

Why would you make your own noise function?

Usually, noise functions take a cartesian 1D, 2D or 3D point as input, and returns a value between 0 and 1. This means that the input space is a grid, usually the world space (2D or 3D) of your game, or a 1D “grid” along an axis.

In my game, Warmonger Dynasty, the grid is hexagonal, and I use a cubic coordinate system. It is a 2D coordinate system, where each point have 3 components: Q, R and S such that:

For more information about this coordinate system, I invite you to read this article: