For very high energy radiation (gamma rays) it is more complicated. In addition to absorption, the gamma rays undergo scattering, which changes the ray direction and also results in a loss of energy. This subject has been heavily investigated and I presume there are tables of the energy attenuation for various substances.
Electronic and rovibrational resonances of the substance in question will dominate the absorption spectra, variables like density will probably only be significant when comparing two samples of the same substance.
We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling We Value Civility
• Positive and compassionate attitudes
• Patience while debating We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving