Build a clock with Blender and Python

Tick Tock

Article from Issue 276/2023
Author(s):

With a little help from Blender you can create your own 3D models – including animations. This article shows you how to assemble a partially automated virtual watch model with Blender and Python.

The free Blender program package for modeling, texturing, animation, and video and image editing can be found in the package repositories of most Linux distributions, and there is also a distribution-independent Snap package. Typing the snap install blender command at the command line installs the graphics suite. If you need more in the way of installation options, you can download the application directly from the Blender Foundation website [1]. While you are there, you can also access the extensive documentation, tutorials, and examples and grab the versions for Windows, macOS, and others. On top of this, because the Blender Foundation provides the source code, the program can even be adapted to run on less common operating systems. Of course, in this case you will have to compile Blender yourself.

On Linux, either open Blender in a terminal or use the Open in Terminal shortcut in the window manager of your choice. If neither succeeds, first launch Blender and then try to discover the path of the Blender installation in the Python Interactive Console by typing bpy.app.binary_path. Then enter this as the start parameter for the call in the terminal. This ensures that error messages and output from the Python command print("Hello world"), for example, also reach their target (i.e., the terminal window). This is especially important if you don't just want to use the Blender Python Console in Blender's Scripting workspace and individual commands, but also want to call Python programs you saved previously.

Desktop

Blender's user interface is divided into workspaces. Each of them hosts a different collection of editors and windows that appear at specific positions on the screen. The program lists the available workspaces on the right below the menu bar. They include Layout, Modeling, Sculpting, UV Editing, and Animation. Almost all workspaces contain the 3D viewport window and other windows.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Free 3D animation

    You need good software and plenty of CPU power to create virtual worlds. Luckily for today’s animators, powerful PCs are inexpensive, and some excellent animation tools are absolutely free.

  • Blender 3D Animation

    Blender not only generates realistic single frames; it is also capable of capturing the natural movements of people and animals. We’ll introduce you to some of Blender’s animation features.

  • Fragrance Workshop

    Blender's massive feature set can seem overwhelming at first. Choosing a manageable project can help you get started.

  • Playful Progress: Blender 2.49 Enhances Game Engine and Panoramic View

    Blender 2.49 is still profiting from its experience developing Big Buck Bunny and the Yo Frankie! Blender game. Much of what goes into the new release is on account of the Game Engine, with its video integration and performance boost.

  • Free Software Projects

    Free software enjoys an excellent reputation in the field of 3D graphics. In addition to Blender, other projects stand out: MakeHuman creates realistic 3D humans, and Art of Illusion – with its intuitive interface – lets users enter the world of animated movies.

comments powered by Disqus
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

News