Formation of mesoscopic polymer structures for optical devices door