---
title: MDLMaterialProperty
framework: modelio
role: symbol
role_heading: Class
path: modelio/mdlmaterialproperty
---

# MDLMaterialProperty

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

## Declaration

```swift
class MDLMaterialProperty
```

## Overview

Overview The collection of material properties in a MDLMaterial instance defines the intended surface appearance for rendering a 3D object. A material property object’s 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) or set the value of an existing material property (using one of the property setters listed in Working with a Material Property’s Value), the 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

- [init(name:semantic:)](modelio/mdlmaterialproperty/init(name:semantic:).md)
- [init(name:semantic:string:)](modelio/mdlmaterialproperty/init(name:semantic:string:).md)
- [init(name:semantic:url:)](modelio/mdlmaterialproperty/init(name:semantic:url:)-2ldk4.md)
- [init(name:semantic:textureSampler:)](modelio/mdlmaterialproperty/init(name:semantic:texturesampler:).md)
- [init(name:semantic:color:)](modelio/mdlmaterialproperty/init(name:semantic:color:).md)
- [init(name:semantic:float:)](modelio/mdlmaterialproperty/init(name:semantic:float:).md)
- [init(name:semantic:float2:)](modelio/mdlmaterialproperty/init(name:semantic:float2:).md)
- [init(name:semantic:float3:)](modelio/mdlmaterialproperty/init(name:semantic:float3:).md)
- [init(name:semantic:float4:)](modelio/mdlmaterialproperty/init(name:semantic:float4:).md)
- [init(name:semantic:matrix4x4:)](modelio/mdlmaterialproperty/init(name:semantic:matrix4x4:).md)

### Using a Material Property

- [name](modelio/mdlmaterialproperty/name.md)
- [semantic](modelio/mdlmaterialproperty/semantic.md)
- [type](modelio/mdlmaterialproperty/type.md)

### Working with a Material Property’s Value

- [stringValue](modelio/mdlmaterialproperty/stringvalue.md)
- [urlValue](modelio/mdlmaterialproperty/urlvalue.md)
- [textureSamplerValue](modelio/mdlmaterialproperty/texturesamplervalue.md)
- [color](modelio/mdlmaterialproperty/color.md)
- [floatValue](modelio/mdlmaterialproperty/floatvalue.md)
- [float2Value](modelio/mdlmaterialproperty/float2value.md)
- [float3Value](modelio/mdlmaterialproperty/float3value.md)
- [float4Value](modelio/mdlmaterialproperty/float4value.md)
- [matrix4x4](modelio/mdlmaterialproperty/matrix4x4.md)

### Copying a Material Property

- [setProperties(_:)](modelio/mdlmaterialproperty/setproperties(_:).md)

### Constants

- [MDLMaterialSemantic](modelio/mdlmaterialsemantic.md)
- [MDLMaterialPropertyType](modelio/mdlmaterialpropertytype.md)

### Initializers

- [init(name:semantic:URL:)](modelio/mdlmaterialproperty/init(name:semantic:url:)-6lf96.md)

### Instance Properties

- [luminance](modelio/mdlmaterialproperty/luminance.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)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Materials

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