This invention discloses a method and apparatus for x-ray techniques using structured x-ray illumination for examining material properties of an object. In particular, an object with one or more regions of interest (ROIs) having a particular shape, size, and pattern may be illuminated with an x-ray beam whose cross sectional beam profile corresponds to the shape, size and pattern of the ROIs, so that the x-rays of the beam primarily interact only with the ROIs. This allows a greater x-ray flux to be used, enhancing the signal from the ROI itself, while reducing unwanted signals from regions not in the ROI, improving signal-to-noise ratios and / or measurement throughput. This may be used with a number of x-ray measurement techniques, including x-ray fluorescence (XRF), x-ray diffraction (XRD), small angle x-ray scattering (SAXS), x-ray absorption fine-structure spectroscopy (XAFS), x-ray near edge absorption spectroscopy, and x-ray emission spectroscopy.