kzbin.info/www/bejne/a37IdIBsfs-UpKM simulation of particles collide with there trails
@geotyper3 жыл бұрын
kzbin.info/www/bejne/fHi2hYZvp9J9nqs and also instability of solver )
@ImXyper3 жыл бұрын
@@geotyper no
@6-dpegasus4253 жыл бұрын
Any additional instructions for running this? Upon running gcc main.cpp from the src folder, I get an error for No such file or directory at #include
@suzanne43003 жыл бұрын
He doesn't need volumetric simulations for creating nebulae.. His "buggy"code works just fine for that!
@d9gepro23 жыл бұрын
It looks like a star that keeps exploding
@codahighland3 жыл бұрын
@@d9gepro2 To be honest, it kind of is. This isn't THAT far off from being a reasonable approximation of a star. The main difference is that the overshoot is the source of the extra energy here instead of fusion, but both happen because of particles getting shoved together too hard.
@ericrenz60743 жыл бұрын
@2:50 im'a tell my grandkids this was the big bang theory
@transnewt2 жыл бұрын
@@d9gepro2 that’s kinda just a normal star
@HyperMAX90012 жыл бұрын
I thought that Big Bang is similar to this simulation.
@tds66313 жыл бұрын
It looks like a star forming then going supernova Edit: after finishing video, the entire thing just looks like star simulation
@fburton83 жыл бұрын
Exactly my thought!
@turdle694203 жыл бұрын
you're looking at it upside down. This is actually a tie-die teeshirt maker.
@d9gepro23 жыл бұрын
@@turdle69420 Funny Joke
@DaveMackenzie3 жыл бұрын
I thought the same thing, but it also gave me 'big bang' vibes.
@d9gepro23 жыл бұрын
@@DaveMackenzie same
@dinoscheidt3 жыл бұрын
Interesting how semi stabilities with a core and outer layer emerge on its own. Like the sun. Including solar flares. Brilliant video. ☀️
@elliotn75783 жыл бұрын
It's because he's changing parameters like viscosity and attraction force in real time.
@nothingnothing17993 жыл бұрын
@@elliotn7578 no it's literally just an emerging pattern, chaos tends to do that
@jetison3333 жыл бұрын
@@nothingnothing1799 he is changing parameters in real time, but there is moments where it does start to form patterns by itself.
@marcellus51063 жыл бұрын
looka like the sun, but just too tiny too exist. maybe with a billion paricles and some kind of particle fusing, one could try and error its way up to near a real sun. Also about the star Canis Majoris ,its form may be something very similar to 6:42 .
@trs41842 жыл бұрын
hydrostatic equilibrium!
@martinhultman76133 жыл бұрын
Pezzza: "I have a bug in my code". Also Pezzza: Creates a star.
@gobs50612 жыл бұрын
"the power of the sun in the palm of my hand" _Pezzza
@Nothing-f8z3 жыл бұрын
Makes me think our universe could just be a bug in a higher dimension universe
@o1-preview3 жыл бұрын
I wouldn't be happy if someone called my perfectly fine working software to be called a bug hahahha nice work devs, that is, if you're out there!
@serafm45653 жыл бұрын
And God saw it was funny and said: "I'll not fix this crazy sh*t, it's hell'a fun"
@long_chin_man3 жыл бұрын
desinc accelerated backhop into another solar system
@puppergump41172 жыл бұрын
@@serafm4565 That honestly makes more sense than him seeing this as good lol
@aniksamiurrahman63652 жыл бұрын
There's no bug in reality. The universe just Is. It's all feature.
@KingofJ953 жыл бұрын
"It can be exploited to create *funny things*" Truly, this is the thing that binds all avid users of technology together.
@EbonyWolf.3 жыл бұрын
This is probably one of the most beautiful and impressive simulations I've ever seen. I'm pretty sure humanity has discovered the secret of the universe by now, but counted as a memory leak on their program and just fixed it away.
@ledumpsterfire64742 жыл бұрын
You're kind of talking about a counter argument to dark matter there. We can't explain the exponential acceleration of the universe's expansion under the standard model alone, nor does it match up with the amount of matter we see in the observable universe, which can primarily only mean one of two things: 1) There is a hidden force, possibly a form of exotic matter/energy, which is driving expansion ever faster 2) We done fucked up and magic numbered ourselves into a corner because there is something fundamentally wrong with the standard model. We've seriously misunderstood something at the bottom, and it's causing predictions to collapse at the top.
@Rudxain2 жыл бұрын
@@ledumpsterfire6474 *dark energy. I also confused them a lot some time ago, the names are too similar lol
@ledumpsterfire64742 жыл бұрын
@@Rudxain We could be forgiven for that since physicists also often use them interchangeably unless specifically discussing both as separate phenomena. There's a lot of argument that they're ultimately the same thing exerting parallel forces. We don't really know one way or another yet.
@Rudxain2 жыл бұрын
@@ledumpsterfire6474 But, AFAIK, dark matter only has "normal gravity" while dark energy is kinda "anti gravity". But we don't know enough about neither, so maybe they're connected and we don't know it yet
@nikitademodov34463 жыл бұрын
I love this! It's like watching a film but the "script" is just the variables changing. Beautiful stuff as always!
@pipecleanermaster3 жыл бұрын
I wouldn’t say this is funny, I would say this is perfection in art form
@AndrewBrownK3 жыл бұрын
lovely, absolutely stunning Technical question: How does one even stabilize the energy at such high pressures? This is a really valid stress test for any physics engine
@user-sl6gn1ss8p3 жыл бұрын
off the top of my head (and I'm no specialist : p), you can fiddle with the step sizes (either just reduce them all around, or use a method which calculates the necessary size or a predictor), use higher order methods (which take into account the rate of change of acceleration, and it's rate of change, etc), or try to force constraints (like re-normalizing energy or enforcing minimal distances and etc). The first two options can get really slow really fast. The last will introduce other unphysical behaviour. So yeah, as far as I know there's no way to really avoid this given finite time and an arbitrarily large amount of objects : p
@PezzzasWork3 жыл бұрын
"Sub stepping" (ie dividing each simulation step into N substeps with a dt N times slower) is a first possibility which in the end multiply the cost of the frame simulation by N but it's easy to add and quite robust (it also allows for faster moving object without tunneling effect). Another approach which can be combined with the previous one is multiplying solver iterations (we solve the contacts multiple times in each simulation step) which is a bit less costly than real substeps because spatial partitionning doesn't have to be done at each iteration. But as @yout ube said there are no miracle solutions I guess
@EbonyWolf.3 жыл бұрын
@@PezzzasWork I understand about that solution, just increase iterations and you're gtg. But at some point it has to stop, even the universe has a plank time. Is there any way to deal with this issue that doesn't involve adding indefinite calculations for precisions? Maybe not using absolute values for speed and such but use relative values instead? Just guessing.
@WilcoVerhoef3 жыл бұрын
@@EbonyWolf. yes there is an exact method that's quite efficient. You can calculate the exact time of the next collision (because you know all object future paths, and can do some maths on it). Advance all objects to this moment, perform the collision and repeat. This way you aren't limited to the predefined regular step interval. Another, hybrid way is to use step based iteration, like normal. But once a collision (overlap) is detected; calculate back in time the exact moment of collision, and perform the calculation as if it happened already at that point in time. This is what Rocket League does.
@stickguy91093 жыл бұрын
@@PezzzasWork I like your funny words magic man
@jameswhalley74623 жыл бұрын
This is brilliant. I always look forward to seeing your videos as they're generally fascinating.
@ToaTawlee3 жыл бұрын
I love this. Beautiful as always. You're one of my greatest sources of inspiration right now
@dairop32203 жыл бұрын
Same, this channel is awesome. I watched at least one time each of his videos :)
@evolutegamedev93902 жыл бұрын
Im glad im not the only one who noticed the resemblance to the way stars work. we are in a simulation for real
@lollo-ez4nr3 жыл бұрын
This is one of the best video I've seen so far on KZbin! Well done!!!
@TeteBruleeFR2 жыл бұрын
Pezzza's audience : "Absolutely stunning! Mesmerising! Chilling! Enjoyable!" Pezzza's CPU : "Aaaaaaaahh!!" "Thanks guys, but I'm dying down here!"
@mechaniker21112 жыл бұрын
5:28 you just made a star
@maximeg36593 жыл бұрын
amazing job ! looking forward to the publication of the code :)
@Tinkerer_Red3 жыл бұрын
every once in a while i just binge your videos and recently these beta test videos where you discuss the variables and how they effect the objects really give me inspiration to add more to my game. This video and your newest one about smoke have given me two wonderful ideas. Thanks for all the amazing work you put into your videos.
@turdle694203 жыл бұрын
Pizza man always delivering straight gold. Seriously, if bars were in videos, ur shit would be spittin fire son. nawmean. SPITTIN FIRE
@dottedboxguy3 жыл бұрын
1 : and that, kids, was how the universe appeared 2 : and that, kids, is how the sun will die
@OldTexasRed2 жыл бұрын
To echo what others have said this looks like a stellar simulation. The energy released at the core of a star is constantly pushing outward trying to tear the star apart, but the mass of the star and resulting space time distortion that it creates (i.e. gravity) is simultaneously trying the crush the core into a smaller more compact state. Eventually the two forces reach a balance called "hydrostatic equilibrium" where the outward force is equal to the inward pressure. Amazing that this was created via bug.
@cocolasticot90272 жыл бұрын
It really looks like a star, balancing gravity and internal pressure. Also love that Tubular Bell tune
@PloverTechOfficial2 жыл бұрын
This is really really cool! Amazing what bugs can do if you embrace them.
@Cyanfox30063 жыл бұрын
As much wrote - bugs handles nuclear reaction like it was created to. Very nice and if i didn't know i would think that originally created for this
@kh_y3 жыл бұрын
Really cool! Thanks for sharing. Really thought it was building up to a big explosion at the end, was a little disappointed haha
@TaranVaranYT Жыл бұрын
I love that the particles form to become this little star-like ball that ends up exploding/semi-exploding into a supernova
@VestigialHead3 жыл бұрын
Love this. Cool concept and beautiful results.
@debblez2 жыл бұрын
the 42.0,0.01,1.00,0.02 simulation was probably the coolest thing I’ve ever seen. I need it as a screensaver
@MykdaBEAST3 жыл бұрын
This is like when artists got so good at making art look realistic that they had to start making it ugly and abtract in order to show off how good they were. Pezzza is transcended beyond simulating real life, now he makes art out of "buggy" code.
@gairisiuil2 жыл бұрын
are you dissing impressionists
@Texan_christian11322 жыл бұрын
And that’s how The lifecycle of a star works.
@needamuffin2 жыл бұрын
The patterns immediately after the explosions are very feathery and surprisingly organic.
@JasminUwU2 жыл бұрын
I really like the hexagonal surface waves when the ball was oscillating
@zincorelearn9809 ай бұрын
This guy make a virtual firework, or the star death simulation, using a bug. Just incredible! Don't be afraid to make mistakes, kids. Learn how to turn them into greater things.
@cameronmcallister76063 жыл бұрын
This would make a really interesting screensaver, at least, so long as the number of objects didn't actually increase the power usage whenever it turned on.
@Ruktiet3 жыл бұрын
Beautiful! Nice idea of coloring in function of the velocity and stress
@ewaldlatreider51272 жыл бұрын
1:16 My man simulated a super nova in his hello world xD
@RedStinger_02 жыл бұрын
These look like real explosion simulations that you'd see in a movie. It's so awesome!
@Zalex6123 жыл бұрын
I legit was expecting some slow-mo bug splats on a windshield with color effects added in lol!
@ecgwineicling25432 жыл бұрын
This is fascinating to me (I just found this channel and am binging through it now). This simulation uses a linear force law (which arguably makes "physical" sense in a 2d simulation), but I wanted to try an inverse square law. If you do that (changing a single line in the code), you get much less spectacular results, the particles settle nicely in a clump, but you do still get occasional eruptions from the core, these go into random directions much like solar flares, and they create shock waves, sometimes resulting in secondary eruptions.
@ziggyzoggin3 жыл бұрын
dude, you should totally use newton's gravity laws and make them attracted to eachother instead of the center. it would make a similar but much better effect. plus it would basically be the big bang when it explodes. amazing video!
@briarfisk3 жыл бұрын
Makes me want to get into the graphical side of programming.
@AlienXtream12 жыл бұрын
the fact this models some aspects of atomic physics and fission reactions is amazing.
@pampogokiraly96353 жыл бұрын
This looks amazing!
@NiSoKai3 жыл бұрын
This is outstanding!! Thanks for posting!
@TodePond3 жыл бұрын
THIS IS INCREDIBLE! 💥
@randomlol-ya30632 жыл бұрын
"it's not a bug, it's a feature" That sentence has so much piwer in it
@kovacsattila89933 жыл бұрын
Omg this is so amasing!!! I would be also amasing to see collide two heap particles each other with no speed or pressure visualization but rather with acceleration visualization. Acceleration visualization I mean by sum of all the acceleration vectors what effecting a particle. Keep in mind that the acceleration vector length can change very rapidly, so if you visualize it, it can create some crazy flickering, so it would be also amasing to see if you implement it in a way that the particles color changes not just by their current acceleration vector lengt, but how much time the particle experiencing a given acceleration. Like if they being" heating up" when experiencing a great amount of acceleration and that "charge" being dissipating slowly by time. Please try to create something like this it would be amasing to see it.
@vecbenoit28562 жыл бұрын
you've got to do some1-2 hour compilations of animations like this. phenomenal!
@milandavid72232 жыл бұрын
I've managed to get similar results in the past, though on a much smaller scale, and I think there's something really beautiful about systems that oscillate between chaos and order. It kinda reminds me of life and death. A clump of particles explodes and gives way for others to form and so on forever.
@usama579263 жыл бұрын
Don't know why but Super nova explosions are coming into my mind while seeing these explosions
@Hust912 жыл бұрын
Seems like you just accidentally the worlds most satisfying screensaver.
@eeee69 Жыл бұрын
Very interesting how it forms hexagons after bursting out, you can see it many times around 4:43 through 5:08 If I had to guess why, it is because the spheres are crystallizing into a hexagonal lattice, and drawing a line through opposite vertices of the hexagon corresponds to the close-packed (highest density of atoms in a straight line) crystallographic direction before the explosion. In the close-packed direction of a crystal, the atoms are closer together, so compressive stress is higher in those directions. The explosion would happen along the close-packed directions before any other direction, and that leads to those atoms being farther out in hexagonal close-packed directions because they got a head start. Alternatively, you can think of it as the pressure equalizing in that direction through an increase in volume. As evidence of crystallization in your video, you can see a hexagonal lattice in the small-scale simulations (0:12 through 1:01). You can even see vacancies and dislocations (crystallographic defects) at 1:12. A really good video to illustrate those defects is by Alpha Phoenix, here: kzbin.info/www/bejne/qZ-UimmwfrhsZ8k Or you can watch this video from the 50s by a nobel prize winner, which is the original experiment Alpha Phoenix replicated: kzbin.info/www/bejne/i3alZGxjn9Ggmtk I've got a background in materials science, had to put in my two cents because the bubble experiment is ubiquitous in the field and this video gave me strong deja vu! You made a great demo
@jameslong99212 жыл бұрын
I was expecting a bunch of praying mantis's stuck to a frame, but this also is good.
@3kcozadurnylol3 жыл бұрын
Incredibly marvellous! If only all the bugs could result in such things...
@xcreeperbombx613 жыл бұрын
What if each particle created it's own gravity, I wonder what the redults would look like!
@strwb3rryz2 жыл бұрын
Watching this high is a whole different experience. It shattered my world view, showed me the depths of the dimensions that don't make sense and left me laying in bed with the best visual experience of my life
@doomakarn2 жыл бұрын
That's not an instability, that's fusion; that's how a star works.
@BrunoWiebelt2 жыл бұрын
this is better then any video-synth I have seen so far
@Roy-wh2qt3 жыл бұрын
Can't wait for the girhub repo, I wanna play with this also. Great video
@game-ow8re2 жыл бұрын
accurate representation of a star, the core is where the fusion takes place and that keeps the star from collapsing, meanwhile, the gravity keeps the star held together
@samuels11232 жыл бұрын
The explosion was so violent that the viscosity parameter of the objects falling in was hit so hard they reversed without touching anything
@christiantoft3 жыл бұрын
Inspiring! Would be interesting to see with additive shading - usually works best with very low RGB values per particle, and just a smidgen of desaturation, so not purely primary colors. Though often requires quite small particles, a good deal of overlap, and very high count (millions), for smooth effects.
@user-sl6gn1ss8p3 жыл бұрын
you could render the particles a little bigger than their collision shapes if necessary to get the effect from a far without changing the physics
@comicspace80342 жыл бұрын
6:37 an object: flies by at high speed the whole thing: fuck *you time to explode*
@statelyelms2 жыл бұрын
It's like a much, much more resource intensive windows screensaver you'd stare at for ages as a kid
@Gleb082 жыл бұрын
We need an hour compilation of this. PLEASE
@krccmsitp28842 жыл бұрын
Wow, looks impressive. Could watch it for hours.
@Xyb3rAnims3 жыл бұрын
He's literally explained the big bang. the end of the universe, the makings of the universe, with a bug
@comicspace8034 Жыл бұрын
i like to think of this as a extremly unstable star that could implode at any moment so is constantly convulsing trying not to die
@sildurai82872 жыл бұрын
Well done! It probably would be great to see some of the parameters being controlled by the velocity (and maybe pitch and pan, or something) of music.
@superlambda41442 жыл бұрын
Wow, it's like magic! So stunning!
@Zappygunshot3 жыл бұрын
If you give each particle an attraction force to every other particle within a certain radius, you get a pretty accurate visualisation of stellar nucleation, lifetime and finally supernova instead. The explosion of particles after the system is "overleaded" is the result of a principle that works actually in pretty much the same exact way in reality (there's obviously differences, but on a macro level it's basically what happens).
@jyxtheberzerking48242 жыл бұрын
**plays around with buggy physics** **makes a star simulation** "huh, neat."
@coreKORD3 жыл бұрын
Best screensaver ever!
@Chrispydummy2 жыл бұрын
You just made an explosion simulation by "mistake" and it's beautiful
@beaming_sparkling_trash261 Жыл бұрын
You fing created a whole functioning star ... I don't have words
@blistlelo17002 жыл бұрын
Much better bugged art than that one weird cluster of frozen floating cars that accidentally became an abstract sculpture in Cyperpunk 2077! All glitches could be art themselves... so long they don't entirely corrupt the whole software!
@Laderite2 жыл бұрын
Bruh your channel is actually amazing. I subbed
@PezzzasWork2 жыл бұрын
Merci ;)
@Laderite2 жыл бұрын
@@PezzzasWork avec plaisir :)
@MyloXylo7383 жыл бұрын
You literally created the big bang with a whole new universe.
@Mark-Wilson2 жыл бұрын
looks like a supernova when bugs are actually cool
@deltainfinium8693 жыл бұрын
This reminds me of my experiments with Algodoo.. I wish I could program simply so I could make my own simulators; not only to break limitations of Algodoo and visualize better, but to increase performance, as algodoo simulates many things that I often intentionally reduce to 0 (thus disabling them; but its still simulating the calculations; they're just multiplied by 0 in the end), and getting rid of those unnecessary calculations would be nice.
@THExRISER3 жыл бұрын
Most commercial game engines like Unity have visual scripting tools for people who struggle with programming, I recommend you check those out if you're interested.
@fiona98913 жыл бұрын
try processing, it's pretty quick, easy and lightweight, you should be able to do some neat simulations withnit (not as good for more general stuff though keep in mind)
@bmxscape2 жыл бұрын
you dont need to wish for things like that you just need to do it
@heikid05202 жыл бұрын
look like a (very)speedlapse of an eternal big bang cycle, maybe this bug art explain our universe
@ub3rm1k323 жыл бұрын
This would make a kickass screensaver
@nikilmanu3342 жыл бұрын
This proves that life in this universe has formed as a bug in its coding.
@MarijnvdSterre2 жыл бұрын
Best screen saver I ever seen. Only thing is: the logo makes it impossible to see the parameters.
@iamsushi10562 жыл бұрын
It’s beautiful! Also, congratulations on finding a new way to punish the KZbin compression algorithm!
@pak56h3 жыл бұрын
Congrats! You've just re-created the big bang.
@pigeon_91612 жыл бұрын
I hate when people defame abstract art bc they saw some silly things at a money laundering scheme. Sorry I meant high art gallery. Abstract art not only has potential for making you think, but it can also be very pretty like here. I absolutely loved this video
@clockhart87433 жыл бұрын
Nice :D This could make a very satisfying audio visualiser.
@PezzzasWork3 жыл бұрын
I was thinking about this but it seems quite hard to do
@septillion.2 жыл бұрын
You've actually created a primitive model of a star.
@sylvanbrander22532 жыл бұрын
This looks like a simulation of a 2d star, black hole when the points clip over each other, and a super nova when it explodes!
@1080GBA2 жыл бұрын
2:45 Sun in 8 billion years:
@DaveMackenzie3 жыл бұрын
I am filled with envy. My attempts at dynamic collision look like a child's finger-painting compared to the Sistine Chapel watching this!
@WolfsKitten3 жыл бұрын
this is probably close to what the life cycle of a star looks like when sped up
@DavidTriphon3 жыл бұрын
This is gorgeous!
@yanmarcus61283 жыл бұрын
I feel like you're kinda simulating a cosmic event, y'know gravity, explosions and stuff. Also looks like a defeated Final Fantasy boss 😆
@d9gepro23 жыл бұрын
Yeah right about that boss.
@yungmaz133 жыл бұрын
Absolutely beautiful simulation. One thing I’m curious about is how can your computer handle that many objects? Mine can barely do 1000, do you just have a really good CPU?
@dairop32202 жыл бұрын
With some optimisation you can probably do more than 1000 ;) I have an average CPU and I can do around 10k/15k, probably more with better optimization. Btw I think the objects only interact with their close neighbours (for collisions) and don't attract each other, so a simple quadTree would do the work!
@yungmaz132 жыл бұрын
@@dairop3220 Optimization like what? Also im using python and I know people typically use C or C++, do you think that has THAT large of an affect on speed? Since I know Python is slower but I wouldn’t think its that big of a deal
@dairop32202 жыл бұрын
@@yungmaz13 Oh yeah sure, python is very slow. I did my test of 15k objects for another type of project requiring more interactions in c++, and in python I had a similar limit to your. It's an interpreted language, so much slower than compiled ones. Python is good to understand what you are doing, but clearly not for speed :)
@yungmaz132 жыл бұрын
@@dairop3220 Thanks for the help
@dairop32202 жыл бұрын
@@yungmaz13 No problem! If you need some help with C++ feel free to ask
@PabloRomanelli3 жыл бұрын
This is amazing! Please make a 1h video of this!!!
@Roach182 жыл бұрын
Very cool! I suggest turning this into a feature by making the particles merge like in the start of the *Big bang* , these particles could mege into hydrogen and helium! And then combust, of course, that's the most important part!
@squishybrick2 жыл бұрын
You could've just cut clips of this and said it was a simulation of neutrons/quarks/ect interacting on a sub-atomic level at the core of a star, and nobody would've questioned it for a second.