Merges multiple texture images in a 3D model into a single texture image of a specified pixel size.
Syntax
scene ST_CombineTextures(scene sc, int4 expected_size);Parameters
| Parameter | Description |
|---|---|
sc | The scene object. |
expected_size | The target pixel size of the merged texture image. Must be greater than 0. Unit: pixel. For example, setting this to 256 produces a merged texture image of 256 × 256 pixels. |
Usage notes
Returns NULL if
scis not specified.Returns an error if
expected_sizeis less than or equal to 0.
Example
The following example merges all texture images in the scene column into a single 4,096 × 4,096 pixel texture image.
SELECT ST_AsText(ST_CombineTextures(scene, 4096)) FROM t;Output:
{"type" : "gltf", "content" : {"accessors":[{"bufferView":0,......The following images illustrate the merge result. The input consists of multiple 256 × 256 pixel texture images:

After merging, all input images are combined into a single 4,096 × 4,096 pixel texture image:
