Today I’m stretching my use of the word “code” to include memory hacks.
There exists a memory technique called the Roman Room, or Method of Loci, in which you associate information you want to remember with specific places in a house or building you know. For anyone who has better recall on spacial data or visual imagery, it’s ideal. That’s me in a nutshell.
Continue reading “A Roman Room: 1900-1910”
It’s not difficult to load Python scripts into Blender’s text editor, but there’s something reassuring about just getting them to populate in the space bar menu.
How do you get Blender to do that, you ask?
You make your script into an add-on.
Continue reading “PYTHON: How to Make a Blender Add-On”
I have an obsession with timelines, which honestly may be bordering on manic and unhealthy. A 3D timeline has been on my back-burner for months because while I have written a function that auto-creates materials in Python, I had not yet mastered the art of applying image textures to those materials.
That’s today’s project.
Continue reading “Python: How to Bulk Load Image Textures in Blender”
The human mouth is kind of a bastard. Animating it frame-by-frame requires a patience that I just don’t have. Blender has shape keys that can help you mold lips into different configurations for each sound, but you still have to set keyframes to match up with a particular word at each and every frame.
Or you can be lazy. Like me.
Continue reading “Python: How to Automate Shape Keys in Blender”
Getting coordinates to scale properly to Blender units has been extremely frustrating for me since I started attempting more 3D maps. So, finally, in a fit of rage this weekend, I wrote a function to do it for me.
It scales the latitude and longitude down along the Z (height) and X (width) axes, taking into account the size of a base map oriented along those axes. In my version, it places a sphere at each coordinate set, but that can be easily changed to other objects.
Continue reading “Blender: How to Scale Down Coordinates for a Map Scene”
After a long vacation, a wedding, a bad flu, and a whole mess of planes, trains, and automobiles, I’m back to talk about textures. I love playing with transparency in scenes, but scripting transclucency is a bit unusual in Processing. The normal Processing canvas doesn’t support an alpha channel, so it requires something called PGraphics().
Continue reading “Processing: How to Make Transparent Textures”
This is Bob. Bob is a gelatinous organism from outer space. He’s also a bit of a diva, so he requires that he be announced by text that drifts upwards in a graceful and organized fashion.
So that’s how I spent the first chunk of my long weekend—figuring out text objects in Blender. For the sliding script, just scroll to the bottom. For more description, keep reading below.
Continue reading “PYTHON: How to Get Sliding Text in Blender”
Updated: May 2021
Sometimes I get embarrassingly excited about being able to do things in Python that I will probably never need to do again. This is one of those times.
I had a mesh—a plane that I had turned into an a spiral walk-way. And I had the thought, this thing can’t have walls. Eventually I want the walk-way to be the center of a large arena that’s coated in fog. And the only way you’d really be able to see that it’s a spiral is if it’s semi-transparent and lined in lights.
Continue reading “Python: How to Loop through Every Vertex in a Mesh”
A couple weeks back, I posted a confetti function that was wildly fun to play with, but frustrating because all the confetti was oriented in the same direction.
In the end, I started selecting the individual planes at random to rotate the manually, but well, let’s face it. There were over 200 planes. That was just stupid. Two new lines of Python. That’s all it took. I actually wasn’t even the Python that threw me in the first place—it was the rotation operator.
Continue reading “Python: How to Randomize Rotation in Blender”
There are times when I feel the need to take a step back and re-evaluate all my life decisions. Those moments tend to be preceded by questions like how the crap did I end up in this field of kudzu, and where the hell did that snake go? Or how hard could it be to script random materials in Blender with Python—an hour tops?
That last one led me to three days of HELL. This was, by far, the most difficult Blender script I’ve tackled because the API doesn’t have much on how to create materials.
Continue reading “PYTHON: How to Code Materials in Blender Cycles”