---
title: visualMesh
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/clothbodycomponent/visualmesh
---

# visualMesh

The dynamically deforming visual mesh of the cloth body, which you may read but not modify.

## Declaration

```swift
var visualMesh: LowLevelMesh? { get }
```

## Discussion

Discussion This visual mesh will always be nil at first. The visual mesh becomes non-nil if the entity is part of a simulation and has a ModelComponent whose mesh is not a LowLevelMesh. This is a dynamically deforming version of the mesh stored in the ModelComponent, and overrides the rendering. The visual mesh is updated on the GPU after each simulation update. Subscribe to ClothSimulationEvents.AfterUpdate to know when new data is available. To read the mesh contents on the GPU, encode your work using the scene’s commandQueue to ensure proper synchronization with the simulation’s GPU writes.

## See Also

### Mapping the visual mesh

- [visualMeshWeights](realitykit/clothbodycomponent/visualmeshweights.md)
- [materialNames](realitykit/clothbodycomponent/materialnames.md)
- [ClothBodyComponent.PerVisualVertexData](realitykit/clothbodycomponent/pervisualvertexdata.md)
- [ClothBodyComponent.PerSimulationVertexData](realitykit/clothbodycomponent/persimulationvertexdata.md)
