Liquid Layers

Sdílet
Vložit
  • čas přidán 26. 06. 2024
  • Demo: grantkot.com/ll
    Added new interactions, better multi-touch, easier to modify via scripting.
    The physics is based on the paper: Particle-based Viscoelastic Fluid Simulation by Simon Clavet, Philippe Beaudoin, and Pierre Poulin
  • Hry

Komentáře • 85

  • @ChristopherElwell
    @ChristopherElwell Před 4 dny +29

    2:28 Cool that your LLM (Liquid Layer Model) can elicit AGI.

    • @weevilsnitz
      @weevilsnitz Před dnem

      Adjusted Gross Income? Liquid Layers can do my taxes!

  • @theowenmccarthy
    @theowenmccarthy Před 3 dny +3

    It's wild that moving the window is simulated as motion, such a cool detail

  • @AnalogueAbsynth
    @AnalogueAbsynth Před 4 dny +13

    playing with this is so satisfying

    • @idontwantahandlethough
      @idontwantahandlethough Před 2 dny +1

      reminds me of that classic "Falling Sands" game(let) that used to exist all over the place, but updated with more complexity for modern times :D
      P.S. I know gamelet isn't a word, but it *_feels_* like the right word for a game that isn't actually a game but more of a toy/experiment lol

  • @fios4528
    @fios4528 Před 4 dny +18

    As always, a wonderful demonstration of awesome tech. Thank you for taking the time to share this

  • @Copa20777
    @Copa20777 Před 3 dny +1

    I didnt expect to interact with it in my phone directly, dude your a Genius, wish you all the best and God bless

  • @JohnDoe-rx3vn
    @JohnDoe-rx3vn Před 2 dny

    "Falling sand" games aren't new, but this is the by far the best fluid simulation i've seen in that vein

  • @m.i.c.h.o
    @m.i.c.h.o Před 3 dny +3

    You just blew my mind. I'm playing with the demo right now and I can't believe my eyes! MY computer is running this??? Thanks for this!

  • @jamesking2439
    @jamesking2439 Před 4 dny +9

    The bonding behavior is so cool.

    • @iestynne
      @iestynne Před 3 dny +2

      Yeah, the way the difference materials naturally self-organize into a regular matrix looks kind of RGB cells on a CCD... fascinating.

  • @RPG_Guy-fx8ns
    @RPG_Guy-fx8ns Před 3 dny +1

    add some bubbles, boids, maybe some slime growth. maybe add a crafting system, where you recognize certain molecule structures, and you replace them with other particles.

  • @23lkjdfjsdlfj
    @23lkjdfjsdlfj Před 4 dny +6

    Absolutely amazing!

  • @cyber-gate
    @cyber-gate Před 4 dny +6

    Molecular bonding is so interesting!

    • @GrantKot
      @GrantKot  Před 4 dny +3

      Yeah, very curious to see what could be done with it. I'm going to have to improve my chemistry simulation knowledge a bit.

  • @SuperWabo
    @SuperWabo Před 4 dny

    Really cool simulation. Well done!

  • @iestynne
    @iestynne Před 3 dny +1

    This looks so much fun to play with!
    Am I the only one thinking... Noita sequel?? :)

  • @markoradojevic4813
    @markoradojevic4813 Před dnem

    This is REALLY amazing!!!

  • @TeslaPixel
    @TeslaPixel Před 4 dny +4

    2:28 lol it's just as close as current claims

  • @trololp9724
    @trololp9724 Před dnem

    This remainding me of old sandbox game called OE-Cake that was released in 2008, some structure you called "molecular bonding" and those spaghetti thing I saw in that game too.

  • @tev5040
    @tev5040 Před 3 dny +1

    found this video randomly. played around on this website for like 30 minutes. super fun lol

  • @basiliotornado
    @basiliotornado Před 3 dny

    Fun demo! always love playing with this kind of thing

    • @basiliotornado
      @basiliotornado Před 3 dny

      is it intentional that i can drag the window to shake the fluid? 😅

    • @GrantKot
      @GrantKot  Před 3 dny +1

      @basiliotornado yeah dragging and resizing the window are supported. On mobile accelerometer and multitouch is also supported.

  • @robelso5646
    @robelso5646 Před dnem

    This is AWESOME

  • @salvadorian3288
    @salvadorian3288 Před 3 dny

    Fantastic!

  • @idontwantahandlethough

    Very cool man!

  • @artificiallychallenged

    I would really like to see electric potentials and radii added here. It could be fun to try to make molecules with this!

  • @pablogonzalez4567
    @pablogonzalez4567 Před 11 hodinami

    this is really cool

  • @TeslaPixel
    @TeslaPixel Před 4 dny +4

    User functions are a nice touch, maybe add an input field on the settings? Something like a text box and a "run" button would be nice

    • @GrantKot
      @GrantKot  Před 4 dny +2

      Yes definitely! I will try to see if I can add it there, with maybe a dropdown of demoFuncs. I would also like to somewhat figure out a way to sanitize user JavaScript to some subset so that it can be shared via the site without endangering other end users.

    • @TeslaPixel
      @TeslaPixel Před 4 dny

      Oh that's a good idea! And yes that's probably for the best 😅

    • @balala4641
      @balala4641 Před 3 dny +1

      @@GrantKot can you add a function to toggle gravity? accelerometer button does nothing on my end

    • @willd2609
      @willd2609 Před 15 hodinami

      @@GrantKot this would be outrageously cool :D

    • @GrantKot
      @GrantKot  Před 14 hodinami

      @@balala4641I added gravX and gravY sliders under the simulation tab.

  • @emrekt22
    @emrekt22 Před 2 dny

    very impressive i like this

  • @kellymoses8566
    @kellymoses8566 Před dnem

    This is like a liquid version of powder toy.

  • @creativical
    @creativical Před 21 hodinou

    Just spent an eternity trying to get 4 different colored blobs to stay together in zero gravity just using the drag tool. Meanwhile my sister married and had two kids who study statistics now.

    • @GrantKot
      @GrantKot  Před 21 hodinou

      There is the nbody checkbox under the simulation tab which might be helpful lol

  • @timmygilbert4102
    @timmygilbert4102 Před 3 dny

    Me: look ma! I'm a Jedi
    Ma: stop playing with your cereal 🥣

  • @MartinDxt
    @MartinDxt Před 4 dny

    wow i remember playing with the phone app back in 2012 i think

  • @kaede_elfen
    @kaede_elfen Před 3 dny

    Amazing stuff! Where can we read more about the background and the method used to simulate the fluids?

    • @GrantKot
      @GrantKot  Před dnem

      Thanks! The base liquid algorithm can pretty much be fully implemented just by following the paper Particle-based Viscoelastic Fluid Simulation.
      The method I recommend for spatial hashing can be found here: github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial14_ComputeShader

  • @realElo.2
    @realElo.2 Před 4 dny +1

    would it be possible to add a pause hotkey? where things are paused but you can still leftclick drag things around? would be awesome

    • @GrantKot
      @GrantKot  Před 3 dny +1

      I added a "sculpt mode" which you can toggle with S key. There's also the vortex forces from x and c that you can use while in this mode. Or attract/repel. Would also recommend playing around with the sameRestDensity/diffRestDensity/stiffness parameters in this mode.

    • @realElo.2
      @realElo.2 Před 3 dny +1

      ooo this is very interesting!! thank you for doing this!! (:

  • @blendfile3_3
    @blendfile3_3 Před 4 dny +1

    Are there plans to add simulation/particle size control?

    • @GrantKot
      @GrantKot  Před 4 dny +2

      Yes, I should probably add that now that I have the emit action. And also have the ability to turn off auto resizing of the kernels when the window is resized.

  • @scotthilton7164
    @scotthilton7164 Před 3 dny +1

    Can you make it so we can set rest density for each material individually?
    Do you have source code available?

    • @GrantKot
      @GrantKot  Před dnem

      I will try to add that feature soon. I don't have the latest SIMD optimized version available to public but I do have a JavaScript implementation: github.com/kotsoft/particle_based_viscoelastic_fluid/

  • @Theawesomeking4444
    @Theawesomeking4444 Před 3 dny +1

    do you plan on updating liquid heating in the future? im actually very curious how well your new fluidsim performs compared to back then.

    • @GrantKot
      @GrantKot  Před 3 dny +1

      I think the liquid heating one was reasonably optimized. With it I resolved the multithreading and cache issues that were plaguing me when I moved up to the 5900X. Its main slowdown is the tracking of the full 3x4 deformation gradient. And sending it to the GPU as all floats. In the newer one, with the sand, I only send a byte for each of the 3x3 deformation gradient elements.

    • @Theawesomeking4444
      @Theawesomeking4444 Před 3 dny +1

      ​@@GrantKot interesting, because something i realized with the liquid heating is that it runs at 20 fps (1 million particles i think it is?), and it does not matter if my cpu is clocked at either 4ghz or at 2ghz it runs at the same fps, possibly memory bottle necked, since you said that you made the particle memory size smaller, maybe it should run at 40 fps now?
      because for example the one i have, i managed to get it running at 18 fps (1 million) after doing manual simd with avx2 as you suggested which thanks btw. but the cpu has to be clocked at 4ghz otherwise it lowers based on clock speed, for example 2ghz will make it run at 9 fps.

    • @GrantKot
      @GrantKot  Před 3 dny +1

      @Theawesomeking4444 yeah could be memory bandwidth related. Does your machine support resizable bar? I think I relied on it too much. I am on the way to get things multithreaded with webassembly as well

    • @Theawesomeking4444
      @Theawesomeking4444 Před 3 dny +1

      @@GrantKot resizable bar? ive never heard of that, what is it for?

    • @GrantKot
      @GrantKot  Před 3 dny +1

      @Theawesomeking4444 it allows you to write directly to GPU memory from the cpu. Instead of having to use an upload buffer. Started with nvidia 3000 series.

  • @jackerywebster5864
    @jackerywebster5864 Před 4 dny

    A while ago you made the chemical reaction mpm, was there any special algorithm you used implementing that?

    • @GrantKot
      @GrantKot  Před 4 dny

      Nothing too special, the particle would just pick another index at random in the same cell. And I didn’t take much else into account like pressure or heat etc

  • @MDNQ-ud1ty
    @MDNQ-ud1ty Před dnem

    You seem excited. /s
    Maybe you could add some molecular like feature where the different materials can act as atoms and form molecules if they exist in the right configuration. This would likely make the simulation non-realtime though but maybe if you limited the possible configurations. E.g., 4 reds with a blue center in the form of a + can form a molecule and these will then act as fixed structures which could only break if another molecule hit it hard enough. Also, maybe have some help hints when mouse is over the text.

    • @GrantKot
      @GrantKot  Před dnem

      Yeah, great ideas! Thanks for reminding about the hover hints. Will try to get those in soon.

  • @DTS037
    @DTS037 Před 3 dny

    hello ;qnm i love ur job / do u think it could be qudio sync ?

    • @GrantKot
      @GrantKot  Před dnem

      Thanks yeah, would be cool to audio sync different things. Maybe a heightfield collider on the ground, or maybe bass could control some repulsion force fields. I think it is possible to use the WebAudio analyzer node to do this.

  • @quentinwach
    @quentinwach Před 4 dny

    The singularity is near

  • @willd2609
    @willd2609 Před 16 hodinami +1

    Just incredible!! Could something like this be ported to Godot? This would be so wonderful to play with for 2D video games!!

    • @GrantKot
      @GrantKot  Před 4 hodinami

      Thanks! Definitely the base algorithm from Particle based Viscoelastic Fluid Simulation (Simon Clavet) could be implemented. But yeah I think JS+Wasm is a pretty amazing combination for getting near native performance but being easy to hack around on.

  • @m.i.c.h.o
    @m.i.c.h.o Před 3 dny

    Please add fixed obstacles and containers that you can place into the sim

    • @GrantKot
      @GrantKot  Před dnem +1

      I have started adding some of this. To preview static colliders you can now use the C, V, B, G keys to have the liquid collide with basic shapes around the mouse. Will allow placing of these as soon as I update the renderer to render the shapes. You can lock particles in the brush radius in place with the tilde ` key. I hope to polish this stuff up this week.

    • @m.i.c.h.o
      @m.i.c.h.o Před 23 hodinami

      @@GrantKot that’s great, thanks! By the way, I was hoping you could add a purely anti-gravity button for mobile users, as when using the accelerometer makes it so you need to have your screen flat to the ground.

    • @GrantKot
      @GrantKot  Před 23 hodinami

      For zero g you can also now use the gravX and gravY (set to 0) settings in the Simulation tab. Kind of unfortunate they’re not in same tab

    • @m.i.c.h.o
      @m.i.c.h.o Před 17 hodinami

      @@GrantKot Got it. All good!

  • @jonathanperreault4503

    could you add sand//ground behaviour ? it would be awesome to make this into a full game , if you ad ground and water then you would only need to be able to generate a large world to walk around in ,could you make the simulation window scroll around super mario style?

    • @ar_xiv
      @ar_xiv Před 4 dny +2

      "only" lol

    • @GrantKot
      @GrantKot  Před 4 dny +1

      Yeah! I did have something like that in the past, a little game called Polluted Planet. But it got caught up when all the browsers were removing Java (not script) support. And there was no great browser alternative for computation heavy code. But now I can try again with JS + WebAssembly

  • @hallo2955
    @hallo2955 Před 3 dny +1

    Truly amazing. I see so much potential for a Game. But sadly, it doesn't run in FireFox. I just can't emit any particles. Does anyone has similar issues?

    • @GrantKot
      @GrantKot  Před 3 dny +1

      Hi, Firefox should be able to run this. Would you be able to press F12 while on the page so the inspector pops up, then reload and see if any errors pop up in the bottom? It does use some newer features like WebAssembly and WebGL2 so maybe also check your FF version in settings (search "updates" to get to relevant section). I am currently trying it out on FF 127.0.2.

  • @Lily-Carruthers
    @Lily-Carruthers Před 3 dny

    Does this have a public git repo that I could contribute code to?

    • @GrantKot
      @GrantKot  Před dnem +1

      I don't have the SIMD optimized version available to public, only a JS version so far: github.com/kotsoft/particle_based_viscoelastic_fluid/
      If there are features you would like to see let me know and I can also potentially add them.

  • @user-qh8bm4nv9w
    @user-qh8bm4nv9w Před dnem

    Noita 2 Demo :)

  • @theneonbop
    @theneonbop Před 4 dny +1

    its super fast, it runs at ~25 fps on my dual core celeron chromebook from 2017, even with half of the screen filled with liquid

  • @quentinwach
    @quentinwach Před 4 dny

    How do I upload my brain into this?

  • @quentinwach
    @quentinwach Před 4 dny

    Clearly AGI

  • @LaDoorDude
    @LaDoorDude Před 4 dny

    easily a chrome bookmark. usable on a school laptop!