jit.world feedback loop

Marigold Maripol's icon

Hi -
I'm experimenting with a feedback loop idea where jit.world outputs as a texture, sent to jit.gl.asyncread and fed back into the world.
What I don't entirely understand though, is why an erase_color for the jit.world is no longer operational in this context - and whether there might be a way to work around it.

Thanks for any help!

I've attached the patch below.

Max Patch
Copy patch and select New From Clipboard in Max.
Rob Ramirez's icon

here's a little feedback patch for you

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

TFL's icon

erase_color behaves weirdly when doing some feedback loop, you usually to use the "smear" trick to get it applied as you would. Here is an example (based on Examples > jitter-examples > gen > smear-o-vision.maxpat)

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

Generally it is preferred to use [jit.world] only for the final output. So to create a feedback you can capture the scene using an intermediary [jit.gl.node].

And also, you want to avoid switching from textures (blue patch cords) to matrices (green ones). So here you can use [jit.fx.rota] instead of [jit.rota] + [jit.gl.asyncread].

Marigold Maripol's icon

thanks for the ideas, i'm having a little trouble implementing them, though.

is there a significant difference in using [jit.fx.rota] rather than the built in td.rota.jxs shader? i don't have max 9 yet - but it doesn't seem to be working with a simple swap-out.

TFL's icon

Like so?

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

jit.fx.rota hides a td.rota.jxs slab in the inside, so you should get the same result. Params just need to be accessed with the word param, instead of the param's name directly.