正在加载视频...
视频加载失败
Ah, all the artifacts were fixed by replacing one '<' with '<=', duh. It all works now, particle life completely on WebGPU! There are 2^18 (~260k) particles here; my PC struggles after about half a million particles. Will probably try to optimize it a bit later.
11 条评论

I always feel like this sort of thing is more accurately called "artificial chemistry" than "artificial life", since it's lacking genetics and metabolism. Unfortunately seems too computationally intractable to have a chemically reductive life simulation.

Well, it's not me who coined the name "particle life" for it! Not sure about "artificial chemistry" either - the model lacks any chemical reactions. Anyway, it's more of a toy rather than serious research, and it does look "life-like", so I'm happy with calling it that!

We can't spill the beans about the release date of Maki: Paw of Fury, but make no mistake, things are happening! 🫘😎 We remind you that the game is coming to #NintendoSwitch and #PC #Steam and you can play the demo on PC, here ⤵️ >>> Have a great day!

very interesting. I wonder how you handle particle interactions. Do you use some acceleration structure like KD Trees to check neighbour particles?

I used a k-d tree in my CPU implementation, but it's hard to port to GPU. Here I'm using spatial binning (put particles in a grid, only traverse neighbouring cells for interactions)

thanks for sharing, this is awesome cc @benrayfield

you planning something with this or is this good ol'fashion recreational programming (which i fully endorse ofc)

Recreational mostly, yep! Hope to optimize it a bit and maybe make a 3D version, but we'll see...

That reminds me of the cell stage in Spore

That’s so mesmerizing…are you sharing the code anywhere?

Sure:
