“The Pinball Machine of Science” is the latest Biocinematics video, about how tools of science are used, how science develops over time, and how we can learn about things we can’t even see. I hope you enjoy the video, then read on to get a glimpse behind the scenes and rigorously peruse the references.
Behind the Scenes
Simulating the Pinball Machine
The pinball table was modeled mainly in ZBrush, and brought into Houdini for all the animation and simulation. The difference between animation and simulation is: with animation, the animator (me) specifies the exact position, rotation etc. at different points in time, for example, the metal disk rotation. With simulation, the simulator(?) (also me) sets up some rules for the computer to follow and he sees what happens. Then he tweaks the rules, and tries again and tweaks the rules and tries again until he has a result that he’s happy with. It would have been crazy to animate the pinball ball itself, since it has to bounce convincingly many times for 24 different disk rotations. I thought it would be pretty easy to set up a simulation; I mean, it’s a single ball bouncing in an idealized way with just a single force (gravity) and nothing else going on.
How wrong I was. In my first (and second through umpteenth) attempts, the pinball would land on squarely on the launcher and then spontaneously roll around. When it collided with the hidden shape, it would bounce into the air and fly off at crazy angles.
The crucial aspect was that I needed the ball to bounce off the hidden shape at the same angle as it arrived at, and my simulation just wasn’t doing that. The angle of incidence should be the same as the angle of reflection, that’s basic physics, right? Right? I needed this in order to have a convincing data visualization in the video. After a lot of trial and error and head scratching, I decided to assess my assumptions and read up on some physics. Suddenly everything became clear. I was asking the simulation for an impossible situation: I needed idealized physics (assume no friction nor air resistance, perfectly elastic collisions) but I also needed real-world behaviour (friction, drag, and inelastic collisions, otherwise the ball would sail around for far too long). If the ball is spinning and collides with a surface with friction, and loses some energy in the process, it’s not going to be a perfect bounce. But I did recognize that a real pinball machine should be pretty close to an equal incidence/reflection bounce. So instead of assuming there was a magic setting that I couldn’t find, I set out to manually balance idealized physics with real-world properties.
I set up some helper visualization so I could see how close I was to the desired bounce angle, and then I went through and dialed in the friction, bounce, drag, gravity, etc. for the ball, table surface, table walls, and hidden shape individually. Finally I had a convincing simulation that bounced properly. At that point I was confident I would be able to publish the video.
The Island of Human Knowledge
The tropical island was a stylistic experiment. I had a vision of a somewhat cartoony tropical island fully rendered in 3D, with simple 2D stick-figure characters telling the story.
The island and palm fronds were sculpted in ZBrush, while the ocean was a built-in Houdini tool that I baked into a displacement map for Redshift to apply to a flat plane at render-time, so it’s not a real water simulation. You can tell because the waves don’t really interact with the shore, they just move up and down regardless. I was pretty pleased with the result that I got in a fairly short time, because I had a huge number of frames to render.
Right before I submitted my renders to run over the weekend, I noticed a strange artifact. On some frames I was getting black lines around the edge of the water. I tried everything I could think of to fix the problem. Higher trace depth, different index of refraction, single-scattering off, emission, GI, displacement resolution, and more.
But in every case, even with a very simple setup, I still had problematic black lines. Finally some memory was jogged in the back of my mind, and I realized that my ocean grid was hundreds of units away from the origin. So what, you might ask? A precision issue! As objects get farther away from the center of the world, sometimes there can be internal mathematics rounding errors (I guess) that produce artifacts with Redshift, even though the pixels I was rendering were very close to the center of the world. Weird, huh. I adjusted how the grid placement was set up, and the problem was immediately solved! Reading forums can be pretty handy, because the problems that other people have can subconsciously return at opportune times. I submitted my fixed renders just in time for the weekend.
Thanks for reading, and I hope you’ll stay tuned (or whatever the internet equivalent is… oh yeah: subscribed) for the next animated science video!
Stuart
References
Allain, R. We Swear There’s a Reason to Model This Ball Bouncing Off a Wall. Wired (2016).
Collaboration, T. E. H. T. et al. First M87 Event Horizon Telescope Results. I. The Shadow of the Supermassive Black Hole. ApJL 875, L1 (2019).
Gerhard, M. Direct Or Indirect? | Science project | Education.com. Available at: https://www.education.com/science-fair/article/direct-indirect-observation/. (Accessed: 12th March 2019)
GRANT, E. HISTORY OF SCIENCE: When Did Modern Science Begin? The American Scholar 66, 105–113 (1997).
Kosso, P. Observability and Observation in Physical Science. (Springer Science & Business Media, 2012).
Kross, B. Questions and Answers - What is one example of indirect evidence that scientists use to study an atom? Jefferson Lab Available at: https://education.jlab.org/qa/atom_01.html. (Accessed: 12th March 2019)
Levi, R. How X-Rays were discovered — by Mistake. Ran Levi (2016).
Panchbhai, A. Wilhelm Conrad Röntgen and the discovery of X-rays: Revisited after centennial. Journal of Indian Academy of Oral Medicine and Radiology 27, 90 (2015).
Tubiana, M. [Wilhelm Conrad Röntgen and the discovery of X-rays]. Bull. Acad. Natl. Med. 180, 97–108 (1996).
Ralph Washington Sockman. Wikipedia (2018).
Designing an Observation Study. Science Buddies Available at: https://www.sciencebuddies.org/science-fair-projects/references/observation-study-experimental-design. (Accessed: 12th March 2019)
How Scientists Captured the First Image of a Black Hole - Teachable Moments. NASA/JPL Edu Available at: https://www.jpl.nasa.gov/edu/news/2019/4/19/how-scientists-captured-the-first-image-of-a-black-hole/. (Accessed: 26th June 2019)
Indirect Observations and Inference—Demonstration Kit. Available at: https://www.flinnsci.com/indirect-observations-and-inference---demonstration-kit/ap7425/. (Accessed: 12th March 2019)
Observation beyond our eyes. Available at: https://undsci.berkeley.edu/article/howscienceworks_05. (Accessed: 12th March 2019)
Ontario Science Centre: Home. Available at: https://www.ontariosciencecentre.ca/. (Accessed: 12th March 2019)
RÖNTGEN, Wilhelm Conrad (1845-1923). <I>Ueber eine neue Art von Strahlen (Vorläufige Mittheilung).</I> -- <I>Eine neue Art von Strahlen. II. Mittheilung.</I> Offprints from: <I>Sitzungsberichte der Würzburger Physik.-medic. Gesellschaft,</I> 1895 [no. 9], and 1896, [nos. 1-2]. Würzburg: Verlag und Druck der Stahel’schen k. Hof.-und Universitäts- Buch- und Kunsthandlung, 1895-1896. Available at: https://www.christies.com/lotfinder/lot_details.aspx?intObjectID=5084328. (Accessed: 26th June 2019)
Structural Biochemistry/Nucleic Acid/DNA/Franklin’s DNA X-ray Crystallography - Wikibooks, open books for an open world. Available at: https://en.wikibooks.org/wiki/Structural_Biochemistry/Nucleic_Acid/DNA/Franklin%27s_DNA_X-ray_Crystallography#Fiber_Diffraction. (Accessed: 12th March 2019)