Making Generative Art | Intro to Processing
Vložit
- čas přidán 1. 07. 2024
- Learn how to make generative art with processing, no programming knowledge required! In this tutorial I will teach you the basics of programming, and we will make some art together.
Processing is free and can be downloaded here: processing.org/download/
Final code from this video: github.com/hapiel/intro_to_pr...
0:00 Introduction
0:35 What is processing
1:40 Functions
3:53 Variables
7:06 Built in variables and the setup + draw functions
8:56 Loops
12:44 2d grid
15:53 Random
18:49 Final project
29:10 Learn more about Processing
You can follow me online for more creative and technological content.
Twitter: / hapiel
DanielSimu.com
If you'd like to create something together, send me an email:
hello@danielsimu.com - Hry
I've been looking for a video that explains basics of generative art with examples.... pretty much BANG ON - the way you did it!! This video is one of the ideal first steps for whoever wants to become a code generated artist...I sincerely want to THANK YOU for your efforts 🙏
You're very welcome!
This is awesome! Subscribed immediately! So clean and clear!
Great introduction to generative art! I rarely watch 30 minutes videos but this one was definitely worth it!
exactly, i just search about coding and art, and im glad i found your clip video which light my way to be a generative artist!
Really great work dude, so comprehensive, thank you
Super cool and inspiring, Daniel. I want to jump in and make some art in Processing right now!
thanks so much for this ! i’ve been trying to explore Processing and this tutorial made it super easy.
Thank you for the great tutorial! I like how you build up to the final result by incrementally introducing concepts one at a time.
Thank you!
amazing video, really well made and informative. excited for more!
Fantastic introduction! I've been curious about Processing ever since I saw it used a decade ago for some very cool generative wallpapers. I'm finally dipping my toes in now because I think it will be my medium of choice for building mathematically-inspired laser-cut relief artworks.
This is terrific. Please make more!
The best of the best, really a teacher, clear and progressive and a simple way of showing things (I'm in Brazil, thank you so much).
Thank you, I'm glad you like it!
holy shit dude, that was awesome! I was especially suprised how easy it is to change a simple structure with the controlframe at the end. Well done, thank you!!
I'm glad you liked it, thanks for the comment!
waiting for more tutorials like this, love the way you explain
Thank you! I hope I find time soon :)
Excellent teaching - thank you!
I made my first generative art!! Thankyou for this tutorial!! Will be staying tuned!!
Yay, congratulations! I hope to see the stuff you come up with some time :)
I just discovered this application and its so fun to learn
Great informative video - thank you for sharing!
Toffe demonstratie, vooral met al die sliders op het laatst!
Really helpful video man, thanks a tone👌🏻
Thank you so much you were the first person to teach me so I am able to get into processing thank you so MUCH!!!!!
So happy I could help :)
OMG I made my first generative art! I have zero coding experience but this was easy to understand and follow. Thank you for this tutorial!
Yay, congratulations!
Great video !! Thank you.
Ending part is lovely, you are awesome :)
Thank you! You are awesome too!
SUPER GREAT TUTORIAL🔥🔥🔥🔥🔥 thank u alot broo
Great tutorial. Thanks! Thought your re-takes were quite funny, glad you kept them in :P
Whilst editing I discovered that I messed up the second time as well, and I was so annoyed by that that I totally forgot to cut the first one out!
But you're the first to comment on it, hopefully nobody else noticed ;)
@@DanielSimu I noticed but I loved it! those moments are always great for a little giggle. Makes learning something new less intimidating
lIke the way you explain. Thank you Dani
My pleasure!
Great video - used it for an introduction to Processing, very cool program
I'm glad you're enjoying it!
Thanks you Daniel that was very helpful
I'm glad it was! Thanks :)
thank you!! hope u make more videos like this
Thank you so much for this tutorial!
You're very welcome!
Thank you! Well explained!
You're welcome!
I wish we had more videos of you coding, was able to follow you easily
Thank you! I'm planning to do more, but it's gonna take a while before I find the time.
Great content. Keep it up.
Dude this is amazing thanks for sharing your information
My pleasure!
Great tutorial, honestly one of the best I've followed.
Thank you!
Good teaching style :)
That was doooope!
very detailed, thank you:) (although i don't think i'll code lol too complex!)
Nice video :)
I've been programming with Processing for 3 years and I would have loved to see this video when I started
Thanks Flolo!
love this intro video, very well put together and easy to follow. any plans on following up with some more in-depth concepts within processing?
I hope I find the time!
so cool! thank you!
so welcome!
Great video
Thank you SO MUCH!!
You're SO WELCOME :)
This is really good.
Thank you!
Thank You!
You're welcome!
really great video!
Thanks :)
MERCI DANIEL !
AVEC PLAISIR! :)
help a lot ! thanks
thank you so much
Fun stuff!
Thanks! I'm sure there must be Processing libraries that can track objects in a webcam, it might be a very good platform to create juggling animations with!
Awesome! thank you for sharing! Would you happen to know how could I draw ellipses tangent to each other?
thank you, I had a play around with this- super helpful. What is the process for outputting still images from the sketch results- for example an image file of the artwork. Is there a native export image or video function inside processing- or is code required? many thanks
try adding: save("filename.png"); at the end of your sketch.
Hi Daniel, do you have more videos on creating the slides section? I want to create that to allow other people to manually play around and export what they did using my parameters. Exports in PNG/SVG/JPG
Dankje!
Awesome thanks!
Glad you like it :)
@@DanielSimu Are you gonna do more processing stuff?
@@Guus Likely so, I wish I had more time but it will happen some time!
@@DanielSimu I'm gonna stay tuned for that!
I read many places that indeed Processing it is jit compiled.
But when I compare it to Python, it's always just as slow or slower.
And when I jit compile Python with numba (jit), then it's like 50x slower.
BTW, I do love Processing!
This very simple test processing.py sketch runs in 11,4s:
def adds(x):
a =0
for k in range(1,x):
a+= sqrt(abs((sin(k) + cos(k))))
return a
start = millis()
a = adds(10000000)
dt = millis() - start
print(a)
print(dt)
and this one in Python (exactly the same), runs in 5 seconds:
from timeit import default_timer as timer
from math import *
def adds(x):
a = 0
for k in range(1,x):
a+= sqrt(abs((sin(k) + cos(k))))
return a
start = timer()
a = adds(10_000_000)
dt = timer() - start
print(a)
print ("Tempo: %f s" % dt)
and if I add the @jit decorator after importing numba, then it runs in 0,2 seconds... 50x faster than Processing.
If processing is not really compiled, is there a way to jit compile it?
Thank you so much,
Sander Manzoli
I don't know how processing (or Java) is compiled, but if you need high performance there are probably better solutions for any specific task. It's not designed to do complex calculations efficiently, it's designed to make art easy.
How do you do the pencil thing to draw over you screen? Neat tool!
Great video thank you! How can I center the grid? and How do I create a random that starts at 4 for example so I'll have control over the min size of the squares.
figured out the random thing. what's the most economic way to center the grid?
A random that starts at 4 is easy: random(10) + 4; is between 4 and 14.
The grid is the exactly same, add or subtract an amount to each coordinate to offset the grid.
Just sub'ed - hope you still doing cool code in 2024!
Thanks! Not as much as I wish, but hopefully soon more!
hey daniel super cool work! Any chnace i can see the code for your final project with the sliders?
I just published all the code here:
github.com/hapiel/intro_to_processing
At 14:56, we reach number 9, not number 10 as you state.
Thanks for a great video, with a very pleasant Dutch accent.
Thanks! Actually the script does draw 10 boxes in each column, but my canvas is too small to see it. My bad!
Exccellent
control frame is cool..
yes would love to see how you created the ControlP5 frame that functioned on an existing window ... I installed like you commented below but not connected to current sketch - thx
Open Examples > Contributed Libraries > ControlP5 > extra > ControlP5frame
It took me a while to find this one too, but within the example it should hopefully become clear how to use it!
And alternatively, there is now a link to the source files in the video description
@@DanielSimu thank you ... great video btw
What did you use to record? With the ability to draw on screen and keyboard actions in real time
hey daniel. I have mac catalina and processing stop showing the sketch. Do you know what could be the problem?
can you share any online resource with instructions on how to get your control p5 sliders on to a separate window?
Good question! Open Examples > Contributed Libraries > ControlP5 > extra > ControlP5frame
It took me a while to find this one too, but within the example it should hopefully become clear how to use it!
Thank you 🙏 brother the most clear tutorial I've ever seen on processing till now, I'm just stuck on how to get that sliders option can u tell me how to make it work i will reach you out on twitter
The sliders are too difficult to explain in one comment, which is why I left it out of the video too, but in the description of the vid you'll find a link to my source code which includes sliders.
@@DanielSimu i found it but i have no experience in coding so where i should post that code please
Hi. Thanks for the tutorial. I have a home made pen plotter. This is my start of using processing. It takes quite a bit of digging about the net to get an idea how to generate art for my plotter. Could you tell me how you would go about converting this output to gcode. Thanks again
Hi, I think processing features PDF export, which you can convert to svg easily, and then there are loads of tools to convert svg to gcode. I personally use vpype with gcodetools for this.
However, I think processing is not ideal for pen plotting paths, so I am now using vsketch which is a python library. Vsketch is very similar to processing but it is designed specifically for pen plotting. I'll soon make a video about it, hopefully this weekend even!
@@DanielSimu Hi Daniel. First of all thank you for responding and taking the time with your tutorial. I will of course look into V sketch. Looking forward to your new tutorial. I've got my A4 plotter built and I'm ready to progress further. Thanks again for your time.
Thanks! ✨ you are awesome presenting info⭐️⭐️⭐️⭐️⭐️ installed control p5 library ...can you do A HOW TO VIDEO, please 🙏🏼?
Yes, it would make sense if I do that! I'll have a think on how I could make that in a way that makes sense. In the meanwhile, I encourage you to play with the many examples that come with controlp5, they'll make it quite obvious how to use it I hope!
super fun! created what you showed!
love your hair, I had the same. but cutted out )
hello lets presume i created an art work in processing . how can i export it into a png file
Can we create math animation like animating any math equation using processing ??
Sure! The only limit is your imagination!
Se puede hacer esto en Python?
I found when I run out of elastic bands for my hair I ask the vegetable clerk at the grocery store for left over broccoli or green onion bands.
Is there a way to get rid of the blank space (margins) on the top and left by any chance? Thanks in advance!
Of course, just subtract from the position values.
For example: rect(i * 80 - 80, i * 80 - 80, 50, 50)
Or, right now I started drawing when i == 1 but it is more common perhaps to start when i == 0, then you also don't have margins.
@@DanielSimu Thank you very much! Really hope to see more content like this from you soon! Absolutely amazing!
what happened in 21:26 ?😂
your expression made me laugh out loud
Is there a way to make it out put every variable as random... so every single output will be random ?
I don't understand what you mean
@@DanielSimu I think he means randomly create x amount of files.
Also, after creating randomly generated files how can I save each file numerically going up i.e:
Squares #1
Squares #2
etc.
Great content! Im subscribing.
Hi. what I don't know how to program, which language is best for me to learn to make generative art?
Processing of course, which is why I made this video about it :)
@@DanielSimu is better than p5?
Where is control frame? i didn't found it? Can you show me where is it?
you need to download the ControlP5 library
how to make the text to image ai?
Hi love your video but only have integrated graphics, will it still work?
Yes, you don't need a good graphics card for this at all, processing will run on a potato if needed!
@@DanielSimu Well I now know I don't need any extra graphics, thank you but will the Potato in my skull be up to it.
@@spiralspirit7604 That's where this video comes in, I made it to be potato proof (if you watch it 3 times ;) )
how can I add some sort of animation with this?
You will need to put everything in the 'draw' function (see 7:30) and then include some variable that is different every time the draw loop runs, for example by using :
myVar = myVar + 1;
Good luck
What programming language are you using ??
Processing, which is built upon Java
How do I export my work??? like to a gif or somthing else
Please someone tell
Add this to the bottom of your code:
save("name.png");
@@DanielSimu Thankuuu
Any one know how to randomly generate 100 piece series?
Throw all of the code from the tutorial in one big loop ('for' loop, or 'while' loop as shown in video)
Then in every loop include a save() function, and make sure the save includes the loop number so you don't override your old files (so something like save("my_img" + i + ".png"); )
Good luck!
@@DanielSimu nice thank you for the advices 😍
Vond net je video en lijkt me erg leuk.
Ga je nog meer videos over Processing maken?
Ik ken het werk van 'The Coding Train'
Deze man maakt ook mooie zaken met Processing en J5: twitter.com/Hau_kun
Please can you do the translation arabic
0:10 third artwork a lil sus
can you make nft with processing?
how do you make a java organic art in 2 lines LOL ^^
i am just cursed; i will never be able to learn how to code. my code is exactly yours and i get errors "the method rect(float, float, float) in the type PApplet not applicable for the arguments (int, int, int). it happened with javascript too. so frustrating.
The rect() function requires 4 arguments, it seems you've only input 3 of them! Don't give up yet, I'm sure you can learn this :)
@@DanielSimu omg thank you. i feel so dumb. hahaha! unbelievable. this stuff is *so* fascinating. makes me look at nature and the world/universe differently. thank you again!
@@gurpchirp Haha, such a contrast from your previous comment. I'm glad you're discovering this!
@@DanielSimu dude, i was *so mad* lol. i keep on messing up with coding, but i want to be good at it.
can you make a project jsut like BAYC or CryptoPunks? its it NFT on the ethereum blockchain? They have 10,000 copies each one being different, with all types of traits. they also code it. can you do a project like this? Let me know..
@hashlips has some cool tuts for this : czcams.com/video/3c2EFpCr_vY/video.html
Geef je cursus in Nederlands?
Het lijkt me leuk eens ergens een cursus te geven, als ik gevraagt wordt!
I hate math...
Me to, but the patterns it makes are so beautiful 😭