Sub topic 11
Alpha and transparency
This chapter assumes you can build a Principled BSDF material, plug image textures into its inputs, and set the right color space for each map. Here you will learn what the Alpha input does, how to cut out shapes with it, and which material settings control how Eevee draws it.
What Alpha does
Alpha is a number from 0 to 1 on the Principled BSDF. At 1.0 the surface is fully present. At 0.0 it is fully absent and you see whatever is behind it. Values in between mix the surface with what lies behind it.
Alpha only decides how much of the surface is there. It does not bend light. A glass ball made with Alpha shows its background undistorted, while the same ball made with Transmission refracts it (see the glass chapter). Use Alpha for things that really are cut out or see-through without refraction: leaves, fences, decals, stickers, thin plastic film, fading effects.
Alpha is not the same as the render's Film > Transparent option. That option makes the world background transparent in the output image. It has no effect on object materials.
Sources of alpha
You can supply Alpha in three common ways:
- A fixed value. Type a number in the Alpha field. This gives uniform see-through, such as 0.4 for tinted film.
- An image's alpha channel. Connect the Image Texture node's Alpha output to the Principled BSDF Alpha input. PNG files with transparency carry this channel.
- A grayscale mask. Connect a black-and-white image's Color output to Alpha. White is opaque and black is invisible. Set that image to Non-Color, because the values are data and not color.
The image's Alpha setting (below the node's color space field) tells Blender how the file stores alpha:
| Alpha mode | Use it when |
|---|---|
| Straight | Color is stored separately from alpha. This is the usual choice for textures. |
| Premultiplied | Color values were already multiplied by alpha, as in some video and compositing exports. |
| Channel Packed | The alpha channel holds unrelated data and you do not want it applied to color. |
| None | You want to ignore the alpha channel completely. |
If a cutout shows dark or light fringes around its edges, the mode is probably wrong. Try Straight and Premultiplied in turn.
How Eevee draws alpha
Cycles treats Alpha as a probability. At each hit it randomly decides whether to continue through the surface, and averaging many samples gives the smooth result. This always works and needs no settings, apart from the transparent bounce limit under Render Properties > Light Paths > Max Bounces > Transparent. If the limit is too low, stacked leaves or panes can turn black.
Eevee is a real-time engine and needs a choice. Where that choice lives depends on your Blender version.
- Blender 4.2 and later (EEVEE Next): In Material Properties > Settings > Surface, set Render Method to Dithered or Blended.
- Blender 4.1 and earlier: The same choice is the Blend Mode (Opaque, Alpha Clip, Alpha Hashed, Alpha Blend) plus a separate Shadow Mode.
| Option | Behavior | Strengths | Weaknesses |
|---|---|---|---|
| Dithered (older: Alpha Hashed) | Discards pixels in a noise pattern, then denoises over samples. | Correct sorting, works with shadows and overlapping surfaces. | Grainy at low sample counts. |
| Blended (older: Alpha Blend) | Draws the surface with true blending, back to front per object. | Smooth, no noise. | Sorting errors between and within objects. Limited shadows and reflections. |
| Alpha Clip (older only) | Pixels are fully on or off at a threshold. | Cheap and crisp. | Hard, jagged edges. |
Start with Dithered. Switch to Blended only when noise bothers you and the object is simple, such as a single flat sheet.
Shadows
A cutout leaf should cast a leaf-shaped shadow, not a rectangle. In Eevee 4.1 and earlier, set Shadow Mode to Alpha Hashed or Alpha Clip. In 4.2 and later, Dithered materials produce alpha-aware shadows, and a Transparent Shadows option in the material's settings controls whether the shadow follows the alpha. Cycles always casts alpha-aware shadows.
Check the result by looking at the shadow on the ground. A solid rectangle means shadows are ignoring alpha.
Building a cutout leaf
This script builds a leaf material with a PNG that has an alpha channel. It works on both the old and new Eevee settings. The file path is a placeholder relative to your .blend file.
import bpy
mat = bpy.data.materials.new(name="Leaf")
mat.use_nodes = True
nodes = mat.node_tree.nodes
links = mat.node_tree.links
bsdf = nodes.get("Principled BSDF")
tex = nodes.new("ShaderNodeTexImage")
tex.image = bpy.data.images.load("//textures/leaf.png")
tex.image.alpha_mode = 'STRAIGHT'
links.new(tex.outputs["Color"], bsdf.inputs["Base Color"])
links.new(tex.outputs["Alpha"], bsdf.inputs["Alpha"])
# Eevee settings differ by Blender version
if hasattr(mat, "surface_render_method"):
mat.surface_render_method = 'DITHERED'
else:
mat.blend_method = 'HASHED'
mat.shadow_method = 'HASHED'Apply it to a flat plane with UVs that cover the leaf image. Edges of the leaf then become see-through wherever the PNG is transparent.
Common problems
- The object is invisible in Eevee. The material may have Alpha at 0, or a texture's alpha is not connected the way you think. Set Alpha to 1.0 and reconnect.
- The object is visible in the Viewport but not the render, or the reverse. Check the viewport and render engines separately. Also check the object's visibility settings under Object Properties.
- Parts of a Blended object draw in the wrong order. This is the sorting limit of Blended. Switch to Dithered, split the mesh, or change object origins so the sort order improves.
- The back faces of a cutout disappear. Check Backface Culling in the material settings and turn it off for two-sided leaves.
- A fringe appears around cutout edges. Change the image's Alpha mode, or dilate (extend) the color past the alpha edge in your image editor.
- Cycles shows black where leaves overlap. Raise the transparent bounce limit.
Exercise
You apply a PNG leaf texture to a plane. In Eevee the leaf looks correct, but its shadow on the ground is a full rectangle. Which two things do you check, and what does Cycles do differently?
Show answer
Check that the PNG's Alpha output is connected to the Principled BSDF Alpha input, and check the Eevee shadow setting: in 4.1 and earlier set Shadow Mode to Alpha Hashed or Alpha Clip, and in 4.2 and later use the Dithered Render Method with Transparent Shadows enabled. Cycles needs no shadow setting, because it always follows alpha when casting shadows.
Exercise
A thin plastic bag should be see-through at 0.3 alpha with no refraction, and you want it to sort correctly when it overlaps itself. Which Render Method (or Blend Mode) do you choose, and what trade-off do you accept?
Show answer
Dithered (Alpha Hashed in 4.1 and earlier). It sorts correctly and handles overlap, but it is grainy at low sample counts, so you raise the render samples or rely on denoising.