Chicken Gloss map export and usage

I’ve encountered a couple of problems when exporting a model with color, normal and gloss maps. Let me describe what happens.

Variant 1. A color map with gloss in alpha channel.

In this case, I enable Col and Spec on the color texture in Blender, so it knows RGB is for color and Alpha is for Gloss. According to Chicken’s manual, this should result in MODULATE_GLOSS envtype setting in the Egg, but instead I get GLOSS. Thus, the image has correct specularity, but no color.

When I change that setting manually in the egg, it works fine, but that’s obviously a little inconvenient.

In this case I setBloom(blend=Vec4(0, 0, 0, 1)) for testing purposes and it seems like everything works fine on this end, just the export itself goes wrong.

Variant 2. Color and gloss maps in separate images (color with rgba and gloss in grayscale)

I set Col only on the color map, and Spec only on the gloss map.

The resulting Egg looks fine to me. It has 3 textures with envtypes of MODULATE, NORMAL and GLOSS (in this order).

In this case the Gloss map seems not taken into account during rendering in Panda, regardless of the Bloom’s blend settings (I’ve tried Vec4(1, 1, 1, 0), Vec4(0, 0, 0, 1) and many values in between).

EDIT: I’ve found that adding

<Scalar> format { alpha }

to the Gloss texture in the Egg makes Varian 2 work. So now both my problems are only on the Chicken side, because I don’t know how to set it correctly for export.

Thanks in advance.