Rendering a perfume bottle with Blender
Make a Bottle
To get started on rendering your bottle, simply use the cube already present in the scene. In Object Mode, you can scale the cube along the z-axis by pressing S,Z until you get the desired bottle height (minus a cap on top – that step comes later). Next, move your bottle – you will adjust the bottle shape later – to the front view (press 1). Then press G,Z until the bottle's base rests exactly on the bevel plane. Now press the tab key to switch to Edit Mode, select the top square of the cube using Face select, and scale the top square down to create a flat-topped pyramid (Figure 6).
Now toggle back to Object Mode using the tab key and assign a material to the pyramid by selecting a glass shader under Properties | Material Properties on the far right. Mouse over Surface | Principled BSDF and change the option to Glass BSDF. Leave the Roughness at the default value, and change the IOR (Index of Refraction) parameter to 1,330 for glass. As soon as you select Viewport Shading | Rendered, the cube becomes transparent.
Toggle to Edit Mode (with the tab key) and press A to select the entire cube. Next press L,P and select Separate | Selection. The cube's edge should now glow a bright red-orange, which will help you keep track of it later. The selected edge has become a separate object. Now switch back to Object Mode.
In the next step, give the wall (the edge) a thickness by applying a Solidify modifier. First, set Viewport Shading | Wireframe and then go to Properties | Modifier Properties. Under Add Modifier, select Solidify. As shown in Figure 7, the cube's wall now has a thickness, which you can set using the Thickness parameter.
Now, you need to set the camera and the image dimensions by going to Properties | Output Properties (on the right). Set Resolution | X to something like 925px and Resolution | Y to 1080px. Then, right-click to select the camera. You can do this either in the viewport or in the Outliner.
To configure the camera, set Properties | Object Data Properties (the second icon at the bottom with the green camera) to Focal Length 35mm. Then use G to move the viewport up so that there is enough space for the bottle's cap.
Add Perfume
After you have modeled your bottle, you next need to fill the bottle with perfume. Create a new cube in the front view (1) using Shift+A and position the cube accordingly (Figure 8). Use G and S to move the cube until it fits exactly inside the bottle – just like real perfume.
To adapt the cube shape (perfume) to the flat-topped pyramid shape (bottle), follow the same steps you used to scale the bottle. In User Perspective view (on the left), select the four upper edges of the cube with Edit Mode | Edge select and scale them until they fit exactly into the bottle (Figure 9).
Press 1 to activate the front view and scale the selected edges so that they fit exactly inside the bottle. Then, in Vertex select mode, adjust the top edges with a combination of scaling (S) and moving (G) so that they look like Figure 10.
Now you are ready to assign a material to the perfume cube. Choose a transparent, slightly amber material following the exact steps you did for the bottle (Properties | Material Properties | New). Under Surface, select Glass BSDF, and select a slightly yellowish orange color.
The perfume in the bottle currently looks too dark, so set the gamma to 1.8 via Properties | Render Properties | Color Management | Gamma. Now the perfume, as well as the whole scene, should appear much brighter. Use the top view (7) to check whether the perfume is centered exactly in the bottle; correct the position with G if necessary.
Label It
Your perfume bottle now needs a label on the front of the bottle. This process, known as UV Mapping, seems a little complicated at first. However, once you've done it a few times, it turns out not to be that difficult. Working in parallel, you will need to use Blender and a graphics program that supports layers to make your label. (I used Gimp for this tutorial.)
Use the tab key to switch to Object Mode and press A to select the bottle without the perfume. Then press Ctrl+A and select Apply | Scale – you must do this because you have scaled the cube. Call Ctrl+E and run Mark Seam. This will make the edges of the bottle appear a reddish orange. Next, press U and Unwrap, which unwraps the framework of the bottle on a plane, similar to unfolding a paper cube.
Next, you'll use the UV Editor to export the UV Layout, and then edit the label in your graphics program and import the finished layout back into Blender. To get to the UV Editor, click on the small clock icon at bottom left in the Timeline editor. Change Timeline to UV Editor and drag the viewport up a bit (Figure 11).
Select the UV Editor and run UV | Export UV Layout. Save the layout as a PNG and then import it into your graphics program as the bottom layer. You now insert your desired label text in the graphics program. Make sure to rotate the text's orientation to 90 degrees (Figure 12).
Next, delete the bottom layer containing the UV Layout or temporarily hide the layer by pressing the eye icon. Once you've done this, export the label back to Blender. Keep the graphics program with the label file open in case you need to make corrections. If necessary, you can easily restore the deleted UV layout with Ctrl+Z and continue working with it.
To reimport the label text file into Blender, switch from the UV Editor to the Shader Editor and create the necessary nodes as shown in Figure 13. This relatively complicated setup is due to the bottle's transparent material. Once you've successfully added the nodes, you can view the label on the bottle. If the label is not quite right, switch back to the graphics program and edit the text.
« Previous 1 2 3 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.