Loading video...

Video Failed to Load

Go Home

So I've implemented hash grid based fluid simulation in VRChat - its absolutely incredible. Because its hash based its literally boundless, so fluid can occupy the entire world. Currently I only have the "Mentos" particle rendering, but I plan on trying to make isosurface work

359,465 views • 2 months ago •via X (Twitter)

58 Comments

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

Its absolutely mental when you set gravity to low, fluid literally flyes everywhere

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

I have put 1M particles as limit in the world for now, which can fill a decently large space

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

I've also added a bunch of "manipulator" objects, like this attractor sphere, you can make globes of fluid

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

Here's high viscosity goop liquid

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

Inverting gravity direction is also quite insane when you dont have bounds

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

I've also been improving the isosurface ray tracer, make it a bit more PBR based, also basic screen space effects. Its currently only functional in bounded simulation mode. Making it work in hash sparse boundless would be the next problem. Not sure if even feasible with good perf

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

Regarding the technical side, I think hash based particle simulation is much better than sparse tree grid based one, sparse tree's require indirections to get neighbor, while with hash grids the only drawback is hash collisions, but the bottleneck is latency so its much better

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

Making a hash based grid however is tricky, I think I'm going to try making a "N-slot texture" where each sparse cell can hold up to N voxels, it should hopefully work most of the time if the "hash" has few collisions. But yeah making it ray trace fast is tricky

kiby3x's profile picture
kiby3x2 months ago

Soo what exactly do you expect vrchat players to do with a fluid sim...

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

dont worry about that 🫡

Low3's profile picture
Low32 months ago

Please dont add white color, i beg you

Low3's profile picture
Low32 months ago

You did, didn't you

POBrevive's profile picture
POBrevive2 months ago

How did he made the water physics work I mean is there a tutorial for it

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

tutorial? not really, more like papers:

Joseph Adams's profile picture
Joseph Adams2 months ago

VR chat? How many request for a sticky white version you got so far?

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

yes

Vladimir Cazacu | 𝕧𝕠𝕝𝕠𝕕▿'s profile picture
Vladimir Cazacu | 𝕧𝕠𝕝𝕠𝕕▿2 months ago

Will you be releasing this anywhere? I'd love to learn from your work.

RasputinKaiser's profile picture
RasputinKaiser2 months ago

Hi! I've been working on a very similar thing with ThreeJS + Box3D! This is MIT

Coach Dorn || Oyaji Club's profile picture
Coach Dorn || Oyaji Club2 months ago

VRC Splatoon and DrainSim. Good potential here.

Noosphere's profile picture
Noosphere2 months ago

Portal 2 map incoming xD

Adam Kadmani's profile picture
Adam Kadmani2 months ago

This is the future

EmberBeard 🏳️‍🌈🇬🇧 NFC, CFZ, EF's profile picture
EmberBeard 🏳️‍🌈🇬🇧 NFC, CFZ, EF2 months ago

@GuusDeKroonVR - we need to check this out sometime 😁

ً's profile picture
ً2 months ago

watch this be used for you know what

Kuwazy's profile picture
Kuwazy2 months ago

The bandwidth required to display this for all players must be enormous.

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

Not really, sim is run locally. As long as the inputs and interaction matches it looks similar enough for people to be fooled that its synced

Aki 🔞's profile picture
Aki 🔞2 months ago

Wonder if it'd be possible to use this to do something like SpaceSim in VRChat (Example of SpaceSim: 1M Solar mass black hole eating Mercury)

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

Unfortunately it is possible, and I've been considering something like that. But I would need on top of sorting to build a sparse octree for Barns-Hut, or multipole method, that would be tricky. Much harder simulation wise than sparse hash fluid

Aki 🔞's profile picture
Aki 🔞2 months ago

Don't know about you, but I'm one of those people who love pushing a platform not made for physics deep into physics Same with mechanical engineering stuff, just seeing things move and be interactive So difficult yes, cool also yes.

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

external gravity is easy with this simulation, its just self gravity which is ass to work with due to nonlocality

Aki 🔞's profile picture
Aki 🔞2 months ago

Ah, got it. So basically VRChat is being VRChat like always, a pain in the ass to do anything cool in without having to get around a mess

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

honestly? this would be hard even outside of vrchat 😅

Aki 🔞's profile picture
Aki 🔞2 months ago

Yeah... I'll come back and reread after I get sleep so I'm not on 2% battery mode and actually comprehend things Until then imma go read up on some more whatever I was doing... I forgot

Tilur A Kit's profile picture
Tilur A Kit2 months ago

That's really cool!

daddy konta's profile picture
daddy konta2 months ago

world?

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

work in progress, release later

LowPolyNicky's profile picture
LowPolyNicky2 months ago

Add white color PLEASEEE i uhhh need it for scientific research

Kohei / Konoha / Saya's profile picture
Kohei / Konoha / Saya2 months ago

これはまだVRChatで公開されていませんか?ワールドを知りたいです

CCHICKEN's profile picture
CCHICKEN2 months ago

@SadlyItsBradley Can it run on potato pc ?

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

@SadlyItsBradley potentially with a small amount of liquid

CCHICKEN's profile picture
CCHICKEN2 months ago

@SadlyItsBradley Never really tried VRchat. you made me want to play it !

DollyDread 👻🍒50s Diner Ghost's profile picture
DollyDread 👻🍒50s Diner Ghost2 months ago

I wanna play in the virtual water so bad ngl

Wish Dragon's profile picture
Wish Dragon2 months ago

What the fuck

Cool Bandit's profile picture
Cool Bandit2 months ago

Really strong technical work, respect.

adyingdeath's profile picture
adyingdeath2 months ago

Fiuld simulation in such a performance limited world is really an incredible work. Next step should be adding Cola fiuld into the world.

Dom's profile picture
Dom2 months ago

This will 100% eventually be used for VR furry sex cum physics

Decima #ResignTimSweeney's profile picture
Decima #ResignTimSweeney2 months ago

Great. Another thing that could crash my game.

Treebeast||Dishdog🇵🇸's profile picture
Treebeast||Dishdog🇵🇸2 months ago

millions of gallons...

Mogmek's profile picture
Mogmek2 months ago

That's waaay too cool. I seem to have very similar things under the hood, but the visualization and constants make yours look so much better

Look O' Me's profile picture
Look O' Me2 months ago

Yaaay, gooop :3333

jake downs's profile picture
jake downs2 months ago

@SadlyItsBradley this is awesome! 👏

Freddy's profile picture
Freddy2 months ago

I also implement hash, how funny

Leo Dutra's profile picture
Leo Dutra2 months ago

I know what you VRChat guys are targeting with fluids. So keep up the good work.

Δx ⋅ Δp ≥ ℏ / 2's profile picture
Δx ⋅ Δp ≥ ℏ / 22 months ago

You are having too much fun over there.

N's profile picture
N2 months ago

How do you replicate data of 1 million particles, or it's not a concern?

NeubertIM 📯's profile picture
NeubertIM 📯2 months ago

Woah this is impressive. Even with "only" the Mentos. I dont know how VRChat works since i rather play DCV or Valheim in VR but where is the Workload of this sim? Is this Standalone VR or are there Servers from VRChat which handles the calculations? impressive video 🤩👍

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

its locally simulated, not synced. it looks similar for players, but not the "same"

NeubertIM 📯's profile picture
NeubertIM 📯2 months ago

Ah. So it is PCVR and every Chatter has its own simulation result. Still impressive. Nice work

Mykhailo Moroz's profile picture
Mykhailo Moroz2 months ago

If this was a separate game it could potentially be synced, but youd likely need * Deterministic simulation, probably on CPU * Lockstep handling on all players * Exact matching of simulation inputs between players

Related Videos