Eternalism & the art of slitscanning


Eternalism is a philosophical view on reality that proposes time is just another dimension. As opposed to the view of the world as a three-dimensional space modulated by the passage of time. An interesting facet of eternalism is that it implies future events are “already there” and as such that there is no objective flow of time. One can argue about the truth of such a theory in the real world. With regard to the world of film, it is most certainly true. When the viewer starts the film, the ending is already there. So the perceived spatial dimension and the perceived temporal dimension, are truly equal. This creates the possibility to view everything in a non-conventional way.

The manipulation of time
Wasn’t this blog about Processing? Yes it is! So let me get right to point. Time bending experiments in Processing, the possibilities are endless! Visually that is. ;-) I’ve been working on a series of sketches that mess with the flow of time in some way, shape or form. Ranging from manipulations at the frame level, all the way down to the very pixels that images are made of. I have no idea what you would normally call these effects. But for myself I used names like TimeMatrix-based VideoSequencer and pixelTimeDisplacement (preliminary screenshot below). More than just cool names, they’re actually a fairly decent representation of the functionality. Perhaps later I will release, write or show material related to these experiments. The focus of this blog post however will be on the technique I used to make the video above.

Slit-scanning
The term slit-scanning has it’s roots in the history of the technique. Back in the days, the process would supposedly be as follows. A moveable slide, into which a slit had been cut, was inserted between the camera and the subject to be photographed. Making one single slit-scan photograph would thus require a whole series of shots. You can imagine this was extremely time-consuming. Over the years, technological advances have not only made it cheaper, easier and faster to create slit-scan photography, but also allowed for creation of and experimentation with slit-scan video art. A great catalogue of the latter is maintained by Golan Levin. So check out this page to see some inspiring examples. You can also find a simple slitscanning sketch for Processing there, which works very similar to the old-school techniques I just described.

Existing code
We have computers now to do all the heavy lifting (yay for the digital age 8)). And there are quite a few code examples out there to get started with slit-scanning. Although a good starting point, none of those were unfortunately completely suited for what I had in mind. Which was full HD slitscanning of existing image sequences. The two biggest problems for me with existing sketches: they were fairly slow to process frames or incapable of processing large files altogether due to memory restrictions. So these were the two points I focused on when developing different prototype sketches. What I ended up with ain’t perfect, but it’s good enough for the job at hand. Also, the learning process itself is still my most important goal. Of course solid software and pretty pictures are a big bonus! :D The final sketch works in batches and uses the maximum amount of memory it can use for a single batch. So it works regardless of the size and number of images. A small video can be processed in a matter of seconds in a single batch. If you’re processing a longer sequence of full HD images, it can take around two hours, depending on your computer and memory limit. However in my opinion this is pretty reasonable. Plus the added advantage of batches, is that after the first batch (10 minutes even with full HD) you’ll already be able to see the first series of resulting images. And decide if you wanna see the rest. :P

SlitsP5
In the spirit of open-source I like to share the code I wrote. For lack of a better name, let’s refer to it as SlitsP5. You can download it from here. Of course I release my code under the usual disclaimer. That it was created as a personal experiment by yours truly. So there are no guarantees it actually works, haha. ;-) For your convenience I placed almost all of the code in a class, so it becomes really simple to use it. Aside from the aforementioned class, the code example below is the only thing you need to run it (this is all included in the download, no need to copy-paste). As you can see there aren’t many settings, just state the directory and the direction of the slit-scanning (X or Y) and that’s basically it. Some settings hidden in the class itself are a boolean for saving (true by default) and one for additional console output (false by default). I put them there, cause they’re unlikely to be used anyway. I’ve experimented with video and image sequences for both input and output. But in the end I found video unreliable (fps, codecs and whatnot), so I switched fully to image sequences for both input and output. For me there are a number of advantages to this like accuracy, flexibility and quality. The downside being the need to separately convert between video and image sequence. Of course it’s possible to rework this sketch to include direct video input and output.

SlitsP5 mySlitscan;

String directory = "inputDirectory";
char direction = 'X';
int memBarrier = 320000000;

void setup() {
 size(500,500);
 mySlitscan = new SlitsP5();
}

void draw() {
 mySlitscan.run();
}

Setting the memBarrier
With regard to settings, the only really important thing is to correctly set the memBarrier. You only need to do this once. The memBarier is the maximum amount of pixels your computer can hold in the memory at one time (given the Processing/Java/WinXP memory limitations). So this is different per computer. For me it was about 360 million, so I set the memBarrier at a secure 320 million. A little less won’t have a huge impact, but if you set it too high, you’ll get an out-of-memory error right at the start. I’m pretty sure there is a neater way to manage memory, but since you only need to do this once, it’s not a whole lot of work. :-) So how do you find your memBarrier? Well, for your convenience another sketch – called memBarrierTest – is included in the download. Run this program until it crashes. Yes, crashes. Then scroll up a little in the console and see the last line that says something like “Number of pixels in memory: 363.250.000”. That’s the number you can use for the SlitsP5 sketch. Just to be safe you can even set it a little lower.

How to use SlitsP5
Using SlitsP5 in four steps (assuming a correct memBarrier is set):

  1. Place the input image sequence in a subdirectory in your sketch directory.
  2. State the name of the directory in the sketch (images will be read automatically).
  3. State the direction you want to slit-scan (X or Y).
  4. Run. You will see information and a progress indicator in the console as well as the main window. Output images are saved in a subdirectory of the same name as the input directory with the addition of either an X or an Y, depending on your slit-scan direction.

Tips, tricks & troubleshooting
A collection of useful suggestions to help you on your way:

  • SlitsP5 automatically reads JPG, PNG and TGA images from the input directory. If you want to use other image formats, it’s fairly easy to add them to the class (as long as they can be read by Processing in the first place). You can add other filetypes in the loadFilenames() function.
  • Remember that the number of frames will be your new X or Y dimension. For example if you have 100 input images of 200 x 200 pixels and you slit-scan over the X. You will end up with… 200 images of 100 x 200 pixels. That is slit-scanning. A spatial dimension switches places with a temporal dimension. So if you wanna end up with full HD width (1920 pixels) you will need to input exactly 1920 frames.
  • Footage with big cuts and/or compilations doesn’t work well. As you can imagine, sudden changes stand out in slit-scanned material. Slow moving objects on the other hand create much smoother output.
  • If you get an outOfMemory error right at the start, you need to correctly set the memBarrier! ;-)

Inspiration
For anyone interested in slit-scanning, I can recommend the 1988 experimental short film The Fourth Dimension by Zbigniew Rybczyński, a filmmaker and innovator in the technical field. Aesthetically the video I made was also influenced by the work of Pipilotti Rist, an amazingly talented video artist. I was – unexpectedly – introduced to her wonderful art on my visit to the Fundació Joan Miró in Barcelona. Last but not least an obvious source of inspiration were the works of previous Processing tinkerers such as Don Whitaker, Lukasz Karluk and Matt Ditton. Don Whitaker also happens to be the man behind Mother Nature Videos. This is one of the few online collections of free quality HD stock footage, which is perfect material for slit-scan experimentation.

Looking back, looking forward
It’s becoming kind of a blog post tradition to reflect upon the whole creative & educational process. With each project, I just feel that my grasp of programming in general and Processing in particular is growing. Which is of course great. I do notice that despite my best efforts, my to-do-list is even growing faster! :D The more you know, the more you realise you don’t know. There are numerous areas of interest that I’d like to investigate. I just try to go from one to the next intuitively, so we’ll see what happens… I hope this post, video and/or source code is useful to someone out there. And please feel free to talk back in the comments below. :-)

You can download SlitsP5 from here.

About these ads
Comments
58 Responses to “Eternalism & the art of slitscanning”
  1. Eli says:

    hello,

    after finding ure site i was so impressed with processing that im addicted to it for the past week, but of course i’m still at the begining. i actually wanted to experiment with the slitp5 code u have and ive tried it but i think there is a problem. my input images are of 1920/1080and then the output that comes out is much smaller 248/1080 . and it doesnt really look like much so i was wondering how you managed to do what you did. it would be great if you could help.

    E

    • Amnon says:

      Hi Eli,

      See tip 2 above. Slitscanning means a spatial dimension (in this case 1920 pixels width) is replaced by a ‘temporal’ dimension (in this case 248 images). If you want the output to be 1920 pixels wide, you need to input exactly 1920 images. Because the NUMBER of images (not the original width) determines the final width of your output. The original width of your input images will determine the number of output images (in this case 1920 images). You can precalculate everything, start from your intended output and work backwards. When slitscanning over Y it’s the same except with regard to height. For simplicity I usually just input 1920 images at at resolution of 1920×1080 and slitscan over the X. Then you end up with the same. ;-)

      • sacha says:

        Hello Amnon, i installed Slitscanning but i got a arrayoutofbounds exception when i run the render
        on this part:”

        void processFrame() {
        if (direction == ‘x’) {
        int maxX = min(saveCount+batchSize, inputWidth);
        for (int x=saveCount; x<maxX; x++) {
        int target = x – saveCount;
        for (int y=0; y<inputHeight; y++) {
        int getLoc = x + y * inputWidth;
        int setLoc = inputFrame + y * inputFrames;
        outputBuffer.get(target).pixels[setLoc] =
        currentImage.pixels[getLoc]; //On this part
        }
        }

        I don't know if i did something wrong but i simply try to run sketch with P5 1.5.1 control P5 0.75
        i used 10 jpg in my input directory, but i know it doesn't matter, maybe i need to use image as same dimensions?
        Sorry for this answer, i'm just a newbie. I hope you could help me
        bye

      • Amnon says:

        Hi sacha, seems like it’s an image dimensions problem. Make sure all images are exactly the same dimensions.

  2. Marco says:

    Hello! Great Work for both (video & script)!
    I noticed a problem, when I set “y” slit axis (char direction) the program start an endless processing series (1/0,2/0,..etc etc) and doesn’t save anything!
    Can You help me out?

    P.S.
    Sorry for my english, and i’m a newbie in Processing!

    Looking forward for an asnwer!
    Thank you
    Bye

  3. David Ayre says:

    Hi Amnon, thanks for sharing your work, very impressive. I’m really interested in this technique and as a photographer I have tried similar things with still images. I have decided that video is the way to go.

    What I want to do is shoot some HD video, grab a 1 pixel wide vertical strip from the left side of the first frame, then another 1 pixel strip from the second frame at pixel 2, etc. I would want these to be put in a folder in sequence so that I can join them all together to make a single image. Is it possible to do this with your code? if not, can it be modified to do it?

    I can save my video frames as jpgs first no problem.

    I think your version is probably the best I have seen so far and is not far from what I want to achieve – I think. Cheers, DAVE.

    • Amnon says:

      Hi Dave,

      This is indeed very close to what this code does, in fact it’s easier. To let the pixel strip correspond with the frame number, would require only minor alteration. And if I understand you correctly, your intended output is one single image, which is as wide as the number of input frames. Outputting a single image is obviously in many ways easier to handle than the above app which needs to output many images. So what you describe is very much possible and could code-wise be even shorter and faster. Also, the output image could be joined by the program immediately, unless you need single-pixel strips for another reason. My guess is that it would take an efficient program minutes to generate one single image -as you describe- from a series of input frames.

      Best,
      Amnon

      • Jonny says:

        Hi Amnon,

        I want to do something similar to what Dave has described, any advice on how to modify the code to do this?

        Cheers
        Jonny

      • Amnon says:

        Like I said, what you guys want to do is actually much simpler because you only output a single image. At the start create a PImage that is as wide as the number of input images. Then just go trough each input image, extract the line you need into the output image buffer (even the placement doesn’t change). If the pixel array confuses you, you can use get() for your first attempt. Once you’ve gone through all of the input images, you will have completed your output image. Perhaps you can use some snippets from my code, but it may be even faster to just write it yourself.

  4. Justin Hantz says:

    Hey Amnon, I’m a newbie to processing and I dont know how to get my image sequence into Slitp5! how do I “State the directory” I have a folder that contains my image sequence rendered out of final cut. PLEASE HEEEELLLLPPPP

    • Justin Hantz says:

      I keep changing the word “inputDirectory” to the name of the folder that I have my images in. then i get this error message

      Exception in thread “Animation Thread” java.lang.NullPointerException
      at SlitsP5main$SlitsP5.determineVariables(SlitsP5main.java:120)
      at SlitsP5main$SlitsP5.(SlitsP5main.java:75)
      at SlitsP5main.setup(SlitsP5main.java:37)
      at processing.core.PApplet.handleDraw(PApplet.java:1608)
      at processing.core.PApplet.run(PApplet.java:1530)
      at java.lang.Thread.run(Thread.java:613)

      • Amnon says:

        Put the whole directory with your images inside the directory of the SlitsP5 sketch. So your inputDirectory should be a subdirectory of the sketch’s main directory (just like the data folder which can be used to place your input for general Processing data). In your sketch you replace inputDirectory with the NameOfSubdirectory. It’s relative, do not put the full path in there. So you should only use the name of the direcory you want to use.

        On a side note, I’ve been working on a second version of this Slitscanner which does take absolute paths, so then you don’t have to move/copy the images. However in this version that you use, it’s not yet implemented. So again, copy/move the image directory inside your sketch’s main directory and then put the name of that subdirectory in the sketch.

        Good luck! :D

  5. Renata says:

    Hi Amnon, I´m really interested in having an video output with your script.
    The code is running but, it only saves the splits images in the file.
    I don´t know how to get them to compose a video like your exaple here. Could you help me?

    • Amnon says:

      Hi Renata,

      As you’ve noticed both the input and output for this sketch are image sequences. This is a conscious design decision on my part. To create a video from a sequence of images you will need to create another sketch or use another program, for example Quicktime PRO or After Effects. There are many programs available that can turn your image sequence into a video.

      Best regards,
      Amnon

  6. Scott R says:

    Hi Amnon,
    Great article and a great tool!

    I was wondering how this is different from the effect shown in this video: http://vimeo.com/3697348

    I’ve seen this similar effect called “slit scan” and but also “time displacement” (after the crude After Effects tool).

    Is there a simple way to modify your sketch to output an image sequence in which the appearance of each line of pixels is staggered from left to right, or top to bottom (etc.) in this way? I know the two effects are related but I can’t tell what the different variables are here.

    Thanks,
    Scott

    • Amnon says:

      Hi Scott,

      Yes, these are the two broad effects that fall under the term slitscanning. In July I finished a program that incorporates both types of slitscanners (and some other improvements like memory management). For lack of a better term, I call one DimensionalSwap and the other TimeOffset. The first is what SlitsP5 did and what you see in my video… a temporal and a spatial dimension are swapped. The second is what you are talking about and what that linked video shows… certain pixels (usually lines from top to bottom) are delayed. So the top of the screen is realtime and the bottom of the screen is “t-height”, causing the time displacement effect (actually the yellow-pink screenshot above is also an example of this type of slitscanning). Unfortunately there is no simple way to modify the SlitsP5 code to change the effect. The good news is that the time displacement effect runs much faster, basically in realtime.

      My original intent was to release this program with a new video + big writeup, but as usual other things got in the way timewise… ;-) Also I’m not sure yet how I will release it. As a library, a sketch or an application. So I’m pretty sure it will come out (with a video and possibly a PDF showcasing / explaining it’s possible use). I just don’t know when.

      Best,
      Amnon

  7. Johnnie says:

    hey amnon, thanks for sharing your code, could you help me with “arrayoutofboundsexception 106800 error?”

    I just wanted to test 11 images, size 400 400, processing sketch size, 400,400 and its giving me that error. How would i go about fixing that ?

    • Amnon says:

      This code was posted a long time ago, so it’s not exactly fresh in my memory. The most likely cause of OOB errors with this sketch is that you are using images of different dimensions. The solution is: don’t. All images should be of the same dimensions. 11 images won’t give a meaningful result anyway, since the number of images is the new width or height of your new image.

  8. paulk says:

    hi how are you, this is way cool, try to get it to work, but I get a error while saving
    outputBuffer[i-batchFirstFrame].save(directory + “-” + direction + “/sequence_” + nf(i,4) + “.png”);
    em i missing some thing?
    thanks

    • Amnon says:

      No idea. You don’t even mention what kind of error you get.

      • Barry says:

        Hi Amnon, I get a null pointer exception on this line, any pointers?
        Thanks

      • Amnon says:

        Ok. Apparantly the outputbuffer is null, which is kinda weird. Perhaps you’re using a 2.0 alpha version of Processing in which this old code doesn’t work well. Try it in 1.5.1. Perhaps you are using images of different dimensions. However all images should be of the same dimensions. I still intend to turn all the slitscanning code I have lying around in a newer, bigger and better app, but so far I keep getting drawn into different projects.

      • Barry says:

        Thanks man, I’ll try it in 1.5.1 and see how it goes.

  9. Tim says:

    MANY thanks for writing the SlitsP5 sketch and for your excellent explanation of slit scanning. I’ve used it many times and enjoy how fast it is and the feedback it gives the user. I would really like it if one day (soon?!) you found the time to add some bits, such as Time Offset and the ability to choose which direction to start the process, i.e. include right-to-left and bottom-to-top. I am happy to be a tester for you!

    • Amnon says:

      Hi Tim,

      Saw your post on the forum as well. I’ll look into it. As far as I remember all of those things were already built in the new code I was working on then. I’ll see if I can find it, give it an update and release something. If I manage, I’ll post it on the forum in the Share section.

      Best,
      Amnon

  10. piepaper says:

    Hi Amnon, great work on the Slit Script! Really enjoying it!
    Not sure if you still have your head in this, but you might be able to helpout:
    When rendering time-offset from left or right it would fill the frame completely with lines but when a new batch starts it jumps back a few hundred lines and starts from there. Each batch jumps back to that position and creates a black unrendered bar.
    Upwards or downwards render doesn’t create this problem. I tried with different memory settings but it would stay the same problem. Any idea? Thanks

    • Amnon says:

      Are you using the latest SlitsP5 v0.4? I haven’t had the time to extensively test it and currently doing other stuff again. You could check the processFrame() method in the TimeOffset class. At first glance, I’m not seeing anything fishy there. But like I said, since this code is mostly untested, there very well may be some bugs left in there. Usually some println’s can help you track down the problem.

      Best regards,
      Amnon

      • piepaper says:

        Thanks Amnon, I did more tests and it seems like it was a memory problem. I increased it to the max possible and had a good result. Thanks.

  11. Barthélémy says:

    Hello and thousands thanks for sharing this great work.

    I begin processing, partly because I want to experiment some slitscan, so this slitsP5 is a great.

    I did test it, it’s quite impressive
    I didn’t have any problem with small images. (960*540)

    When it comes to big files, it’more tricky.

    Here a test I did with a bunch of 1920 files of 1920 pixels width to report.
    I select the default mode (I just load the dir path and click to start rendering, so I have dimensional swap and horizontal )
    I first increased the maximum available memory in Processing via File > Preferences to 4000 mb

    I got this error list :

    sept. 06, 2012 11:37:30 AM controlP5.ControlBroadcaster printMethodError
    SEVERE: An error occured while forwarding a Controller event, please check your code at render
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at controlP5.ControlBroadcaster.invokeMethod(Unknown Source)
    at controlP5.ControlBroadcaster.callTarget(Unknown Source)
    at controlP5.ControlBroadcaster.broadcast(Unknown Source)
    at controlP5.Controller.broadcast(Unknown Source)
    at controlP5.Button.setValue(Unknown Source)
    at controlP5.Button.activate(Unknown Source)
    at controlP5.Button.mouseReleased(Unknown Source)
    at controlP5.Controller.setMousePressed(Unknown Source)
    at controlP5.ControllerGroup.setMousePressed(Unknown Source)
    at controlP5.ControlWindow.mouseReleasedEvent(Unknown Source)
    at controlP5.ControlWindow.mouseEvent(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at processing.core.PApplet$RegisteredMethods.handle(Unknown Source)
    at processing.core.PApplet.handleMouseEvent(Unknown Source)
    at processing.core.PApplet.dequeueMouseEvents(Unknown Source)
    at processing.core.PApplet.handleDraw(Unknown Source)
    at processing.core.PApplet.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:722)
    Caused by: java.lang.OutOfMemoryError: Java heap space
    at processing.core.PImage.init(Unknown Source)
    at processing.core.PImage.(Unknown Source)
    at processing.core.PImage.getImpl(Unknown Source)
    at processing.core.PImage.get(Unknown Source)
    at processing.core.PImage.get(Unknown Source)
    at SlitsP5v04$Slitscanner.createBufferWHM(SlitsP5v04.java:140)
    at SlitsP5v04$DimensionalSwap.createBuffer(SlitsP5v04.java:460)
    at SlitsP5v04$Slitscanner.setupSlitscanner(SlitsP5v04.java:99)
    at SlitsP5v04$Slitscanner.(SlitsP5v04.java:83)
    at SlitsP5v04$DimensionalSwap.(SlitsP5v04.java:456)
    at SlitsP5v04.render(SlitsP5v04.java:405)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at controlP5.ControlBroadcaster.invokeMethod(Unknown Source)
    at controlP5.ControlBroadcaster.callTarget(Unknown Source)
    at controlP5.ControlBroadcaster.broadcast(Unknown Source)
    at controlP5.Controller.broadcast(Unknown Source)
    at controlP5.Button.setValue(Unknown Source)
    at controlP5.Button.activate(Unknown Source)
    at controlP5.Button.mouseReleased(Unknown Source)
    at controlP5.Controller.setMousePressed(Unknown Source)
    at controlP5.ControllerGroup.setMousePressed(Unknown Source)
    at controlP5.ControlWindow.mouseReleasedEvent(Unknown Source)
    at controlP5.ControlWindow.mouseEvent(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at processing.core.PApplet$RegisteredMethods.handle(Unknown Source)
    at processing.core.PApplet.handleMouseEvent(Unknown Source)
    at processing.core.PApplet.dequeueMouseEvents(Unknown Source)

    I find very strange that when the program works with small images, it always do only 1 batch ( batchcount = 1)
    I guess that’s why it’s going out of bounce with HD, but i don’t understand why it doesn’t batch the work…

    Thanks again !

    NOTES :
    I run on an Asus g74sx series with intel i7-2630qm cpu at 2.00Ghz
    RAM : 8 Go
    windows 7 64 bits service pack1

    Java (build 1.7.0_06-b24)

    Processing 1.5.1
    (I downloaded all libraries few days ago as described on http://code.google.com/p/amnonp5/)
    controlIP5 0.7.6
    hemesh 1.50a
    HemeshGui v0.2
    I also corrected the hemeshGUI as described in https://forum.processing.org/topic/having-trouble-installing-hemeshgui (just in case)

    • Amnon says:

      Yes, I have noticed there seems to be a problem (on 64bit systems) with accurately assessing the memory when a lot of it is used, which results in the error you show. I know because I tried it myself some time ago with 14GB of memory. The only workaround I found was a manual one, so not quite ideal. I have asked at the forum for better ways of memory management with 2GB+ memory, however unfortunately this didn’t lead to a solution.

      For you, the simplest workaround is to add a manual escape after line 96 of Slitscanner.pde:
      if (totalMemory > 6000) { break; }
      …where 6000 stands for 6GB. Experiment with a good number.

      Note that SlitsP5 has nothing to do with HemeshGui, so those depencies don’t apply. They are two different programs. SlitsP5 relies only on the controlP5 library.

      • Barthélémy says:

        Thanks a lot Amnon for your answer,

        I did add “if (totalMemory > 6000) { break; }” after line 96.
        It works perfectly, I just had to find the good combination of the memory setting.

        I tried few couples, here is a summary as a report :

        “memory in Processing Preferences” WITH “totalMemory > XXXX line 97″
        (again with 1920 pictures full HD in dimensionalswap mode)

        for instance 8000 WITH 7000 : it crashs

        it worked with

        7000 WITH 5000 : batchcount= 4 calcul duration 26’42s , batchcount= 4
        8000 WITH 6000 didn’t crash but batchcount= 1920 ! I stoped it after 40 minutes, 11 pictures were produced…
        8000 WITH 5500 : batchcount= 1920 I stoped immidiately
        7000 WITH 5500 : batchcount= 4 calcul duration 27’40s
        7000 WITH 4500 : batchcount= 5 calcul duration 30’54s
        Conclusion the first couple of value seems to be optimal in my case.

        Thanks again Amnon for sharing this work !

      • Amnon says:

        Yeah, still hoping to find a solid memory management method some day… ;-)

  12. Leo says:

    Hey Amnon,

    I am a total noob with Processing and can’t get your slit scan skript to work. Is there any chance for a tutorial, that is for beginner ? i have the files, i have processing, but whats next ?!

    thank you ;)

    leo

    • Amnon says:

      Perhaps at some point, but not in the short term. The open-source code is currently provided “as is” :D I still have many ideas related to slitscanning that I’d like to implement, so maybe when a more developed version hits, I’ll include a bigger write-up / tutorial. Currently working on other personal and commercial projects.

  13. twdarkflame says:

    Absolutely wonderfull stuff!
    I never tried processing before, but dived right in just for this (after reading a bit in the new scientist on slitscan and googling all over for whats been done).

    Already trying out allsorts with renders and random footage I have. I’ll probably try to mod in some sort of image-time-map based option….if thats even vaguely compatible with the code. I’m a half decent coder, but new at this. Still, that option would raise all sorts of new possibility’s. (screw memory concerns, for this I’ll buy more….)

  14. Barthélémy says:

    Hello again,

    I just wanted to let you know we used this very good software in some parts of the music video we did for the swedish singer Mariam The Believer ( https://www.facebook.com/MariamTheBeliever )
    ‘Somewhere Else’ is a song from the album Blood Donation.

    the video : http://www.youtube.com/watch?v=t_dIeGGyigg

    Thanks !

  15. This is really cool!! You might want to check out my analogue slit scan set-up..
    http://realitysosubtle.com/2012/07/11/slit-scan/

  16. Amnon says:

    Cool,can’t believe the original technique is still used today ;-) I always have more projects than time, but I have scribbled some new slitscan ideas on a piece of paper. Hopefully at some point I’ll be able to implement those and do another slit scan experiment & blog post.

  17. Norman Dimock says:

    total beginner at Processing.
    maybe I put files in wrong directories…

    Processing
    -Sketchbooks
    –SlitsP5v04
    —SlitsP5v04.pde
    -libraries
    –controlP5.pde
    –displayFunctions.pde
    –Slitscanner.pde
    –ssDimensionalSwap.pde
    –ssTimeOffset.pde

    Opened SlitsP5v04.pde
    Ran it.
    Got “Cannot find a class or type named “Slitscanner”

    Please help?
    Thanks much.

  18. Norman Dimock says:

    Hmmm. Nevermind.
    On second thought, I need to do more learning.

  19. Amnon says:

    All files can remain in the same directory.

  20. Pat says:

    Hi Amnon,

    I was very inspired by your slit-scan work and is the first that has really stuck out but I’m a noob to processing. I’m getting my head around it and the instructions all make sense to me and are logical enough but I have a feeling I’ve just made one noob error by putting something in the wrong folder or I’m staring at the wrong place/tab, not clicking on the right thing. The major problem is that I can’t find the code that was listed in the tutorial at the top. I don’t want to bother you for a whole tutorial but if you have just a minute to confirm whether theres anything I’ve done wrong in the process:

    controlP5 and SlitsP5v04 and their contents, (Slitscanner.pde, SlitsP5v04, etc) are both in the libraries folder. I double click SlitsP5v04.pde which brings up the sketch along with all the source files as sketches too (ssTimeOffest, Slitscanner, controlp5 etc). Within SlitsP504, there is none of the code that is listed up above except “Slitscanner slitsP5;” which is on line 6, not 1. All there is:

    // SlitsP5 v0.4
    // by Amnon Owed @ http://amnonp5.wordpress.com (12-06-2012)
    // Tested under Processing 1.5.1 & ControlP5 0.7.5

    Slitscanner slitsP5;

    void setup() {
    size(1280, 720);
    setupControlP5();
    textFont(createFont(“Arial”, 18));
    smooth();
    }

    void draw() {
    background(0xffE0E4CC);
    if (slitsP5 == null) {
    displayExplanation();
    } else {
    slitsP5.update();
    }
    displayControls();
    }

    I’ve searched through the rest of the tabs and can’t find any code similar. Am I clicking on the wrong thing or is there something I haven’t installed or what? I’d love to learn Processing now that I’ve come across it, but I’d really like to do a slitscan for a project I’m currently working on and this seems like the best option!

  21. Amnon says:

    Hi Pat, the tutorial and blog post above were written in january 2011 for SlitsP5 v0.1. It did not have a gui and only featured a single mode. If you want to download this version, you still can when you show the deprecated downloads on google code:

    http://code.google.com/p/amnonp5/downloads/list?can=1

    However my advice is to use the latest v0.4. While the above blog post no longer applies, it has a gui, so it’s much easier to run. It also has different modes and settings. To learn more about it see my forum post:

    https://forum.processing.org/topic/slitscanner-for-processing-slitsp5-v0-2

    The only thing is that memory management isn’t flawless yet. Especially with high amounts (like I tried with 14 GB) you still need some manual memory safeguards (which I believe are not built in the v0.4 code yet!). I asked a question about this on the forum two months ago, but unfortunately it remains unsolved:

    https://forum.processing.org/topic/utilizing-maximum-amount-of-memory-without-going-out-of-memory

    Which is the main thing standing in the way of a big release / write-up, apart from all the other projects I was working on. :-)

    The sketch does not need to be in the libraries folder (that’s for libraries), however you will probably need the mentioned versions: Processing 1.5.1 & ControlP5 0.7.5.

  22. Pat says:

    Hi Amnon, thanks heaps for the feedback! Thats clarified it definitely although I’m still having trouble. Every time I hit run it doesn’t come up with the GUI but up with “The method selectFolder(String, String) in the type of PApplet is not applicable for the arguments ()” and highlights “String selectedDirectory = selectFolder();” I’ve got both Processing 1.5.1 & ControlP5 0.7.5 both in the libraries folder. Same things have with any version except the very first which comes up with a different error when I try to run it- NullPointerException and highlights “PImage tempImage = loadImage(directory + “/” + loadFilenames[playFrame]);”

  23. Pat says:

    Ah, my bad. I was running Processing v.2 by mistake. Seems to be rendering now. Thanks a lot!

  24. Pat says:

    Loving it so far! Amazing! Just wondering is there any somewhat simple way (not having to change heaps and heaps of code) to change it so it scans at a faster rate so I don’t have to way 30secs for a 720p comp to fully refresh? I’ve seen some other examples in AE projects where you can change it to 2 pixels wide and although it becomes slightly more blocky, it will refresh quicker. That possible?

  25. Amnon says:

    Such things are to a certain extent possible… by changing the code. I have other real-time slitscanning sketches for the TimeOffset variant. However it is not easily activated for this codebase. So the answer is no, there is no simple way to turn on ‘preview mode’ in this sketch.

Trackbacks
Check out what others are saying...
  1. [...] ONEEIGHTNINE® Original: SlitsP5 | SlitsP5:Eternalism blog comments powered by Disqus [...]

  2. [...] were either afraid of the learning curve or simply disappointed with the HD options out there, then this is the script for you! It’s really quite an easy process to perform.  Even if you have no experience with Processing [...]

  3. [...] wanted to test out this new and exciting slit-scan Processing script that designer Amnon Owed created.  I went searching for whatever video I already had on my computer.  Since the creativity project [...]

  4. [...] sent the shot through Amnon Owed’s awesome slit-scan processing script twice.  Once running on the X-axis and the other on the Y.  Due to the large number of frames [...]

  5. [...] http://amnonp5.wordpress.com/2011/01/16/eternalism-the-art-of-slitscanning/ Tags: generative, processing, slit-scan Posted on Sunday, May 15th, 2011 at 4:00 pm , filed under [...]

  6. [...] 2011 · Leave a Comment  Just a quick update with some exciting news. My short film Eternalism was selected for two festivals. It’s really amazing to me! I still have so much to learn and [...]

  7. [...] Slitscan doodles made with Amnon Owed’s awesome Slitscan Processing script. [...]



Follow

Get every new post delivered to your Inbox.

Join 92 other followers

%d bloggers like this: