Help needed - coffee stain effect

Hi, I’ve only been using Blender for a couple of weeks. In this, my first project, I want to include a coffee stain on the table. I applied the image to a new plane before setting it up as shown, with the Ztransp on and alpha to 0. However the background is still visible. How do I make it so that the only visible texture is the coffee stain?

If it helps I can upload the .blend file.

Thanks, Matt Cronin


I’m just a novice, so take this with a grain of salt.

The coffee stain texture needs an alpha channel.

I usually make my textures as PNG file, and in my graphic editor (Adobe Photoshop or the Gimp) I set the alpha on the unwanted parts.

When I load the texture in, I click the “Premul” button, otherwise I seem to get a messy white halo. In the MAP IMAGE tab, click the UseAlpha button

Now, if you are using a JPG or something, you’ll need to make an alpha channel. After you load the image, in the MAP IMAGE tab, click the CalcAlpha and the UseAlpha buttons.

Okay, thanks very much. I’ll give it a shot.

there is an example of a coffe Stakin on a wood table in the BSOD material Wiki page

don’t have the url at hand

but i’ll try to find it

meanwhile you can search the wiki for this BSOD


With your coffee stain image, I would apply it as a texture directly to the table material, set the location with an empty (materials, Map Input tab, hit Object button, type in name of empty in Ob: field). Then the image texture will appear at the empty’s location.

In Map To tab, you only need to set Col to on, and the mix mode dropdown to multipy. Your image doesn’t have an alpha channel, so no alpha button is needed. Since the background is white, any color your table has won’t be affected by white (= multiply with 1), you’ll only see the image where it is not white, i.e. where the stain is.

EDIT: oh yes, or do like RickyBlender suggests, like in the BSOD materials tutorial with the coffee stain. They go about it a bit differently (grayscale image, IIRC), but that’s also a good way.

here it is

check this wiki out

on one of the page there is the coffe stain example


Thanks for all the help everyone, I have the finished version uploaded to my other thread.
If you want to see it then follow the link:
Thanks again :smiley: