Greetings. In my quest to see if/how I can add an new object type to blender, a few months ago after looking at the code I decided that it was over my head and in the time to figure out how Blender is designed and what needs to go where, it would take just as long as to take my prototype project to the next level and create an app with some basic features and handle multiple objects and GPU uitilisation. Well last week I had complete that and was very pleased as I had accomplished all I set out do.
But when I considered the possibility of adding extra object types, and eventually large number of objects, I saw the OOP approach I had used would be slow and difficult to achieve to perform complicated tasks. How does Blender and game engines overcome this ?
Almost immediately I came across what is called an Entity Component System (ECS) design approach to overcome performance issues and other problems. It quickly dawned on me that this ECS is basically a relational data base problem, something I understand and have implemented quite a few times. Thus I have created and tested the scaffolding for my own ECS, and am just about to finish it off with coding for all the initial mangers that will be needed to get it up and running properly.
Then it dawned on me. Blender has in its code sections called RNA, DNA and BKE that from memory corresponded to this kind of design. In an instant I could understand Blender and its structure and If Blender is a kind of ECS, from the begininng I would not have been overwhelmed by the code. I did a quick search in the developer forums and found only one topic that matched the search for entity component system.
I skimmed through this as it was long, but there was a mention that Blender is designed using a data oriented design (DOD) and one poster call astrand suggested using and ECS approach rather than a DOD.I thought these are the same.
Does Blender use a DOD and if so, If what is the difference to an ECS design for Blender?
If Blender utilises a DOD or ECS, then knowledge of that design and its layout or relationship of the various directories and files would help and even make life so much easier for wannabe developers get to know, navigate the code and how to contribute to Blender much more easily and not be overwhelmed by it. Reading code or a list of directory structures, or the diagram showing code layout of modules give little insight to the overall workings of Blender. So if there is a diagram of Blenders design it would be grateful if anyone could help me as I have never, despite many attempts to found one, and would suggest that such a diagram be included in the documentation.
Sorry for the long post, it went much longer than I had planned it to be.
Regards