The Cadmium Zinc Telluride Imager (CZTI) on AstroSat is a hard X-ray coded-aperture mask instrument with a primary field-of-view of 4:6 Â 4:6 (FWHM). The instrument collimators become increasingly transparent at energies above $ 100 keV, making CZTI sensitive to radiation from the entire sky. While this has enabled CZTI to detect a large number of off-axis transient sources, calculating the source flux or spectrum requires knowledge of the direction and energy dependent attenuation of the radiation incident upon the detector. Here, we present a GEANT4-based mass model of CZTI and AstroSat that can be used to simulate the satellite response to the incident radiation, and to calculate an effective ''response file'' for converting the source counts into fluxes and spectra. We provide details of the geometry and interaction physics, and validate the model by comparing the simulations of imaging and flux studies with observations. Spectroscopic validation of the mass model is discussed in a companion paper, Chattopadhyay et al.