I am using a transparent material but it seems that I only have a transparent surface. How can I get the result that a thinner part of my object is more transparent than a thicker part. I now the answer may be simple but I tried a lot of options but there are simly too many for trial and error. Also I don't find anything like that in the questions. I am using eevee.
I tried the solution with the principal volume and I cranked up the volumetrics samples. The effect is weird. See the second picture.