Uploaded January 2022 | Updated November 2026, 6 hours ago
This is a real time demo of a hydraulic jump simulation with interactive raytraced graphics, running on a single Nvidia Titan Xp GPU. At this resolution (3.2 Million lattice points), framerate is anywhere between 50-110 fps, while the fluid simulation is running on the same GPU.
The simulation setup was inspired by this video: youtu.be/TW0TS_56pag
The simulation software used is FluidX3D, an OpenCL implementation of the lattice Boltzmann method. FluidX3D runs at peak hardware efficiency on the worlds fastest data-center GPUs (8799/5232 MLUPs/s on the Nvidia A100/V100 @ D3Q19 SRT FP32), on gaming GPUs and CPUs and it even runs my smartphone.
The fluid simulation is done with the lattice Boltzmann method (LBM) with the Volume-of-Fluid (VoF) extension and piecewise linear interface construction (PLIC) for surface tension. The simulation method is physically accurate.
Raindrop simulations: doi.org/10.1186/s43591-021-00018-8
Volume-of-Fluid: doi.org/10.3390/computation10020021
Esoteric-Pull: doi.org/10.3390/computation10060092
FP32/FP16 mixed precision: researchgate.net/publication/362275548_Accuracy_and_performance_of_the_lattice_Boltzmann_method_with_64-bit_32-bit_and_customized_16-bit_number_formats
FluidX3D: doi.org/10.15495/EPub_UBT_00005400
VoF-LBM provides a 3D grid with fluid fill levels, used as isovalues for marching-cubes, which generates a contiguous triangle mesh representing the water surface.
Marching-cubes: paulbourke.net/geometry/polygonise
With raytracing I shoot light rays from the camera through the 3D isogrid. For each grid cell that a ray traverses, I run marching-cubes to generate the triangles on-the-fly, then check for ray-triangle intersections with any of these triangles. If the ray intersects, I don't use the flat-face-surface nromal of the triangle, as this would lead to visual artifacts on the reflected/refracted rays. Instead, I interpolate the surface normal at the intersection point in order to have a smoothly appearing surface. How does surface normal interpolation work with marching-cubes? I get the normals directly at the lattice points with gradient (central derivative) on the isogrid, then do trilinear interpolation to the intersection point. This is only computed once, after the intersection point has been found.
The 3D lattice that the LBM provides already is one of the ideal acceleration structures for raytracing. Any ray only has to check for possible intersections with isosurface triangles contained within the traversed grid cells. This makes it - when the lattice is not too large - even run in real time on any OpenCL 1.2 capable GPU with enough memory. No RTX or "professional" GPU required.
Also see the most realistic raindrop simulation ever done: youtu.be/9Rfu9ZqW894
Timestamps:
0:00 intro
0:02 simulation start
0:46 showing the triangle mesh
1:02 showing the simulation grid
1:06 3.2 Million particles
1:18 streamlines
1:34 showcasing reflection/refraction
2:10 outro
Music: HOME - Head First
#FluidX3D #OpenCL #Raytracing #GPU #LBM
This is a real time demo of a hydraulic jump simulation with interactive raytraced graphics, running on a single Nvidia Titan Xp GPU. At this resolution (3.2 Million lattice points), framerate is anywhere between 50-110 fps, while the fluid simulation is running on the same GPU.
The simulation setup was inspired by this video: youtu.be/TW0TS_56pag
The simulation software used is FluidX3D, an OpenCL implementation of the lattice Boltzmann method. FluidX3D runs at peak hardware efficiency on the worlds fastest data-center GPUs (8799/5232 MLUPs/s on the Nvidia A100/V100 @ D3Q19 SRT FP32), on gaming GPUs and CPUs and it even runs my smartphone.
The fluid simulation is done with the lattice Boltzmann method (LBM) with the Volume-of-Fluid (VoF) extension and piecewise linear interface construction (PLIC) for surface tension. The simulation method is physically accurate.
Raindrop simulations: doi.org/10.1186/s43591-021-00018-8
Volume-of-Fluid: doi.org/10.3390/computation10020021
Esoteric-Pull: doi.org/10.3390/computation10060092
FP32/FP16 mixed precision: researchgate.net/publication/362275548_Accuracy_and_performance_of_the_lattice_Boltzmann_method_with_64-bit_32-bit_and_customized_16-bit_number_formats
FluidX3D: doi.org/10.15495/EPub_UBT_00005400
VoF-LBM provides a 3D grid with fluid fill levels, used as isovalues for marching-cubes, which generates a contiguous triangle mesh representing the water surface.
Marching-cubes: paulbourke.net/geometry/polygonise
With raytracing I shoot light rays from the camera through the 3D isogrid. For each grid cell that a ray traverses, I run marching-cubes to generate the triangles on-the-fly, then check for ray-triangle intersections with any of these triangles. If the ray intersects, I don't use the flat-face-surface nromal of the triangle, as this would lead to visual artifacts on the reflected/refracted rays. Instead, I interpolate the surface normal at the intersection point in order to have a smoothly appearing surface. How does surface normal interpolation work with marching-cubes? I get the normals directly at the lattice points with gradient (central derivative) on the isogrid, then do trilinear interpolation to the intersection point. This is only computed once, after the intersection point has been found.
The 3D lattice that the LBM provides already is one of the ideal acceleration structures for raytracing. Any ray only has to check for possible intersections with isosurface triangles contained within the traversed grid cells. This makes it - when the lattice is not too large - even run in real time on any OpenCL 1.2 capable GPU with enough memory. No RTX or "professional" GPU required.
Also see the most realistic raindrop simulation ever done: youtu.be/9Rfu9ZqW894
Timestamps:
0:00 intro
0:02 simulation start
0:46 showing the triangle mesh
1:02 showing the simulation grid
1:06 3.2 Million particles
1:18 streamlines
1:34 showcasing reflection/refraction
2:10 outro
Music: HOME - Head First
#FluidX3D #OpenCL #Raytracing #GPU #LBM

![PhysX3D [GRAVITY SIMULATION] Portraits of the Planets
Es wurde wirklich Zeit, die Rotation von Himmelskörpern in PhysX3D einzubauen. Die dazu notwendigen Daten für die Planeten unseres Sonnensystems zu bekommen stellte sich als Herausforderung heraus. Die Inklination der Rotationsachse und die Rotationsperiode zu finden war leicht, aber um die Rotationsachse korrekt definieren zu können, wird noch einen weiterer Winkel benötigt: die Rektaszension.
Außerdem hat Saturn seine charakteristischen Ringe bekommen.
Mehr Informationen auf: http://www.projectphysx.de
Musik: John Murphy - Sunshine (Adagio in d Minor) PhysX3D [GRAVITY SIMULATION] Portraits of the Planets](https://i.ytimg.com/vi/O1cLkJP2nfk/mqdefault.jpg)






![PhysX3D [GRAVITY SIMULATION] 25k body galaxy @20x playback speed
This is PhysX3D simulating a galaxy containing 25000 stars. For calculation brute force and RK4 integration is being used on a notebook GPU (Nvidia GTX 960M, 1.54TFlops). The GPU calculates roughly 3.5 Billion particle interactions every second.
This simulation took 12 minutes to calculate.
More information at: http://www.projectphysx.de
Music: Puddle of Infinity - Open Sea Morning PhysX3D [GRAVITY SIMULATION] 25k body galaxy @20x playback speed](https://i.ytimg.com/vi/TmBf2DI-3cE/mqdefault.jpg)

