An x-ray based cement evaluation tool for measurement of the density of material volumes within single, dual and multiple-casing wellbore environments wherein said tool comprises: an internal length comprising a sonde section, wherein said sonde section further comprises an x-ray source; radiation measuring detectors (203, 307, 308, 410, 411, 412, 413, 414, 415, 510, 511, 512, 513, 514, 515, 605, 606, 707, 709); a radiation shield for said radiation measuring detectors (203, 307, 308, 410, 411, 412, 413, 414, 415, 510, 511, 512, 513, 514, 515, 605, 606, 707, 709); sonde-dependent electronics; and a plurality of tool logic electronics and power supply units, wherein the tool is configured to use x-rays (201, 309, 409, 509, 601, 701) to illuminate the formation surrounding a borehole and said plurality of radiation measuring detectors (203, 307, 308, 410, 411, 412, 413, 414, 415, 510, 511, 512, 513, 514, 515, 605, 606, 707, 709) are configured to directly measure the density of a cement annuli (104, 304, 402, 404, 502, 504) and any variations in density within, wherein the tool is configured to modulate a x-ray source energy, a plurality of reference detectors are configured to monitor the output of the x-ray source, wherein the tool is configured to modulate an energy of the output x-ray beam (201, 309, 409, 509, 601, 701), wherein a lowering of the x-ray beam's energy by the modulation of the tool results in a reduction of an optimum axial offset of said plurality of radiation measuring detectors (203, 307, 308, 410, 411, 412, 413, 414, 415, 510, 511, 512, 513, 514, 515, 605, 606, 707, 709), wherein the tool is configured to use information collected by said plurality of reference detectors relating to the modulation of the x-ray beam (201, 309, 409, 509, 601, 701), wherein the tool is configured to ascertain varying levels of sensitivity functions for the region surrounding a borehole from the collected information relating to the modulation of the x-ray beam (201, 309, 409, 509, 601, 701). an internal length comprising a sonde section, wherein said sonde section further comprises an x-ray source; radiation measuring detectors (203, 307, 308, 410, 411, 412, 413, 414, 415, 510, 511, 512, 513, 514, 515, 605, 606, 707, 709); a radiation shield for said radiation measuring detectors (203, 307, 308, 410, 411, 412, 413, 414, 415, 510, 511, 512, 513, 514, 515, 605, 606, 707, 709); sonde-dependent electronics; and a plurality of tool logic electronics and power supply units, wherein the tool is configured to use x-rays (201, 309, 409, 509, 601, 701) to illuminate the formation surrounding a borehole and said plurality of radiation measuring detectors (203, 307, 308, 410, 411, 412, 413, 414, 415, 510, 511, 512, 513, 514, 515, 605, 606, 707, 709) are configured to directly measure the density of a cement annuli (104, 304, 402, 404, 502, 504) and any variations in density within, wherein the tool is configured to modulate a x-ray source energy, a plurality of reference detectors are configured to monitor the output of the x-ray source, wherein the tool is configured to modulate an energy of the output x-ray beam (201, 309, 409, 509, 601, 701), wherein a lowering of the x-ray beam's energy by the modulation of the tool results in a reduction of an optimum axial offset of said plurality of radiation measuring detectors (203, 307, 308, 410, 411, 412, 413, 414, 415, 510, 511, 512, 513, 514, 515, 605, 606, 707, 709), wherein the tool is configured to use information collected by said plurality of reference detectors relating to the modulation of the x-ray beam (201, 309, 409, 509, 601, 701), wherein the tool is configured to ascertain varying levels of sensitivity functions for the region surrounding a borehole from the collected information relating to the modulation of the x-ray beam (201, 309, 409, 509, 601, 701).