---
title: GKNoise
framework: gameplaykit
role: symbol
role_heading: Class
path: gameplaykit/gknoise
---

# GKNoise

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

## Declaration

```swift
class GKNoise
```

## Overview

Overview Using procedural noise requires three steps: 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 source generates a field of floating-point noise values between -1.0 and 1.0 across an infinite, three-dimensional domain—a noise object represents this field. Using GKNoise methods you can process the values in the noise field or combine values from multiple noise fields. Create a GKNoiseMap object from the noise object. A noise map samples values from a finite, two-dimensional slice of the noise field to create a concrete output. You can then read those values directly, use the SKTexture class to generate texture images, or use the SKTileMap class to generate tile maps. GKNoise objects are lightweight. Because each noise object represents only a specific configuration of noise generation and processing steps, there’s little computation cost to creating noise objects from noise sources and applying operations to process, transform, or combine them. After you create noise objects and apply operations, creating a GKNoiseMap object from the resulting noise object performs only the computation needed to generate final output. Colorizing and Combining Noise A noise object doesn’t contain noise values or pixel color values for the noise field it describes. However, because you can combine multiple noise objects before producing colorized textures from the result, the gradientColors property specifies the colors that the SKTexture class uses to colorize output. For example, you can generate a realistic terrain texture by creating several styles of noise representing different biomes such as water, grassland, forests and mountains, each with their own color gradient, then combining them with the init(componentNoises:selectionNoise:) method. The selectionNoise parameter to that method determines which biomes shows through in which regions of the final output, and each retains its own color gradient.

## Topics

### Creating Noise

- [init(_:)](gameplaykit/gknoise/init(_:).md)
- [init(_:gradientColors:)](gameplaykit/gknoise/init(_:gradientcolors:).md)

### Creating Noise by Combining Noise

- [init(componentNoises:selectionNoise:)](gameplaykit/gknoise/init(componentnoises:selectionnoise:).md)
- [init(componentNoises:selectionNoise:componentBoundaries:boundaryBlendDistances:)](gameplaykit/gknoise/init(componentnoises:selectionnoise:componentboundaries:boundaryblenddistances:).md)

### Colorizing Noise

- [gradientColors](gameplaykit/gknoise/gradientcolors.md)

### Applying Operations to Noise Values

- [applyAbsoluteValue()](gameplaykit/gknoise/applyabsolutevalue().md)
- [invert()](gameplaykit/gknoise/invert().md)
- [raiseToPower(_:)](gameplaykit/gknoise/raisetopower(_:)-14715.md)
- [clamp(lowerBound:upperBound:)](gameplaykit/gknoise/clamp(lowerbound:upperbound:).md)
- [remapValues(toCurveWithControlPoints:)](gameplaykit/gknoise/remapvalues(tocurvewithcontrolpoints:).md)
- [remapValues(toTerracesWithPeaks:terracesInverted:)](gameplaykit/gknoise/remapvalues(toterraceswithpeaks:terracesinverted:).md)

### Applying Operations that Combine Noise

- [add(_:)](gameplaykit/gknoise/add(_:).md)
- [multiply(_:)](gameplaykit/gknoise/multiply(_:).md)
- [raiseToPower(_:)](gameplaykit/gknoise/raisetopower(_:)-zm5g.md)
- [maximum(_:)](gameplaykit/gknoise/maximum(_:).md)
- [minimum(_:)](gameplaykit/gknoise/minimum(_:).md)

### Applying Operations that Distort Noise

- [displaceWithNoises(x:y:z:)](gameplaykit/gknoise/displacewithnoises(x:y:z:).md)
- [applyTurbulence(frequency:power:roughness:seed:)](gameplaykit/gknoise/applyturbulence(frequency:power:roughness:seed:).md)

### Applying Geometric Transformations

- [move(by:)](gameplaykit/gknoise/move(by:).md)
- [rotate(by:)](gameplaykit/gknoise/rotate(by:).md)
- [scale(by:)](gameplaykit/gknoise/scale(by:).md)

### Initializers

- [init()](gameplaykit/gknoise/init().md)
- [init(noiseSource:)](gameplaykit/gknoise/init(noisesource:).md)
- [init(noiseSource:gradientColors:)](gameplaykit/gknoise/init(noisesource:gradientcolors:).md)

### Instance Methods

- [value(atPosition:)](gameplaykit/gknoise/value(atposition:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Procedural Noise

- [GKNoiseSource](gameplaykit/gknoisesource.md)
- [GKNoiseMap](gameplaykit/gknoisemap.md)
- [GKCoherentNoiseSource](gameplaykit/gkcoherentnoisesource.md)
- [GKBillowNoiseSource](gameplaykit/gkbillownoisesource.md)
- [GKPerlinNoiseSource](gameplaykit/gkperlinnoisesource.md)
- [GKRidgedNoiseSource](gameplaykit/gkridgednoisesource.md)
- [GKVoronoiNoiseSource](gameplaykit/gkvoronoinoisesource.md)
- [GKCylindersNoiseSource](gameplaykit/gkcylindersnoisesource.md)
- [GKSpheresNoiseSource](gameplaykit/gkspheresnoisesource.md)
- [GKCheckerboardNoiseSource](gameplaykit/gkcheckerboardnoisesource.md)
- [GKConstantNoiseSource](gameplaykit/gkconstantnoisesource.md)
