Yes, it is possible to assign materials to meshes in OBJ and export them as MTL. Probably I should do it because the same functionality is already implemented in Procgen Mansion. The problem is that I don't use (and export) UV coordinates because all my materials are solid colors, and for this reason applying textures is problematic.