40

Metal spaghetti trees

 4 years ago
source link: https://www.tuicool.com/articles/yEJfI36
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

For quite some time I’ve been revisiting the idea of procedurally creating images of stylized trees. I went through a number of approaches, techniques, and aesthetics. At one point I was working on a custom SVG renderer with a 3D projection. Different display issues in different browsers forced me to abandon this route and go full 3D. Turns out, this was just what I needed. This is my first generative project in 3D and I’m very pleased with the results. (I even 3D-printed one of the trees and I keep it on my desk.)

In this post I include a selection of images I created when working on this project: different algorithms, different seeds, different techniques.

My favourite are the ones with mirrored and repeated branches. They exemplify qualities that I like the most in generative art: patterns emerging from a large number of simple elements, organic shapes contrasted against unnatural precision.

3ER7bau.png!webRb6JvyY.png!webbiEZFz7.png!webNzqIriM.png!web6FJRJv7.png!webUFBzAb3.png!webvMb2qeF.png!web6jUZJni.png!web

Technical notes

  • I wrote everything in Python. I save binary PLY files with edges (no faces) and load them in Blender.
  • Blender can be scripted. I run it from the command line and make it execute a Python script that loads the PLY, adds volume to edges, sets materials, etc.
  • Everything is automated. I make a change to the code, press ⌘S, and new images start appearing in the web browser next to the editor.
  • The generation process is divided into two main phases. First, I create a “low poly” geometry with the overall shape. Then, I create individual “high poly” spaghetti strings, twist them around, bring them closer together near the tips, etc.
  • To speed up iteration, I wrote a simple Redis-based queue to use multiple computers. Each machine creates geometry and renders an individual image. This approach works great for creating many renders at once, but it doesn’t help when I want to make a single high resolution image.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK