---
title: MDLMaterial
framework: modelio
role: symbol
role_heading: Class
path: modelio/mdlmaterial
---

# MDLMaterial

A collection of material properties that together describe the intended surface appearance for rendering a 3D object.

## Declaration

```swift
class MDLMaterial
```

## Overview

Overview Each material property (a MDLMaterialProperty object) provides one specific aspect of appearance, such as opacity, shininess, or surface detail. Use the material property of a MDLSubmesh object to associate a material with a 3D object for rendering or to find the material assigned to an object loaded from an asset file. Sets of certain material properties called scattering functions determine the material’s response to lighting. You can manage these properties together using a material’s scatteringFunction property. Creating a material with the inherited init() initializer is equivalent to using the init(name:scatteringFunction:) with a MDLScatteringFunction object whose properties all have default values.

## Topics

### Creating a material

- [init(name:scatteringFunction:)](modelio/mdlmaterial/init(name:scatteringfunction:).md)

### Using a material

- [materialFace](modelio/mdlmaterial/materialface.md)
- [name](modelio/mdlmaterial/name.md)

### Determining a material’s response to lighting

- [scatteringFunction](modelio/mdlmaterial/scatteringfunction.md)

### Working with individual material properties

- [propertyNamed(_:)](modelio/mdlmaterial/propertynamed(_:).md)
- [property(with:)](modelio/mdlmaterial/property(with:).md)
- [properties(with:)](modelio/mdlmaterial/properties(with:).md)
- [setProperty(_:)](modelio/mdlmaterial/setproperty(_:).md)
- [remove(_:)](modelio/mdlmaterial/remove(_:).md)
- [removeAllProperties()](modelio/mdlmaterial/removeallproperties().md)

### Sharing material properties

- [base](modelio/mdlmaterial/base.md)

### Accessing material properties with subscript syntax

- [subscript(_:)](modelio/mdlmaterial/subscript(_:)-323j3.md)
- [subscript(_:)](modelio/mdlmaterial/subscript(_:)-19j2.md)
- [count](modelio/mdlmaterial/count.md)

### Working with textures using resolvers

- [loadTextures(using:)](modelio/mdlmaterial/loadtextures(using:).md)
- [resolveTextures(with:)](modelio/mdlmaterial/resolvetextures(with:).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)
- [MDLNamed](modelio/mdlnamed.md)
- [NSFastEnumeration](foundation/nsfastenumeration.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Materials

- [MDLMaterialProperty](modelio/mdlmaterialproperty.md)
- [MDLMaterialPropertyConnection](modelio/mdlmaterialpropertyconnection.md)
- [MDLMaterialPropertyGraph](modelio/mdlmaterialpropertygraph.md)
- [MDLMaterialPropertyNode](modelio/mdlmaterialpropertynode.md)
- [MDLScatteringFunction](modelio/mdlscatteringfunction.md)
- [MDLPhysicallyPlausibleScatteringFunction](modelio/mdlphysicallyplausiblescatteringfunction.md)
