Three-Dimensional Photonic Circuits in Rigid and Soft Polymers Tunable by Light