<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKNoise/remapValues(toTerracesWithPeaks:terracesInverted:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKNoise(im)remapValuesToTerracesWithPeaks:terracesInverted:"
  },
  "title" : "remapValues(toTerracesWithPeaks:terracesInverted:)"
}
-->

# remapValues(toTerracesWithPeaks:terracesInverted:)

Replaces values in the noise field by mapping them to a terrace-like curve that passes through the specified control points.

```
func remapValues(toTerracesWithPeaks peakInputValues: [NSNumber], terracesInverted inverted: Bool)
```

## Parameters

`peakInputValues`

An array of noise values to use as the sharp points of the mapping curve.

`inverted`

<doc://com.apple.documentation/documentation/Swift/true> for curves that start rising slowly and become more steep; <doc://com.apple.documentation/documentation/Swift/false> for curves that start rising quickly and become more shallow.

## Discussion

When you call this method, the [`GKNoise`](/documentation/GameplayKit/GKNoise) class first creates a curve between the points in the `peakInputValues` array. Each point in the array is a value that remains unchanged, and the `inverted` parameter determines the shape of the curve in between those points. Then, this method uses the curve to replace values in the noise field. The resulting effect can be useful for generating textures that resemble realistic terrain, replacing sloping hills with dramatic plateaus and ridges.

![](images/com.apple.gameplaykit/media-2556390@2x.png)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)