Love physics simulations and rendering algorithms Lead Research Engineer at @ZibraAI michael-moroz.bsky.social Discord: misha.m.

Warsaw, Poland
I finally released the LOD version of VRChat Gaussian splatting that supports 100M scale splats! Compared to v3 it has a huge changelist!
12
208
1,636
88,584
For the last week I've been working on a fast enough way to render realistic light refraction through multiple layers of liquid in my VRChat fluid simulation. Ended up using a multilayer screen space ray marching solution to approximate the path of light.
12
90
901
27,118
The idea was to basically use minimum blending and use all 4 color channels on the screen to write 4 depths: Nearest frontsurface, nearest backsurface, furthest frontsurface and furthest backsurface. (you can do min and max by inverting the numbers) Rendering the liquid with ZTest Off gives a pretty good approximation of the surfaces the liquid has that are within the field of view. Combining this with screen space ray marching of the scene depth and one can get a pretty decent emulation of how a multibounce ray traced fluid would have looked like, while being much faster. Without the 4 depths it would have been impossible to properly show the optical depth of absorption of light of the entire mass of fluid with air in-between.
2
4
88
10,900
Also I'm working on other rendering modes, but this one needs better shadow implementation... As you noticed I'm working on a nicer demo world, hopefully I'll release the world and the fluid simulation plugin soon enough.
1
18
1,166
Mykhailo Moroz retweeted
【出展登録開始】 ただいまより、ShaderFes2027の出展登録を開始します! 出展規約を必ずご確認の上、お気軽にご応募ください。 登録〆切:10/12まで ▼詳しくはHPをご覧ください▼ shaderfes.com/ #ShaderFes #VRChat
1
260
411
39,181
Okay I figured out a pretty decent and fast way to get nice looking isosurfaces for sparse liquids in VRChat. But its applicable in general. I suspect I could make it even faster if I had access to compute shaders. Oh well, its already impressive as is
18
42
526
22,559
Basically: 1) Hash grid without random rolls (important! otherwise our tile in hash space maps to every point in normal space - unusable) 2) Go over every particles in each 4^3 tile (+2 hash cell halo) in the hash grid and allocate up to N 4^3 bricks filled in space at this repeating position 3) Compute approximate near band smin sphere SDF for the particles in each of the allocated bricks 4) Do normal marching cube shit - cell signs, edge flags bla bla on a padded (4+1)^3 brick - 125 bits of sign flags 5) Allocate a vertex for each grid edge crossing the isosurface 6) Go over the vertices and vertex neighbors in the mesh with the computed MC topology case to average normals and positions for smoothness of the mesh 7) Render it. Map 1 point to 1 tile, do a tesselation shader to expand it to how many cells are crossed, then spit out the marching cubes triangles from a geometry shader. Now I only need to improve the transparent rendering...
1
3
40
1,611
I'm still trying to find a better rendering approach for the fluid isosurface in VRChat. Sparse grid isosurface is awfully slow. It is getting better, but seems I'd need to get rid of the ray tracing feature, its just too expensive. Meanwhile here are some preliminary results:
8
11
197
9,276
I'm probably going to stick to marching cubes mesh generation, potentially mesh smoothing, no particle anisotropy for the SDF calculation on the sparse grid, and faked screen space multibounce liquid refraction effects, otherwise its just not usable on anything but my 5090
2
18
1,325
Here is how slow my first attempt was in VR for a fully ray traced isosurface with 4 bounces. Looks cool, but fluid is basically in slow-mo
2
39
1,029
Mykhailo Moroz retweeted
ZibraAI's @Michael_Moroz_ implemented a fluid simulation in a VRChat world, and it's pretty much boundless and interactive. Details: 80.lv/articles/boundless-int…
1
7
106
13,741
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
69
488
5,034
356,078
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
1
34
5,460
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
3
26
5,283
Mykhailo Moroz retweeted
programming since AI has been the most miserable. you cannot not use AI because AI lets you do way more. but then you have to live with bullshit like the AI replacing a 10s limit by 150s without telling you and you only finding out 2 weeks later, at the fucking launch day this is not a thing that ever happened in my programming career, that your code would randomly get damaged and regress in spuriously terrible ways. not the least competent human would do shit like this and there is no way out. whenever I decide not to use AI, I get slower. I realize I'm shipping a project way larger and more ambitious than whatever I could do before. I depend on it. yet, every time I embrace AI my mental health is slowly consumed by the sheer amount of retarded shit like this, I have to handle at a daily basis so programming has just became... miserable I really truly hope Bend solves that problem in practice for me at least, that I only maintain proof-based specs that AI can't touch, and that I never ever ever ever again have to touch another programming language in my fucking life why would it replace this fucking constant there goes another fucking day of damage repair I hate this so fucking much
198
177
3,338
228,928