Posts

Showing posts from October, 2026

Your First Blender Script

For this series I will present a script, walk through it line-by-line, display the results, and then include the full script. Let's get started import bpy import math import mathutils import os Each of these statements imports one of the python scripts that are needed for what follows. bpy accesses all of the Blender libraries. math and mathutils provide access to a pair of math libraries. os is a wrapper for your operating system. bpy.ops.wm.read_factory_settings(use_empty=True) This statement sets the environment back to the "factory defaults" so that we can safely assume what the environmental settings are.

Getting Started with Blender Scripting

Installation Blender, like many applications, requires that it be downloaded and installed. Easy enough. The latest version is always freely available at www.blender.org . Just follow the links. While installing Blender, be sure to note the installation folder so that you can add it to the system path later. Add Blender's folder to your PATH variable Once you have downloaded and installed Blender, you will need to add it to your environmental path. I found perfectly useful instructions for Windows here . Add the installation folder for Blender here. Test the installation Once you have done this, open up a command prompt and change directory to your Documents folder. This will usually be as easy as cd Documents . Enter the command blender -b -P dummy.py Be sure that -b is lower case and that -P is upper case. If this results in an error that the file dummy.py could not be found, everything is working correctly and you can go on to the next article. If you get any other err...

A New Beginning

It's been a few years since my last post, and in that time I've not done much POV-Ray work of any kind. I've tried my hand with Blender a few times, and each time I went away frustrated because the interface takes a college degree's worth of studying to learn. I ain't got time for that. It turns out that Blender has an entirely separate interface: Script files. My reasons for jumping ship are two-fold. First, POV-Ray is based on a rendering approach that does not incorporate the advances in rendering that have taken place in the past thirty years (with the exception that if the system has a multi-core CPU, POV-Ray will make use of it). Second, POV-Ray is not well-designed for modelling organic shapes, unless those shapes are amenable to procedural generation; but if you want to make realistic-looking humans or animals, you're out of luck. As a long-time POV-Ray scripter (30 years), I expect that a lot of the skills I developed for POV-Ray will carry over with...