What everyone else thinks: wow this is very cool! What i think: *J E L L O*
@CATHERINE-rx8ov4 жыл бұрын
Same
@hottomm-k5j8 ай бұрын
schloop
@DogsWithPurpose4 жыл бұрын
This is like “oddly satisfying things” but for programmers.
@somecriticaldude48304 жыл бұрын
I gotta admit, I love how fluent your engine is. Im subscribing and looking forward to more updates!
@laughingbeans77154 жыл бұрын
The only ad I’ve ever clicked on because I was actually interested. Keep up the good work.
@LMT14144 жыл бұрын
Wow this is just complete eye candy!
@JesseStiller4 жыл бұрын
It's amazing that you're one of the only people pushing for realtime fluid simulation (and everything else that MPM allows for) :D What integration scheme are you using (ie, jacobian, gauss seidel, etc)?
@GrantKot4 жыл бұрын
I'm using the default integration as described in MPM and APIC papers. I think things are going to heat up in the real-time physics industry this year. AMD and Nvidia and Intel battling it out is good for this kind of stuff. My CPU is actually considered low-end these days. Hoping to upgrade to Threadripper once the new Nvidia cards come out.
@Vollkornaffe4 жыл бұрын
@@GrantKot Default integration means explicit I'm guessing. Then no system solving (jacobian ... ) is required at all.
@GrantKot4 жыл бұрын
@@Vollkornaffe Yeah, explicit. I'm also not using substeps.
@chobyriley4174 жыл бұрын
Your ad worked : )
@GrantKot4 жыл бұрын
Thanks! Working way better than I expected.
@midgetman42064 жыл бұрын
So you got it too, the strangest ads are the ones that work
@degenerate61094 жыл бұрын
You had my curiosity, now you have my attention
@TMracer737 ай бұрын
This is breathtaking
@Vollkornaffe4 жыл бұрын
Dude... I love it :D
@astraldragon54834 жыл бұрын
If only a minecraft-like game had these physics. All the freedom/creativity of Minecraft, with a realistic physical/destructible world that actually has realistic physics for solid objects and liquids/etc.
@GrantKot4 жыл бұрын
Hi, I fully intend to support community created content and modding. I am now working on MagicaVoxel support (check latest vid) and will also have some basic in game construction.
@Alex-ft8bs4 жыл бұрын
You took playing with your food to another level
@Sploky3 жыл бұрын
This is the greatest thing ever.
@yummygummy34164 жыл бұрын
so gorgeous looking (edit: im def gonna be watchng ur stuff as u post its really cool
@banymany74444 жыл бұрын
How the pool looks when your dad gets in...
@sirbirbton4 жыл бұрын
This looks super nice, I've never seen fluid simulation quite like this.
@GrantKot4 жыл бұрын
Thanks! Make sure you check out my latest video which has even more advanced rendering :)
@lewaxer24074 жыл бұрын
Bro this is awesome keep up the good work! 😄
@RagdollRocket4 жыл бұрын
That's so cool!
@red-28954 жыл бұрын
IM TRIPPING BALLS
@ghostflesh24494 жыл бұрын
So dope looking! Keep up the good work.
@SchmiblorFlumbo4 жыл бұрын
This looks great! Keep up the good work, I'm positive that this could turn into something awesome!
@Vollkornaffe4 жыл бұрын
How tough can you make your material? Do you have Young's modulus and Poisson's ratio? Edit: 3 typos, smh
@GrantKot4 жыл бұрын
The deformation gradient in MPM can be thought of as a parallelipiped and each of the matrix columns is an axis. To keep things stable you can limit things like length of each column.
@Vollkornaffe4 жыл бұрын
@@GrantKot My bad, typo. How *tough* can you make your material? As in, can it also be more rigid?
@GrantKot4 жыл бұрын
@@Vollkornaffe This is about the most rigid I can get without additional springs, like my fibers experiments which used Position Based Dynamics, or there are papers on using Lagrangian springs with MPM. I use a density summation and pressure equation of state based on density, which is more common in SPH sims. I think for long running simulations you have to use density summation and not integration over time. I'm not too sure about the constants, because I have various limiters for stability reasons.
@rod50654 жыл бұрын
This is really nice, good job
@dlk7777i4 жыл бұрын
The inside of my washing machine be like
@GrantKot4 жыл бұрын
Demo available at: kotsoft.itch.io/mpm-tech-demo Windows 64-bit only for now. This is the first release so I'm not completely sure on the minimum system requirements. Please let me know if you have any issues running it. Also, feel free to post your CPU model and what FPS you are getting.
@VioletPrism4 жыл бұрын
This is like ASMR 🥵
@imsonoided4 жыл бұрын
Reminds me of my last acid trip
@Theawesomeking44443 жыл бұрын
thats pretty cool are you using opengl,opencl, vulkan or other?
@GrantKot3 жыл бұрын
Thanks, I’m using DirectX here. It’s less cross platform but easier to develop on if you only want to target PC/Xbox
@Theawesomeking44443 жыл бұрын
@@GrantKot yeah ive heard directx is good but its only for windows and xbox unfortunately, ive been trying to do this with opengl tho are you doing the fluid physics on the CPU or the GPU? i tried doing it on both i managed to run 100000 particles on a quad core cpu at 60 fps but only 50000 on an intel hd GPU (i think some of the code that works on the cpu doesnt work very well on the gpu ive heard branching is evil on the gpu) do you have some recommendations on how i can improve the instace (particle) count or make the simulation more stable and use less timesteps (rn i use 120fps)?
@GrantKot3 жыл бұрын
I'm doing the physics on the CPU. I think the era of doing every computational thing on the GPU is over, with GPU being in short supply, as well as multicore CPUs seeing major improvements thanks to AMD (and Intel is fighting hard to comeback as well). And especially with integrated graphics, I would assume most of the focus went to the CPU portion, so that could explain why you see better performance with your CPU than the iGPU. Achieving perfect multithreaded scaling with MPM can be tough, and if you have other things you want to have in your game like rigid body physics, I would recommend maybe 1 core for MPM, 1 core for rigid bodies, 1 core for AI, etc. Otherwise, my main suggestion would be to bin/partition the particles so you get more locality. Hopefully each core is writing to only a portion of the grid, and not doing scattered reads/writes across the whole domain. Try tiling your grid, or do your scatters to a core-local cache, then do a copy of that to the global grid. This is a paper I recommend which includes a wide variety of techniques. Many of these concepts will also work well when transferred to CPUs: sites.google.com/view/siggraph2020-multigpu
@Theawesomeking44443 жыл бұрын
@@GrantKot i removed some stuff on the gpu code and now it runs 300000 particles at 20 fps(40 fps substepped) but now the water is all turbulent. wait so each core has to get a portion of the grid instead of scanning the grid per particle? wouldnt that bottleneck the simulation if there are lots of particles concentrated on one place leaving most cores idling with empty grids while the ones with the full grid are busy? ill give it a try anyways thanks also i saw that you can run up to 600000 particles in your cpu is that in a single thread or using all cores? because right now i can run 30000 single threaded and 100000 in all cores (quad core) since you have an 8 core with 600000 particles this means that my cpu should be able to handle 300000, dang i need to optimize my simulation.
@GrantKot3 жыл бұрын
I'm not just dividing the grid into N sections for N cores. It's a little finer grained than that, dividing the grid into tiles, and then binning the particles into the tiles. The cores go over each tile of particles via work stealing which allows more even load balancing. Static partitions is also not terrible as sometimes CPUs automatically balance things out because if only 1 core is doing work it turbo boosts a bit more. How are you avoiding data race conditions if you're not binning/partitioning your particles? Are you using atomics?
@cyanoure2 жыл бұрын
Imagine this on a stable quantum computer in the future. :D
@VoxelMusic3 жыл бұрын
Game listed in description: Minecraft
@GrantKot3 жыл бұрын
Yeah... that's KZbin itself doing weird stuff. I don't mention Minecraft anywhere in the title or description but it's automatically adding this link and there's no way for me to remove it.
@dragoons_net8 ай бұрын
Amazing! Using mesh shaders? If so, can you use textutres?
@GrantKot8 ай бұрын
This was pre-mesh shaders, and my recent demos have also been using just vertex shaders as I optimize a little for older gens. But yeah, I could support textures with or without mesh shaders. I do kind of like a more geometric style though, e.g. material per triangle. Mesh shaders are really useful if you want different geometry per particle.
@dragoons_net8 ай бұрын
@@GrantKot Thanks! I played with mesh sahders until I found out that their main interest resides in occlusion culling, and thought (saw) that textures could not be used with them. Not surprised that you came back to the good old vertex shader! Very impressive work. Thanks for the emotion!
@grantlauzon52374 жыл бұрын
Looks tasty.
@jamessever89363 жыл бұрын
in order to create the flexible material does the size of the voxels change or just the space between them?
@GrantKot3 жыл бұрын
The voxels are able to scale rotate and shear so that can help keep things more connected. If you pull things too far apart gaps do show or it might fracture.
@angelo99154 жыл бұрын
This is truly amazing, how did you learn to make stuff like this?
@GrantKot4 жыл бұрын
Thanks! Do you know the channel Two Minute Papers? I don't learn directly from there but it might help introduce you to the concepts if you're interested in coding your own simulations. Other useful pages: kesen.realtimerendering.com/ www.physicsbasedanimation.com/ Or if you just want to make 3D animations via Blender or something, check out Flip Fluids and Embergen and RealFlow
@jamessever89363 жыл бұрын
this could actually be used fo research simulations
@TwitchingShark4 жыл бұрын
Looks like you are on the same path. Amazing work! Do you enjoy getting lost in physics too? what gpu api are you using or is it completely custom?
@GrantKot4 жыл бұрын
Twitching Shark thanks! Yes physics is a lot of fun! I used to focus a lot on mechanics but this year have started expanding into optics and acoustics. Engine/framework I’m using is DirectXTK.
@Bleenderhead4 жыл бұрын
I wonder what kind of adaptive meshing approaches would be viable as an alternative to deformed cubes... it doesn't translate readily to marching cubes since this simulation isn't volumetric. Even RTX acceleration structures can't handle an undulating fluid, so ditching triangles and ray tracing metaballs doesn't seem viable either. On the subject of acceleration, is there any way to cull geometry on the interior of the "boundary" of the fluid? Rendering a soup of volume elements presents a scale problem regardless of how pretty they are, and I guess this is a challenge for similar reasons, i.e. no way to partition the scene into an acceleration structure without rebuilding it every frame.
@GrantKot4 жыл бұрын
I've only followed some very basic RTX tutorials so far, so my knowledge is very limited. I think the deformable cubes are actually quite friendly to raytracing as they are basically just instance transform matrices. Metaballs shouldn't be too difficult either. As for acceleration structures, I don't think that should be to difficult, as physics simulators rebuild their "acceleration structures" every frame all the time for collision optimization. I think what would be useful is a different type of structure for particle simulations than what they currently have which I think is a K-D tree. Something more of a grid hash type, maybe blocked for sparseness, like SPGrid. Also, rasterization also seems pretty cheap as modern GPUs can early exit on fragments based on depth. Also when you're having mixtures of many materials, I think there is no huge reason to worry about geometry culling. I don't possess the skills yet, but hope to in the future. For now, I'm going to be doing some screen space refractions and reflections.
@Vollkornaffe4 жыл бұрын
>[..] it doesn't translate readily to marching cubes since this simulation isn't volumetric. I am very confused by this. You can just use the mass on the gridnodes for marching cubes?
@GrantKot4 жыл бұрын
@@Vollkornaffe Yeah, it can be used, but I feel like it loses a lot of detail. One of the advantages of MPM is the ability to simulate sub-grid details and have multiple particles per grid cell. I feel like it's hard to tell the flow with marching cubes.
@Vollkornaffe4 жыл бұрын
@@GrantKot I also think that the cubes you have now are looking just fine... but its a matter of taste :P
@GrantKot4 жыл бұрын
Check out newest video for some volumetric raytracing :).
@WDGSWhatDoesGodSay3 жыл бұрын
Wow!
@KingofKings3514 жыл бұрын
2x speed makes this sooooo much more fun to watch 😂
@GrantKot4 жыл бұрын
Thanks for the suggestion! I will be optimizing it better for high core counts so the 12 core threadripper should be able to hit 60fps for this particle count. Currently my friend tested and it’s at 48fps, but cpu usage only at 70% (so room for improvement). On my 6 core with screen capture it’s about 35fps.
@KingofKings3514 жыл бұрын
Anyway you can make a slime from Dragon quest? 🤔
@GrantKot4 жыл бұрын
Sure can! I’ll try to include one in my next video. I’m working on supporting magica voxel files so you can draw anything in there and then drag and drop in the window to add it to the scene.
@GrantKot4 жыл бұрын
Check out the latest vid! I had limited resolution to work with but did my best :)
@dontsubscribetothischannel96844 жыл бұрын
#bigbrain
@iamlordstarbuilder55954 жыл бұрын
What kind of hardware is running this? Also why’s it an ad?
@GrantKot4 жыл бұрын
CPU is i7-8700K 6-core 3.7GHz (not overclocked). GPU is RTX 2080 (base, not Super or TI). System can be bought prebuilt for $1000 or less these days. I got some free ad credit from Google so finally decided to try it out and I'm really glad I did. I started with the video right before this. These 2 videos would probably have taken years to reach the views they have now, and I've gotten new subscribers and people commenting and interested in my engine. This has really helped with motivation and I'm going to try to start doing weekly updates.
@iamlordstarbuilder55954 жыл бұрын
Grant Kot that’s great dude. I’m hoping I can get to this level of skill soon, as I’m actually working on an engine of my own. I’m calling mine Chaos, does this thing have a name?
@GrantKot4 жыл бұрын
@@iamlordstarbuilder5595 I haven't settled on a name quite yet, a lot of the good ones are taken. Currently I just call it MPM Sandbox. MPM or Material Point Method is the physics algorithm this stuff is based off of. I wish you luck on your engine as well!
@dbgwins4 жыл бұрын
please relise demo for lowend pc (4cor CPU, GTX gpu)
@GrantKot4 жыл бұрын
Sorry for the delay, I will be releasing a demo on Steam soon. I did briefly release the previous version but when I was having trouble getting downloads I figured I needed to up the quality a bit. Btw, it should work ok on your computer.
@GrantKot4 жыл бұрын
I have republished a demo at: kotsoft.itch.io/mpm-tech-demo
@julianemery7183 жыл бұрын
I want to eat those voxels...
@GrantKot3 жыл бұрын
Same lol, sometimes I wonder if I should be making a culinary/baking/dessert simulator.
@bloodeleine4 жыл бұрын
i hope you didnt pour your life savings into that ad
@GrantKot4 жыл бұрын
I put in $150, the campaign has used $100 so far, and Google will be matching my spend up to $150. I didn't really make this video with the intention of making an ad, but when I got a promo code from Google I decided to try this experiment. I've gotten far more views, likes, and subscribes from this than usual, so quite worth it. I am of course also working to improve the quality of my videos so that I can get more organic traffic as well.
@ZAXT0N4 жыл бұрын
I want to eat it.
@GrantKot4 жыл бұрын
:) had the exact same thoughts when I was making this
@luckylepercon41884 жыл бұрын
How get
@GrantKot4 жыл бұрын
I currently have it on itch.io: kotsoft.itch.io/mpm-tech-demo Will try to get it onto something more legitimate like Steam or Epic Games Store once I polish it up a bit more.
@TBTaco644 жыл бұрын
JELLO
@senditt0themoon1994 жыл бұрын
0:09 *AND DO YOU REALLY WANT TO SEE HUNDREDS OF OCTOGONS HURDLING AT YOU AT THOUSANDS OF MILES SN HOUR!?!?*