Hacker News new | ask | show | jobs
by gioele 4295 days ago
The page also shows that sometimes what you think is hard is easy and what you overlook is the really difficult bit:

> The problem with SPH in realtime is it’s really really hard. The simple explanation of the algorithm is: “take all the particles near my particle and perform some force exchange between them”.

At this point I was expecting a long discussion on all the clever tricks they have found to calculate the force exchange between thousands of particles in a snap. And instead...

> The force exchange is easy; the “all the particles near my particle” is a bitch. On GPU it’s even more of a bitch; and in 3D it becomes an order of magnitude more of a bitch.

> [...]

> The problem is simply the neighbourhood search. You end up with a variable amount of fast-moving particles affecting each particle, where it’s hard to pick an upper bound – so the spatial database is hard to construct. If you solve the neighbourhood search, you can solve SPH.