Three dimensional photonic crystals for optoelectronic applications