<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PhysicallyBasedMaterial/metallic-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation23PhysicallyBasedMaterialV8metallicAC8MetallicVvp"
  },
  "title" : "metallic"
}
-->

# metallic

The reflectiveness of an entity.

```
var metallic: PhysicallyBasedMaterial.Metallic { get set }
```

## Discussion

The `metallic` property represents the reflectiveness of an entity. Use
this property to specify whether the entity displays metallic qualities
and reflects the surrounding environment, or displays dielectric
qualities and doesn’t reflect the environment.

![An illustration showing two spheres rendered in RealityKit. The sphere](images/com.apple.RealityKit/PhysicallyBasedMaterial-metallic-swift-property-1@2x.png)

Specify this property using a
<doc://com.apple.documentation/documentation/Swift/Float> to represent a
uniform reflectiveness for the entire entity. You an also use a
UV-mapped grayscale image to represent the reflectiveness of different
parts of the entity. When using an image, black pixels represent areas
that are dielectric, while white pixels represents areas that are
completely metallic and reflective.

If you initialize this property with a color image, rather than a
grayscale image, RealityKit only uses the intensity of the image’s red
channel.

The following example specifies the metallic qualities of an entity
using a single float value:

```swift
material.metallic = 1.0
```

The following example specifies the metallic qualities of an entity
using a UV-mapped image:

```swift
// Load a texture resource from a file.
let metalResource = try TextureResource.load(named: "entity_metallic")

// Set the texture to the metallic property.
let metallic = MaterialParameters.Texture(metalResource)
material.metallic = PhysicallyBasedMaterial.Metallic(texture: metallic)
```

---

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)