Materials for photolithography and 3D printing