<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLNoiseTexture/init(vectorNoiseWithSmoothness:name:textureDimensions:channelEncoding:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLNoiseTexture(im)initVectorNoiseWithSmoothness:name:textureDimensions:channelEncoding:"
  },
  "title" : "init(vectorNoiseWithSmoothness:name:textureDimensions:channelEncoding:)"
}
-->

# init(vectorNoiseWithSmoothness:name:textureDimensions:channelEncoding:)

Initializes a noise texture that creates random directional noise.

```
init(vectorNoiseWithSmoothness smoothness: Float, name: String?, textureDimensions: vector_int2, channelEncoding: MDLTextureChannelEncoding)
```

## Parameters

`smoothness`

A value that indicates how similar neighboring texels will be in the resulting texture. The value should be between `0.0` and `1.0`. A value of `1.0` generates a smooth surface.

`name`

The [`name`](/documentation/ModelIO/MDLNamed/name) property for the new texture object.

`textureDimensions`

The texel dimensions (width and height) of the texture image.

`channelEncoding`

The data format for each channel value per texel—for example, 8-bit integer or 32-bit floating point. For possible values, see [`MDLTextureChannelEncoding`](/documentation/ModelIO/MDLTextureChannelEncoding).

## Return Value

A new directional noise texture object.

## Discussion

Unlike a color noise texture, in which the RGBA channels are independently randomized, a directional noise texture treats each texel’s RGB channels together as the XYZ components of a random direction vector, and the A channel as a scalar for the vector’s direction.

This initializer does not generate texel data; the [`MDLNoiseTexture`](/documentation/ModelIO/MDLNoiseTexture) class automatically generates data and caches it for reuse when you use one of the [`MDLTexture`](/documentation/ModelIO/MDLTexture) methods listed in Accessing Texture Data.

---

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)