New little Physic Engine - Trying to implement destructible objects

Sdílet
Vložit
  • čas přidán 7. 09. 2020
  • Particles based physic engine allowing easy destruction handling.
    Still a very early version.
    Music freepd.com/music/Inspiration.mp3
  • Věda a technologie

Komentáře • 197

  • @Neboooo
    @Neboooo Před 3 lety +379

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

    • @MonsieurSwag
      @MonsieurSwag Před 3 lety +14

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

    • @uvbe
      @uvbe Před 3 lety +17

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

    • @georgplaz
      @georgplaz Před 3 lety +24

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

    • @MonsieurSwag
      @MonsieurSwag Před 3 lety +8

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

    • @Toothily
      @Toothily Před 3 lety +1

      > Dorian Smiles has entered the chat

  • @lnx0007
    @lnx0007 Před 3 lety +418

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

    • @PezzzasWork
      @PezzzasWork  Před 3 lety +186

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

    • @8koi245
      @8koi245 Před 3 lety +6

      Lmao IKR

    • @raphulali8937
      @raphulali8937 Před 3 lety +2

      @@PezzzasWork 😆😆hahaaa

    • @masterjohn3126
      @masterjohn3126 Před 3 lety

      should see me then...

    • @georgplaz
      @georgplaz Před 3 lety +2

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

  • @NinjaNJH
    @NinjaNJH Před 3 lety +380

    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 Před 3 lety +4

      do you saw "OE-Cake"?

    • @ThylineTheGay
      @ThylineTheGay Před 3 lety +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 Před 3 lety +1

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

    • @thousandsofclowns
      @thousandsofclowns Před 3 lety +14

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

    • @ThylineTheGay
      @ThylineTheGay Před 3 lety +1

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

  • @missingdev0948
    @missingdev0948 Před 3 lety +28

    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 Před rokem +1

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

  • @alasanof
    @alasanof Před 3 lety +34

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

    • @quantumbaqel6971
      @quantumbaqel6971 Před 3 lety

      Sandspiel?

    • @_neophyte
      @_neophyte Před 3 lety +1

      @@quantumbaqel6971 man i remember wasting hours on that site

    • @AmantePatata
      @AmantePatata Před 3 lety +2

      Noita is based on it

    • @xen32
      @xen32 Před 3 lety

      Are you talking about some Powder rip off?

    • @NeonV01D
      @NeonV01D Před 3 lety +1

      Powder game?

  • @CloudPhase
    @CloudPhase Před 3 lety +20

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

    • @Phiwipuss
      @Phiwipuss Před 3 lety +1

      Look up "Powder Toy"

    • @legolion1849
      @legolion1849 Před 3 lety +3

      try noita

    • @artex_112
      @artex_112 Před 3 lety

      Look Space Simulaton Toolkit on Steam

    • @PenguinMaths
      @PenguinMaths Před 3 lety +3

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

    • @-Burb
      @-Burb Před 3 lety +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.

  • @nothingnothing1799
    @nothingnothing1799 Před 3 lety +46

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

  • @AAvfx
    @AAvfx Před 3 lety +3

    Love it! So satisfying! 👍

  • @barnabasolah-bozo5837
    @barnabasolah-bozo5837 Před 3 lety +4

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

  • @keithmanning6564
    @keithmanning6564 Před 3 lety +65

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

  • @nv7213
    @nv7213 Před 3 lety +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!

  • @too-many-choices
    @too-many-choices Před 3 lety +15

    must comment for youtube algorithm to strike this masterpiece

  • @oguzdemirtas1873
    @oguzdemirtas1873 Před 2 lety

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

  • @zyphery
    @zyphery Před 3 lety

    Very impressive work! I love it

  • @ignuxas64
    @ignuxas64 Před 3 lety +1

    Great projects man, keep going!

  • @soulguibo
    @soulguibo Před 3 lety +2

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

  • @MortVaderDK
    @MortVaderDK Před 3 lety

    Looks Awersome! Keep going!

  • @senorbill374
    @senorbill374 Před 3 lety

    daym this looks epic
    hope more people will see this soon

  • @s0lly
    @s0lly Před 3 lety +5

    Looking shweet.

  • @enrices
    @enrices Před 3 lety

    Beautiful. More more more videos like this please !!

  • @ThylineTheGay
    @ThylineTheGay Před 3 lety

    This seems really cool

  • @drewlop
    @drewlop Před 3 lety

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

  • @tensterss
    @tensterss Před 3 lety

    Projects like this are fun to pla with

  • @Xenthera
    @Xenthera Před 3 lety +2

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

  • @DrBZU
    @DrBZU Před 3 lety

    Nice work!

  • @laz_chance_to_see
    @laz_chance_to_see Před 3 lety +2

    very nice

  • @mateuspopoff
    @mateuspopoff Před 3 lety

    beautifull job

  • @merthyr1831
    @merthyr1831 Před 3 lety

    Awesome stuff!

  • @arabic_memes1865
    @arabic_memes1865 Před 3 lety

    THIS REMINDS ME ABOUT PHUN ALGADOO!

  • @kurtiskurt1
    @kurtiskurt1 Před 3 lety +2

    Idk why but this physics stuff feels so nostalgic

    • @Onimirare
      @Onimirare Před 3 lety +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 Před 3 lety

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

  • @rodakdev
    @rodakdev Před 3 lety +2

    Truly amazing, great work

  • @CallMeTess
    @CallMeTess Před 3 lety

    Really cool. Reminds me of Noita.

  • @walkiacid9265
    @walkiacid9265 Před 3 lety

    damn, Box2D v2 looking real spicy today.

  • @brynshannon6692
    @brynshannon6692 Před 3 lety

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

  • @mytino
    @mytino Před 3 lety +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 Před rokem +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  Před rokem +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

  • @NuYiDao
    @NuYiDao Před 3 lety +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 Před 5 měsíci +1

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

  • @Mupersega
    @Mupersega Před 3 lety

    you're incredible

  • @Pspet
    @Pspet Před 3 lety

    This is very cool

  • @TheRealSavi
    @TheRealSavi Před 3 lety +9

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

    • @PezzzasWork
      @PezzzasWork  Před 3 lety +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 Před 3 lety +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 Před 2 lety +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 Před 2 lety +1

      @No Sound stacking. Things on top of things.

  • @jonwatte4293
    @jonwatte4293 Před 3 lety

    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!

  • @dirtyspock7957
    @dirtyspock7957 Před 3 lety

    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?

  • @johnjackson9767
    @johnjackson9767 Před 3 lety

    Very nice, is this using MPM for the phyiscs?

    • @PezzzasWork
      @PezzzasWork  Před 3 lety

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

  • @evannibbe9375
    @evannibbe9375 Před 3 lety

    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 Před 3 lety +1

    Wow, nice

  • @Antcode-wk7tu
    @Antcode-wk7tu Před 14 dny +1

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

  • @konstantinkh
    @konstantinkh Před 3 lety

    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?

  • @dairop3220
    @dairop3220 Před 3 lety +1

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

  • @AlienLogic775
    @AlienLogic775 Před 3 lety +1

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

  • @AdamgamesCZ
    @AdamgamesCZ Před 3 lety

    Can I download it?

  • @peridoritothemighty5226

    :0
    I love it

  • @yfluz
    @yfluz Před 3 lety +3

    0:46 Green seem *sus...*

  • @JoeEnderman
    @JoeEnderman Před 3 lety

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

  • @lukeystuff
    @lukeystuff Před 3 lety +1

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

  • @leelou0796
    @leelou0796 Před 3 lety +3

    J'aime bien

  • @Leander_0
    @Leander_0 Před 3 lety +1

    how does one learn this power? this is soo cool

  • @Ali107
    @Ali107 Před 2 lety +1

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

    • @PezzzasWork
      @PezzzasWork  Před 2 lety +1

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

  • @TeppuTeppu
    @TeppuTeppu Před 2 lety

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

  • @Philyshark7
    @Philyshark7 Před 3 lety

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

  • @Natsters46
    @Natsters46 Před 3 lety

    This makes me want to eat some pearled couscous

  • @delve_
    @delve_ Před 3 lety +1

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

  • @AlienLogic775
    @AlienLogic775 Před 2 lety +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  Před 2 lety +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 Před 2 lety

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

    • @AlienLogic775
      @AlienLogic775 Před 2 lety

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

    • @PezzzasWork
      @PezzzasWork  Před 2 lety +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 Před 2 lety

      @@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.

  • @enricobianchi4499
    @enricobianchi4499 Před 3 lety

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

  • @kylaxial
    @kylaxial Před 3 lety

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

  • @atlasua2021
    @atlasua2021 Před 3 lety

    Лучший!

  • @viporal7898
    @viporal7898 Před 3 lety

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

  • @leeuwengames315
    @leeuwengames315 Před 3 lety

    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.

  • @ImXyper
    @ImXyper Před 3 lety +1

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

  • @ChristopherGray00
    @ChristopherGray00 Před 3 lety +1

    Do you have a github for this?

  • @Snort70
    @Snort70 Před 3 lety

    Reminds me of OE-Cake

  • @SacrificialGoat94
    @SacrificialGoat94 Před 3 lety +1

    Is this opensource? Can we get the code anywhere?

    • @PezzzasWork
      @PezzzasWork  Před 3 lety +5

      I will publish it when it'll be more polished

  • @unknown-bx8my
    @unknown-bx8my Před 3 lety

    Woww

  • @Mark00747
    @Mark00747 Před 3 lety +1

    Could you share the code?

  • @prod.hxrford3896
    @prod.hxrford3896 Před 3 lety

    What is this programmed on?

  • @tehbigb
    @tehbigb Před 3 lety

    I wonder how many youtube tutorials this took to make

  • @chakibchemso
    @chakibchemso Před 3 lety

    3d?

  • @chakibchemso
    @chakibchemso Před 3 lety

    This + raylib

  • @arsenbabaev1022
    @arsenbabaev1022 Před 2 lety

    Does that work only with convex geometry?

    • @PezzzasWork
      @PezzzasWork  Před 2 lety

      Yes it does, I used this engine for this project
      czcams.com/video/Yg3xn64P40Y/video.html where objects have non convex shapes

  • @pajeetsingh
    @pajeetsingh Před 3 lety

    Sell this on iphone. Toddlers would buy.

  • @ITpanda
    @ITpanda Před 3 lety

    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 Před 3 lety

      Ever seen noita?

    • @ITpanda
      @ITpanda Před 3 lety

      @@Tulip_bip Negative! Please inform me.

    • @Tulip_bip
      @Tulip_bip Před 3 lety

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

    • @ITpanda
      @ITpanda Před 3 lety

      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.

  • @wizardnotknown
    @wizardnotknown Před 3 lety

    I died.

  • @ivysly
    @ivysly Před 3 lety

    reminds me of oe cake

  • @anothrnoml
    @anothrnoml Před 3 lety

    1:24 wait brain dots all over again

  • @4ROff
    @4ROff Před 3 lety

    tutor ?

  • @nix3l_
    @nix3l_ Před 3 lety

    Source code?

  • @Xturnal
    @Xturnal Před 3 lety

    Git me the Hub

  • @1e1001
    @1e1001 Před 3 lety

    Teardown 2D

  • @prashanthkumar0
    @prashanthkumar0 Před 3 lety +1

    source code plz...
    +1 sub

  • @pou3321
    @pou3321 Před 3 lety

    unity particle system

  • @retard1582
    @retard1582 Před 3 lety +3

    This is nice and all...
    But Prometech Software made something called "OE cake" 12 years ago that does this exact things as this, and a whole bunch of other stuff.
    Like dragging images in and having them load in as objects, stretching and scaling texture meshes based on the physical model, simulation of elastic, viscous mediums.
    simulations of surface tension. The abilty to save and load simulations.
    And they released it as freeware... I know that some people probably haven't been on the internet in 2008, but this was basic stuff even then.
    It's funny to see that your implementation has the exact same object-body clipping issues as OE cake though, it brought back some fun memories.

    • @PezzzasWork
      @PezzzasWork  Před 3 lety +1

      The "new" in the title doesn't refer to the technique used but to the fact that it's a new version of my little physic engine. All my projects are about experimenting things from scratch in order to better understand various subjects.
      Didn't know about OE cake but it's very impressive and it seems very fun to play with :D

  • @edthetraveller
    @edthetraveller Před 3 lety

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

  • @TheVizualkat
    @TheVizualkat Před 3 lety

    This has some Crayon physics Deluxe vibes.

  • @dankmemewannabe7692
    @dankmemewannabe7692 Před 3 lety

    cromch

  • @bugrilyus
    @bugrilyus Před 3 lety

    Facebook video music

  • @CstriderNNS
    @CstriderNNS Před 3 lety

    be more optimized if it would procedurally break

  • @praadiiit
    @praadiiit Před 3 lety +2

    This video is so fragile