Merges all meshes in a 3D model into a single mesh.
Syntax
scene ST_CombineMeshes(scene sc);Parameters
| Parameter | Description |
|---|---|
sc | The scene object. |
Description
ST_CombineMeshes consolidates all meshes in a scene object into one. If the scene contains no meshes, the function returns NULL.
The following figures show a merge operation on a 3D model that contains 145 meshes.
Before the merge:

After the merge, the 145 meshes are consolidated into one:

Examples
The following example calls ST_CombineMeshes on a scene column and converts the result to text using ST_AsText.
SELECT ST_AsText(ST_CombineMeshes(scene)) FROM t;The output is a glTF-format scene object:
{"type" : "gltf", "content" : {"accessors":[{"bufferView":0,......