# materializeToDataTable

Function

Source: https://github.com/playcanvas/splat-transform/blob/b6424a5b3b929695fbaafe738a995adb1240d675/src/lib/compat/data-table.ts#L289

```ts
materializeToDataTable(src: ChunkSource, pool: ChunkDataPool, layers?: Set<ChunkLayer>): Promise<DataTable>
```

Materialize a `ChunkSource` into the legacy columnar `DataTable`
representation.

Each requested layer is read chunk-by-chunk and scattered into the
appropriate named columns (`x, y, z, rot_*, scale_*, opacity, f_dc_*,
f_rest_*`, plus extras).

**Parameters**

- `src` ([`ChunkSource`](https://api.playcanvas.com/splat-transform/interfaces/ChunkSource.md)): The source to materialize.
- `pool` ([`ChunkDataPool`](https://api.playcanvas.com/splat-transform/interfaces/ChunkDataPool.md)): The `ChunkData` pool used for the temporary read buffers; its `chunkSize` must be >= the source's.
- `layers` (`Set<`[`ChunkLayer`](https://api.playcanvas.com/splat-transform/types/ChunkLayer.md)`>`, optional): Optional layer filter; when set, only these layers (intersected with the source's) are read and allocated. Omit for every available layer. Consumers of a subset (e.g. voxelization needs only position + geometric) skip the unused columns entirely rather than loading and discarding them.

**Returns** `Promise<`[`DataTable`](https://api.playcanvas.com/splat-transform/classes/DataTable.md)`>`: A `DataTable` holding the source's gaussians in canonical column form.
