tsulej / GenerateMe

Processing scripts used to generative glitch / art / design
The Unlicense
962 stars 231 forks source link

CompositeTVSimulator batch Processing(losing hair) #17

Open tinyjapaneselunches opened 1 year ago

tinyjapaneselunches commented 1 year ago

Very new and accidentally left this in another issue folder. Can someone explain batch processing to me. I have everything set up the right way but don't get the process. If I'm just processing a folder, do I need the filename filled out? I did that and get a NullPointerException error. Also, if I do get this right...you just press 'b'? Do you press the play button first? Well I would think yes, obviously, but I'm just trying to make sense of all this.

genmeblog commented 1 year ago

Generally all of this scripts require some preparation, especially batch processing (sorry, no convenient gui :/ ). Can I assume you can run a sketch and produce the result for a single file? If answer is yes, do the following:

  1. create a subfolder, say images
  2. put all your images into this folder
  3. be sure this is set to your file extension .jpg for jpegs, .png for pngs.
  4. replace this line with String foldername = "./images";
  5. run the script
  6. press b and wait
genmeblog commented 1 year ago

One more thing came to my mind: set the filename to the exising file.

tinyjapaneselunches commented 1 year ago

Sorry...just saw this. I can't run the script. This is what it says: NullPointerException "The file "./imagesimages.jpg" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable." All the settings you told me are the ones I just did and that's the error message I get. Also, when I run the script and get the error, it leads me down the code to a certain point and highlights this: buffer.beginDraw();

Any ideas? Again....ultra Noob/Padawan here.

tinyjapaneselunches commented 1 year ago

Just tried it again and now it's highlighting this: buffer = createGraphics(img.width, img.height);

genmeblog commented 1 year ago

Ah, my bad, sorry!

Point 4 should be (slash / at the end of folder name):

replace this line with String foldername = "./images/";

tinyjapaneselunches commented 1 year ago

Nope. Still the same message. It again brings me down to line 109 which is: buffer = createGraphics(img.width, img.height);

I think this line of code is what needs to get changed maybe? Not sure, but the error message always leads me to this particlular line.

tinyjapaneselunches commented 1 year ago

Can anyone answer this question for me? Kinda time sensitive.

genmeblog commented 1 year ago

Which version of Processing you are using? Should be 2.x Can you run the version from github? Do you have composite_video_simulator.pde and test.jpg files inside "composite_video_simulator/" folder?

tinyjapaneselunches commented 1 year ago

I'm running 2.21. That was the recommended version from when I first downloaded the generateme scripts. I'll try running on the github version and get back to you ASAP. Everything is in their respective folders. I've been using these scripts for quite a while for artwork and this is the first time I'm trying batch processing. I'll let you know if the github version works in a minute.

genmeblog commented 1 year ago

ok, ready to support you

genmeblog commented 1 year ago

verifying also on my side

genmeblog commented 1 year ago

Ok. works on my side:

Folder structure is like that:

image

Setup is like following:

// set up filename
String filename = "test1";
String fileext = ".jpg";
String foldername = "./images/";

Press 'b'

[...]
test5.jpg... to YIQ
composite chroma lowpass
chroma to luma
preemphasis
video noise
chroma from luma
fm
chroma noise
chroma phase noise
vhs luma lowpass
vhs chroma lowpass
chroma vert blend
vhs sharpen
svideo out
chroma loss
composite recombination
composite chroma lowpass out
from YIQ
done
render scanlines
saved
results saved in ./images/A34630B7 folder

image

Please note that there should exist file "./images/test1.jpg".

tinyjapaneselunches commented 1 year ago

I'll try this. Should they all be labeled as 'test' for the images?

tinyjapaneselunches commented 1 year ago

I'll take that as a yes.

tinyjapaneselunches commented 1 year ago

SUCCESS!!!!! That worked!! Thank you sooooo much! Now all I need to do is grow my hair back. This is awesome!!!

genmeblog commented 1 year ago

Great! Share the final result (if possible)!

tinyjapaneselunches commented 1 year ago

I'm working on 2 computers but I'll transfer the files and upload the results.

Apsynth00 commented 1 year ago

I had a problem with -NullPointerException: My solution is check the format File for example if file Test is "Test.jpeg" You need put : String filename = "Test"; // should have 4:3 ratio String fileext = ".jpeg"; String foldername = "./";

//If the file is "test.jpg"

String filename = "Test"; // should have 4:3 ratio String fileext = ".jpg"; String foldername = "./";

The photos almost always has a .Jpeg Format.

genmeblog commented 1 year ago

I'm pretty sure it should work on both .jpg and .jpeg extensions. Processing accepts both (this is the same format btw). I would verify file names (some filesystems are case sensitive some are not).