4K, 6 Months of Voxel Physics Engine Optimizations

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • ИгрыИгры

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

  • @Specht77
    @Specht77 5 месяцев назад +35

    Thank you, RUclips compression destroyed the 1080p one, this is MUCH better

    • @GrantKot
      @GrantKot  5 месяцев назад +8

      Thanks! It was more my fault. Because of the long timespan my clips covered, I had to redownload old clips from YT. So that caused them to be triple/quadruple compressed. It took some time but I got freshly recorded 4K clips for this.

    • @AndrewBrownK
      @AndrewBrownK 5 месяцев назад +3

      @@GrantKot definitely worth it

  • @timmygilbert4102
    @timmygilbert4102 4 месяца назад +1

    Sand that's coarse and get everywhere, perfection

  • @illustriouschin
    @illustriouschin 5 месяцев назад +19

    I'm dumb but an idea that might be good is if when a droplet becomes isolated, the single object becomes rendered as a spreading cloud of particles that eventually despawn.

    • @GrantKot
      @GrantKot  5 месяцев назад +13

      I think it's a good idea. This could save CPU by not activating node tiles with too few particles. I have considered something similar for rain, if the tiles have too few particles with low chance of collision, don't waste resources doing MPM on those tiles.

    • @Pockeywn
      @Pockeywn 5 месяцев назад +2

      @@GrantKoti mean rain really doesnt need collision until it lands so it could be the opposite and only become physical after landing

    • @joa1401
      @joa1401 5 месяцев назад +1

      @@GrantKoti’m glad that an idea like this might be feasible. something i’m really hoping overall for this technology is that it will leave room for stylisation and art direction beyond just the voxel ‘look’. one beautiful feature of water is the way the otherwise cohesive surface of an ocean can break up into a spray of droplets so small that, from afar, we just see mist.
      i’m also curious if something like dithering could be used to give powders like sand a finer, grainier look without too much of a performance hit

    • @GrantKot
      @GrantKot  5 месяцев назад +3

      Oh yeah, something like this would be great for mist! I didn't actually realize that was the use case OP was probably referring to and not purely a computation saver.

    • @joa1401
      @joa1401 5 месяцев назад

      @@GrantKot also, i’m not sure if you’ve already tried/implemented this, but a nice touch could be slightly darkening the colour of the sand when it gets wet, to represent the ‘total internal reflection’ effect (where rough surfaces refract less light when water permeates them).
      you’re doing amazing stuff here. thank you so much for sharing your journey in such an informative and accessible way! : )

  • @basiliotornado
    @basiliotornado 5 месяцев назад +1

    Saw your post on reddit a few days ago and didn't notice it was the same person who made liquid crystal! happy to see you're still working on it :D love the updates

  • @AndrewBrownK
    @AndrewBrownK 5 месяцев назад +3

    this engine is seriously amazing and pretty

  • @bitmau5
    @bitmau5 5 месяцев назад +2

    Thanks for the re-up!

  • @Aqua_Turneur
    @Aqua_Turneur 5 месяцев назад

    this game looks soooo relaxing! i can't wait to see the final result

  • @WyrdieBeardie
    @WyrdieBeardie 5 месяцев назад +7

    Uhh... This is INCREDIBLE!!

  • @bnug242
    @bnug242 5 месяцев назад +5

    I've been following this project for a few years, just wanted to show extra support with this comment!! 😄

    • @bnug242
      @bnug242 5 месяцев назад +2

      side note, i downloaded the demo and have been playing around with it, its so fun

    • @GrantKot
      @GrantKot  5 месяцев назад +2

      Thanks! I'm really glad to hear you like it!

  • @mrmaniac9905
    @mrmaniac9905 3 месяца назад

    So much potential here.....

    • @GrantKot
      @GrantKot  3 месяца назад

      Hi, if you're worried about the status of the 3D project don't worry, I'm just trying to do some rapid prototyping in 2D to find fun interactions etc.

  • @illustriouschin
    @illustriouschin 5 месяцев назад +4

    That slushy stuff looks good to eat.

  • @GeorgiKrastevMusic
    @GeorgiKrastevMusic 5 месяцев назад

    revolutionary

  • @k.w.6626
    @k.w.6626 5 месяцев назад +2

    I was here! But seriously, wow, amazing stuff. Will the engine itself be open source at some point, or are you gonna license it out like teardown?

    • @GrantKot
      @GrantKot  5 месяцев назад +6

      I think first I want to make some products with it. That way I can fund further development. At this point it's not just a basic MPM simulation anymore (which I do have opensource of but kind of outdated and might even have bad multithreading/SIMD habits), but getting close to products. Sandbox, then game as well as possible VFX simulator.

    • @k.w.6626
      @k.w.6626 5 месяцев назад +1

      @@GrantKot I completely understand, I'm just happy to hear that it isn't off the table in the long term. Not like I'm gonna use it anyway, my brain smooth as a marble. The Doom engine wasn't released the day the game came out, after all. I don't even understand how people begin to learn all this stuff.

    • @sumofat4994
      @sumofat4994 5 месяцев назад

      Stop asking people to give away for FREE their very hard work. That has to stop especially in the gaming industry which is already tight.

    • @k.w.6626
      @k.w.6626 5 месяцев назад

      @@sumofat4994 I don't understand, I never asked anyone to give away anything. I only asked if it would be open source eventually, out of curiousity. I could never do anything with the engine, and I know of people who charge a price to anybody for access to their source code.

  • @roundtabledetails3307
    @roundtabledetails3307 5 месяцев назад +1

    could you make a ai overlay? there is a video of gta5 with a ai filter that makes the game seen almost realistic with no fps cost, couldn't you do the same with water?

    • @GrantKot
      @GrantKot  5 месяцев назад

      Yeah it might be something I could try. I wonder if the water could be point rendered so the NN could see what is behind the water and refract it accordingly.

  • @PedroGarcia-fl1fu
    @PedroGarcia-fl1fu 5 месяцев назад

    AMAZING!!!!

  • @TankorSmash
    @TankorSmash 5 месяцев назад +3

    This is eyewatering, amazing!

  • @dingusbrule5756
    @dingusbrule5756 5 месяцев назад

    Idk why i find boats sinking so fascinating, but we are getting there with this
    Lets get the titanic on it 😤

  • @fryser007
    @fryser007 5 месяцев назад

    I always found fluid simulation hypnotizing @_@

  • @GeorgiKrastevMusic
    @GeorgiKrastevMusic 5 месяцев назад

    Man, imagine a game like Empire Earth with this engine

  • @kellymoses8566
    @kellymoses8566 3 месяца назад

    multithreaded programing is so freaking annoying

  • @aw_dev
    @aw_dev 5 месяцев назад +1

    Gotta love the jello sticks 😂

  • @Polygarden
    @Polygarden 5 месяцев назад

    Very impressive work! Is the simulation running on cpu or gpu?

    • @GrantKot
      @GrantKot  5 месяцев назад +2

      I have the simulation running on CPU and the rendering on GPU. The game renders at 4K, might even try for multiple screens. Also targeting handhelds with iGPU.

  • @mr.gummie3472
    @mr.gummie3472 5 месяцев назад +1

    possible to make a game inside of?

    • @GrantKot
      @GrantKot  5 месяцев назад

      Yup, that's the plan!

  • @Gwilo
    @Gwilo 5 месяцев назад +1

    this is wonderful

  • @lordmarum
    @lordmarum 5 месяцев назад

    I understood nothing, but its so beautiful!

  • @zaidbahssali4791
    @zaidbahssali4791 5 месяцев назад

    You were sharing one of your demos on Parsec Arcade a while back, right? I was mesmerized by it. This is really awesome work and I can't wait to see where this project of yours goes!

    • @GrantKot
      @GrantKot  5 месяцев назад

      Thanks! Yes, Liquid Crystal. There is also a demo of it on kotsoft.itch.io with local split screen.

  • @coreywilliams6118
    @coreywilliams6118 5 месяцев назад

    So minecraft but better? Is that the plan?

  • @SynthByte_
    @SynthByte_ 5 месяцев назад

    that water would look great in a lego type of game

  • @AndrewLeConte
    @AndrewLeConte 5 месяцев назад

    It would be really nice to have things like, if cold water is in contact with an ice block then a water particle can move itself to the ice object grid and become more ice, or fast water against dirt has a chance to make a mud particle and cause erosion.

    • @GrantKot
      @GrantKot  5 месяцев назад

      Yeah, definitely. With the dirt, there is some of that mud behavior when it mixes with water. The material properties and effects are blended a bit through MPM.

  • @christojojo4433
    @christojojo4433 3 месяца назад

    Feel like high poly count in the fluid makeing it lot more polygonal looking could make it more satisfying and cpu friendly

    • @christojojo4433
      @christojojo4433 3 месяца назад

      Like fluid in the game - instruments of destruction

  • @luigi.0533
    @luigi.0533 5 месяцев назад

    I want to drink the voxel water

  • @PchlaPddy
    @PchlaPddy 5 месяцев назад

    Amazing video. This proves how big the rabbit hole of water simulations is, so many ways to optimize and finetune it...

  • @MrCreepsGaming
    @MrCreepsGaming 5 месяцев назад

    this man still only got 5k subs

  • @pangolin7398
    @pangolin7398 5 месяцев назад +1

    Cant wait to see where this goes

  • @ハェフィシェフ
    @ハェフィシェフ 5 месяцев назад

    The simulations are magical, are you gonna open source it at some point? I totally understand if you wanna keep the hard work for yourself but was just curious

    • @GrantKot
      @GrantKot  5 месяцев назад +1

      First I will work on my own products sandbox/game/vfxsim with it and try to use them to fund further development and even accelerate the pace of development by forming a studio.

    • @ハェフィシェフ
      @ハェフィシェフ 5 месяцев назад

      @@GrantKot sounds great! Good luck man!

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

    you should make some car crashing with this new system

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

      Yeah, I will try to do cars soon. There is a slight issue with wheels but I will try to figure it out and improve the game's structure system.

  • @lankim3164
    @lankim3164 5 месяцев назад

    This looks amazing!! Can I ask you why 5900x performed poorer than i5-8600k? Was it related to the memory latency or bandwidth?

    • @GrantKot
      @GrantKot  5 месяцев назад +1

      Thanks! I think at 12 cores and 2 CCDs and maybe the PC builder skimping a little on memory latency (CL18) all contributed to amplified my poor multithreading practices. Initially there was some trouble with non-temporal stores on one thread being slowed down by atomics going on another thread, because I think atomics will cause the write combine buffer to flush. I also had an interleaved like pattern for updating particle tiles so I could write to the global grid because I thought not having a copy would be better. In the end, using thread local scratch memory was the way to go.

    • @lankim3164
      @lankim3164 5 месяцев назад

      @@GrantKot Oh wow! Thanks so much for the detailed explanation. To me, the fact this can be done is a little mind-blowing. Have you run the revised multithreading routines on 5900x and see a drastic improvement over 8600k? When you ran it on your new laptop, did you have to rearrange the tasks and distribute them over P and E cores manually in your program for the new Intel CPU, like heavy loads to P cores and others to E cores? Or does the CPU do that for you somehow even if you run the same code(as the code you wrote for the CPU with homogenous cores)?

    • @GrantKot
      @GrantKot  5 месяцев назад +1

      At the time when I did the Liquid Heating demo, when I merged the G2P and P2G (and other optimizations), for the same particle count performance was 2x faster on 8700K and the 5900X went close to the theoretical of being 2x faster than the 8700K. But then I got a bit demotivated because that whole thing about not knowing how to do the structures. I don’t differentiate what I send to the cores, just use taskflow which does work stealing

  • @EngineerNick
    @EngineerNick 5 месяцев назад

    :O

  • @RobShmit
    @RobShmit 5 месяцев назад

    Amazing how far its come in a short while! How many simulation steps & substeps are you performing per second? I moved away from MPM because it wasn't stable enough for me with fewer steps...

    • @GrantKot
      @GrantKot  5 месяцев назад

      On the clips with FPS counters, the simulation rate is the same as the render rate. I’m not using any substeps. The coarse pressure (only added one 1/8 level so far) helps with that.

  • @AngeloXification
    @AngeloXification 5 месяцев назад

    😍

  • @incription
    @incription 5 месяцев назад

    what if u save results of particle collisions in a hash table then use it as a cache to precompute particle collisions when the initial positions are "close" together

    • @GrantKot
      @GrantKot  5 месяцев назад +1

      Yeah, that is a possibility. I think though the data of this hash table would have to fit within L1 or L2 cache for it to work well. If any larger (these days CPUs are very memory-bound), and you will have issues with cache coherence. The thing is, it can get pretty large, especially if you have different materials with different properties. It is something perhaps Machine Learning physics is trying to solve, actually now that I think about it, are there any successful multiphase ML fluid simulations out there? I'm going to do some digging.

  • @ocean3323
    @ocean3323 5 месяцев назад

    Is that reupload?

    • @GrantKot
      @GrantKot  5 месяцев назад

      Yes, it is a 4K60 reupload. The previous one had major compression issues so there were many requests to redo it in 4K. There are some new 4K clips used as I had to recapture any footage that I no longer have originals for. In the future I plan to always upload 4K the first time.

  • @PeterMyler
    @PeterMyler 5 месяцев назад

    wow this is so much better, thanks for the 4k!

  • @jb14_99
    @jb14_99 5 месяцев назад

    wow this is amazing : ) awesome work

  • @sjoerdev
    @sjoerdev 5 месяцев назад +1

    which graphics api is this?

    • @GrantKot
      @GrantKot  5 месяцев назад

      Nowadays I usually build on DX12 to take advantage of async compute, where I run things like Intel XeGTAO and FSR.

    • @sjoerdev
      @sjoerdev 5 месяцев назад

      @@GrantKot which build system do you use? cmake? msbuild? other?

    • @GrantKot
      @GrantKot  5 месяцев назад

      Yeah, now I use cmake with MSVC clang. I find the clang vector extensions to work well for writing cross platform SIMD code.

    • @sjoerdev
      @sjoerdev 5 месяцев назад

      @@GrantKot cool, and which code editor are you using? and which os?

    • @GrantKot
      @GrantKot  5 месяцев назад +1

      i'm usually using vscode on windows

  • @slurmworm666
    @slurmworm666 5 месяцев назад

    Amazing, bravo

  • @yashsaxena9
    @yashsaxena9 5 месяцев назад

    Hello sir, is it possible to get codebase of this? or a similar voxel particle system?
    Please 👉👈

    • @GrantKot
      @GrantKot  5 месяцев назад +2

      I first want to give a go at releasing my own sandbox/game/vfxsim. If it is successful, then I could start a studio and further accelerate development into this.

    • @GrantKot
      @GrantKot  5 месяцев назад +1

      Oh and there is the OS gvox system by Gabe Rundlett

  • @jsierra88
    @jsierra88 5 месяцев назад

    Hi! Where could we start learning about this method?

    • @GrantKot
      @GrantKot  5 месяцев назад +2

      The main one here is MPM, or the MLS-MPM/APIC variant of it. I also take in some stuff from SPH (I think I was responsible for making the usage of density summation rather than integration over time more popular in MPM, it was common in SPH) and PBD (shape matching).
      For MPM, there is a Chenfanfu Jiang who is involved in a lot of MPM papers. So his publications page is a good list. Utah CSAFE also seemed to be very into MPM.
      MPM: Material Point Method
      MLS-MPM: Moving Least Squares MPM
      APIC: Affine Particle in Cell
      SPH: Smoothed Particle Hydrodynamics
      PBD: Position Based Dynamics

    • @jsierra88
      @jsierra88 5 месяцев назад

      @@GrantKot thank you for answering! That's good info. Density summations instead of integration over time? Is that why your system is that stable?