I made à Light painting app in openframeworks That i ré made in TD.
I created multi fx component in which i can add shader effects component with ui.
All is ok but when i had a New effect TD freezes for some milli seconds.
I then saw That it is the same when i had a top operator from the palette…
I do not have this behaviour in my openframeworks app.
I think the difference is that in openframeworks i only create 2 gpu objects at the beginning And i apply shaders from one to other (fbo ping-pong), whereas in td each top operator create a gpu buffer.
Is there a way to avoid That, cause in TD i can not add my effects in live ?
Not sure I understand you correctly, but it’s not recommended to add new nodes to the network during a live performance. The trick is to build the network with all effects &shaders beforehand, and use nodes like the Switch TOP and the Select TOP to make dynamic changes to your effect routings during a live performance, or for instance use CHOPs or UI button signals to control the values of any dynamic parameters on your GLSL TOPs.
Does that answer your question?
Thanks for the answer
You understand correctly.
I extended my Light painting project to a video synth with actually 6 video tracks.
Each track can contain video source And effects. I can not have 50 or more eftects loaded by track…
How other softwares are running, why it is not recommanded to add nodes during live performance ? Is the freeze time due to gpu memory allocation ?
May be c++ top operator wich could dynamically internally add many shaders, like a chain rack could be the solution ?
Hey, your assumption is correct. Adding a node will allocate more GPU memory since that node needs an output that may need to stick around for many frames. We can’t just ping-pong between two images since any node’s output can be branched off.
Also adding a new TOP can also result in a shader compilation that also takes some time.
Thanks for the answer.
I did not realised those “problems” since in my openframeworks version, i had not this behaviours.
I want to work with TD since it simplifies prototyping, but i want a “realtime” system without the freezes i encounter when i create sources or effects in my video racks in live performance.
I think (after holidays, end of august) i want to create a c++ TOP operator in openframeworks which could act as a rack :
- a parameter folder containing the shaders with parameters indications (shader.frag, shader.vert, shader.para)
- all shaders loaded when top created or folder changed (to avoid compilation time)
- for each effect created a parameters page created
- possibility to create, delete, change position of effect in the rack
- use of 2 buffers (input size), assigned on top creation, in ping pong to apply all the effects of the rack
Then when i would use that TOP Rack, i would use Comp Parameters to assign all the parameters appearing on the top pages.
What do you think about it ?
Is there an other solution ?