Blender is an open source 3D modeling package available for many different platforms. It uses Python as its built-in scripting language for plugins. On this page you will find various plugins written in Python that will work with Blender.
The first plugin is called Add Image. It has no user interface, instead it simply opens a file selector and asks you to pick an image file from disc. It will load this image and create an appropriately-sized single-face mesh object, with a new material assigned to display the image. This is good for getting 2D graphics into the 3D environment quickly. It's also a good example plugin for people who are just learning Blender/Python.
The next plugin is called Parametric Object. This one does have a user interface with a number of buttons, options, and formulas on it. It's handy to know a little math to get the most out of using this. It will generate a 3D object from a 2D surface, using u and v as parameters to drive three parametric equations for x, y, and z. The plugin will ask Python to compile these equations prior to iterating them, for speed.
You don't have to understand everything right off the bat. The Parametric Object plugin comes with a "Presets..." button, that gives you a choice of common shapes (Sphere, Torus, Ripples, Sproingie, etc). Click the preset shape you're interested in, and the formulas are loaded into the interface for you. Then just click "New object" and you should see your requested shape! Most of the presets are low-res, but you can increase the resolution by upping the number of steps for u and v. Raise the values slowly, because the amount of computation required can dramatically increase for large numbers of steps.
All of the screenshots below are of built-in preset shapes in the Parametric Object plugin. The user can click the "Presets..." and "New object" buttons to generate these shapes without any mathematical knowledge. Most of the screenshots have the "steps" values cranked up, and smooth shading turned on, to make the screenshot look nice. If you try this and see a seam, click the "Rem Doubles" button in Edit Mode of Blender, with all vertices selected.
If you start to experiment with more complex mathematics, you might find it handy to have this link to the Python math module documentation.
Add Image (2 KB)
Parametric Object (15 KB)
![]() ![]() ![]() ![]() ![]() |
|