Dots arranged on a distorted Fibonnaci sphere.

This tutorial’s aim is to encourage creative coders to try Blender as a platform for procedural artwork. Blender is free software in the sense that no payment is required to download and use it. Furthermore, its source code is available online.

This is written for readers with some experience creative coding who wish to expand their toolset. We’ll write some Python scripts to animate geometry, add modifiers and constraints, create materials with Open Shading Language (OSL), and end with a glimpse at Blender’s grease pencil.

This tutorial was written with Blender version 2.92.

It is an update of an older…

This tutorial introduces how to script an add-on for the pixel art editing program Aseprite. We do a series of “hello world” exercises to create dialog menus in the interface. We then look at two more in-depth tools: an object-oriented isometric grid and a conic gradient.

Unlike prior tutorials, the software discussed here is not free. As of writing, Aseprite costs $19.99 USD. A free trial is available from their website. Free variants, such as LibreSprite, exist due to an earlier, more permissive license. However, Aseprite’s scripting API is a recent addition, and so may not exist in these…

The Giant’s Causeway in Northern Ireland features hexagonal basalt columns. Source:

This tutorial explores how to make a grid of regular convex hexagons in Blender with Python, then how to turn that script into an add-on. An example render made with the add-on looks like so:

Unity, Processing, Godot, Blender, Three.js

A particle system emits capsules in Blender.

This tutorial explores how to generate a capsule through script in five 3D environments. Or rather, how to approximate a capsule with a mesh. We’ll look at two game engines, Godot and Unity; one modeling suite, Blender; one creative coding IDE, Processing; and one browser-based tool, Three.js. We leave it to others to judge which APIs are better or worse.

There should be no illusion that learning to make a capsule is in itself useful; however, understanding how to make one shape across APIs can lay the groundwork to create many more. …

This tutorial introduces Blender’s BMesh as a way to create and edit meshes in Blender through Python. The benefit of BMesh is that we have access to higher level operations than we would working with vertices and face indices; however, we avoid overhead incurred with bpy.ops, the functions called by Blender’s graphical user interface (GUI).

This is aimed at readers who already have already tried their hand at scripting with Blender: who know how to set up Blender to be code friendly, who know how to look up an unfamiliar function in the documentation (either for Python or for Blender)…

This tutorial introduces how to make patterns with complex numbers in Blender. It builds off of tutorials on creative coding in Blender and scripting Cycles nodes. For that reason, it assumes some prior acquaintance with Blender’s Python API and Open Shading Language (OSL).

In this tutorial, we’ll go over

  • the maths behind complex numbers;
  • how to define complex number operations with nodes, Python and OSL;
  • how to create 2D patterns (the Mobius transformation, Mandelbrot set, Julia set, Pickover stalks and tricorn).
  • how to create a 3D Mandelbulb.

Last, we’ll look briefly at how a fractal pattern can be mixed with…

A curve approximating various sine waves.

This tutorial introduces how to edit curves in Blender with Python scripting. In the following, we’ll look at how to

  1. render a curve;
  2. convert a curve to a mesh;
  3. distribute objects along a curve;
  4. adjust movement with F-curves;
  5. move objects along a curve;
  6. create a curve with multiple splines;
  7. influence modifiers and particle motion with a curve;
  8. work with curves and animation rigs.

Blender supports both Bézier curves and Non-uniform rational basis splines (NURBS), but we’ll work with the former only. For those who want more background on this curve, Takashi Wickes offers a history in An Ode to the…

This tutorial introduces moving virtual cameras for 2D and 3D Processing sketches. First it looks at strategies for wrapping screen elements, like the background, when the camera is fixed. After introducing shaders and working with multiple renderers, it creates a 2D camera. It then creates the 3D equivalent, looking at projections along the way. The tutorial concludes with a First-Person Shooter (FPS) camera with a dynamic background and heads-up display (HUD).

Processing is designed for quick prototyping and a friendly introduction to creative coding. As such, it needs to be customized to implement the above. …

This tutorial, a follow-up to Creative Coding in Blender, focuses on creating patterns on materials in Blender’s Cycles renderer. There are a few reasons why patterning can be challenging at first. Tutorials for OpenGL Shading Language (GLSL) abound, but the node-based visual programming in Blender has a slightly different toolset. While Open Shading Language provides an alternative, it has a few drawbacks:

  • OSL requires that a render be done on the CPU, not the GPU.
  • There’s a potential dependency, where .osl files may have to be tracked along with the .blend file.
  • Documentation is segmented — and inconsistent — between…

This tutorial explores how translation, rotation and scale — taken together under the umbrella term affine transformations — work in Processing (Java mode). An alternative to matrices, based on a quaternion, is then created to show how we can ease between ‘keyframes.’ To keep this tutorial from being any longer than it already is, the code gists to follow contain only highlights under discussion. Full code for the classes and functions can be found here.

This tutorial was written with Processing version 3.3.7 in the Processing IDE (as opposed to Eclipse, etc.). Since coding with multiple objects requires a learning…

Jeremy Behreandt

Creative coder from Wisconsin, USA.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store