How do you bake masks into a model's texture for exporting?

Hi there. Title says it all. I have a model that uses masks to add some detail to parts of the model, and I need to make that model useable in other programs, such as 3ds Max, Daz Studio, and Sketchup.

Can someone tell me how to bake the mask into the texture for the model, so I can export it to FBX or OBJ with the mask as part of the texture?