Saturday, 8 October 2011

Databases and file formats

The database is the core of Synapse, allowing it to save and load data, undo and redo, and generate user interfaces automatically from user defined nodes. Synapse 1 used an XML file format, and used a database system written specifically for Synapse (called Alter), this system was written quite quickly in order to get Synapse going, and had some relatively major flaws.

With more time to write Synapse 2 the database system has been rewritten to give several key improvements:

Smaller Components
Alter has now been split into several core libraries, initially it was an application framework with a database built in, now Alter is only an application framework. The database component initially built into Alter is now Shift, with a sub component of Graphics related data types.

The entire source for Alter is only a few files, all it really does is load some plugins. Its quite neat, but is also one of the areas I think needs a bit more work before its finished. However, it completes its purpose for now of providing a base for all the other components to work from.

Synapse 1 was bad at handling itself when loading large files, especially when creating and deleting a lot of data. We are now supporting a range of file formats, aiming for much improved speed and readability, all faster than the original XML format. The main format planned for use is currently not finalised, but will most likely be JSON.

Synapse 1 was based heavily on Qt's data types, and while we still rely on Qt at the core of Shift for string types and containers, data types are now stripped away from Qt, are much more efficient and flexible too.

The basic data type in Shift is the property (called an attribute in Alter 1), we then build on these properties by adding more functionality in derived classes until we have an Entity, similar to Alter 1, an Entity holds a bunch of properties/attributes and can also have child Entities. This flexibility to store anything in a property, including other properties makes Shift much more powerful than the previous version of Synapse.

Properties are exposed at a low level to the script system (currently built around Qt's javascript system). Creating editing and displaying these entities should be really simple and quick in the built in script editor. You can even define your own scripted Property types inside shift through script, for example you could add your own Number type, if you felt like that. This core support for your own types will later support defining your own types of Synapse node through exactly the same API.

Document Structure
The latest work going on for Synapse 2 is the Part and Document interfaces, a document is any file you may have open in Alter, so for example, you could open a Synapse composite, that is a document. You could also open a Synapse Node, and edit its contents, that is a Document too. Saving the node document will (in theory) automatically edit and replace any nodes in any document you've used it in. automatically. The node document is also a Part, as it has defined inputs and outputs, and is conceptually a reusable piece of node structure.

So, thats a quick summary of how everything might work in Synapse 2, its obviously not doing much right now, but very soon the Document work will come down to the development branch, and the work on the document editors can start.


  1. What are the main features for Synapse?
    Does it handle Raster, Vector, 3D graphics?
    Audio? Video?

  2. may I answer:

    It handles raster, and svg from what I can see. Video is supported through image sequences.

    It features numerous types of nodes, which are pretty standard in all compositing applications. You can group nodes, and add pieces of code / alter the nodes code inside the UI. The UI approach is quite interesting, and it seems to work quite ok on linux 64bit.

    see for the tutorial videos of synapse1.

    for synapse2, I don't know really.. too less info rmation .Hey devs, the core structure concept is nice to know, but people seem to want to know the goal of this project, should it be something which is really useable for being creative? whats the internal quality of processing (e.g ramen works with exr files..) etc..

  3. That seems like quite a good feature list c3sso.

    As the headline features for Synapse 2, we are looking to improve rotoscoping, and also support for cpu rendering.

    Unfortunately this is a larger job than expected as the openGL rendering was built in quite deeply to Synapse 1! I am currently working on roto editing, but progress is slow.

  4. ok. So you are not gonna use openCL / cuda in a reasonable time. Maybe its good to plan the code to make the use of that easy in future. I think the guy who did the new compositing engine of blender and brecht with his cycles renderer are fighting with this... maybe you could take a look at their code..

    well, one cannot do everything at once.

    btw, I have made some synapse packages for my ubuntu based distribution, openArtist.

    In case you need these somehow.

  5. I was having a blast playing with synapse 1.0.2 yesterday right up until I couldn't do any key framing. Most of the other 1.5 features are niceties, but key framing/ animation needs to come sooner than later. Even if they were linear keys for the time. The inability to modify any processes over time (other than perhaps via code) reduces this products value to4 place in the free compositing world. The current order looks like this:
    1. Blender (has keys)
    2. Ramen (has keys
    3. Wax (has basic keys)
    4. Synapse (no keys)
    5. Mewa (more alpha than this, but it has basic keys)

  6. Yes, animation is also a key feature, unfortunately not simple to plug into the synapse 1.0 architecture, but will come easily to synapse 2.

    Unfortunately synapse 1.9 was written quickly as a university project and didnt consider much future expansion!

  7. Any idea when the next update to this awesome program will happen? I came here about animation as well, and saw these posts.

  8. unfortunately with no funding and minimal development power we can't work as fast as we would like.

    Any extra development support would be greatly appreciated though?

    I am currently working on the basic rendering engine (CPU based), after this i intend to release a VERY preliminary version (say, synapse 2.0.0 PRE_RELEASE), where i will gauge feedback, and work on features based on that.

    The synapse 1.x app was so badly designed though we couldnt have built on from it to support all these features... as i have said, it was only a university project.

    Ill try and update the blog with progress soon.

  9. I'm glad you are still working on this, quite promising! :)

  10. Hi Jorg Pimm.
    Why don't you use This way you could complete this program

  11. I agree, kickstart the synapses of every one. I think there is a spot in the open source world for this, but there needs to be more buzz. Ramen imploded before it made it out of beta, and just as it's buzz was starting. Jahshaka is an example of a group that had tons of buzz, could have been a contender, but produced so much vaporware that no one trusts them.

  12. The Jahshaka team have just recently announced that they are re-starting development from the ground up!
    And Ramen apparently has decided to develop his program into a commercial app. Can't say I blame him, but it still kind of sucks...

  13. The Video Lan people, who make the excellent VLC player, have started a Non=linear editor project called "videolan movie creator". It's in the VERY early stages of development, but if they put as much effort into it as they do for their video player, then it will be a force to be reckoned with... and FREE!
    I'd like to see a LUA or Python based script processor (or node based!) so that any end user can write their own filters and effects, even though they would probably be slow-ish. Many filter plugins are more expensive than the editors they are made for! (Boris Effects, Red Giant, etc).

  14. Synapse needs a manual or help guide of some kind, even if it's only a few pages of ASCII text included with the download. Anyone want to volunteer to put these together?

    I know there are tutorials on Youtube, but they are very short and, oddly, have no narration or explanation telling WHAT they are doing.