<!--
{
  "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/MDLMaterial/init(name:scatteringFunction:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLMaterial(im)initWithName:scatteringFunction:"
  },
  "title" : "init(name:scatteringFunction:)"
}
-->

# init(name:scatteringFunction:)

Initializes a material

```
init(name: String, scatteringFunction: MDLScatteringFunction)
```

## Parameters

`name`

A descriptive name for the material.

`scatteringFunction`

The collection of material properties that define the material’s response to light. For details, see the [`scatteringFunction`](/documentation/ModelIO/MDLMaterial/scatteringFunction) property.

## Return Value

A new material object.

## Discussion

To use the newly created material with a 3D object, assign it to the the [`material`](/documentation/ModelIO/MDLSubmesh/material) property of a [`MDLSubmesh`](/documentation/ModelIO/MDLSubmesh) instance.

---

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)