Тёмный

4K, 6 Months of Voxel Physics Engine Optimizations 

Grant Kot
Подписаться 5 тыс.
Просмотров 9 тыс.
50% 1

4K60 reupload of my previous video detailing the past 6 months of optimizations I've made for my engine. Some clips are newly recorded since I don't have 4K versions of all of my old footage.
Some early unoptimized demos here: kotsoft.itch.io/

Игры

Опубликовано:

 

20 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 93   
@Specht77
@Specht77 Месяц назад
Thank you, RU-vid compression destroyed the 1080p one, this is MUCH better
@GrantKot
@GrantKot Месяц назад
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 Месяц назад
@@GrantKot definitely worth it
@Sinaeb
@Sinaeb Месяц назад
tfw you sub only for a 4k version of the video to drop 2 minutes after
@illustriouschin
@illustriouschin Месяц назад
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 Месяц назад
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 Месяц назад
@@GrantKoti mean rain really doesnt need collision until it lands so it could be the opposite and only become physical after landing
@joa1401
@joa1401 Месяц назад
@@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 Месяц назад
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 Месяц назад
@@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! : )
@bnug242
@bnug242 Месяц назад
I've been following this project for a few years, just wanted to show extra support with this comment!! 😄
@bnug242
@bnug242 Месяц назад
side note, i downloaded the demo and have been playing around with it, its so fun
@GrantKot
@GrantKot Месяц назад
Thanks! I'm really glad to hear you like it!
@WyrdieBeardie
@WyrdieBeardie Месяц назад
Uhh... This is INCREDIBLE!!
@timmygilbert4102
@timmygilbert4102 20 дней назад
Sand that's coarse and get everywhere, perfection
@YOOOOOOOOOOOOO-dv2nt
@YOOOOOOOOOOOOO-dv2nt Месяц назад
This is incredible. Keep up the work.
@basiliotornado
@basiliotornado Месяц назад
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
@Aqua_Turneur
@Aqua_Turneur Месяц назад
this game looks soooo relaxing! i can't wait to see the final result
@TankorSmash
@TankorSmash Месяц назад
This is eyewatering, amazing!
@bitmau5
@bitmau5 Месяц назад
Thanks for the re-up!
@PchlaPddy
@PchlaPddy Месяц назад
Amazing video. This proves how big the rabbit hole of water simulations is, so many ways to optimize and finetune it...
@PeterMyler
@PeterMyler Месяц назад
wow this is so much better, thanks for the 4k!
@Gwilo
@Gwilo Месяц назад
this is wonderful
@AndrewBrownK
@AndrewBrownK Месяц назад
this engine is seriously amazing and pretty
@pangolin7398
@pangolin7398 Месяц назад
Cant wait to see where this goes
@illustriouschin
@illustriouschin Месяц назад
That slushy stuff looks good to eat.
@jb14_99
@jb14_99 Месяц назад
wow this is amazing : ) awesome work
@SynthByte_
@SynthByte_ Месяц назад
that water would look great in a lego type of game
@slurmworm666
@slurmworm666 Месяц назад
Amazing, bravo
@zaidbahssali4791
@zaidbahssali4791 Месяц назад
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 Месяц назад
Thanks! Yes, Liquid Crystal. There is also a demo of it on kotsoft.itch.io with local split screen.
@PedroGarcia-fl1fu
@PedroGarcia-fl1fu Месяц назад
AMAZING!!!!
@lordmarum
@lordmarum Месяц назад
I understood nothing, but its so beautiful!
@GeorgiKrastevMusic
@GeorgiKrastevMusic Месяц назад
revolutionary
@fryser007
@fryser007 Месяц назад
I always found fluid simulation hypnotizing @_@
@dingusbrule5756
@dingusbrule5756 Месяц назад
Idk why i find boats sinking so fascinating, but we are getting there with this Lets get the titanic on it 😤
@GeorgiKrastevMusic
@GeorgiKrastevMusic Месяц назад
Man, imagine a game like Empire Earth with this engine
@k.w.6626
@k.w.6626 Месяц назад
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 Месяц назад
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 Месяц назад
@@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 Месяц назад
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 Месяц назад
@@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.
@AndrewLeConte
@AndrewLeConte Месяц назад
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 Месяц назад
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.
@aw_dev
@aw_dev Месяц назад
Gotta love the jello sticks 😂
@Polygarden
@Polygarden Месяц назад
Very impressive work! Is the simulation running on cpu or gpu?
@GrantKot
@GrantKot Месяц назад
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.
@RobShmit
@RobShmit Месяц назад
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 Месяц назад
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 Месяц назад
😍
@lankim3164
@lankim3164 Месяц назад
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 Месяц назад
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 Месяц назад
@@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 Месяц назад
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
@incription
@incription Месяц назад
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 Месяц назад
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.
@user-xs9ey2rd5h
@user-xs9ey2rd5h Месяц назад
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 Месяц назад
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.
@user-xs9ey2rd5h
@user-xs9ey2rd5h Месяц назад
@@GrantKot sounds great! Good luck man!
@luigi.0533
@luigi.0533 Месяц назад
I want to drink the voxel water
@EngineerNick
@EngineerNick Месяц назад
:O
@yashsaxena9
@yashsaxena9 Месяц назад
Hello sir, is it possible to get codebase of this? or a similar voxel particle system? Please 👉👈
@GrantKot
@GrantKot Месяц назад
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 Месяц назад
Oh and there is the OS gvox system by Gabe Rundlett
@roundtabledetails3307
@roundtabledetails3307 Месяц назад
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 Месяц назад
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.
@jsierra88
@jsierra88 Месяц назад
Hi! Where could we start learning about this method?
@GrantKot
@GrantKot Месяц назад
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 Месяц назад
@@GrantKot thank you for answering! That's good info. Density summations instead of integration over time? Is that why your system is that stable?
@MrCreepsGaming
@MrCreepsGaming Месяц назад
this man still only got 5k subs
@mr.gummie3472
@mr.gummie3472 Месяц назад
possible to make a game inside of?
@GrantKot
@GrantKot Месяц назад
Yup, that's the plan!
@WhipThenNaeNae
@WhipThenNaeNae 19 дней назад
you should make some car crashing with this new system
@GrantKot
@GrantKot 19 дней назад
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.
@ocean3323
@ocean3323 Месяц назад
Is that reupload?
@GrantKot
@GrantKot Месяц назад
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.
@sjoerdev
@sjoerdev Месяц назад
which graphics api is this?
@GrantKot
@GrantKot Месяц назад
Nowadays I usually build on DX12 to take advantage of async compute, where I run things like Intel XeGTAO and FSR.
@sjoerdev
@sjoerdev Месяц назад
@@GrantKot which build system do you use? cmake? msbuild? other?
@GrantKot
@GrantKot Месяц назад
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 Месяц назад
@@GrantKot cool, and which code editor are you using? and which os?
@GrantKot
@GrantKot Месяц назад
i'm usually using vscode on windows
@coreywilliams6118
@coreywilliams6118 Месяц назад
So minecraft but better? Is that the plan?
Далее
Much bigger simulation, AIs learn Phalanx
29:13
Просмотров 2,6 млн
Incredible Wheel Restoration Process 🚙
01:00
Просмотров 4,7 млн
ТИПИЧНЫЙ РЕСТОРАН
12:09
Просмотров 509 тыс.
Optimizing my Game so it Runs on a Potato
19:02
Просмотров 419 тыс.
6 Months of Voxel Physics Engine Optimizations
8:17
Просмотров 44 тыс.
I Made a Neural Network with just Redstone!
17:23
Просмотров 605 тыс.
The Game That Hacks Your Brain
24:43
Просмотров 439 тыс.
How I designed Fruit Ninja
22:58
Просмотров 6 млн
What does a Game Engine actually do?
16:45
Просмотров 139 тыс.
When Optimisations Work, But for the Wrong Reasons
22:19