Jit.gl.textureset glitching on palindrome playback

antialias's icon

I'm adapting a video looper Rob posted awhile back to capture and loop 3D animations. The playback doesn't loop smoothly when using a palindrome counter to read back the texture frames. Max 8.5.2, Jitter tools 1.07, M1 MBP OS 13.0.1. Patch attached— any tips appreciated!

video-looper-230202.maxpat
Max Patch

Rob Ramirez's icon

I'm not seeing any glitches, but the logic for setting index and outputtexture is a bit off (apologies if that was originally my error). If you have a texturecount of 150, then the index and outputtexture should go from 0 to 149. Maybe that will fix up your glitches.

antialias's icon

Thanks Rob— I've changed the counters to 0 149. Attached is a syphon recording— the duck is not rotating smoothly on playback. If the index is being written into on each new frame, it seems like a palindrome counter should smoothly loop what's in the buffer?

Max - looper 2023-02-03 at 18.03.00.mov
video/quicktime 1.53 MB

Rob Ramirez's icon

you have your counters continuously running, so there is no synchronization or logic in place to indicate the beginning of the loop. here's some minor changes that allow you to bang to start recording a loop, and then switch to that loop once the buffer is full

Max Patch
Copy patch and select New From Clipboard in Max.

antialias's icon

Thanks Rob!