-
Notifications
You must be signed in to change notification settings - Fork 566
Description
I have a glb model that uses EXT_mesh_gpu_instancing extension. Apart from TRANSLATION
, ROTATION
, and SCALE
attributes, each instance has a single color for its entire surface (so, a color per instance) and this info is in _COLOR_0
attribute. When I run optimize the model with gltfpack, the _COLOR_0
attribute is stripped from the output model. I am aware that gltfpack removes unknown/custom extensions, but since custom attributes are supported by EXT_mesh_gpu_instancing extension, I think these attributes should not be removed.
As with vertex attributes, custom instance attributes may be prefixed with an underscore (e.g. _ID, _COLOR, etc.) and used for application-specific effects.
As result, the ThreeJS loads and renders my model as expected, but the colors are missing when using the optimized model:
Command:
gltfpack -i input-model.glb -o output-model.glb
Input model rendered in gltf-viewer:

Output model rendered in gltf-viewer:
