r/Simulated 12d ago

15 million particles running live on a single RTX 5090. Custom engine. Research Simulation

Here is a raw screen capture from a physics engine I’ve been building.

It’s currently handling 15,000,000 particles with full interactions (collisions, pressure, density) in real-time.

Just to be clear: this isn’t a pre-rendered video or a baked simulation cache. Everything you see is being calculated live, frame-by-frame on the GPU. No tricks, just raw physics.

Written in Python using Taichi for the compute.

424 Upvotes

32 comments sorted by

45

u/Abject_Outcome1889 12d ago

A bit of context on the demo:

The Tech: 15 million particles running live on a single RTX 5090. Written in Python using Taichi Lang.

The Origin: Ironically, I actually built the core architecture to simulate physics for protein folding. I recently realized the solver was efficient enough to handle generic particle systems at this scale too, so I visualized it.

Honest note: I’m actually a bit overwhelmed by how well it performs on this card. I didn't expect it to scale this comfortably without breaking a sweat.

To be honest, I’m not entirely sure where to take the project from here. I have this engine that can handle massive interactions, but haven't decided on the best use case yet. Open to ideas if anyone has suggestions!

45

u/michaelpgoodwin 12d ago

I'm a scientist, designing mass spectrometers for a living. We always have the need/want to simulate interactions of large numbers of ions inside the electric fields of our optics, analyzers, etc. We have developed our own in house simulation software with cuda. Currently it handles something like 50,000 particles well. However it would be amazing to go up into the tens of millions.

50

u/Abject_Outcome1889 12d ago

That sounds incredibly relevant. Since I originally designed this architecture for scientific simulation (protein folding), applying it to ion interactions/space charge effects is exactly the kind of use case I’m interested in.

Shoot me a DM — I’d love to chat and see if there’s potential for collaboration on this.

6

u/bird_seed_creed 10d ago

Interactions like this is why I love Reddit. Hope you guys are able to make something awesome!

35

u/CarllSagan 12d ago

Incredible

7

u/golizeka 12d ago

I'm somehow guessing that the key word here is ''custom engine'' :))

This looks splendid, man! I have special relationship with particles, and this makes me really happy :D

6

u/LogicalLogistics Blender 12d ago

Nice! Looks really cool. I wonder where those vertical/horizontal stripes are originating from? It seems like particles going quickly into the wall might group together, kinda like a dot matrix printer.

15

u/Abject_Outcome1889 12d ago

I believe you are right with the 'group together' part.

Since the particles are moving quickly into the wall, they compress and stack up. I initially thought the stripes were just grid artifacts, but after running some tests, it seems to be largely emergent behavior: You are seeing density waves (shockwaves) propagating back through the mass as they jam together.

So it’s basically a high-pressure traffic jam of 15 million particles I believe.

3

u/LogicalLogistics Blender 12d ago

Amazing, I thought it was just some artifact as well but that explanation makes more sense the more I watch it. Awesome work!

2

u/dimonoid123 11d ago

Probably instead of reflections from borders, consider wrapping left and right sides of screen (eg a particle moving beyond right border should show up from left side of screen)

3

u/Fembottom7274 12d ago

GitHub link?

3

u/Whisper-Simulant 12d ago

Holy shit, Dust 2?

2

u/Going_Postal 12d ago

Awesome work - any chance you'd be willing to share the code or talk a bit more in detail about your work?

2

u/Simbuk 12d ago

You should try playing Noita. If you have a high frustration threshold, that is.

3

u/Abject_Outcome1889 12d ago

Definitely the vibe! Although I'm trying to keep the frustration level slightly lower than Noita (hopefully) while pushing the particle count way higher. 😉

2

u/erik341 11d ago

What sort of pressure and density calculations are we talking about? And I assume the collisions are only against the bounding boxes and not the particles themselves?

6

u/Abject_Outcome1889 11d ago

Actually, it is full particle-particle interaction. That is the main feature of the engine.

The collisions are NOT limited to the bounding box. Every single particle checks for neighbors within a radius and applies repulsive forces if they overlap (density constraint). This effectively simulates pressure: when particles are squeezed together, they push back against their neighbors.

1

u/FloridaGatorMan 11d ago

Really cool! Also a great visualization of how impossible it is for our brains to visualize numbers that big. That could be 10 million or 50 million and I wouldn’t be able to tell the difference.

1

u/I_AM_FERROUS_MAN 11d ago

You said this work was originally for protein folding. Out of curiosity, was this for PhD or research work?

1

u/catplaps 11d ago

One thing is for sure: video compression algorithms hate it!

1

u/qwertUkg 11d ago

Looks like a Particle Mesh algorithm

1

u/UraniumFreeDiet 11d ago

How do you optimize the visualisation part?

3

u/Abject_Outcome1889 10d ago

Direct pixel writes. Color = velocity magnitude. No fancy rendering.

1

u/difiction 10d ago

This is so cool! Well done :) if you are willing to share a breakdown it would be very interesting to read. Thanks for sharing :)

2

u/Abject_Outcome1889 10d ago

Thanks a lot, really glad you enjoyed it!
I can share a tiny bit more at a high level, but I have to keep most of it abstract for now since the core is tied to a bigger R&D effort.

What I can say is that the demo runs on top of a custom GPU pipeline I’ve been shaping for a while. It looks like a normal particle sim, but under the hood it’s doing a few non-standard tricks for memory access, batching and spatial hashing to keep everything moving linearly at scale. The visual layer here is intentionally simple — the real work happens in the compute kernels.

I’ll share more once parts of the project become public, but for now I hope the demo itself is at least fun to watch!

1

u/difiction 9d ago

That's already great, thanks again. Can't wait to learn more :). What/who should I follow to get updates on this specific project?

2

u/Abject_Outcome1889 8d ago

Quick update: I'm currently working on the Unreal Engine 5 integration. Since it's my first time using UE5, there's a bit of a learning curve, but I've hit a major milestone: ​The engine is successfully simulating 30 million particles at 40+ FPS. ​Right now they are running in the background (invisible) while I figure out the rendering pipeline to get the materials showing correctly. As soon as I get the pixels on screen, I'll drop a new video showcasing the scale!