A simple spray pyrolysis technique has been employed for the preparation of thin films of crystalline semiconductors ZnO and SnO2. Furthermore, these materials could be doped with rare earth elements (Pr, Ce, Nd, Tb, Sm). The main parameters (substrate temperature, spraying time and doping material type) affecting the structural and optical properties of these films have been studied. Ultra-violet and visible spectroscopy, interference shearing microscopy, atomic force microscopy, X-ray diffraction and scanning electron microscopy were used for the investigation of the deposited layers. The films consist of aligned crystals of ZnO and SnO2, with nm dimensions. Films with optical transmission T > 85% and structural uniformity in terms of average roughness < 10 nm have been obtained. (C) 1997 Elsevier Science B.V.