Session 58

Sometimes the Model Flips You

Dom reports that he was able to sneak out of Amazon.com with a PS5, and is now enjoying his last-gen games in sweet, sweet 60FPS. He then unveils his latest work, which lets us load OBJ files and draw actual 3D models into the game. Soon, the game is filled with life-like trees and tanks. We quickly discover there is no agreed-upon standard for orienting 3D models, we spend the rest of our time flipping and rotating objects so they draw correctly. Notes/highlights - A teardown of the PS5 adaptive trigger assembly: https://youtu.be/4rNITneXnCo?t=570 - The PS5 controller is the first console controller to use linear resonant actuators for haptic feedback: https://blog.piezo.com/haptic-actuators-comparing-piezo-erm-lra - Manchester currently loads 3D geometry using OBJ, one of the simplest formats for 3D graphics: https://en.wikipedia.org/wiki/Wavefront_.obj_file - Jeff implemented the rollback and netpause mechanisms described by this GDC talk: https://www.youtube.com/watch?v=7jb0FOcImdg - A “material” is a bundle of parameters that control how the appearance of a 3D surface changes according to light from the environment: https://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Materials_and_Textures - Backface culling prevents rendering surfaces that point away from the camera: https://en.wikipedia.org/wiki/Back-face_culling - Testing pixels against a depth buffer is the primary method for making sure objects don’t draw on top of each other: https://learnopengl.com/Advanced-OpenGL/Depth-testing - There was a question about what values actually go into the depth buffer. The most common mechanism is to write values from zero to one, where higher values are farther from the camera. This value represents how far an object is between the near plane and far plane. - We’re big fans of Children of Men. You clearly need to watch Slavoj Zizek providing his analysis: https://www.youtube.com/watch?v=pbgrwNP_gYE - If you’re looking for a fun Twitter follow, you could do worse than Close But No Potato: https://twitter.com/ButNoPotato - We spent some time rotating entities the wrong direction. We didn’t realize it at the time, but the problem was that the game simulation performs rotation on the XY plane, but rendering them in three dimensions and rotating on the XZ plane. When transitioning between those two planes, you have to negate your rotation. Here’s a JSFiddle that makes it clear: https://jsfiddle.net/5mnrakj0/ - Ruroni Kenshin, a classic manga from the 90s: https://en.wikipedia.org/wiki/Rurouni_Kenshin - Takeshi Miike’s remake of 13 Assassin’s is a fun, over-the-top samurai film: https://en.wikipedia.org/wiki/13_Assassins_(2010_film)