SilverwingVFX shows how to create a foam shader in Octane Render using Surfaces and Volumes.
Creating dense foam, like the kind seen in soap bubbles or a head of beer, requires combining several things to produce the final result in 3D rendering. Scattering? Sub Surface Scattering? Displacements?
Here, SilverwingfVFX (Raphael Rau) shows how to create a great-looking foam shader with Octane Render in Cinema 4D. This technique will also work in many renderers, such as Arnold, Redshift, etc., and most allow you to alter volumes with textures.