OK, so "foam" isn't the whole story........
First of all the foam in the picture is a very cheap, soft foam. You can easily get something like it.... I've got many sheets I've used to line projector "hush boxes" and various Home Theatre sound/speaker projects. I bought mine at Joanne's Fabrics, Fred Meyer and Walmart. I've never found black though.
Secondly, "foam" isn't an adequate descriptor...... the various foams are made using different base materials. I once had a gun rust, quickly, in an archery case. I spoke with the company and they said "Ohhh, we would never recommend you put blued steel into that foam"....
And thirdly, the FOAM isn't maybe as important as the container. I have gun cases ranging from "dollar-two-ninety-nine" the "hunnerds of dollars" and the gooder cases have a strong, solidly supportive foam and an aluminum or other very rigid outer shell.
Soooo, I'm with Wilbur on this one.
In fact, I've recently taken this another way too. I've wrapped the guns themselves using towels, silicone gunsocks, denim, even blankets (I've never used old underwear so can't comment on that suggestion) I've got cases that bulge out like a wallermellion before they'll hold a gun from moving
yeahh, I'm cheap
I won't even beautify it with "thrifty" nor "frugal" nor "skint"..... I wear holey socks.
and underwear, come to that....
hmm
maybe THAT's why......