[SHARE] Memories of a Broken Dimension - glitch techniques

grigou's icon

Hello guys !

I want to achieve the glitch effects used in the game Memories of a broken dimension.
But I can't get complex glitches like that with Max.
Any idea how I can make those beautiful glitches ?
Thank you for help !

ygreq's icon

The easiest solution I saw was to actually use a royalty free effect in alpha. If you really want the effect. Of course if you really want to use max, that's a different story

grigou's icon

Thanks for your help !
What free effect does this kind of visuals ?
But indeed, i want to use Max for that, because I want to mix those visuals in realtime with other effects I made.

Martin Beck's icon

Thanks for sharing the link to the video GRIGOU. Very inspiring.

The effects used for this seem to include the following:
a) geometric distortion of rendered ego view - maybe the attached patcher shows a way how to get there:

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

b) different effects on different parts of the rendered ego view (horizontal region) changing horizontal dimension. Something like this can be achieved using multiple jit.gl.cameras and adjusting their viewport settings. Also using different jit.gl.node @shader attached to the 3d objects might be useful here.

c) gauss filter, edge filter - there are jit.gl.slab or jit.gl.pix versions available in Max.

Some effects seem to be related to manipulation of vertices of the 3d objects via an vertex shader and some fragment shader manipulation as already noted with different viewports for different parts of the final image and additionally some fragment shader for the entire final rendering.

grigou's icon

Hello Martin,

I'm glad you liked the video ! I love that kind of visuals !!!
A BIG THANKS for your advices and to took the time to make this patch (and with commented code !).
I really appreciated, and I laughed when I saw you used also my audio glitch examples ! :)

The result of your patch is clearly in the right direction !!
I think I understand the global idea, but I always had difficulties to understand the effects of objects like :
jit.unpack 3 @jump 3 2 3 @offset 0 3 5

I know it output each individual planes of a matrix, but how do you know what are those planes (and in which order they are) ? jump and offset attributes are mysterious to me...

How do you learn to do those tricks with gen ?
Especially the code part with signed normalized coordinates.

I love glitch art, and I have a lot of ideas in mind to develop glitch machines with Max, but for now, I don't have enough skills to achieve my goals :(

I don't have big difficulties to make glitch with audio, but with the video... it's another story !!
Mathematics are clearly not my best skill, so it's difficult for me to know what to do when I want to make video glitch like that.

I used jit.gl.slab and jit.gl.pix a little, but always taking part of code I found on this forum, but I could never do the effects myself from scratch, and shader are also a big mystery for me...

Do you have any advice on how I could increase my skills on that glitch world ?

Maybe creating a big thread on glitch art (audio and video) on this forum could be a good idea to regroup techniques, ideas, patches, etc. What do you think ?

Martin Beck's icon

I think we should keep this thread alive. I am curious to know if someone else has some more ideas about what techniques are involved in the "Memories of Broken Dimension" video.

Referring to jit.unpack you can have look here:
https://youtu.be/d9TVSTr4K3s?t=364

  • The order of planes is (x,y,z) (s,t) (nx,ny,nz)

  • meaning the 3d coordinates of vertices,

  • texture coordinates on the surface that is described by the vertices

  • and the coordinates of the normals (the vectors that are perpendicular to the faces described by the vertices).

  • In total it is actually 12 different planes including ARGB https://docs.cycling74.com/max5/tutorials/jit-tut/jitterappendixb.html

The normalised coordinates stuff is somehow standard way to access jit.matrix content. https://cycling74.com/tutorials/demystifying-expressions-in-jitter/
Using the [snorm] instead of [cell] is the preferred way if you want to use matrices of different size e.g. video of different resolution, because the code will behave invariant of this.

Referring to my example the gauss function that I used was just an arbitrary approach to illustrate how to change the distortion amount along the y-axis. One could also use a noise function [jit.bfg] or another arbitrary matrix of different size than the [jit.gl.gridshape] that is fed in the left inlet of [jit.gen]. On would use an additional [in 2] object and a [sample] within [jit.gen] to distort the vertices with another pattern.

My personal recommendation for great tutorials on jitter is this

tmhglnd's icon

Sem Shimla posted a nice tutorial here about displacing pixels to create a glitch effect, by using a looping video of glitch-effects.

👽'tW∆s ∆lienz👽's icon

amazing visuals in that game :)
(also, love that patch of Martin's above, nice work 🙌)

referring back to the video posted by the OP: maybe i'm mistaken and some of the effects really are a keyframe problem when the video was uploaded to youtube(i didn't try the original game out yet), but some of that pixelation that seems to 'flow' out from the objects in certain ways reminds me of Andrew Benson's optical-flow related shaders:
https://cycling74.com/forums/sharing-new-distortions

(since that thread seems to have dropped his attachment a couple times already, i'm attaching an extra .zip here just for posterity)

4445.hsflowdistort.zip
application/zip 10.09 KB

also, here's Andrew's site for other stuff(some javascripts) too: https://pixlpa.com/
hope it helps.

Martin Beck's icon

Cool Raja, I really like this optical flow related shader by Andrew. Thanks for pointing to this.
Waking up this morning I thought I should have look at the patch I posted above and change the vertex manipulation to texture coordinate distortion just by rewiring the patch cords:

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

grigou's icon

Very nice ideas here ! Thanks a lot !
I already checked jit.unpack and jit expressions tutorials.
It's a bit more clear. Now, I need to go deep in jit.gen and pix.
And experiment with the patchs on this thread !

Martin Beck's icon

Anyone any ideas how to achieve these kind of visuals only using Max ?

grigou's icon

Thanks for the video Martin ! It's really beautiful ! Love it !

For now, I tried to do a random VHS glitch with jit.gl.pix.
The effect is interesting, but I think it could be better.
What do you think guys ?

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

And another try :

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

Martin Beck's icon

Hi GRIGOU,

an application example of your VHS glitch:

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


and inspired by this video here

an application example that affects color channels

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

grigou's icon

Really nice ! A lot better than my attempt. Thanks Martin !
I still need to work on my noise VHS pattern generation to make a better glitch visual !
I'm not quite satisfied with my code for this part.
Working on glitch ideas is an endless pleasure for me :)

Martin Beck's icon

Comprehensible passion :-)

The usage of video input as pattern was also inspiring for me with this patch version here, but I should go to sleep now.

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

Martin Beck's icon

On the way to understand how to achieve this kind of pixelation effect from https://vimeo.com/211346942

Pixelation on certain regions of image.

I want to share this intermediate approach including the VHS glitch pattern generator from GRIGOU:

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


grigou's icon

Thanks Martin for the patch !
The video you shared is really nice !
I love this kind of glitching geometry.
I made some patches with 3D shapes generation like that, I will try to mix that with those glitchs.

grigou's icon

I just try something with 3D shape glitch and some noise.

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

grigou's icon

Another try with jit.gl.bfg.

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

Martin Beck's icon

Some more glitch madness

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

grigou's icon

Thanks !!!
So much nice technique to study in your patch !
The color displacement give a nice VHS style !!

Martin Beck's icon

So let's make the patch a little more crowded ;-) I recommend to use Rajas "Journey of the sparklies" as music to drive the visuals https://cycling74.com/forums/-share-•˚**˚•˚*_journey-of-the-sparklies_*˚•˚**˚•

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

grigou's icon

Wonderful ! Love the scanlines effect.
This effect wasn't here in your previous patch, but I didn't find what part of the patch is doing it.
Maybe it's related to audio input ?

Martin Beck's icon

The main difference to the previous patch besides camera automation, voronoi origin automation and higher dim of the gridshape is the change in the pixelation code. Have look at the parameter horsamp. If it is zero the sampling in horizontal direction leads to the lines effect.

Martin Beck's icon

Let's keep this thread alive -Glitch technique ideas.

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

missmiss's icon

this is cool! I like the thread

Martin Beck's icon

... some more glitches and distortions. I recommend https://cycling74.com/forums/-share-•o_0∆cellblock-caravan∆o_o• as music to drive the visuals.

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

grigou's icon

Martin, you're the Master of glitch here !!!
Your last patch is exactly what I was dreaming to do with Max since months (and years) !

jit.gl.pix is really a beast for those kind of visual glitches.
I really need to master it.

I have a question for the part 2 of your patch (the 2 jit.gl.texture objets) : is it better to feed textures with video ? Or it's possible to feed them with other kind of input without breaking the glitch effect ?

I was thinking about sending the content of the jit.gl.node inside the two jit.gl.texture objets or the output of jit.gl.pix (the one for the displacement map) or the output of jit.gl.slab world @file cf.gaussian.2p.jxs or adding another glitch map for the texture.

Roman Thilenius's icon

this reminds me on actual glitches of quake or unreal engine type of games which were partially incompatible with certain graphics cards or a problem loading the correct shader for some elements in the map.

Martin Beck's icon

Hi GRIGOU,

is it better to feed textures with video ? Or it's possible to feed them with other kind of input without breaking the glitch effect ?


Actually there is no difference between the use of [jit.gl.texture] and [jit.gl.node @capture 1] in the context of this patcher.
The benefit of using [jit.gl.texture] is that you can switch the texture applied to an object by sending messages "texture texturename". This acts like a switch between different texture sources.
This is used in my patch e.g. with the gridshape that generates the horizontal stripe that is overlayed on the image and that sometimes slides down. It uses two textures with the names "Off" and "texDisplaceStripe". The texture " Off" is empty, it is not explicitly created in the patch and Jitter automatically applies a white texture leaving the stripe region undistorted. (For better understanding reattach the [jit.pwindow] to the corresponding node - I had to disconnect the pwindows in order to increase rendering performance).
You could create several other [jit.gl.texture], give them a name and apply message boxes to the gridshape.
The input of the [jit.gl.texture] can be a [jit.movie @output_texture 1] or a [ jit.gl.node @capture 1] or a [jit.gl.slab] or a [jit.gl.pix] etc. -all of them output textures.
Textures can be thought of as 4 plane matrices (One plane for Red, one for Green, one for Blue, one Alpha channel), but they reside on the GPU RAM and are processed on the GPU.
[jit.matrix] is the equivalent on the CPU side and [jit.gl.pix] is for textures what is [ jit.gen] for [jit.matrix].
The [jit.gl.pix] take textures as input and process the pixels in parallel on the GPU by applying the code inside the [jit.gl.pix] to each pixel of the texture fed into its first inlet.
The [sample] objects control which pixel from the first inlet texture is rendered to the output including interpolation - there is no need for the textures in the left and right inlet of [sample] to be of the same size. The output size or resolution of a [jit.gl.pix] is defined by the texture sent in its left inlet.
The intensities of the pixels sent to the right inlet of [sample] object define the position to be sampled on the texture fed into the first inlet . In consequence the glitch effects vary with the intensity distribution of the texture in the right inlet of [sample].

Martin Beck's icon

The creator of Memories of a Broken Dimension explains some details in this video here starting at 54:48.

Martin Beck's icon

This patch from Chris Vik http://chrisvik.com/max-patch-share-glitchface/ should be mentioned in this thread.

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

grigou's icon

Good pick ! I already downloaded this patch years ago. Very impressive work.

By the way, thanks for your explanation Martin (and the game design critique video). Very helpful.

Martin Beck's icon

The Debris patch from Andrew Benson is also quiet nice for creating glitches in the style of "Memories of a Broken Dimension".
https://cycling74.com/tutorials/jitter-recipes-book-3/

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


Hey GRIGOU, what do you think of changing the title of this thread to e.g. "[share] Memories of a Broken Dimension - glitch techniques" to encourage other Jitter enthusiasts to contribute to it? As you proposed some time ago

creating a big thread on glitch art

grigou's icon

Title changed !
I will search on my big Max folder to find and share other glitch patch.
I made another audio glitch patch, but maybe it's not the best thread to post it if we talk about video.

Martin Beck's icon

I have structured the patch a little bit, added some Sobel filter based effects and some automation.

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

Martin Beck's icon

... new messages from the broken dimension

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

grigou's icon

Thanks Martin !
Another nice glitch effect !
For now I'm too busy with a show on tuesday, but after that, I want to take all your glitch algorithms and put them in separate patch. I think it would be cool to do glitch modules like the Vizzies.

By the way, I share also here my 23 audio glitch algorithms. It could be mixed with those video glitchs.

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


grigou's icon

Hey Martin, you're famous now :) : https://cycling74.com/tutorials/best-practices-in-jitter-part-1


For a real world example, the following patch posted by user Martin Beck from this epic thread on glitch techniques from the Jitter forum demonstrates the concept.

👽'tW∆s ∆lienz👽's icon

Hey Martin, you're famous now :)

haha, you BOTH are :) pretty sure folks are just in awe watching this thread in its entirety... i have nothing to add but praise 🙌
(they should create 'like' buttons or something similar for these forums, that way i wouldn't have to come in here and interrupt the flow just so i can emoji-bomb my praisez at y'allz:
💪👏🙌💃 🕺🙌👏👍 )
🍻

grigou's icon

haha thanks Raja ! I'm glad that this thread could also help other people !

Andrew Benson's icon

Great thread, glad to see some cool ideas in here.

grigou's icon

Thanks Andrew ! You're welcome to join the glitch family :-D
I learned a lot with your jitter tutorials and I'm sure you have also great ideas to share on this thread !

Andrew Benson's icon

:D
I don't know if I can keep up with the looks you guys have already got going, but here's a weird animated pattern generator idea I came up with using jit.gl.pix

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

Martin Beck's icon

Anybody any ideas how to achieve this kind of Delaunay effect (fill the Delaunay regions* with sampled values of a video) used in Rawtekk's - "Here's to them" ?
* or jit.bfg pattern
... I am happy to hear there are some people interested in this thread. Thanks for kind replies and contribution.

grigou's icon

Hello guys !

I'm back with new glitchy stuff !!!

First of all, thanks Andrew for your beautiful patch. Very inspiring, even if I don't really understand the jit.gl.pix part for now. And thanks Martin for the video. Unfortunately, it's way above my skills, so I can't help you with this :(

So, I found a very simple way to generate glitchy patterns with jit.catch~ and some random. You just have to open any file with sfplay~.
This work best with non compress files, dll files or apps.
Try opening this one : http://www.telecharger-dll.fr/dll-AimRes.dll.html

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


giorgio's icon

awesome!!! Thank you Grigou


grigou's icon

Yeah ! Love the result. What kind of file did you use ? The blue color is also nice, I need to add some options for controling colors in my patch. By the way, I will add another random layer by adding a switch before jit.normalize

grigou's icon

Same patch, but with some optimization.
Have fun !

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

Martin Beck's icon

Nice work GRIGOU - the basic concept reminds me of the Buchla 259e Twisted Waveform Oscillator - a wavetable oscillator that can use the internal operating system code as waveforms.

I found another nice glitch video on Facebook from データコード 「datacode」:
https://www.facebook.com/methlabrecordings/videos/592833154572601/

giorgio's icon

Hi GRIGOU, I used this file:

grigou's icon

New test... but I have a weird bug : jit.world don't always enable.
Sometimes I need to toogle many times to enable it. Any idea why ?
It happens only in this patch.

To use the patch, load the jpeg I attach to my post.
The result is really nice, but I need help to manage big files.

When I load the image "ghost_notes_random_03", there's no problem, but when I use the file "SIGIL (1)", there's a huge drop of FPS even with jit.movie @colormode uyvy @output_texture 1

How I can use big images (2000x2000 or more) and still keep a good framerate ?

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

daddymax's icon

Huge thanks to all the people sharing patches here - so many good ideas and clever execution to learn from. Great stuff.

grigou's icon

Thank you ! :)

By the way, for using the glitch effect in my patch, you can check the toggle to generate random value for jit.gl.pix or leave the toggle uncheck and choose a value between 0. (no effect) to 1. (full effect) with the number box.

grigou's icon

Hey glitchy friends ! :)
Any clues for the issues with jit.world and big files in my last patch ?
Thanks !

cerval's icon

Dear glitchers,

I recently uploaded a vid demonstrating my new A/V - installation app "IVAR_2"
All my thanks and respect to Grigou & Martin Beck for their great thread & patches which made my IVAR glitchy ;)
https://www.youtube.com/watch?v=YY1Gazdp0h0

grigou's icon

Nice evolving patch ! Thanks Cerval :)

TConnors's icon

Great thread!

Martin Beck's icon

I don't remember where I found this patch from Jean-Michel Couturier ( Blue Yeti, 2014), but I think it might find some application for the Broken Dimensions simulation.
It uses Andrew Bensons optical flow shader to induce movement of a kind of fluid dynamics.

Fluid GPU.zip
application/zip 19.57 KB

grigou's icon

Thank for sharing ! Interesting patch to study !

By the way, I updated my patches and added a syphon recorder to record glitch videos !

1. Patch to transform raw files into 2D glitches (+ audio glitches) :

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

2. Patch that generate glitches like a vhs :

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

3. Patch that generate glitches by messing up a 3D shape :

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

And I'm still stuck with this patch :

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

BUG #1
jit.world don't always enable when I check the toggle.

BUG #2
I need help to keep a decent frame rate while using big files (2000x2000).

No problem with this file : https://cycling74-web-uploads.s3.amazonaws.com/58ed0512285705c15ccfb5ec/2019-06-19T13:54:42Z/ghost_notes_random_03.jpg
But this one kill my frame rate even with jit.movie @colormode uyvy @output_texture 1 : https://www.cyrilmichaud.com/SIGIL(1).jpg

Any idea to solve this problem ?

pereshaped's icon

Thanks you all for such amazing patches. They left me mouth open. A real education into glitch generators. A new wonderful world.

The only two patches which are crashing immediately, on paste, are the ones Martin posted on May the 11 and May the 23. Is it because Im still using Max7.3.6?

Many thanks for any help.

Martin Beck's icon

Does this version here also crash on paste? (I removed the automatic start of jit.world and some mc related parts in version of May the 23.)

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

pereshaped's icon

Hi Martin, thank you for responding so quickly. I just tried and the same thing. It crashed on paste.
BUT I managed to get a Max Console screenshot before it quit. Here attached


pereshaped's icon

Ok, I get it. This is for Max 8. Thanks anyway, all the best.

pereshaped's icon

Here a version for Max7. It loses the functionality of the mc.function object from Max8 but multiple function objects could be used. Ive just summed them into one to get it running at the mo. Many thanks for posting this wonderful patch.

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

grigou's icon

New try :

The result is interesting, but I have huge drops of frame rate in fullscreen mode.
Any clues to optimize this patch ?
Thanks !

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

Martin Beck's icon

Hello GRIGOU,

your patch runs with 60fps on Macbook Early 2013 2,4 GHz i7 (without using syphon). I think the only way to optimise it further for weaker machines is to transfer all matrix based parts to jit.gl.pix or jit.gl.slab and perhaps use jit.gl.bfg as source of random textures.
https://cycling74.com/articles/jitter-shaders-or-gen-patcher-equivalents-for-common-jitter-objects

Martin Beck's icon

I found another interesting patch for the Memories of Broken Dimension collection from MATT ROMEIN,

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

*requires cv.jit package

https://cycling74.com/forums/farneback-op-flow-shader
Also credit to Andrew Benson since this particular patch is just an extension of his DebrisHD patch from the jitter recipes package.

grigou's icon

Thanks Martin,

Too bad, there's no equivalent with jit.gl.pix or jit.gl.slab for jit.noise, jit.scanslide, jit.scanwrap and jit.scanoffset.
I tried to replace matrix with texture, but dstdimstart/dstdimend don't work for me with jit.gl.texture.
I can't see what I did wrong...

Federico-AmazingMaxStuff's icon

Following this amazing thread

grigou's icon

Just wanted to share with you this awesome VHS glitch :

This guy have some other videos like this one on his channel that he made by crushing VHS.
I love the result!
Maybe some new inspiring work to remade with Max :)