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.
![](/var/linux_magazin/storage/images/issues/2021/253/tutorial-blender/figure-7/794955-1-eng-US/Figure-7_large.png)
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.
![](/var/linux_magazin/storage/images/issues/2021/253/tutorial-blender/figure-10/794964-1-eng-US/Figure-10_large.png)
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.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.