---
title: "init(name:scatteringFunction:)"
framework: modelio
role: symbol
role_heading: Initializer
path: "modelio/mdlmaterial/init(name:scatteringfunction:)"
---

# init(name:scatteringFunction:)

Initializes a material

## Declaration

```swift
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 doc://com.apple.modelio/documentation/ModelIO/MDLMaterial/scatteringFunction property.

## Return Value

Return Value A new material object.

## Discussion

Discussion To use the newly created material with a 3D object, assign it to the the material property of a MDLSubmesh instance.
