<!--
{
  "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/MDLMaterialProperty",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLMaterialProperty"
  },
  "title" : "MDLMaterialProperty"
}
-->

# MDLMaterialProperty

A definition for one specific aspect of the rendering parameters for a material.

```
class MDLMaterialProperty
```

## Overview

The collection of material properties in a [`MDLMaterial`](/documentation/ModelIO/MDLMaterial) instance defines the intended surface appearance for rendering a 3D object. A material property object’s [`semantic`](/documentation/ModelIO/MDLMaterialProperty/semantic) property identifies which aspect of material rendering it affects, and its value (which can be any of several types) determines how the material property contributes to that aspect of rendering.

When you initialize a material property with a specific value (using one of the initializers listed in [`Creating a Material Property`](/documentation/ModelIO/MDLMaterialProperty#Creating-a-Material-Property)) or set the value of an existing material property (using one of the property setters listed in [`Working with a Material Property’s Value`](/documentation/ModelIO/MDLMaterialProperty#Working-with-a-Material-Propertys-Value)), the [`type`](/documentation/ModelIO/MDLMaterialProperty/type) property changes to reflect the data type of the stored value. To retrieve the material property’s value, you must use the property accessor appropriate to its type. If you read a material property’s value using an accessor for a different type, the result is undefined.

## Topics

### Creating a Material Property

[`-  initWithName:semantic:`](/documentation/ModelIO/MDLMaterialProperty/init(name:semantic:))

Initializes a material property without a value.

[`-  initWithName:semantic:string:`](/documentation/ModelIO/MDLMaterialProperty/init(name:semantic:string:))

Initializes a material property with a string value.

[`-  initWithName:semantic:URL:`](/documentation/ModelIO/MDLMaterialProperty/init(name:semantic:url:)-2ldk4)

Initializes a material property with a URL value.

[`-  initWithName:semantic:textureSampler:`](/documentation/ModelIO/MDLMaterialProperty/init(name:semantic:textureSampler:))

Initializes a material property with a texture sampler object.

[`-  initWithName:semantic:color:`](/documentation/ModelIO/MDLMaterialProperty/init(name:semantic:color:))

Initializes a material property with a color value.

[`-  initWithName:semantic:float:`](/documentation/ModelIO/MDLMaterialProperty/init(name:semantic:float:))

Initializes a material property with a scalar value.

[`-  initWithName:semantic:float2:`](/documentation/ModelIO/MDLMaterialProperty/init(name:semantic:float2:))

Initializes a material property with a 2-component vector value.

[`-  initWithName:semantic:float3:`](/documentation/ModelIO/MDLMaterialProperty/init(name:semantic:float3:))

Initializes a material property with a 3-component vector value.

[`-  initWithName:semantic:float4:`](/documentation/ModelIO/MDLMaterialProperty/init(name:semantic:float4:))

Initializes a material property with a 4-component vector value.

[`-  initWithName:semantic:matrix4x4:`](/documentation/ModelIO/MDLMaterialProperty/init(name:semantic:matrix4x4:))

Initializes a material property with a 4 x 4 matrix value.

### Using a Material Property

[`name`](/documentation/ModelIO/MDLMaterialProperty/name)

A descriptive name for the material property.

[`semantic`](/documentation/ModelIO/MDLMaterialProperty/semantic)

The semantic meaning for the material property’s value.

[`type`](/documentation/ModelIO/MDLMaterialProperty/type)

The data type stored in the material property’s value.

### Working with a Material Property’s Value

[`stringValue`](/documentation/ModelIO/MDLMaterialProperty/stringValue)

The string value for the material.

[`URLValue`](/documentation/ModelIO/MDLMaterialProperty/urlValue)

The URL value for the material property—typically, the URL to a texture image.

[`textureSamplerValue`](/documentation/ModelIO/MDLMaterialProperty/textureSamplerValue)

A texture sampler object that provides the texture image value for the material property.

[`color`](/documentation/ModelIO/MDLMaterialProperty/color)

The color value for the material property.

[`floatValue`](/documentation/ModelIO/MDLMaterialProperty/floatValue)

The scalar floating-point value for the material property.

[`float2Value`](/documentation/ModelIO/MDLMaterialProperty/float2Value)

The 2-component floating-point vector value for the material property.

[`float3Value`](/documentation/ModelIO/MDLMaterialProperty/float3Value)

The 3-component floating-point vector value for the material property.

[`float4Value`](/documentation/ModelIO/MDLMaterialProperty/float4Value)

The 4-component floating-point vector value for the material property.

[`matrix4x4`](/documentation/ModelIO/MDLMaterialProperty/matrix4x4)

The 4 x 4 floating-point matrix value for the material property.

### Copying a Material Property

[`-  setProperties:`](/documentation/ModelIO/MDLMaterialProperty/setProperties(_:))

Sets the material property’s attributes to those of the specified material property.

### Constants

[`MDLMaterialSemantic`](/documentation/ModelIO/MDLMaterialSemantic)

Options for the semantic use of a material property’s value in rendering a particular surface appearance; used by the [`semantic`](/documentation/ModelIO/MDLMaterialProperty/semantic) property.

[`MDLMaterialPropertyType`](/documentation/ModelIO/MDLMaterialPropertyType)

Options for the data type of a material property, used by the [`type`](/documentation/ModelIO/MDLMaterialProperty/type) property.

## Relationships

### Conforms To

[`NSCopying`](/documentation/Foundation/NSCopying)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`MDLNamed`](/documentation/ModelIO/MDLNamed)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Hashable`](/documentation/Swift/Hashable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)