Extract texture/colors as png/jpeg once model is saved
Sorry for the question, but I'm a total novice on handling glb file. Once the model has saved the glb file, I'd like to extract the texture/colors from it into a png/jpeg file.
For glb files produced by other models I'm able to do this with the following code
from pygltflib import GLTF2, ImageFormat
from PIL import Image as PILImage
import io
# Load the GLB file
filename = "/content/unique3d.glb"
gltf = GLTF2().load(filename)
# Convert the images to PNG format
gltf.convert_images(ImageFormat.FILE)
gltf.images[0].uri
BUT for the glb file produced by Unique3d this code does not work. Is anyone able to guide me on doing this?
Thanks in advance!
@mattia-z - were you able to solve this. I am also facing same issue
@mattia-z - were you able to solve this. I am also facing same issue
sorry for the late reply, but still no. For my understanding, colors are saved inside the vertexes that's why the code i had does not work. But with my little knowledge of this field i wasn't able to figure out which is the right solution