I was trying to get a foamy material like coffee latte with material shaders. tried the procedural shader in the share forum but render times were unexceptable and controlling the look was difficult.

Firts I thought off a making a foam mesh. I used grasshopper to generate this cellstructure. But the mesh would be so dense that it would be also problematic
When I found the image above in a google search for foam I was suprised. 
it might look like a picture but it is actually a illustrator vector image. if you zoom in you can see the layers.
so I thought I could maybe get a foam alike appearance by using layered meshes with holes stenciled out.
I made some layered meshes inside a cup nicely crawling up to the cups side.
I made some layered meshes inside a cup nicely crawling up to the cups side.
and made a stencil map in photoshop
The bottom layer with some stenciled holes
I multiplied or better said I put another layer as stencil layer as screen on top of it in the shader tree with a stencil driven by a membrane noise.

The result with four layers of stenciled meshes stacked. Looks foamy!

 

I rotated the photoshopped textures of the drawn holes on each layer so sometimes they overlap and you can look deeper into the foam..

Next thing to work on is to create some displacement to get some transparent bubbles covering the holes and some speculars.

And stenciled out the modo logo through all layers except the bottom to show some coffee.
here you see the layersv and their stacked result, now also with some displacements for the bubbles.
And on of the latest renders , it sort off works but needs a lot of attention in detail. Like the size of the stenciled noise, how the stenciled meshes relate together etc.