Live data from Hacker News

Boids

en.wikipedia.org

81–84 of 84 posts

Re: Boids

#81

Earlier quoted context omitted.

Thank you for that Firehose of Fun! Especially the GPU dynamic hashed grid, which looks super useful. Amazing work! LifeBrush is Emacs for Cytoplasm! I've read that those little thing-a-ma-bobs in your cells move around at something like 30 miles an hour, bumping into each other. Is that accurate? Does that simulation show them slowed down a lot? Would it just be a blur in real time? Is that software available, pleas…

You are right, they move insanely fast. The average speed of a medium-sized protein is about 5 m/s. Inside an E. coli, any two proteins will encounter each other at least once a second [0] (this book is incredible). My simulation is inaccurate in terms of Brownian motion. It is slowed down and smoothed for illustrative purposes. It should be more violent. Nice idea with blurring, I'll think about that. The code is on…

Thank you for publishing the code as open source! I'll check it out. Do you have any idea how much work it would be to adapt it to Unity3D's ECS (DOTS: Data-Oriented Technology Stack) and shader system, or somehow get it running on WebGL? At least the simulation and rendering part, if not (yet) the VR stuff, so it can reach the widest audience.

https://unity.com/dots

I really love the part in your interactive simulation overview, at 2:58:

LifeBrush - An overview of our illustrative simulation canvas

https://www.youtube.com/watch?v=5LBHRyGxLGI

2:58> The ribosome uses tRNA to match mRNA codons to amino acids. We paint a cloud of tRNA near the ribosome. tRNA, molecular agents, need amino acids. So we paint a cloud of of amino acids nearby. Brownian motion brings tRNA and ribosomes together. But that takes a long time. However, our system is interactive and immersive. So we grab the ribosome and move it around. Now we see how the ribosome marches along the mRNA, with tRNA depositing amino acids onto a growing poly-peptide chain in blue. We reach the end of the mRNA, and the mRNA and poly-peptide chains are released.

So in order to avoid waiting for brownian motion to do its thing over time, you just grabbed the ribosome's lazy ass and dragged him over near the mRNA, then threaded it into his jaws, and waved him around through a cloud of amino acids and tRNA to feed him, so he sucks up the tRNA pasta and mRNA meatballs and amino acid sauce, just like Lady and the Tramp eating spaghetti to Bella Notte, and then he pumps out useful proteins, just like the Golden Goose.

Lady and the Tramp (1955) Scene: 'Bella Notte'

https://www.youtube.com/watch?v=XNQWbZ9sO3Q

The immersive interactivity is (in a good way) like the Libertarian wet dream wish-fulfillment of the invisible hand of unobservable market forces, or the Intelligent Design pseudo-scientific fantasy of God directly intervening in the affairs of molecules! Ribosomes could be the next Tamagotchi! ;) Ribosomegotchi?

You obviously know this stuff well, but I want to mention that your videos "LifeBrush: Discrete element texture synthesis overview" and "LifeBrush: Bunny-planet design session" using Greg Turk's Stanford bunny impress me as an homage to his work on mapping bunnies with 2d textures, and Andy Witkin's work on reaction-diffusion textures, and also looks inspired by the Photoshop smart clone tool.

LifeBrush: Discrete element texture synthesis overview

https://www.youtube.com/watch?v=624F5iaCKco

LifeBrush: Bunny-planet design session

https://www.youtube.com/watch?v=L482dpH9S8o

Greg Turk

https://en.wikipedia.org/wiki/Greg_Turk

Stanford Bunny

https://en.wikipedia.org/wiki/Stanford_bunny

Andy Witkin

https://en.wikipedia.org/wiki/Andrew_Witkin

Andy Witkin's gallery

https://www.cs.cmu.edu/~aw/gallery.html

Reaction Diffusion Textures. (animation) 1991. Nonlinear partial differential equations as a means of artistic expression. Shown at SIGGRAPH '91 electronic theater. mpeg (209K).

https://www.cs.cmu.edu/~aw/mpg/rd.mpg

Reaction Diffusion Textures. 1991, with Michael Kass. Nonlinear partial differential equations as a means of artistic expression. This image won the Prix Ars Electronica '92 grand prix for computer graphics. postscript. pdf. citation.

https://www.cs.cmu.edu/~aw/pdf/texture.pdf

Using Particles to Sample and Control Implicit Surfaces. 1994, with Paul Heckbert. Quasi-physical particles that float on an implicit surface. We use mutual repulsion and fissioning to quickly obtain a good sampling of the surface, and to maintain it as the surface deforms. postscript. pdf. citation. mpeg(23K). BIG mpeg (868K.)

https://www.cs.cmu.edu/~aw/pdf/particles-reprint.pdf

Re: Boids

#82

Boids are my favourite hello world for 3D simulation environments. For the last few weeks, I've been using boids to update my GPU programming skills and knowledge of related algorithms in Unity and Unreal. Yesterday I got 0.5 million boids simulating in Unreal Engine at 45 fps on a GTX 1080 [0]. The bottle neck is rendering so many instanced cone meshes, the simulation without rendering can do 1 million boids at 120…

> https://wickedengine.net/2018/05/21/scalabe-gpu-fluid-simula...

It's unrelated to boids, but I would not recommend using the Poly6 and Spiky kernels. That design originates from "Particle-based fluid simulation for interactive applications" (2003) by Müller et al., and they choose the spiky kernel on the assumption that a zero gradient at the origin is the reason why particles sometimes get stuck together. However, the clumping phenomenon was more closely studied by Dehnen and Aly in "Improving convergence in smoothed particle hydrodynamics simulations without pairing instability" (2012) [https://doi.org/10.1111/j.1365-2966.2012.21439.x]. They showed that you can predict pairing instability based on neighbour count, and that kernel functions that are everywhere positive within the Fourier domain do not exhibit that instability.

The Wendland family of kernel functions are thus recommended, as they fulfill that criteria. Though, for low neighbour counts a quartic B-spline is a good alternative.

Also, congrats on escaping--err... graduating!

Re: Boids

#83

Earlier quoted context omitted.

Impressive! Mine linked here starts having trouble at around 2000 units on my CPU. Shows how ridiculously parallelisable this is.

I love the interactivity in your workshop sandbox. Is the bottleneck your Boid.findNeighbours function? (that was the first thing I tried on the GPU, except GPU parallelism let's us get away with 50,000 boids).

Yup, it's the neighbour function being the problem. And of course updating even more boids, but that just scales linearly, but its noticeable when decreasing the neighbour radius which gives each boid less other boids to adjust to.

My neighbourhood implementation is the naive n^2 loop, so it's probably trivial to make it better. Quadtrees, or even just simple caching / zoning would probably allow me to dish out many more boids.

It also doesn't help that in order to be easy as a workshop, it's written in a way that's easy to implement, but slow to execute.

Post reply on HN