ksons / gltf-blender-importer

Blender glTF 2.0 Importer
MIT License
214 stars 36 forks source link

Store vertex color alpha into a second color attribute #26

Closed my2iu closed 6 years ago

my2iu commented 6 years ago

It's possible that I don't fully understand Blender, but it's my understanding that gltf lets you store vertex colors in RGBA format while Blender only accepts vertex colors in RGB format. So the importer ends up discarding the extra alpha values of the vertex colors in a gltf file. Is it possible to stash those alpha values into a second vertex color attribute during import? So the importer would create a COLOR_0 and a ALPHA_0/COLOR_0_ALPHA or something like that.

ksons commented 6 years ago

Blender switches from RGB to RGBA vertex colors somewhere between 2.79.0 and 2.79.4. Code on master / next release will cover for that.