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:
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 into 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, looking at 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), and who know some bread and butter concepts of creative coding. …
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
Last, we’ll look briefly at how a fractal pattern can be mixed with other patterns (for shaders) and modifiers (for meshes generated by Python). …
This tutorial introduces how to edit curves in Blender with Python scripting. In the following, we’ll look at how to
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 Bezier Curve. To learn how they work by drawing them, The Bézier Game is a great resource. Surfaces are a related topic, but will not be covered here. …
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
files may have to be tracked along with the .blend
file.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 curve, one helpful feature to turn on is code-completion, to be found in the File > Preferences
menu. …
This tutorial aims to encourage creative coders to consider Blender as a platform for creating 3D artworks. Blender can be daunting to learn, so this primer is written for those who’ve tried their hand at creative coding before, but wish to expand. We’ll write some Python scripts to animate geometry and conclude with Open Shading Language to add texture to those models.
This tutorial was written with Blender version 2.79.
Unlike environments focused on creative coding, such as Processing, Blender is a swiss-army knife. Animators, sculptors and texture artists will configure Blender differently to suit their work. For any given task, there are usually two or three ways to do it — whether by hotkey, menu, mouse click or script. …
This tutorial introduces how to rotate objects in 3D beyond Euler angles; to do this, it looks at the basics of matrices and quaternions. What follows is math heavy, so a robust artistic imagination will be valuable once we dig in.
The approach we use is that of an excavation. We’ll recreate functionality already implemented behind the scenes in Processing and risk statements of the obvious so as to make the implicit explicit. …
About