A camera-independent method of avoiding image saturation using modified sinusoidal fringe-pattern projection to reduce surface measurement error and thus accommodate variable illuminance in phase-shifting surface-shape measurement is presented. The maximum input gray level (MIGL) in the projected patterns is reduced to an optimal tradeoff point, below which the intensity modulation, contrast, and signal-to-noise ratio would diminish the advantage of further MIGL reduction. Measurement simulations using 31 MIGL values, from 105 to 255 in increments of 5, demonstrated reductions in root-mean-square errors for ambient illuminance of 400, 500, 600, 700, 800, and 900 lx, from 0.38, 0.56, 0.86, 1.21, 85, and 373 mm, respectively, at 255 MIGL, to 0.31 to 0.32 mm at the optimum MIGL. The advantage of the method was confirmed in real measurements of a flat plate and human masks. The ability to perform camera-independent measurements under variable lighting conditions and surface reflectivity may lead to more practical measurements in uncontrolled environments.