4 ms·
Show HN: Play with Shaders Inspired by Slime Mold
- Yenrabbit 6y agoAuthor here, happy to answer any questions about the implementation. I'd also love to see any interesting patterns you find :)
- natemcintosh 6y agoLike you, I also loved Sebastian Lague's video on slime mold. Would you suggest starting on a CPU based version if I have no knowledge of shaders?
- mindv0rtex 6y agoThat's what I did when I recently came across the same model. Here's my CPU-based implementation (in Rust): https://github.com/mindv0rtex/physarum https://github.com/mindv0rtex/physarum
- Yenrabbit 6y agoYou can get some fun patterns even at much smaller scale, so a CPU-based approach should be entertaining enough. That said, I had no knowledge of shaders either before this project! I'm johnowhitaker on twitter or email - happy to chat if you want to talk specifics.
- galangalalgol 6y agoIn green slime I saw a central ring that seemed to be reinforcing itself. It stayed circular for ages. And then equidistant parallel lines along each side.
- coldcode 6y agoDoes not seem to work in Safari on Big Sur, all I see is js errors where the animations should be.
- selfsimilar 6y agoSame in Safari in iOS. `viewof gl = TypeError: null is not an object (evaluating 'gl.viewport')`
- nigerian1981 6y agoI tried turning on WebGL and WebGPU in the Safari settings, but it just shows a black box on my iPhone 11
- pineconewarrior 6y agoSafari is a bit behind on javascript and animations. I'm excited for the current Safari preview to become mainstream.
- SketchySeaBeast 6y agoDoesn't work in Firefox either, including the dev edition which is usually more up to date: "viewof gl = TypeError: can't access property "viewport", gl is null" It does work in the new Edge and Chrome. Doesn't load at all in IE, but I take that as a good thing.
- burkaman 6y agoNo problem for me in Firefox Nightly 89.0a1.
- SketchySeaBeast 6y agoHmmm... my work laptop can't run it with Firefox (regular, dev edition, or nightly), but my home PC can on regular Firefox. And it does run on my work laptop in Chrome. Curious.
- arc-in-space 6y agoI'm guessing there's no collisions from the original paper in this implementation? Edit: also, are boundaries being blurred properly with wrapping enabled? It seems to create rectangular patterns(it could just be because of the initial conditions though).
- Yenrabbit 6y agoI'll be honest I found the paper AFTER finishing the project - my implementation was based on the rough description in the video :) Collisions would be very hard to implement, but I will definitely take a look at the blurring - at the moment it doesn't wrap around.
- spuz 6y agoThis is super interesting. I've actually been looking for a way to render 100,000s of points in an animation similar to these so I will definitely take a look at using shaders now.
- Yenrabbit 6y agoGreat - good luck!
- mushishi 6y agoSomewhat related, here's an interesting video about the behavior of Slime Mold: Nova - Se47 - Ep10 - Secret Mind of Slime https://www.dailymotion.com/video/x7z6ycz https://www.dailymotion.com/video/x7z6ycz (Someone shared it here on another post.)
- theossuary 6y agoThis reminds me of a coding adventure YT video that replicates slime molds in Unity, look at the end to see some high res videos of it - https://youtu.be/X-iSQQgOd1A https://youtu.be/X-iSQQgOd1A
- jedimastert 6y agoCoding Aventure is one of my favorite intellectual(?) exploration channels, along with Primer, who's had a great string of genetic/evolution simulation videos exploring the emergent evolution of society https://www.youtube.com/watch?v=goePYJ74Ydg https://www.youtube.com/watch?v=goePYJ74Ydg
- arnado 6y agoThe article credits that video directly for inspiration.
- theossuary 6y agoWhoops, didn't see that. I thought it was a little peculiar that there were two things about simulating mold in a week in my feeds; but I just chalked it up to frequency bias. Now I'm wondering if all the 3d printed cycloidal drive stuff I've been seeing is more than just coincidence...
- Yenrabbit 6y agoI wonder if previous 'Coding Adventures' videos have prompted similar 'coincidences' with people wondering why they are suddenly seeing procedural planets popping up all over the place :)
- marshmallow_12 6y agohere's something else interesting about slime mould https://www.nationalgeographic.com/science/article/slime-mould-attacks-simulates-tokyo-rail-network https://www.nationalgeographic.com/science/article/slime-mou...