Experimental mesh generation

Photo Credit: Anders Hoff - CC-by 3.0

Experimental mesh generation

Results of the workshop

resume of the day

We started the day by trying to run the project of anders hoff. His project requires the python library scipy to be properly installed. Because blender uses his own version of python, the library have to be copied in the blender folders. To do so, we tried the procedure explained in the last comment of this discussion. Unfortunately, it didn’t work out, due to a DLL not found issue on windows…

To avoid total frustration, we tried a more direct and low-level approach, based on a tiny sketch found in a Shigeto Maeda pdf, on page 3.

GShigeto Maeda procedure

It has the advantage of being feasable with built-in blender mesh methods.

The 3 main calls are:

bpy.ops.mesh.extrude_region_move( TRANSFORM_OT_translate={ "value": ( normal.x * m, normal.y * m, normal.z * m ) } )
bpy.ops.transform.resize( value=( 0.5, 0.5, 0.5 ), constraint_orientation='LOCAL' )
bpy.ops.transform.rotate( value= -0.11 * j, axis=( normal.x, normal.y, normal.z ), constraint_orientation='LOCAL' )

where normal is a copy of the face normal.

The script we used is available here.

After palying with it a bit, we end up with these models, based on primitives such as cube and cylinder.

Generative meshes examples

Thanks to blend4web, you can see them in 3D:

You can also download the blender project including exports and python script here.

how to

To use the script:

  • make sure you have 1 object selected (not tested if 2 models are selected)
  • go to edit mode and deselect all the vertices, edges and faces (by pressing ‘A’ key)
  • go back to object mode
  • go to panel text and press run script
  • the process might take a while to finish, and consume a lot of CPU and RAM if you go wild… Check your computer status during process :)

This workshop is dedicated to exploring generative 3D and mesh modifications using Python scripting.

For this, we won’t start from scratch but will use the experimental-surface script by Anders Hoff (@inconvergent) as an object that we will study during the day. For those with less python knowledge, we will just experiment by running the script as it is and try to come up with different forms and outcomes. For the more advanced Python users, we will take a deeper look at the script inner workings, get inspired by it and integrate some of its concepts into other mesh creation experiments.

Sounds interesting to you? Then please send a mail to juego (at) requiem4tv (dot) com to book a seat.

The Blender-Brussels is a series of monthly free and open workshops dedicated to Python creative coding using Blender. Started by François Zajéga and Julien Deswaef in 2012, these have become a regular meeting point for anyone interested in experimenting with code. It works as a communal space to exchange ideas and share knowledge as a way to learn. All results of these practices − exercises and documentation produced during the workshop − are shared online under an open source license.

This event is hosted at F/LAT − 45, rue du Canal − 1000 Brussels on Saturday 28th February 2015, starting at 10:00 and finishing at 18:00.

This event is funded by:

FWB

Digital Arts Commission of the Wallonia-Brussels Federation