In this tutorial, we will create a bubble material from scratch using Blender 3D’s Cycles renderer, primarily focusing on how to use procedural textures for effects like the outer surface, reflections, and inner glow of the bubble. We’ll make the material adjustable for easy tweaking.
Step 1: Set Up Blender Scene
- Open Blender and create a new project.
- Delete the default cube: Select the cube, and press X to delete.
- Add a sphere to represent the bubble:
- Press Shift + A to bring up the Add menu, and choose Mesh > UV Sphere.
- Using CTRL + 2, add a Subdivision Surface Modifier with 2 Levels. Then Right-click and choose ‘Shade Auto Smooth’.
- Make sure you are using the Cycles Render Engine and you are in Material Preview mode.
- If you wish to do so, you can add an HRDI for the lighting.
- Also, make sure you have the Node Wrangler add-on activated.
Step 2: Set Up Material for the Bubble
- Split your Viewport and change one of the panels to the Shader Editor.
- Select the Sphere and create a new material.
- Name the material Bubble.
Step 3: Create the Outer Surface (Reflection & Refraction)
- Principled BSDF Node:
- Start with the Principled BSDF shader as the base for our bubble material.
- Set the Base Color to white for a more realistic bubble color..
- Set Transmission to 1.0 to make the material fully transparent (this will simulate the glass-like transparency of a bubble).
- Set the Roughness to 0.00 to give the bubble a slightly shiny surface.
- Set IOR (Index of Refraction) to 1.33, which is the approximate value for soap bubbles.
- Add Transparency:
- To simulate the transparent nature of bubbles, add a Transparent BSDF node. This node will adjust the amount of transparency.
- Add a Mix Shader and connect the Transparent BSDF into the top input and the Principled BSDF into the bottom input.
- Add a Layer Weight node to help simulate more transparent areas as opposed to other areas of the bubble.
- Using CTRL + SHIFT + LMB you can view the Layer Weight node by itself. We need the Facing output so use CTRL + SHIFT + LMB a second time to switch outputs.
- This will be used to control the Transparency. To do this, connect the Layer Weight node to the Factor of the Mix Shader.
- Using CTRL + SHIFT + LMB on the Mix Shader, you can now see the effect of the Layer Weight. You can increase the Blend for the Layer Weight to affect the transparency.
- To further control the Transparency, add a Color Ramp between the Layer Weight and the Mix Shader. If you change the Black value to a midtone gray, the interior of the UV Sphere will not be as transparent.
- Select these three Nodes and use CTRL + J to join these Nodes into a Frame. Right-click on the Frame and choose ‘Rename’ to title the Frame as ‘Transparency’.
Step 4: Adding Iridescence
- If you look at bubbles in the real world, you will notice there are multiple swirled colors that are reflections of the surrounding environment. So, let’s add those color to our material.
- Add a Noise Texture and use CTRL + SHIFT + LMB twice to preview the color.
- Add a Texture Coordinate Node. This Node will help you to further refine the Noise Texture according to the Object Coordinate.
- Use the Object Coordinate output to connect to the Noise Texture Vector input.
- To make the Noise Texture larger, you can decrease the Scale. If you want a more detailed Noise Texture, Increase the Detail option.
- To add distortion to the Noise Texture, increase the Distortion value.
- Connect the Noise Texture to the Principled BSDF. To preview the colors, use CTRL + SHIFT + LMB and click on the Mix Shader.
- If you want to further refine the colors, you will need to make some change to the Saturation.
- Add a Hue/Saturation/Value Node between the Noise Texture and the Principled BSDF.
- By turning up the Saturation value, you can more easily see the colors of the bubble material.
- Select these three Nodes and use CTRL + J to join these Nodes into a Frame. Right-click on the Frame and choose ‘Rename’ to title the Frame as ‘Colors’.
By following these steps, you can create a customizable, procedural bubble material in Blender! Play with the parameters and experiment with textures and shaders to get a unique bubble effect.