textures – Substance Painter Bayblon.js PBR export (gltf)?

I'm using Substance Painter 2018.3 and I want to export my PBR material to babylon.js. The Babylon.js documentation states:

Metallic roughness texture: texture that contains both metal value
on channel B
and the roughness value in the G channel to maintain
better precision Environmental occlusion can also be stored in the R channel

I have read that the substance once had a pre-set export setting (for gltf textures), but it seems that it was deleted. So, how can I combine the roughness and the metal in a .png using the B and G channels?