Pbd Fluid In Unity

A PBD fluid in unity running on the GPU
Alternatives To Pbd Fluid In Unity
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
3 days agoapache-2.0
A wonderful list of Game Development resources.
3 days ago32mitC#
Unity plugin to run MediaPipe graphs
Render Crowd Of Animated Characters1,017
a month ago5mitC#
Animation Baker and Instancing for Animated Characters: Using GPU to implement large-amount animation characters rendering. The animation map for vertex shader to modify the vertex position of the mesh at runtime. Using GPU instancing to reduce draw calls.
3 months agounlicenseC++
Toy path tracer for my own learning purposes (CPU/GPU, C++/C#, Win/Mac/Wasm, DX11/Metal, also Unity)
Unity Voxel665
4 years ago4mitC#
Mesh voxelization for Unity.
Unityurp Mobilescreenspaceplanarreflection653
5 months ago3mitC#
Reusable RendererFeature of MobileScreenSpacePlanarReflection
2 months ago39otherTypeScript
Free, Cross-Platform, GPU-Accelerated Procedural Texture Generator
a month ago1C#
2 years ago1C#
A straightforward GPU implementation of Jos Stam's "Stable Fluids" on Unity.
Pbd Fluid In Unity415
a year ago1mitC#
A PBD fluid in unity running on the GPU
Alternatives To Pbd Fluid In Unity
Select To Compare

Alternative Project Comparisons

This is a position based dynamics particle fluid simulation running in Unity on the GPU. It uses the same math from the previous PBD project but adapted some what to run on the GPU.

The biggest difference is how finding the neighbouring particles is handled. This is more complicated on the GPU and I went with a grid hash using a Bitonic sort. Other sorting method are around (like Radix sort) and maybe faster but the Bitonic sort was simpler and works quite well. Profiling shows its not the bottle neck so a faster sort may not see much performance gain.

Its certainly not the fastest particle fluid around but can simulate 70K fluid particles and 30K boundary particles at 30fps on a GTX980 which is not too bad.

Fluid particles

The boundary conditions are handled by special particles that the fluid wont flow through. These are then added around the border. This does make it more costly than other methods but it also allows objects in the scene to interact with the fluid more easily. All you need is a method to voxlize a mesh to particles and you can then add them to the boundary.

Fluid boundary

To render the fluid I made a compute shader that fills a 3D texture with the particles densities. That volume can then be ray traced in a shader to render the fluid. Its just a unlit shader however so has no lighting. A method needs to be added to create normals from the volume to add lighting.

You need to use linear light space for the fluid to look like these images.

Fluid raytraced

Fluid raytraced

Fluid raytraced

Fluid raytraced

Fluid raytraced

Fluid raytraced

List of water projects.

Phillips ocean.
Brunetons Ocean.
Tiled-directional flow.
PBD Fluid sim.

List of physics projects


Popular Gpu Projects
Popular Unity Projects
Popular Hardware Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
C Sharp