In this tutorial you’ll learn how to use an alpha map in cycles to make something transparent in certain parts.

We’ll be making a leaf by creating an alpha map from the original leaf texture to use as a mask between a diffuse shader and a transparent shader.

This tutorial assumes you have some basic knowledge of how to use Blender and cycles.

Here’s the node setup:

UPDATE!
As of 2.63, the Image node  has an alpha output, so if the image has an alpha channel already, we don’t need a separate image for that:

Alpha nodes in 2.63

 

40 Comments

 

  1. 21 Nov ’11  4:53 am by Craig

    Thanks, great tip/tut, what good is cycles if you can't use alpha maps.
    Fantastic.

  2. 21 Nov ’11  6:20 am by MasterXeon1001

    Awesome! Thanks Master Zaal. Tricky tricky Blender. I have been wondering about this.

  3. 21 Nov ’11  8:19 am by Ben

    perfect! I was wondering this just yesterday!

  4. 21 Nov ’11  11:44 am by Nunuddo

    Hey!

    Useful indeed, although I'd seen it done by a guy called CGI Trainer...

    Two questions though:

    1) Does anyone know how to make the entire background transparent?

    2) Why put your videos on YouTube, and not stick with Vimeo? Much better quality IMHO...

    Thanks!

    • 21 Nov ’11  11:48 am by Greg Zaal

      1) Easy peasy! In the render tab under the Film panel theres a checkbox "Transparent"

      2) Because we're saving our 1HD upload per week for something else ;)

  5. 21 Nov ’11  3:39 pm by Nunuddo

    @Greg:

    1) Fanxalot! Exactely what I've been looking for...

    2) Sounds like an excellent reason to me... :)

  6. 21 Nov ’11  9:24 pm by Martino

    Hello Greg,

    I was wondering if you have any tutorials cover over largely on how to create bump and specular maps from a diffused texture using something, like gimp or photoshop or perhaps both? Alot, of these tutorials on cycles from the likes of blendernerd, blenderguru, cgcookie have covered some sort of texturing using maps. This world of texturing is new to me and pretty exciting. Besides that the fact that it looks great in cycle! If not, could you possible link me to tutorials/how-to/manuals on how to create these maps; bump, specular, normal, etc. I know you are a busy person much like myself but i would appreciate any direction you could point me in. Because, sadly my search on google and youtube has only lead to a very "layman" ways of creating these maps through desaturating, levels, curves, and etc of a image. Which is Ok but I really want to create some nice mappings. Thanks!

    • 29 Nov ’11  10:22 pm by discoape

      Andrew Price did a cycles tutorial recently on rendering a doughnut scene. In this he covers bump mapping to get the wood texture on the table. It's pretty simple to bump map the leaf texture in this example.

      Add a colour mix node. Drag a second line from the image texture node (not the aplha) to the new colour mix node and put it in the color 1 slot. Then take the right hand color on the new mix node and drag it to the displacement slot on the final "Material Output" node. Then just slide the "Fac" value around on the new colour mix node until it looks the way you like in the render.

      D

  7. 21 Nov ’11  9:51 pm by Shane

    First thought don't bother with making a new image just break up the channels - alas not in cycles nodes yet.

    One that does work if the image has a white background - you can use rgb to bw and feed that into the mix shader fac input - all feeding off the one image input. I found this doesn't work for png (maybe cycles png bug) or black background.

    Guess Image to RGBA node is one we need to ask for in cycles.

  8. 22 Nov ’11  1:04 am by greg p

    Just great, very helpful, thanks.

  9. Pingback : Alpha Mapping in Cycles | BlenderNation

  10. 22 Nov ’11  5:01 am by Sam Schad

    Martino-
    An easy workaround for a bump map is take the same alpha map jpg created by Greg, and open it in Gimp or Photoshop. As a test, just take some black text and type in the white area of that image. Save it and indicate that it is a bump map.

    Back in Cycles, add another image node and find this new bump image. Then attach that bump image to the displacement node of the Material Output. I put a Math node in between that image and the Material Output and set it to Power, and I could change the intensity of the map quite nicely. It only took a few minutes to figure it out, and you'll want to play around....

    • 22 Nov ’11  11:10 am by Martino

      Thanks for the few tips. Your time is appreciated and I will def. have to be checking this out as a better way to figure this kind of thing out

  11. 23 Nov ’11  7:20 am by haqzaf

    Hi,Greg Zaal,
    Thanks for this tutorial.
    This is my first appearance here at your site.
    My system is not compatible for Cycles render.Still I,manage to follow through using cycles.This is a rendered image.Good material to learning.
    my link
    http://browse.deviantart.com/?q=gallery%3Ahaqzaf%2F9410305#/d4h1iwg

  12. 23 Nov ’11  12:38 pm by DolphinDream

    Nice tip! thanks.

  13. 24 Nov ’11  8:12 am by SeriousM

    pretty pretty simple and useful!!
    thank you alot!

    and the tip for contrast down -> contrast up is genuis :)

  14. Pingback : Shadow Only Material for Blender Cycles | Lluis Garcia

  15. 14 Jan ’12  8:47 pm by bobjohnson

    This doesn't work when you use a cycles emmision type as a light source.
    The alpha value is reversed??

  16. Pingback : Tutoriais + de 100 tutoriais de Blender (Atualizados e Completos)

  17. Pingback : Nyílt forrású szoftverek professzionális tervezési folyamatban | http://grafit.netpositive.hu

  18. 12 Mar ’12  10:29 am by comeinandburn

    thanks this was very useful!

    BTW you can speed up you Alpha Map creation in Gimp. When using an image with an existing alpha, just click on the image layer and select "alpha to selection", which selects everything but transparency. Then just use the paint bucket to fill the selection with white, next invert the selection and fill with black.

  19. 20 Apr ’12  7:37 am by Pao

    Hi! Thanks for your tutorial :)
    I have a question!, how about this image:
    http://www.blenderguru.com/wp-content/uploads/2011/06/Clouds.png
    I follow your steps and didnt work, in case u can make it plz drop a line here :P, am trying to make the earth in cycles! =)
    Cheers!!

    • 20 Apr ’12  10:23 am by Greg Zaal

      I can't see why it wouldnt work - can I see your nodes?
      That image should probably be connected to the Fac of the mix node (to use it as a mask) and then also to the colour of the shader for the clouds.

  20. 20 Apr ’12  3:23 pm by Pao

    Hi Greg , thanks for reply!!!! yes it works now!! i upgrade my blender and it works, i dunno if it was for that, or the problems was between the chair and the computer -_-.
    Great page!!! quite useful!!

    • 23 Apr ’12  12:10 pm by 1Aswitchman

      Pao that's a great line - problems between the chair and the computer - perhaps we can call it the CC interface or CCI? Having done years of tech support I don't think I've heard it in quite that frame of reference, although I've heard it put many other ways hehe. Thank you :)

  21. 28 Apr ’12  12:41 am by yeKcim

    i don't underdtand why you don't use alpha channel of a png, to use only one picture… like this: http://img51.imageshack.us/img51/600/blednerpngalpha.png

    • 28 Apr ’12  1:33 am by Greg Zaal

      If you look closely, you'll see that in 2.62 there is not alpha output in the image node :) But now there is, so by all means use that!

  22. 28 Apr ’12  1:37 am by yeKcim

    No alpha for jpg, right, but for png i thought it was right here…

  23. 3 May ’12  11:43 am by Attendant One

    Ok, I'm still get a shadow from the plane. in both methods. Is there some other setting somewhere I should be checking? Like receive transparent shadows in Blender internal.

  24. 11 May ’12  12:21 pm by MarkBerlin

    Hi Greg,

    thanks for the tutorial and the update for Blender 2.63. One question though. How do I achieve it in Cycles that the texture is not repeated and projected just once? This is driving me nuts ;-)
    Mark
    Mark

  25. 16 May ’12  9:19 pm by Nunuddo

    Hey guys...

    I'm trying to make my very first 2D animation, and render it in Cycles... This method would be very helpful, if only my images didn't have a black lining (contour) around them...

    Any ideas how this method would appli in a case like this here?: http://i.imgur.com/fnShjl.jpg

    Thanks! ;)

    • 17 May ’12  12:13 am by Greg Zaal

      My advice would be to use Blender Internal :)

  26. 17 May ’12  1:09 am by Nunuddo

    @Greg: That's what I would have normally done, but my aim here is to go for an 'esthetic experiment', where ultra-simplified figures move about in a realistically lit environnement... Wonder what that would look like... And those borders are killing me! ^^

  27. 26 May ’12  8:03 pm by Alexis

    Thanks for keeping up on this Greg! The fact that you update with the new versions is the reason I keep coming back.

  28. Pingback : Alpha Mapping in CyclesLars Roschek

  29. 14 Aug ’12  2:30 am by elaser

    The new version of blender can handle png quite well, just connect the alpha channel of the image as a fac, same node setup with transparent and it's done, no need to use jpg. I suggest to make an update of the tutorial!
    cheers

  30. 14 Aug ’12  6:16 am by What a silly voice

    Your voice is so fucking annoying i had to turn it off at 10 seconds in. Stop licking your lips too its sickening.

  31. 25 Mar ’13  1:47 am by Andreas

    That was what I was looking for. The update was brillant! Thanks Greg

Leave a reply