Class

GKNoiseSource

The abstract superclass for procedural noise generators.

Declaration

@interface GKNoiseSource : NSObject

Overview

Each noise source class generalizes a specific noise generation algorithm that produces a distinct general style of noise. For example, the GKPerlinNoiseSource class generates fractal coherent noise similar to clouds, terrain, and other natural phenomena, and the GKCylindersNoiseSource class generates a field of concentric cylinders useful for creating wood-grain textures.

To make use of procedural noise in your app or game:

  • Select the GKNoiseSource subclass that generates the style of noise you’d like, and configure its properties to customize the noise generation algorithm.

  • Create a GKNoise object from that noise source. A noise object represents a specific configuration of noise generated by the noise source. You can create multiple noise objects and apply operations that combine or modify them to further customize the style of output. Noise objects are lightweight—creating them and applying operations doesn’t perform expensive noise computation.

  • Create a GKNoiseMap object from the noise object. Creating a noise map performs the computation to generate noise and apply any operations you specified with GKNoise objects, resulting in a concrete output: a field of values that you can either sample directly, use with the SKTexture class to generate texture images, or use with the SKTileMap class to generate tile maps.

Relationships

Inherits From

See Also

Procedural Noise

GKNoise

A representation of procedural noise, generated by a noise source, that you can use to process, transform, or combine noise.

GKNoiseMap

A sample of procedural noise data from which you can read noise values directly or create noise textures.

GKCoherentNoiseSource

The abstract superclass for procedural noise generators that create coherent noise.

GKBillowNoiseSource

A procedural noise generator whose output is a type of fractal coherent noise with smooth features.

GKPerlinNoiseSource

A procedural noise generator whose output is a type of fractal coherent noise resembling natural phenomena such as clouds and terrain.

GKRidgedNoiseSource

A procedural noise generator whose output is a type of multifractal coherent noise with sharply defined features.

GKVoronoiNoiseSource

A procedural noise generator whose output (also called Worley noise or cellular noise) divides space into discrete cells surrounding random seed points.

GKCylindersNoiseSource

A procedural noise generator whose output is a 3D field of concentric cylindrical shells.

GKSpheresNoiseSource

A procedural noise generator whose output is a 3D field of concentric spherical shells.

GKCheckerboardNoiseSource

A procedural noise generator whose output is an alternating square pattern.

GKConstantNoiseSource

A procedural noise generator that outputs a field of a single constant value.