How to create a Transparent Material in Blender 3D.

Hermes
4 min readOct 18, 2022

--

When using Blender to create 3D models, there are instances where a material needs to have transparency. While this is not a difficult task in Blender, it can be a bit tricky.

In this guide, we’ll use Blender’s Material editor within the Shading tab to create a material that has some transparency.

Project Setup

To start, open Blender and load the default project. The first thing you’ll notice in the scene is the default cube, which is a solid grey. We’ll use this cube in our example to create a transparent material.

Adjust the UV’s

We’ll start by switchin to the UV Editing tab and we’ll see that by default the cube is set up with a traditional cubic UV map. A cubic map isn’t the easiest UV to work with so for this example we’ll keep things simple and make all faces share the same texture and UV mapping.

UV map is visible by clicking the UV editing tab

To change the UV mapping is really simple. Make sure the cube is selected and use the “Cube Projection” function to map the UVs from each face into overlapping square UVs. When the projection is done we’ll see the UV’s for each faces reach the edges of the UV plane in the left panel.

UV > Cube Projection

Creating the Material

Next, switch to the Shading tab to set up the material. Use the image below as the diffuse texture for the cube.

Once you’ve set the image as the texture, you’ll notice the cube is a solid color even though our texture has a 50% transparency.

click “Add” and use the search to add a “Transparent BSDF” node and a “Mix Shader” node to the material editor.

Adjusting the Shader for Transparency

Once the Transparent BSDF and Mix Shader nodes are added:

  1. connect the BSDF node to the first shader input of the Mix Shader
  2. connect the Alpha output from the image to the FAX of the Mix Shader
  3. Connect the output from the Principled BSDF shader to the second shader input of the Mix Shader
  4. Connect the output from the Mix shader to the Surface input for the Material Output node.
  5. Lastly select the material tab on the right settings panel and change the Blend Mode from “Opaque” to “Alpha Blend”
Be mindful of the shader order, wrong order will cause inverse transparency

Export the cube

To export the cube for use in other projects while preserving the textures use the glTF file format.

File > Export > glTF2.0(.glb/.gltf)

The glTF format supports .glb and .gltf, by default Blender selects the .glb format because it packs all the model and material data into a single file and does its best to compress the information into a single binary file.

Testing the Export

There are a number of online previewer tools for testing the export. I’m a fan of the open source glTF Viewer project from Don McCurdy. You can quickly drag and drop your model into the viewer, and it shows you warnings and errors if there are issues.

Thanks for taking the time to read my guide and if you have any questions please let me know with a comment.

--

--

Hermes
Hermes

Written by Hermes

Director of DevRel @ Agora.io … former CTO @ webXR.tools & AR Engineer @ Blippar — If you can close your eyes & picture it, I can find a way to build it

No responses yet