<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ClothMeshResource/init(from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:22RealityFoundationCloth0C12MeshResourceC4fromAC0aB00dE0C_tKcfc"
  },
  "title" : "init(from:)"
}
-->

# init(from:)

Creates a cloth mesh resource from a rendering mesh resource.

```
@MainActor convenience init(from mesh: MeshResource) throws
```

## Discussion

Generates a cloth mesh from a rendering mesh without remeshing.
No remeshing is performed.
In other words, the resulting [`ClothMeshResource`](/documentation/RealityKit/ClothMeshResource) will match exactly the original [`MeshResource`](/documentation/RealityKit/MeshResource).

- from: The [`MeshResource`](/documentation/RealityKit/MeshResource) to generate a [`ClothMeshResource`](/documentation/RealityKit/ClothMeshResource) from.

---

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)