Thermal spraying of sol-gel materials