Thin-film optical waveguides of tantalum oxide and silicon nitride were prepared by rf diode sputtering. The optical loss α was found to be a sensitive function of the following deposition parameters: reactive gas composition, total gas pressure, gas flow rate, substrate temperature, substrate bias, and postdeposition annealing. Increasing the percentage oxygen in argon from 5% to 30% raised the loss from 2 to 45 dB/cm and changed the film structure from amorphous to crystalline. Optical losses below 1 dB/cm were produced in amorphous Ta2O5 films at 0.5 Pa, 10% O2 in Ar, low gas flow, and low substrate temperatures. The log α was a linear function of the percentage of reactive gas for both Ta2O5 and Si3N4. Optical losses of 15 dB/cm in amorphous Si3N4 films were obtained at 1.5 Pa with 10% N2 in Ar, independent of substrate temperature and gas flow.