Node Wrangler!

Let your nodes arrange themselves!

(Download)

I challenged myself to some coding this past long-weekend. I have a nice big list of all the features I wish Blender had, and despite my recent addiction to python, are all way too hardcore for me to code myself… that is until now.

At work we use Maya mostly, so I often find a neat little feature that I wish Blender had and add it to my list. This time it was little button that arranged all your nodes for you, all nice and neat and linear. Surely something like this can’t be that hard to code, right? Well the more I thought about it, the more problems I found.

I checked out some weird and wonderful methods that other software uses, like Spring Force Directed Layouts where you basically simulate the nodes as if each connection was a spring to attract two nodes together, and all nodes that don’t connect, repel each other. After some simulation you get a pretty perfect node tree. Magic right?

The problem is that this technique is more for multi-directional graphs.

Graphs!

At least that was my excuse. Implementing physics algorithms is mostly beyond me for the time being.

So instead I did the logical approach. Fetch all the nodes that have no inputs (start nodes), and look at the nodes that connect to these. Put them to the right of the start nodes, then repeat for all nodes.

Node Wrangler UI

This ends up with one big long overlapping stream of nodes. So to separate them, I did another loop in all the nodes, if one overlaps another, move it down (by the dimensions of the node it collides with – thanks to lukas_t for adding this to the python API by my request!)

And after a couple more loops to make sure everything runs from left to right, it’s basically done.

Apart from this, I also added a button to delete all unused nodes and a tool to display the Backdrop image nicely fit in the window, but those were pretty tedious after the arranging thing.

So I suppose this means I should start tackling some more epic coding projects.

I work with nodes a heck of a lot, so if you’ve got an idea or request for an addon, let me know :) If you convince me that it’d be useful, I’ll do it for ya!

My Wishlist

http://wiki.blender.org/index.php/User:Gregzaal/wishlist

I’ve made a wishlist of sorts of all the things I wish Blender had, most of which are related to cycles or rendering in some way.

I’ve only recently started taking coding seriously, but I figured I’d better write down all my ideas before I forget them. This gives me a nice place to track what’s been done and what still needs doing, and organize things better for my own sanity and of course hopefully attract the attention of a more experienced developer ;)

Material Study

To kick off this cycles/rendering blog, here’s a material study! (i.e. I got bored and took some photos of random crap)

The idea is to build up a library of reference images that use similar lighting so that it’s easy to study different objects and their materials for subtle differences. This being the first, it’s pretty amateur.

Exposures are obviously adjusted, but white balance and lighting is consistent. In future I’d like to make a more isolated “studio” or sorts, with a proper backdrop, measurements and one of them colour cards you buy to make sure your white balance is correct and the lighting is a neutral colour. Which would mean I need some proper lights, since the ones used here are all sorts of different shades of yellow.