Загрузка видео...
Не удалось загрузить видео
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.
28,264 просмотров • 6 дней назад •via X (Twitter)
Комментарии: 13

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.

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.

is this an actual VRChat world that can be played in?

it is, just private so far

It’s so cool, Could I get the world link so I could play with it a little?

Sure, I guess Ill send it in dms

That's a party!

This looks 100x better than @UnrealEngine in this regard.

@UnrealEngine Yeah, niagara liquid simulation is particularly disappointing...

I feel like this could benefit a ton from bubbles+foam simulation. It's no super cheap performance wise, but it made my water so much more alive! And there's just a couple papers to read for this if I remember correctly

yeah i want to add bubble simulation too

Beautiful! Are you using XPBD to solve physical interaction between fluid and solid entities?

I don't do coupled interaction yet, objects don't see the food fluids physically

