<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PhysicallyBasedMaterial/ClearcoatRoughness-swift.struct/init(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation23PhysicallyBasedMaterialV18ClearcoatRoughnessVyAeA06CustomE0VADVcfc"
  },
  "title" : "init(_:)"
}
-->

# init(_:)

Creates a clearcoat roughness object from a custom material’s
clearcoat roughness property.

```
init(_ value: CustomMaterial.ClearcoatRoughness)
```

## Parameters

`value`

The custom material’s clearcoat roughness property.

## Discussion

A clearcoat is a separate layer of transparent specular highlights
used to simulate a clear transparent coating, like the paint on a
car, or the surface of lacquered objects. When you enable clearcoat
rendering for a material, RealityKit renders the clearcoat as a
separate layer just above the surface of the entity. You can specify
a clearcoat roughness value for the clearcoat to indicate how much
the clearcoat scatters light that bounces off of it, which softens
and spreads out the highlights.

This initializer creates an object that specifies the clearcoat
roughness for a material that uses the
[`clearcoatRoughness`](/documentation/RealityKit/CustomMaterial/clearcoatRoughness-swift.property) property from a
[`CustomMaterial`](/documentation/RealityKit/CustomMaterial) object.

---

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)