An addon to write FFGL plugins with OpenFrameworks via Spout

FFGL, OSC, GLSL. If you like abbreviations, this is the forum for you
Post Reply
davidemania
Is taking Resolume on a second date
Posts: 16
Joined: Sat Dec 21, 2013 15:10

An addon to write FFGL plugins with OpenFrameworks via Spout

Post by davidemania »

hi friends,
is anybody interested in writing FFGL plugins with OpenFrameworks? If so you could give a try to an addon I wrote, ofxFFGLSpoutBridge (find it here on GitHub).

With this addon, together with the related FFGL-SpoutBridge plugin (included in this repo, in the FFGL-Plugin directory), it is possible to use an openFrameworks application as a plugin for any software adopting the FreeFrame FFGL standard. I only tested it with Resolume Arena (a demo version can be downloaded here) but it should work with the other hosts too.

Since integrating openFrameworks inside the plugin code has proven to be a hard task (I managed to make it work - sort of - with older OF versions but the code never was stable enough and it had bugs nobody managed to fix) the approach used here is different. Not the most elegant thing I could imagine, but it works. The plugin itself sends the texture it gets from host to the OF app via Spout texture sharing, the app gets it, implements arbitrary code and then sends the updated texture to the plugin that finally gives it back to host for further processing.

The plugin can implement parameters (only float ones in this version, but it is easy enough to extend the process to different types), their values are sent to the OF application every frame with an OSC packet.

The process looks a little cumbersome but the back-and-forward path is very fast and in practice there is no noticeable delay while implementing it in Arena (or any other VJ software).

Note: the openFrameworks app can be built either using 32 bits or 64 bits architecture, according to your taste, but the FFGL plugin must be 32 bits for Arena up to 5 and 64 bits for Arena 6 (and higher). For other hosts check the host documentation or just try and see which one works.

Of course this is a beta version, there will be bugs to fix but in my tests the overall process appeared to run smoothly. Let me know of your results if you try it.

Comments and remarks welcome,
happy coding
Davide

Post Reply