You are computing the whole vector field every frame even though you only use a fraction of the vectors. Give the perlin noise function as an argument to the vector follow function and compute the flow vector once per particle instead. It should improve your performance significantly and make it independent of the resolution and only depend on the number of particles.
A minor extra optimisation could be to save the calculated vector in the flowfield array so that particles in the same square can share it, assuming that wiping the array on each cycle doesn't slow things down again.
Hey Emily, I see what you mean here! Nice tip. There is a lot of empty space that isn't actually touched by any particle, and it would make sense for each particle to calculate the vector of the "cell" it is currently occupying. I'm confused about one thing though. If the flow vector is only calculated once per particle, it seems like it would become less of a "flow field" and more of individual particles moving along a perlin noise defined 2d path, totally separate from other particles. Is that how you see it? So if two particles are close to each other, it may loose that appearence of a flow field?
Drew André I'm not totally sure, but I'd imagine that all the particles would still behave like they all exist in the same flow field because they all access the same noise space, and the zoff variable would be changed globally. I think.
Definitely. It is great he's sharing on youtube too, though. youtube reaches a lot more people and mostly people who are actually looking for content like his. Computer science students often need to take whatever class they're in if they want to graduate so the level of enthusiasm for what is taught tends to be lower.
Instead of setting a max speed you could create a viscous friction force so that it's proportional to the particle's speed, that way everything will behave more like a fluid
When your particles 'wrap around', you're giving their position space a toric symmetry. But the perlin noise doesn't have the same symmetry so it will be discontinuous at the boundary of the canvas.
Using a 3d Perlin evaluated on a toroidal surface could potentially help here. Or continuously creating new particles at random locations as particles fall off of the edges.
Hey Dan! I like watching all your videos and wish I had a teacher like you at my University. You explain the most convoluted of things in a very fun and easy way. Taking them part by part. I am really thinking of applying for the Masters program at NYU after watching your videos.
This was my favourite illusion yet! This would look so cool if it were a candle blow out animation. You should keep it exactly as is but delete (or let the alpha fade out over time) previous points so that it creates a more dynamic smoke effect!
I like you. You make your code big enough, so even with a resolution of 144p i can still read it. I know, i should get faster internet. But it is so expensive!
Didn't realize it's that expensive in Germany, but guess the "nowhere near civilization"-part has something to do with it :) You should move to Sweden, I pay like 15EUR/month for a 100MBit connection.
I got wayy into optimizing this. I can simulate 50 000 particles for 500 iterations in a second. The color of the traces can be dynamically changed. Thinking of making a video of it at some point.
Not sure if someone has said this yet, A problem that I've seen is that when you draw the line from prevPoint to pos, there's some overlap of the lines, which if you're using alpha will produce circles at each of the points where the line is drawn. If you have a maxspeed which all of the particles reach, they end up creating dots at a uniform distance from each other. A fix that I think works is to add "strokeJoin(MITIR)" which makes all of the points at which the strokes join a flat line instead.
ProCactus Hahaha! Exactly, my man. These concepts and ideas are really interesting - and his energy and enthusiasm reminds me of the "perfect" college professor. Hehe. He's really fun. I remember 2 quotes: "The secret to creativity is knowing how to hide your sources" and "Steal like an artist". We'll stand on the shoulders of giants! ;)
***** ProCactus Hahaha! Nice! If you guys are on github (which is a must), you can upload your codes there so that we can all learn together. ;) Have fun guys!
I was trying to figure out a way to make the smoke like lines fade over time, and I'm not really a programmer, so I'm really just spitballing here, but one option might be to have the smoke draw on a transparent white layer that also draws every time the program draws. So every time it's adding a bit of white to everything that wasn't just drawn, eventually making old lines fade out. There's probably a better way to do it, and I'm not sure if my way would even work.
I have a question, I want to build a Indie game, with sound, and good graphics, and I want to code the whole engine myself, not use unity or anything, what language should I be using for such task? It's a Puzzle Platformer, and some creature like enemies will be in the game.
do you do these tutorials for the processing version? because i want to start learning processing more but most of the interesting projects are on p5js
I do not understand 25:30 - Why do the vectors mostly point toward left? And why multiplying by 4? If noise returns between 0 and 1 and we multiply by 2PI we should have already the correct values... What am I missing?
When the increment variable was set to 1, all the tiles were mid grey. He then changed it to 0.1, and he got more variation, but nowhere near a range between black and white.
Referring to 6:50 I wasn't able to get a new angle to change the vectors. All it displays is the lines shown at 6:45 no matter what I put in p5.Vector.fromAngle(). I have P5 imported correctly. Did anyone else run into this issue?
Would you mind asking at discourse.processing.org/! It's a better platform for Processing and p5.js related code questions. You can share code there easily! Feel free to link from here to your post.
Thank you soooo much!! I really like Perlin noise! And I tried to follow the processing you upload in the Github...Can I ask why the effect is different from the version of p5js? sorry about the stupid question, I am just the beginner...
I made some sort of cube that has set length random directed 3d lines in every scl in every axis. I did not use a vector however, but it seems my lines tend to be aligned on a plane. I could post my code here if anyone is interested. I don't think I succesfully made a vector field but I can't really inspect it properly. I think what I made is layers of 2D vector (well they aren't vectors but lines) fields. You also need to download the peasycam library to rotate around. I don't know why I'm writing all this considering nobody cares.
DUDE I MADE IT! It's so damn SATISFYING to see 3d vectors wander over time! I mapped every vector's hue to the perlin noise in its coordinates. It currently lacks particle systems but I think I got this. Not too bad for my first procesing program lol
At around 13:30 of the video, what does the line this.acc.mult(0); do? I know that it is multiplying the acceleration vector by a zero scalar, but what does that actually do?
Yeah, you would have to decrease regularly the pixels' luminosity by drawing a new point over each of them, with the luminosity of the pixel in question minus a certain gradient
i was following along i wrote the code var increment = 0.01; var scale = 20; var cols, rows; function setup(){ createCanvas(200,200); cols = floor(width / scale); rows = floor(height / scale);
} function draw (){
var yoffset = 0; for (var y = 0; y < rows; y++) { var xoffset = 0; for (var x = 0; x < cols; x++) { var index = (x + y * width) * 4; var r = noise(xoffset, yoffset) * 255; xoffset += increment; fill(random(255)); rect(x * scale, y * scale, scale, scale); } yoffset += increment; } yet for some reason i could not get the cubes to show
Can i see the code for the processing version anywere? I tries myself and it works but doesent look as cool as in the version in the video and i want to check whats diffrent Sry for my bad english
Won't run... looked over the whole tutorial, went to your github, getting errors... none of the functions you are calling for particles[i] are recognized...
You are computing the whole vector field every frame even though you only use a fraction of the vectors. Give the perlin noise function as an argument to the vector follow function and compute the flow vector once per particle instead. It should improve your performance significantly and make it independent of the resolution and only depend on the number of particles.
Really great point, thank you.
A minor extra optimisation could be to save the calculated vector in the flowfield array so that particles in the same square can share it, assuming that wiping the array on each cycle doesn't slow things down again.
Hey Emily, I see what you mean here! Nice tip.
There is a lot of empty space that isn't actually touched by any particle, and it would make sense for each particle to calculate the vector of the "cell" it is currently occupying.
I'm confused about one thing though. If the flow vector is only calculated once per particle, it seems like it would become less of a "flow field" and more of individual particles moving along a perlin noise defined 2d path, totally separate from other particles. Is that how you see it? So if two particles are close to each other, it may loose that appearence of a flow field?
Drew André I'm not totally sure, but I'd imagine that all the particles would still behave like they all exist in the same flow field because they all access the same noise space, and the zoff variable would be changed globally. I think.
ill do it soon
Just watching some of your older videos Dan. Makes me wish I had you as a comp sci professor in college. I would've loved it so much more
Definitely. It is great he's sharing on youtube too, though. youtube reaches a lot more people and mostly people who are actually looking for content like his. Computer science students often need to take whatever class they're in if they want to graduate so the level of enthusiasm for what is taught tends to be lower.
Instead of setting a max speed you could create a viscous friction force so that it's proportional to the particle's speed, that way everything will behave more like a fluid
Man i love this guy´s attitude and character =). So excited about what he is doing and a real sense of humor!
When your particles 'wrap around', you're giving their position space a toric symmetry. But the perlin noise doesn't have the same symmetry so it will be discontinuous at the boundary of the canvas.
Oh, this is a very good and important point, thank you!!
I love these videos - don't change a thing!
Is this why the particles are getting stuck at the canvas border?
Using a 3d Perlin evaluated on a toroidal surface could potentially help here. Or continuously creating new particles at random locations as particles fall off of the edges.
Hey Dan! I like watching all your videos and wish I had a teacher like you at my University. You explain the most convoluted of things in a very fun and easy way. Taking them part by part. I am really thinking of applying for the Masters program at NYU after watching your videos.
I'm an accounting major but can't seem to stop watching your videos even though I understand absolutely nothing. Great work.
This was my favourite illusion yet! This would look so cool if it were a candle blow out animation. You should keep it exactly as is but delete (or let the alpha fade out over time) previous points so that it creates a more dynamic smoke effect!
This is the most beautiful thing I've seen this day, shame on me that I haven't checked all of the coding challenges yet..
These are by far my favorite coding videos and are getting me interested again in coding. Thank you for that.
Was looking for inspiration for generative art for pen plotting and this video is still useful, 6 years later. Thank you!
I don't know anything about programming, but stil I'm watching your videos, because you're so excited about it. 😅
Philip Merian Why not start learning now? Daniel has a ton of great videos for beginners!
@@JesseUnderscoreMartin Yea i agree Rebnoz should learn coding! Its not hard and is more than good to learn!
I like you. You make your code big enough, so even with a resolution of 144p i can still read it.
I know, i should get faster internet. But it is so expensive!
Wow, that's dedication... I couldn't bare to watch anything in 144p :)
salle rc Yes. But imo it is not worth 50$ a month more just to watch them in 360p...
Michi Lo Ah I see. That's expensive, where do you live?
salle rc Germany. Bavarian Forest. Nowhere near other civilisation.
Didn't realize it's that expensive in Germany, but guess the "nowhere near civilization"-part has something to do with it :) You should move to Sweden, I pay like 15EUR/month for a 100MBit connection.
I got wayy into optimizing this. I can simulate 50 000 particles for 500 iterations in a second. The color of the traces can be dynamically changed. Thinking of making a video of it at some point.
Would be great to see that video and code.
Thank you very much for this series! You are a very talented teacher
+Stephen Walsh thank you for watching!
Not sure if someone has said this yet, A problem that I've seen is that when you draw the line from prevPoint to pos, there's some overlap of the lines, which if you're using alpha will produce circles at each of the points where the line is drawn. If you have a maxspeed which all of the particles reach, they end up creating dots at a uniform distance from each other.
A fix that I think works is to add "strokeJoin(MITIR)" which makes all of the points at which the strokes join a flat line instead.
Thank You! Great video. Fortunately, I didn't have these performance issues... Was running it on 1920x1080 at 5 particles and got stable 80 fps!
I was running in 4k with half a particle, same with me! , no lag at all..
I can't stop watching your videos man!
ProCactus Hahaha! Exactly, my man. These concepts and ideas are really interesting - and his energy and enthusiasm reminds me of the "perfect" college professor. Hehe. He's really fun.
I remember 2 quotes: "The secret to creativity is knowing how to hide your sources" and "Steal like an artist". We'll stand on the shoulders of giants! ;)
***** ProCactus Hahaha! Nice! If you guys are on github (which is a must), you can upload your codes there so that we can all learn together. ;) Have fun guys!
Me neither and i have never even written one bit in any Coding Language =)
I KNOW THAT FEEL
Me2 haha
dude you are blowing my mind
I can't get over the fact that there are random sitcom laughter clips playing in the background at some points of the video lol
I like the video as fast as my cursor can get to the button. Succinct as always. Thank you.
25:42 the people laughing in background feels like he is doing a comedy skit.
I was trying to figure out a way to make the smoke like lines fade over time, and I'm not really a programmer, so I'm really just spitballing here, but one option might be to have the smoke draw on a transparent white layer that also draws every time the program draws. So every time it's adding a bit of white to everything that wasn't just drawn, eventually making old lines fade out. There's probably a better way to do it, and I'm not sure if my way would even work.
I swear to God I want that t-shirt so bad hahaha. You're always so fun and interesting to watch, keep up!
The way the particles are limited with a maximum speed reminds me of how light is limited as the object with the maximum speed in the world.
You could use the Simplex Noise algorithm its more effcient and does the same thing.
All my Simplex Noise Flow Field creations as CodePen TV: codepen.io/tv/Dwgqqd
awesome work!
"There's a bunch of few different things" xD
That is a really nice program. Good job mate.
Thank you!
I have a question, I want to build a Indie game, with sound, and good graphics, and I want to code the whole engine myself, not use unity or anything, what language should I be using for such task? It's a Puzzle Platformer, and some creature like enemies will be in the game.
The crux.
Such a great word.
Im the only one hearing those creepy laughs ?
AHHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAH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AHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAH
No you aren't
i think they are having party next door.
Love it!
Even though what you did in the end was pointless
Just brutal watching this guy fumble and stumble over text that brackets his life.
I went back and watched them. Now I'm here.
0:06 omg nice, this looks great
:D
where is this video on wind flows based on geo locations! !! Dying to see this!
25:00 the force is strong with this one
8:57
you are a great loving tecaher Daniel :)))
+Danial Shiffman Love the videos. I enjoy following along using processing and learning a bunch including the converting from P5 to processing.
thanks a lot for such amazing stuff... looking forward for upcoming videos
Thanks for watching!
do you do these tutorials for the processing version? because i want to start learning processing more but most of the interesting projects are on p5js
n dimension Perlin noise = the sound of minds being blown right now
Thanks a lot :-)
Now i make beautifull pictures in Java.
That's a nice playground.
Wow! 🤩
I do not understand 25:30 - Why do the vectors mostly point toward left? And why multiplying by 4? If noise returns between 0 and 1 and we multiply by 2PI we should have already the correct values... What am I missing?
When the increment variable was set to 1, all the tiles were mid grey. He then changed it to 0.1, and he got more variation, but nowhere near a range between black and white.
The values tend to be around 0.5 so if you multiply by 2PI they will tend to be around PI (which is the left direction).
@@iminni3459 Does this have to do something with the Gaussian distribution?
@@Kitulous maybe I'm not really sure
i challenge you make random moving particle and make attraction each other like gravity
21:20 for a second i thought hes not wearing pants
Oslo Cloonson Yep, I did a double-take too. Deception 100
Thank you, great video
when the particles wrap you're updating their position before you set the previous one
we know we're like 6 years late but just fyi
love how detalied the tutorial is haha
"We need to talk, meet at this camera. Actually never mind."
-Shiffman 2017
This is so rad. I'm loving your books Dan.
Thanks for the nice feedback!
Sorry for such a silly query, but shouldn't zoff be incremented outside the y loop?
my computer just lags when I try to follow these instructions line by line midway through the video. not entirely sure how others are doing.
This was Uploaded on my birthday, Man... June 27th is an awesome day
+Toby Brooks happy belated!
Thanks Dan, and Thanks for the Great Video !
Toby Brooks we share the same birthday.
@0:38 the good feeling when u really do it..
Referring to 6:50 I wasn't able to get a new angle to change the vectors. All it displays is the lines shown at 6:45 no matter what I put in p5.Vector.fromAngle(). I have P5 imported correctly. Did anyone else run into this issue?
Would you mind asking at discourse.processing.org/! It's a better platform for Processing and p5.js related code questions. You can share code there easily! Feel free to link from here to your post.
Whats the algorithm for the audio background noise?
And remember kids: Shiffman is a particle
learn a lot, thank you !!!
Thank you soooo much!! I really like Perlin noise! And I tried to follow the processing you upload in the Github...Can I ask why the effect is different from the version of p5js? sorry about the stupid question, I am just the beginner...
excellent work
I want to do a colorful version in 3d space that rotates around the origin. Welp, time to learn processing.
I made some sort of cube that has set length random directed 3d lines in every scl in every axis. I did not use a vector however, but it seems my lines tend to be aligned on a plane. I could post my code here if anyone is interested. I don't think I succesfully made a vector field but I can't really inspect it properly. I think what I made is layers of 2D vector (well they aren't vectors but lines) fields. You also need to download the peasycam library to rotate around. I don't know why I'm writing all this considering nobody cares.
DUDE I MADE IT! It's so damn SATISFYING to see 3d vectors wander over time! I mapped every vector's hue to the perlin noise in its coordinates. It currently lacks particle systems but I think I got this. Not too bad for my first procesing program lol
Carlos Valencia I uploaded a short clip on my channel come take a look
omg! you're awesome!!!
Thanks for watching!
Does this mean processing is way more efficient than P5 ?
How is this possible to export it in SVG file format?
Where's the starting code, I would like to code along.
At around 13:30 of the video, what does the line this.acc.mult(0); do? I know that it is multiplying the acceleration vector by a zero scalar, but what does that actually do?
I cover this in section 2.3 of nature of code! natureofcode.com/book/chapter-2-forces/
Does anybody have the code for the processing sketch?
i like your videos man , but i am too busy with with c++, can i do this in c++ ? i do plan to learn JS in the future
Is there a way to delete the drawn pixels after an amount of time, so you can run an infinite animation and create some kind of "snakes"
Yeah, you would have to decrease regularly the pixels' luminosity by drawing a new point over each of them, with the luminosity of the pixel in question minus a certain gradient
Alternatively, draw over the entire screen with the background color but a very small alpha, so rather than clearing it's fading the old
why do the points disappear over time? I'm at 25:07 of the the video
انت انسان مبدع
mohamed mhmood ALLAN SNACKBAR
Jesus Christ Lol ur the best
Is the code to this in the processing version avaiable anywhere?
thanks 😘
Your awesome
I'm confused, can you use function draw() in say notepad, or is it something specifically used within p5?
i like your videos, but preview of your finished work could be longer, because right not it to short i think.
"So I'm moving through time a little bit too quickly".
This is a normal quote from a completely normal person that didn't use drugs 10:40 minutes ago
Im new to this, how do I get started? I know some js, but willing to learn more.
8:33 Does The Coding Train have a laugh track? (EDIT: That was not intended as pun.)
i was following along i wrote the code
var increment = 0.01;
var scale = 20;
var cols, rows;
function setup(){
createCanvas(200,200);
cols = floor(width / scale);
rows = floor(height / scale);
}
function draw (){
var yoffset = 0;
for (var y = 0; y < rows; y++)
{
var xoffset = 0;
for (var x = 0; x < cols; x++)
{
var index = (x + y * width) * 4;
var r = noise(xoffset, yoffset) * 255;
xoffset += increment;
fill(random(255));
rect(x * scale, y * scale, scale, scale);
}
yoffset += increment;
}
yet for some reason i could not get the cubes to show
my rectangles have some kind of a freaky shadow on the inside of the right edge.
Can i see the code for the processing version anywere?
I tries myself and it works but doesent look as cool as in the version in the video and i want to check whats diffrent
Sry for my bad english
Try thecodingtrain.com/CodingChallenges/024-perlinnoiseflowfield.html
Thank you🙏
if u have not watch my videos on Perlin noise , go watch and come back ! In the same line , ha ! u are back!
What am I supposed to not do about it
I change the background to black and the line to red looks like blood vein. Thats cool but i need many time to understand
can you tell me how please?
Top Notch
he didnt use it as thumbnail
I feel like people are making perlin noise in the background
this is awesome
does anybody know a lib for python to do some similar drawing ?
I do love this channel but I prefer to use py
PyProcessing: it's the Python version of Processing. see py.processing.org
webassembly to the rescue
Okey I liked
33:21 when a man enters a woman’s bathroom 😂
WOW
Can you please share the code of the Processing version as well please
Can you file a github issue at github.com/CodingTrain/website if it is not available there?
Won't run... looked over the whole tutorial, went to your github, getting errors... none of the functions you are calling for particles[i] are recognized...
You had p5.js installed, right?
Is this a hair generator?
The background noise is so perturbing
edges function can be simplified:
this.pos.x = this.pos.x % width;
this.pos.y = this.pos.y % height;