Formation of encapsulated bubbles