How are crystals formed from a gas?
It's called deposition or desublimation. It's for example how snow is created in clouds or how frost forms on leaf. When leaf is very cold, then vapour surrounding leaf looses so much energy that it changes into solid state.