---
title: LightmapComponent.SurfaceExtractor
framework: realitykit
role: symbol
role_heading: Class
path: realitykit/lightmapcomponent/surfaceextractor
---

# LightmapComponent.SurfaceExtractor

This is a helper for extracting certain surface properties from entities within a lightmapped scene and rendering them out into the atlas defined by the light map.

## Declaration

```swift
@MainActor class SurfaceExtractor
```

## Topics

### Creating a surface extractor

- [init(lightmapRootEntity:)](realitykit/lightmapcomponent/surfaceextractor/init(lightmaprootentity:).md)

### Extracting surfaces

- [extractSurfacesForAtlasSlice(mode:atlasTextureIndex:textureSliceIndex:cameraOutput:cameraTransform:cameraFOVDegrees:onComplete:)](realitykit/lightmapcomponent/surfaceextractor/extractsurfacesforatlasslice(mode:atlastextureindex:texturesliceindex:cameraoutput:cameratransform:camerafovdegrees:oncomplete:).md)
- [LightmapComponent.SurfaceExtractor.ExtractionMode](realitykit/lightmapcomponent/surfaceextractor/extractionmode.md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Extracting baked surfaces

- [LightmapComponent.FinalShadedColorBakeMaterial](realitykit/lightmapcomponent/finalshadedcolorbakematerial.md)
