I generated a video of the 2D branching script I posted the other day. Unfortunately it wasn’t as easy as I had hoped it would be. Apparently all of iGeo’s computations are done separately from the main runtime in processing, so it wont let make active references from within the iGeo methods. This means that doing something like adding a new frame to a video every time the agents update is impossible because as far as processing is concerned everything inside iGeo isn’t actually ever changing. So I had to add the frames to the movie once every processing cycle. In this case it isn’t that big of a problem because my computer has no trouble doing all the calculations for the 2D branching in real time and I was able to generate a video of what I see in my processing window in real time.
However when I tried to generate a video from a 3D version of the branching script I made this became a big problem. My computer couldn’t calculate all the agent interactions 30 times a second for the video and started to lag behind. This is pretty standard for large multi-agent code, and is actually the primary reason I usually generate videos from processing. The script is to slow to show off in real time so I compile the results into a video that will play back in real time. But this time my workaround of adding a frame to the video each time there is a new frame displayed in processing doesn’t work. It just duplicates exactly what I see in the window.