Blender In Depth
Lets deep dive into blender’s DNA. What composes blender? What can be modified? and what is the blender way?
Blender is a complex and big project managed by blender studios as the official orchestrator, many collaborators and volunteers. This combination makes blender a fast evolving application that needs lots of documentation. For this reason, there are many sources we can use to try to answer What is blender?
In it’s essence, blender is just a collection of Python, JavaScript, C++, HTML and Dockerfile scripts. But nothing explains better what this collection does than the official page itself:
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline: modeling, rigging, animation, simulation, rendering, compositing and motion tracking, even video editing.
Development of Blender happens at projects.blender.org and is funded entirely by donations from entrepreneurs, companies, and users.
And because the good resources are the ones that exist, we will rely in blender’s already official documentation to dive into its skeleton.
This is … in fact … overwelming.
Once we have finished editing a file, it has to be stored somehow the same way it must be loaded in memory at execution time. Blender implements a read/write library that stores Data Structures and loads them back when necessary.
This building blocks are the essence of blender. They compose the building blocks of the software and we can think of them as lego pieces. Blender has developed the $2\times2$ red piece with two toppings and the $1\times1$ green piece. I, myself would like to build a bridge with this blocks so I make as many instances as I wish and build the wall. At saving the file, we just end up with a .blend file that contains a list of this objects, they’re position rotation and scale as well as any other property they may have.
It is a silly example but if I do it correctly, it will help generate intuition for less experienced users on code architecture.
Lets now deep down into a more specific example!!
A Data Structure that everyone has used without noticing is the Mesh Data Structure mesh data documentation
In this scene of blender we see three different objects, each of them has a unique mesh data associated to them. Look what happens when we use the same mesh for all the objects.
Suddenly we have the same geometry on all objects but with an additional transformation added to each one. Do you know what that is? It is called instance and is huge. Instances are the funding block of all game engines and 3D applications. But then, if the object instance is independent of the mesh instance, what is object? It is just another building block called Object Data altogether with Object.
This graph is an over simplification. In blender, each of this data structures have hundreds of attributes and they additionally rely on arrays and tensors that contain even more information (like vertices, edges and faces connections).
A better visualization of this structures shown inside blender itself. Visit Editor and Outliner for the documentation on what are editors inside blender and what is the Outliner editor specifically. We cite the page directly:
Blender provides a number of different editors for displaying and modifying different aspects of data. An Editor is contained inside an Area which determines its size and placement within the Blender window. Every area may contain any type of editor.
The Editor Type selector, the first button at the left side of a header, allows you to change the Editor in that area. It is also possible to open the same Editor type in different areas at the same time.