There is an error at 3:04 at line 41: it should be (radius - 50.0f). Thanks to those who pointed it out to me!
@PezzzasWork
2 жыл бұрын
@Vitor m the dt is not needed because here « velocity » is in fact the distance traveled since the last update so it’s already equivalent to velocity * dt
@ziyadcodes
2 жыл бұрын
Me after spending 4 hours of pure suffering to figure out the problem then figuring it out and being so proud of my self. Then moving both of my fingers up to see the comment section and realizing that the first comment is addressing the problem 😭😭😭😭😭😭😭😭😭. It's even worse when I realize that I have tests and that I should have spend that time studying 😭😭😭😭😭😭. Please edit the video to save people from suffering like that. Or maybe it's just me whose that stupid |(>_
@TetyLike3
2 жыл бұрын
@@ziyadcodes sorry not sorry ¯\_(ツ)_/¯
@wiking2888
2 жыл бұрын
Thank you soooo much I finally have it working
@oamioxmocliox8082
2 жыл бұрын
;)
@AngeTheGreat
2 жыл бұрын
I like how it really doesn't take much to create an amazing looking result (as long as you know what to actually implement of course). Nice video!
@PezzzasWork
2 жыл бұрын
Thank you! And thank you for your videos as well, I found your channel very recently and I really like what you are doing! it seems that we have common interests :)
@PezzzasWork
2 жыл бұрын
Waiting for your next video as well! (And btw the video on bloom was amazing)
@LineOfThy
10 ай бұрын
engine guy :D
@yell9140
2 жыл бұрын
My understanding of the code is currently too limited, but I will definitely learn and come back to this amazing video, I have always wanted to do things like that. Amazing work again Pezzza, wish you all the best.
@mickyr171
2 жыл бұрын
I dont even know what language it is lol, i was thinking C++ but not 100%
@mickyr171
2 жыл бұрын
Maybe rust
@PezzzasWork
2 жыл бұрын
It’s indeed C++ :)
@mickyr171
2 жыл бұрын
@@PezzzasWork thought so, I'm more a java/c# man myself, want to learn c++ but struggle to wrap my head around some of the functions
@PezzzasWork
2 жыл бұрын
C++ is a big and complex language, it's not easy to get into it
@americanhuman1848
Жыл бұрын
why struggle finding happiness when you can just watch this video? seriously its so relaxing and makes you feel like you have reached nirvana
@stylextv
2 жыл бұрын
The colored circles at the end turning into your logo was pretty bad ass. How was it done though? Running the simulation to see where each object ends up then running the simulation again and coloring each object based on its final resting point?
@themikek99
2 жыл бұрын
Maybe it's reversed? B)
@khatharrmalkavian3306
2 жыл бұрын
@@themikek99 Possibly, but Verlet integration is lossy when you add collision handling, so it would have to be a different process in order to be reversible. I think Stylex may have the right idea there. The process is entirely deterministic, so with the same conditions you'll always get the same outcome. You could run the simulation once, take note of where each object ends up, then color them accordingly, and re-run the sim to get the logo.
@gytiskau1865
2 жыл бұрын
@@khatharrmalkavian3306 You could also bake the whole simulation, color the outcome and replay
@ducking_fonkey
2 жыл бұрын
He probably read the image data and the. assigned the objects for some of the pixels and then gave them the velocity to make them move in the right way.
@GG64du02
2 жыл бұрын
If he did not do it in reserve i am interested on how he pulled it off....
@NotAFoe
2 жыл бұрын
Wow I love this kind of content so much, thanks pezzza!
@PezzzasWork
2 жыл бұрын
You're welcome :)
@SuboptimalEng
2 жыл бұрын
I'm really glad to have found your channel after Sebastian Lague made the ant simulation video. The stuff you make is amazing!
@dragonminz602
2 жыл бұрын
Beautiful work and thank you for showing how you did it. That was very interesting. Also very cool ending
@PatrickHoodDaniel
3 күн бұрын
My cat was very interested in the chain!
@general3978
2 жыл бұрын
This video is a masterpiece in technical execution and artistry
@bird5790
Жыл бұрын
Please a part 2! this was by far the most interesting and ACTUALLY HELPFUL video i have seen in a while
@gaspardallimant1768
2 жыл бұрын
How ?! It looks so easy to implement and the result is awesome ! Thank you so much, each of your videos is a bigger mindblowing for me than the previous one
@bigsmoke6414
2 жыл бұрын
I guess thats the Sebastian Lague Effect😉
@muuubiee
2 жыл бұрын
I suspect this is just the art of having studied some mathematics (multivariable calculus and linear algebra is probably enough). With math knowledge you can just take the equation and implement it.
@alliepiper4772
2 жыл бұрын
This is really cool, I always learn something new watching your videos! Implementing collisions and constraints by simply updating positions and having an integration function that can figure out velocity/acceleration is powerfully clever. Great explanation at the beginning, and the surprise picture at the end was a nice touch. Looking forward to your next adventure :)
@carrymeorgg8512
2 жыл бұрын
You inspired me to learn C++ after fearing its complexity for months. I finally was able to learn C++ because of you. Please make more videos like this in the future. I enjoyed the teaching style and learned a lot. Keep up the great work man.
@PezzzasWork
2 жыл бұрын
Thank you so much for your message, it is so cool to read ! I hope you will enjoy the possibilities that c++ offers! It’s a complex but very powerful language
@nejsonsvejson9861
Жыл бұрын
Yeah, the hardest part of programming is overcoming the fear of complexity. It's what kept me away for years.
@MM2isBest
Ай бұрын
So did you learn it carry?
@nothingnothing1799
2 жыл бұрын
I love the inclusion of the code itself seeing what it does is cool but being able to see how it was made is very cool imo
@sushismitcher225
5 ай бұрын
Wow! Incredible. I can't believe how elegantly and simply you set up the code for a complex-looking and incredible result. I also can't believe how you fit this into a 9min video. You're incredible.
@alexhooper27
2 жыл бұрын
I always finish your videos in awe. This is what I aspire to be able to do with my knowledge of math and coding.
@spencer__
Жыл бұрын
No idea how you made a physics programming video both beatiful and relaxing. Amazing work.
@singularityoptimist
2 жыл бұрын
Excellent work and a beautiful result
@sierpinskibrot
2 жыл бұрын
Phenomenal work ur doing here man
@user-tr2hc2xx3b
2 жыл бұрын
Wow, looks so simple and elegant! Great job, looking forward to more videos like this one!
@movingheadmau8128
2 жыл бұрын
Always love watching your videos for the cool content you tackle :)
@PezzzasWork
2 жыл бұрын
Thank you :)
@kikawet
2 жыл бұрын
I loved the video and really respect this channel! if you do a version with continuous collision detection then there is nothing more to expect from you!
@mementomori7160
2 жыл бұрын
I'm glad I subscribed to you, this vid made me really interested in making my own physic engine
@michaberkowicz8239
2 жыл бұрын
That ending was..... unexpected
@SpringDavid
9 ай бұрын
Nice cock
@rtsa4633
Жыл бұрын
This video is gold and I will definitely have to come back to it in the future if I build something like this
@eboatwright_
2 жыл бұрын
This is amazing! Thank you so much for your help! I've always wanted to make a physics engine, and I'll definitely implement this in Rust! :D
@gigaprofisi
Жыл бұрын
will never regret subscribing to this amazing and talented channel
@dandymcgee
2 жыл бұрын
Very cool demonstration. Great work.
@cirogarcia8958
2 жыл бұрын
It's amazing! You just taught me in less than 10 minutes what I wasn't able to learn on my own in weeks! Do you plan on uploading more videos like this in the future? It would be amazing to see how you deal with problems like tunnelling and static collision shapes
@JosephCatrambone
2 жыл бұрын
Good choice of music. Nicely demoed. Solid video.
@valet_noir
2 жыл бұрын
Love ur content, great to see a "behind the simulation" video ! Amazing :D
@newcooldiscoveries5711
Жыл бұрын
Unreal! Very Enjoyable! Thank You!
@aleksandarstankovic4476
Жыл бұрын
This video greatly benefits my coding skills! Thank you for the explenation!
@akosszabo3163
2 жыл бұрын
Your work is very impressive. Thanks for the video. It motivated me to implement this on the language I know the most, so I implemented it in Java. Finally after a couple of hours it worked fine. I implemented all the functions you demonstrated. Functions can be initiated from the menu. Additionally based on the chain example I implemented a rigid body. The last function will be the magic. You can open a picture and cut a part of it and that will appear as your logo did. I will share it as soon as it is done. So thanks again, nice job!
@rodakdev
2 жыл бұрын
That chicken has glasses for a reason! So cool!
@SpartanG318
2 жыл бұрын
I find you right that moment and i am a software engineer in trainee... i can understand the code a bit and on the other hand i sit here and think, i know nothing about physics and simulations. Pretty mind blowing your work. This Bonus at the end.... HOW?? Thanks man, i cant stop to smile. :)
@NimsoStudios
2 жыл бұрын
Bravo my friend, Bravo! An excellent look at the basic Velocity per frame physics engine and just how powerful circle collisions can be. I spent a moment trying to figure out why the velocity was updating before realising you were actually calculating it each step rather than keeping it persistent throughout. I'm going to play a little with the idea of calculating Velocity before applying motion to it, in 3D though since I work a lot on 3D character control systems and write the motion custom. This has been visually the nicest way to show the beauty of a physics engine.
@PezzzasWork
2 жыл бұрын
Thank you very much! This should be directly transposable to 3D. I think it’s a good fit for what you are trying to do!
@NimsoStudios
2 жыл бұрын
@@PezzzasWork I do plenty of platformer gameplay systems, but usually keep velocity persistent rather than calculate immediately before applying the new step. Definitely something I want to try out, might end up making some cool stuff out of it too.
@sanderbos4243
2 жыл бұрын
Amazing tutorial, and the ending was such a twist!
@pelicannot.
2 жыл бұрын
i love this channel :D
@PezzzasWork
2 жыл бұрын
Thank you :)
@Reditect
Жыл бұрын
Amazing! I've been trying to understand the programming behind physics and make my own 2D and 3D game engines. Visually appealing and informative video. Thanks. :)
@GradientAscent_
2 жыл бұрын
Love these endings, keep it up
@LogInValid
2 жыл бұрын
This makes me want to go back to school and learn programming. Simply Amazing!
@xvitxr
Жыл бұрын
bro, this video is a masterpiece, my dream is to be a developer like you. i saw all your past and recent videos and every one of them are amazing! please, PLEASE keep the good work
@NeverForgetNasa
2 жыл бұрын
Oh my god, that is so beautiful.
@NoxiusVI
Жыл бұрын
Amazing tutorial! Worked really well even when using a different language!
@duongquanghuy4387
2 жыл бұрын
The ending got me. Nice work!
@Rentaro_dev
2 жыл бұрын
Nice video man! A wiki article and your video helped me very much.
@caoduythanh1453
2 жыл бұрын
what a master piece!
@henwill8
2 жыл бұрын
Wow it literally felt like magic how it just simply worked with such little effort and code
@devmarboy4045
Жыл бұрын
this is so sick, can’t wait to get as advanced as u lol
@Katniss218
Жыл бұрын
The end was really cool!
@redspyro4750
Жыл бұрын
I don't even know much about code, so this is already very helpful! And by helpful I mean I will probably keep rewatching this every time I want to do physics simulation.
@softpaw6234
2 жыл бұрын
These simulations would have made great screensavers back when we needed those
@williambarajas8090
2 жыл бұрын
yes!!!!!!! love the video please make more of them!!!
@brecoldyls
Жыл бұрын
Can’t wait for part 2: Writing a Physics Engine in Scratch
@glumpfi
2 жыл бұрын
:O Especially the end blew me away!
@busy_beaver
2 жыл бұрын
Thanks for this great video!
@mariusvanc
2 жыл бұрын
5:40 I was thinking the "perfect" solution to this would be, aside from sub-stepping, to add a bit of friction every time there is a collision, this would settle the objects quicker so they don't vibrate while stationary. Just multiply the vectors by 0.99 or something like that.
@WDGSWhatDoesGodSay
2 жыл бұрын
OMG I have been trying to figure out how to make a physics "engine" like this from scratch.
@WDGSWhatDoesGodSay
2 жыл бұрын
Can you make the .cpp files available in the description or tell me where I can find them. THANKYOU!!!
@starship9874
2 жыл бұрын
This is the most underrated coding channel ever. Your videos are so high quality
@DevashishGuptaOfficial
2 жыл бұрын
This video made my day!
@Hailfire08
2 жыл бұрын
Awesome video!!!
@Chareidos
2 жыл бұрын
lol... was gonna write so many questions in another video, asking how to get there... now I found this clip before I would have sent that long comment! This is a clip to start with, I guess. Thank you for enabling me to at least try. Subscribed! Maybe you link this video clip in the notifications of other stuff you uploaded!
@NStripleseven
2 ай бұрын
The concept of Verlet integration is actually super cool IMO, because it means momentum changes from collisions/etc are handled more or less automatically.
@user-lp8pq4en5u
Жыл бұрын
excellent!!!!
@prometheusli101
2 жыл бұрын
amazing effect
@osartur
2 жыл бұрын
You must have worked really hard to get where you are. You are really good at what you do
@osartur
2 жыл бұрын
I used a translator so I don't know if what I said was strange 😁
@wilykary
2 жыл бұрын
@@osartur nah not at all
@TetyLike3
2 жыл бұрын
@@osartur the only problem with that sentence was the punctuation lol
@pineapplerindm
Жыл бұрын
@@TetyLike3 i dont see anything wrong with the punctuation
@jacktapping9290
2 жыл бұрын
beautiful
@nikbivation
Жыл бұрын
thank you for this!
@simonsvoboda8849
4 ай бұрын
I'm so glad youtube recommended this video to me. How did I not know about this??
@Archangel2x
2 жыл бұрын
The ending logo showing up was like magic.
@mr.milindsingh7671
Ай бұрын
This was fantastic. I loved the way you simply coded this complex looking problem. I was wondering what would it take if I wanted to add friction forces among particles.
@lorenzoassiro8532
2 жыл бұрын
Wow this code is mind blowing🤯
@yudhistira7231
2 жыл бұрын
Awesome dudeee, I never get bored watching your videos. A subscriber btw, keep it up!🏃
@PezzzasWork
2 жыл бұрын
Thank you!
@mctuble
Жыл бұрын
Just using the colors makes this so much better lol.
@markwinfield845
9 ай бұрын
Great video, I am subscribing.
@HyperHrishiHD
Жыл бұрын
You scared away half of the people away with the equation as the first thing in the video. But I’m all here for it
@Radu
2 жыл бұрын
Nice ending! It's the reason I subscribed :-)
@and_I_am_Life_the_fixer_of_all
2 жыл бұрын
that ending felt like an assembly theory flex before its time, wow.
@leod6011
10 ай бұрын
Cheers to that bro
@odedkadshai
2 жыл бұрын
felt like magic show
@artemonstrick
2 жыл бұрын
Fantastic
@ziggyzoggin
26 күн бұрын
Thank you for this, I used it to make a 4D gravity simulation in Godot 4!
@ArashRabbani
Жыл бұрын
the jaw dropping last scene!!!
@VincePhoenix
2 жыл бұрын
Impressive !
@mariovelez578
2 жыл бұрын
nice physics baking at the end 😎
@MrWandalen
2 жыл бұрын
I love this
@unknown-bx8my
2 жыл бұрын
awesome😍
@Sam-hu3xt
Жыл бұрын
Three words: epic!
@arcturuslight_
2 жыл бұрын
In the last scene, did you assign colors to balls and then rerun the simulation since the physics is deterministic?
@error-42
2 жыл бұрын
Yes, they did.
@official-obama
2 жыл бұрын
@@capturedflame huh?
@wsb237
10 ай бұрын
Beautiful
@raushankumar2336
2 жыл бұрын
I can't understand how thing is being applied, but i loved it especially the bonus clip 🔥 I have to learn alot to achieve this, nevermind i will do that
@aghayejalebian7364
Жыл бұрын
Fucking beautiful mate
@xintreavideo
2 жыл бұрын
Cool! It's view so easy...
@expressoaddict
Жыл бұрын
That ending was lit.
@MrNucleosome
2 жыл бұрын
THANK YOU
@jellybean2427
Жыл бұрын
You saved my life
@tomfourcaudot9535
6 ай бұрын
Amazing video, I learned a lot from it. I just have a quick question : what software did you use to render the video ( like in the beginning when you explained the formula ). It looks like the 3blue 1brown animation software.
Пікірлер: 514