Combines multiple texture images from a 3D model into a single texture image of a specified size.
Syntax
scene ST_CombineTextures(scene sc, int4 expected_size);
Parameters
|
Parameter |
Description |
|
sc |
The input scene object. |
|
expected_size |
The width and height of the combined texture image. This value must be greater than 0. Unit: pixels For example, if this parameter is set to 256, the combined texture image will be 256 x 256 pixels. |
Description
This function packs the pixels from the texture images of a 3D model into a single new texture image.
-
If the scene object is null, the function returns null.
-
The function returns an error if expected_size is less than or equal to 0.
For example, a model may have multiple source images of 256*256 pixels.
The function combines these images into a single 4096*4096 image:

Example
SELECT ST_AsText(ST_CombineTextures(scene, 4096)) from t;
--------
{"type" : "gltf", "content" : {"accessors":[{"bufferView":0,......
该文章对您有帮助吗?