How to make transparent material in cycles?

Is it possible to make a transparent Material in cycles render? How is it accomplished?

An image texture with alpha(transparency) data can be used to make transparent materials. Do note that in order for alpha textures to work the image file format requires an alpha channel or be a grayscale mask.

UPDATE

Though my original answer is still applicable and functions. There have been many updates and enhancements since then. One of them being the inclusion of a PBR shaders, Principled BSDF hese specifically. Which, as of v2.8, now also has an Alpha input. Simplifying transparency in many ways.

The following examples utilize a 2px by 2px checker pattern with full black and full alpha transparency.

Blender 2.8

Node setup using 'Alpha Channel' with Principled shader:

Master opacity scale is from -1 to +1
Positive values decreases opacity
Negative values increases opacity of masked (transparent) area.

Blender 2.7

In this example; the Transparent Shader is set to white #FFFFFF which produces full transparency. This is then connected to the top input of 2 Mix Shaders.

Alpha from Image Texture is connected to the factor input of first Mix Shader. This takes the alpha data from the image and essentially applies it as a mask.

The color data from the image is not used in this case. Though, when applicable, can be connected to the color input of a shader. Such as mesh based hair and eyelashes for example.

The first Mix Shader connects to the bottom of the second. This allows control of the overall opacity.

Alpha node setup/example:

A black and white and/or grayscale image can be substituted.
Black being fully transparent and white being fully opaque. Use color output instead of alpha.

Grayscale node setup/example:>Note:

Some raster formats that support alpha are:

• OpenEXR
Open Source format released by ILM.
Designed with CGI workflow in mind.
Your image editor may lack support out-of-box.
• JPEG 2000 - Not original JPEG
Lossy format
Support may potentially be limited.
• GIF
Limited to 256 colors
Can be animated
• PNG
Indexed color has faulty alpha handling. Be sure to use RGB/A mode.

I would suggest use of OpenEXR when working with raster images containing an alpha channel. For Photoshop users I recommend the exr-io plugin.

For those using vector images. To my knowledge SVG is the prime candidate.

Note 2:
The shader used for color can be changed as desired and/or needed. This will also work with volumetric shaders as well. However do understand that volumetrics work a little differently than surface shaders. Any further detail on that would be getting a little too far off topic.

Special thanks to Mr Zak and troy_S for their insights in the comments.

Happy Blending!

• Also you can create standalone image intended to be a mask, where everything that should appear is drawn in white, while eveything that should not - in black (so 2-colors image), and that image connect to Factor input, Aug 9, 2015 at 20:53
• Decent aside from the PNG format comment. PNG is the worst possible choice for CGI. Avoid it like the plague. Use OpenEXR instead, even at half float with DWAA compression. PNG should be banished from the face of the earth. Sep 15, 2019 at 23:13
• @troy_s Appreciate the input. I'll likely be editing the answer again after I do a bit of testing. I'm finding out just how far behind I am on image formats the more I read. OpenEXR looks like a great format. Could actually save a few unrelated issues I've had before. Thank you ILM! When I proclaimed png best. I meant it against your most common and/or mainstream formats at the time. JPEG, GIF, TIFF, etc..Stuff that generally has out-of-box compatibility & smaller file sizes. My experience with GIF was lossy as JPEG & I'm rambling on... Point is... Thanks! Sep 16, 2019 at 3:42
• The big knock against PNG is that it can’t encode alpha correctly. Sep 16, 2019 at 12:58
• Only information I can find on the matter involves indexed colour mode. Which honestly is more an issue with software not accepting anything other than 0% or 100% alpha in said mode & poor translation of anything between. Which can be remedied by changing to RGB/A. Also came to find that GIF isn't lossy so much as limited to 256 colours. Leading to nearest substitutions when passed the limit. However, all said, OpenEXR does indeed look to be the de facto format for CGI purposes. So thanks again for bringing that to my attention. Sep 16, 2019 at 19:22

You can add a transparent shader, and with the mix node you can control the transparancy

• Your method works, but the Glossy BSDF shader does have the alpha channel in the Color field. I tried setting the alpha there -- it doesn't work. Any ideas what that alpha is for? Dec 27, 2016 at 22:45
• I don't understand what you are asking? Do you want the glossy shader to be transparent in combination with the diffuse shader? Dec 29, 2016 at 10:15

I wanted to make a transparent glossy plastic for a packaging in blender cycles and ended on this thread. Someone in reddit recommended this setup but I wanted it to be transparent. This is my node setup. I hope it works for you.

Setup in the image works in Blender 2.81 eevee atlease. i.e Principled BSDF,Transparent BSDF with the Mix Shader.Then the Alpha slide in the Principle shader is set to 0. Please note the yellow rectangle. You need to set the Blend mode to Alpha Blend. Thanks