New little Physic Engine - Trying to implement destructible objects

Поделиться
HTML-код
  • Опубликовано: 5 ноя 2024

Комментарии • 198

  • @Neboooo
    @Neboooo 3 года назад +382

    Idk why, but this music makes me wanna make 20k a month from home online

    • @MonsieurSwag
      @MonsieurSwag 3 года назад +15

      You can. I dont know why. But you know why. Because you can do the thing you can do now

    • @uvbe
      @uvbe 3 года назад +18

      But can I be my own boss and work my own ours?

    • @georgplaz
      @georgplaz 3 года назад +24

      I personally just want to know that trick doctors wouldn't tell me

    • @MonsieurSwag
      @MonsieurSwag 3 года назад +8

      @@uvbe yes you can because when you want you do what you want when you want to do

    • @Toothily
      @Toothily 3 года назад +1

      > Dorian Smiles has entered the chat

  • @lnx0007
    @lnx0007 3 года назад +422

    0:22 that was legit the best cursive writing with a mouse i have ever seen

    • @PezzzasWork
      @PezzzasWork  3 года назад +189

      I have to say that this is the part I am most proud of

    • @8koi245
      @8koi245 3 года назад +6

      Lmao IKR

    • @raphulali8937
      @raphulali8937 3 года назад +2

      @@PezzzasWork 😆😆hahaaa

    • @masterjohn3126
      @masterjohn3126 3 года назад

      should see me then...

    • @georgplaz
      @georgplaz 3 года назад +2

      Don't get too excited, I bet he used a green screen

  • @NinjaNJH
    @NinjaNJH 3 года назад +381

    I love to see little projects like this. Not everything has to be a billion dollar AAA raytraced behemoth to be impressive. Good job lad!

    • @slimeball3209
      @slimeball3209 3 года назад +4

      do you saw "OE-Cake"?

    • @ThylineTheGay
      @ThylineTheGay 3 года назад +13

      It’s more impressive if it isn’t, indies are far more unique and fun most AAA games are just generic

    • @last_words596
      @last_words596 3 года назад +1

      @@ThylineTheGay most AAA games are far more polished and innovative

    • @thousandsofclowns
      @thousandsofclowns 3 года назад +14

      @@last_words596 Polished? Surely. Innovative? Not so much.

    • @ThylineTheGay
      @ThylineTheGay 3 года назад +1

      @@thousandsofclowns "Surely." *COUGH* _cyberpunk_ *COUGH*

  • @missingdev0948
    @missingdev0948 3 года назад +29

    It would be interesting to see a tiny bit of "give" on the atoms, so that things that aren't very thick are unsteady. Great work on this!

    • @mambe4349
      @mambe4349 Год назад +1

      Its meant to simulate rigidbody physics, though adding that would make some cool softbody/jelly physics

  • @alasanof
    @alasanof 3 года назад +34

    Every few years, someone is bound to remake the sand particle flash game everyone played in 2001.

    • @quantumbaqel6971
      @quantumbaqel6971 3 года назад

      Sandspiel?

    • @_neophyte
      @_neophyte 3 года назад +1

      @@quantumbaqel6971 man i remember wasting hours on that site

    • @AmantePatata
      @AmantePatata 3 года назад +2

      Noita is based on it

    • @xen32
      @xen32 3 года назад

      Are you talking about some Powder rip off?

    • @NeonV01D
      @NeonV01D 3 года назад +1

      Powder game?

  • @AAvfx
    @AAvfx 3 года назад +3

    Love it! So satisfying! 👍

  • @CloudPhase
    @CloudPhase 3 года назад +20

    I've always thought about what if somebody made a physics engine where everything was particles, kinda like real life.

    • @Phiwipuss
      @Phiwipuss 3 года назад +1

      Look up "Powder Toy"

    • @legolion1849
      @legolion1849 3 года назад +3

      try noita

    • @artex_112
      @artex_112 3 года назад

      Look Space Simulaton Toolkit on Steam

    • @PenguinMaths
      @PenguinMaths 3 года назад +3

      @Mustache Merlin I'm familiar with the material point method, but what is PDB? Googling I only found Protein Data Bank.

    • @-Burb
      @-Burb 3 года назад +2

      Look up Teardown, it’s made of voxels so sort of like particles(just larger) but the destruction physics are really good and satisfying.

  • @nv7213
    @nv7213 3 года назад +4

    Looks super cool! You should try to add a basic blur shader, and then round the blurred values to a single value to make it look like one object breaking apart, I would love to see something like that! Great job!

  • @nothingnothing1799
    @nothingnothing1799 3 года назад +47

    The lack of comments here is criminal so ima just leave this here

  • @olahbozo
    @olahbozo 3 года назад +4

    This is awesome! And looks so efficient and realistic already! Keep working on it! :D

  • @too-many-choices
    @too-many-choices 3 года назад +15

    must comment for youtube algorithm to strike this masterpiece

  • @soulguibo
    @soulguibo 3 года назад +2

    This is really similar to how the flash game SugarSugar works and it’s really cool

  • @keithmanning6564
    @keithmanning6564 3 года назад +65

    This is exactly what I’ve been looking for in a project of mine, how did you do it?

    • @TeenNewsLive
      @TeenNewsLive 3 года назад +9

      particle physics

    • @Jason-uv5tm
      @Jason-uv5tm 3 года назад +5

      @Schlingelkron ikr

    • @n8style
      @n8style 3 года назад +7

      he just did
      import physics as p;
      new p().start();
      you're welcome

    • @keithmanning6564
      @keithmanning6564 3 года назад +5

      @@n8style thanks

    • @madajo3357
      @madajo3357 3 года назад +3

      @@keithmanning6564 Lmao

  • @drewlop
    @drewlop 3 года назад

    I was gonna lose my mind if the cup pieces weren't successfully broken at the end, so glad that they were

  • @kurtiskurt1
    @kurtiskurt1 3 года назад +2

    Idk why but this physics stuff feels so nostalgic

    • @Onimirare
      @Onimirare 3 года назад +1

      I was thinking of those 2007 flash games where you draw something that turns into a object in game, like Crayon Physics Deluxe.

    • @kurtiskurt1
      @kurtiskurt1 3 года назад

      @@Onimirare oh yeah i remember now! those phone apps where you draw stuff with neon. good old times

  • @zyphery
    @zyphery 3 года назад

    Very impressive work! I love it

  • @senorbill374
    @senorbill374 3 года назад

    daym this looks epic
    hope more people will see this soon

  • @oguzdemirtas1873
    @oguzdemirtas1873 3 года назад

    This is what i want to do. Congrats man! So inspiring.

  • @walkiacid9265
    @walkiacid9265 3 года назад

    damn, Box2D v2 looking real spicy today.

  • @Xenthera
    @Xenthera 3 года назад +2

    This is cool because it cuts out a ton of math for traditional physics engines, but behaves in a similar way.

  • @ignuxas64
    @ignuxas64 3 года назад +1

    Great projects man, keep going!

  • @s0lly
    @s0lly 4 года назад +5

    Looking shweet.

  • @arabic_memes1865
    @arabic_memes1865 3 года назад

    THIS REMINDS ME ABOUT PHUN ALGADOO!

  • @tensterss
    @tensterss 3 года назад

    Projects like this are fun to pla with

  • @laz_chance_to_see
    @laz_chance_to_see 4 года назад +2

    very nice

  • @rodakdev
    @rodakdev 3 года назад +2

    Truly amazing, great work

  • @TheRealSavi
    @TheRealSavi 3 года назад +9

    Im currently embarking on a similar project, where did you learn to make the collision response algorithms?

    • @PezzzasWork
      @PezzzasWork  3 года назад +8

      This article is very nice gamedevelopment.tutsplus.com/tutorials/how-to-create-a-custom-2d-physics-engine-the-basics-and-impulse-resolution--gamedev-6331

    • @santiagopuentep
      @santiagopuentep 3 года назад +5

      @@PezzzasWork Your demo looks amazing. How did you solve the rigid body part with rotations and stacking. Are you using polygon or polygon collitions by creating polygons around the circles or is it some other kind of solver?

    • @santiagopuentep
      @santiagopuentep 3 года назад +1

      @No Sound @No Sound yeah, what I mean is that when multiple circles form a shape together, how does it stay so stable. I've implemented polygon on polygon solvers and complex concave shapes are subdivided into convex ones, but always polygons for efficiency.
      This one seems to just use circles but forces transfer perfectly.

    • @santiagopuentep
      @santiagopuentep 3 года назад +1

      @No Sound stacking. Things on top of things.

  • @ThylineTheGay
    @ThylineTheGay 3 года назад

    This seems really cool

  • @mj2068
    @mj2068 4 месяца назад

    pretty cool!

  • @Pspet
    @Pspet 3 года назад

    This is very cool

  • @yfluz
    @yfluz 3 года назад +3

    0:46 Green seem *sus...*

  • @CallMeTess
    @CallMeTess 3 года назад

    Really cool. Reminds me of Noita.

  • @jonwatte4293
    @jonwatte4293 3 года назад

    Did you read up on the Jacobsen Verlet style particle integrator physics, used for the early Hitman games? It's well worth the read of you can find it!

  • @NuYiDao
    @NuYiDao 3 года назад +1

    So good. Is it faster over all this way? Like is it better to render a hull afterwards than try to simulate complex polygons?

    • @vibaj16
      @vibaj16 10 месяцев назад +1

      I don't think so, but it's simpler

  • @lukeystuff
    @lukeystuff 3 года назад +1

    Ferb, I know what we're gonna do today.

  • @konstantinkh
    @konstantinkh 3 года назад

    Treating each object as a rigid body, and running separate constraints solver for stress within each one? Hopefully, only doing the inverse for stress once unless there is a break?

  • @MortVaderDK
    @MortVaderDK 3 года назад

    Looks Awersome! Keep going!

  • @enrices
    @enrices 3 года назад

    Beautiful. More more more videos like this please !!

  • @Mupersega
    @Mupersega 3 года назад

    you're incredible

  • @mateuspopoff
    @mateuspopoff 3 года назад

    beautifull job

  • @evannibbe9375
    @evannibbe9375 3 года назад

    So then, to mimic how objects have a certain level of brittleness, did you have some random distribution that changes the probability of breaking along a fault like based on, say, the square of the impulse applied (force*time, which is the generally constant quantity that is precisely why air bags work so well (by increasing the amount of time your head has to slow down to a stop, thus reducing the amount of force you encounter))?

  • @dimarichmain
    @dimarichmain 3 года назад +1

    Wow, nice

  • @AlienLogic775
    @AlienLogic775 3 года назад +1

    I've cloned your fabulous repo! Where I can find (in the commit history) this example?

  • @mytino
    @mytino 3 года назад +3

    Do you use some sort of flood fill to construct the broken pieces when a body splits? Or is there some predefined hierarchy or structure or something that makes the fracture fast? I'm curious as I wonder if for example a 10k particle rigid body would lag a lot when breaking because of some kind of recursive calculation. And because I'm curious if it can work with a parallel simulation on the GPU.

    • @crazy_wwww
      @crazy_wwww 2 года назад +1

      i believe it uses some sort of voronoi noise thing to make the shattered pieces, since i remember using voronoi to generate a glass shatter texture

    • @PezzzasWork
      @PezzzasWork  2 года назад +2

      The algorithm is really naive and would probably be slow for a an object with 10K particles. When an object collides with another with enough force, I simply cut it from the collision point along the collision normal

  • @johnjackson9767
    @johnjackson9767 3 года назад

    Very nice, is this using MPM for the phyiscs?

    • @PezzzasWork
      @PezzzasWork  3 года назад

      I am just using basic circle-circle collisions for this. But I'm looking into mpm to improve stability

  • @merthyr1831
    @merthyr1831 3 года назад

    Awesome stuff!

  • @leeuwengames315
    @leeuwengames315 3 года назад

    think you should put on something so that if there is no particle of same block in 2 particle length the block sperates cause that didn't really happen at the end.

  • @brynshannon6692
    @brynshannon6692 3 года назад

    Utterly, utterly amazing. Excellent. Please tell me you're planning to make a game of this. XD

  • @DrBZU
    @DrBZU 3 года назад

    Nice work!

  • @Antcode-wk7tu
    @Antcode-wk7tu 5 месяцев назад +1

    Please explain how you made the custom drawable shapes rigid bodies?

  • @AlienLogic775
    @AlienLogic775 3 года назад +1

    It’s Verlet Integration based for the round particles?
    Trying to figure out how you managed to make a “solid” body with the cursive writing.

    • @PezzzasWork
      @PezzzasWork  3 года назад +1

      It could be done with this technique using extended position based dynamic. However in this case it is classic rigid body dynamics

    • @AlienLogic775
      @AlienLogic775 3 года назад

      @@PezzzasWork thanks, do you mind releasing the source code? Even if not finished. Would be very cool to learn something new

    • @AlienLogic775
      @AlienLogic775 3 года назад

      @@PezzzasWork P.S: I’ve been working on a Verlet based engine with also angle constraints and it looks promising.

    • @PezzzasWork
      @PezzzasWork  3 года назад +1

      @@AlienLogic775 I tried using verlet based angle constraints to simulate grass and trees. For grass it worked quite well but requires a lot of damping to stay stable. However for trees I didn't manage to have something robust enough and switch to another approach

    • @AlienLogic775
      @AlienLogic775 3 года назад

      @@PezzzasWork I've tried a different approach for angle constraint, instead of the classic dot product I'm using a kinematic style solver. Seems to be stable at the moment. (I can share with you the code if you are interested)
      Any chance to see your source code about this project? Even if not finished.

  • @Natsters46
    @Natsters46 3 года назад

    This makes me want to eat some pearled couscous

  • @kylaxial
    @kylaxial 3 года назад

    I hope this project doesn't get as laggy as OE Cake does when there's too many things on-screen

  • @Leander_0
    @Leander_0 3 года назад +1

    how does one learn this power? this is soo cool

  • @Philyshark7
    @Philyshark7 3 года назад

    idk why but i just expected all the objects to split into just the balls at some point

  • @viporal7898
    @viporal7898 3 года назад

    It's so little that it's just one physic

  • @leelou0796
    @leelou0796 4 года назад +3

    J'aime bien

  • @Ali107
    @Ali107 3 года назад +1

    From the video those simulated particle objects can get destroyed, but can they be malleable or flexible?

    • @PezzzasWork
      @PezzzasWork  3 года назад +1

      It is currently not possible, my solver only supports rigid bodies

  • @ITpanda
    @ITpanda 3 года назад

    Nice, but I don't think we have the readily available processing power to implement this at standard definitions let alone 2 or 4K. Just too many strings I figure.

    • @Tulip_bip
      @Tulip_bip 3 года назад

      Ever seen noita?

    • @ITpanda
      @ITpanda 3 года назад

      @@Tulip_bip Negative! Please inform me.

    • @Tulip_bip
      @Tulip_bip 3 года назад

      @@ITpanda well it's a game that uses a physics engine that can do far far more than this

    • @ITpanda
      @ITpanda 3 года назад

      Does not do so at a level that compares to n64 games. It is cool and I will be adding to my wishlist but not enough processing power available in a consumer grade setup to make this work on a high detail 3d environment.
      Would be cool to see.

  • @JoeEnderman
    @JoeEnderman 3 года назад

    Are the cubes assigned random strength values on top of the random colors?

  • @MechanizationStudio
    @MechanizationStudio 3 года назад

    Can you do a performance demo with as many objects as possible?

  • @pajeetsingh
    @pajeetsingh 3 года назад

    Sell this on iphone. Toddlers would buy.

  • @peridoritothemighty5226
    @peridoritothemighty5226 3 года назад

    :0
    I love it

  • @AdamgamesCZ
    @AdamgamesCZ 3 года назад

    Can I download it?

  • @dirtyspock7957
    @dirtyspock7957 3 года назад

    Hmm very much like Nvidia Flex. How do you update the particle belonging to a rigid body? Using the best fit transform and simulating each particle?

  • @atlasua2021
    @atlasua2021 3 года назад

    Лучший!

  • @delve_
    @delve_ 3 года назад +1

    Is there a download? I'd like to play with this.

  • @tehbigb
    @tehbigb 3 года назад

    I wonder how many youtube tutorials this took to make

  • @prod.hxrford3896
    @prod.hxrford3896 3 года назад

    What is this programmed on?

  • @Mark00747
    @Mark00747 3 года назад +1

    Could you share the code?

  • @dairop3220
    @dairop3220 3 года назад +1

    Well done, new sub ^^ (Ty to the youtube algoritm)

  • @ImXyper
    @ImXyper 3 года назад +1

    can you upload this to github? i t seems fun and i wanna try

  • @Snort70
    @Snort70 3 года назад

    Reminds me of OE-Cake

  • @anothrnoml
    @anothrnoml 3 года назад

    1:24 wait brain dots all over again

  • @ChristopherGray00
    @ChristopherGray00 3 года назад +1

    Do you have a github for this?

  • @enricobianchi4499
    @enricobianchi4499 3 года назад

    What is the criterion for a body to split in two?

  • @arsenbabaev1022
    @arsenbabaev1022 2 года назад

    Does that work only with convex geometry?

    • @PezzzasWork
      @PezzzasWork  2 года назад

      Yes it does, I used this engine for this project
      ruclips.net/video/Yg3xn64P40Y/видео.html where objects have non convex shapes

  • @SacrificialGoat94
    @SacrificialGoat94 3 года назад +1

    Is this opensource? Can we get the code anywhere?

    • @PezzzasWork
      @PezzzasWork  3 года назад +5

      I will publish it when it'll be more polished

  • @chakibchemso
    @chakibchemso 3 года назад

    This + raylib

  • @chakibchemso
    @chakibchemso 3 года назад

    3d?

  • @wizardnotknown
    @wizardnotknown 3 года назад

    I died.

  • @4ROff
    @4ROff 3 года назад

    tutor ?

  • @Xturnal
    @Xturnal 3 года назад

    Git me the Hub

  • @unknown-bx8my
    @unknown-bx8my 3 года назад

    Woww

  • @nix3l_
    @nix3l_ 3 года назад

    Source code?

  • @TheVizualkat
    @TheVizualkat 3 года назад

    This has some Crayon physics Deluxe vibes.

  • @edthetraveller
    @edthetraveller 3 года назад

    you should try uploading this to itch.io, I'd like to play with it myself

  • @ivysly
    @ivysly 3 года назад

    reminds me of oe cake

  • @prashanthkumar0
    @prashanthkumar0 3 года назад +1

    source code plz...
    +1 sub

  • @pou3321
    @pou3321 3 года назад

    unity particle system

  • @1e1001
    @1e1001 3 года назад

    Teardown 2D

  • @praadiiit
    @praadiiit 3 года назад +2

    This video is so fragile

  • @CstriderNNS
    @CstriderNNS 3 года назад

    be more optimized if it would procedurally break

  • @bugrilyus
    @bugrilyus 3 года назад

    Facebook video music

  • @dankmemewannabe
    @dankmemewannabe 3 года назад

    cromch