Monday, July 10, 2017

Bevels in video games


Like a lot of digital artists today, I learned Photoshop in the late 90s in order to make awesome-looking fan sites and "professional" forum signature images. One of the Photoshop tricks I learned was the "Bevel" layer style, which embosses a faked thickness and depth onto a layer, as if it's popping outward toward / inward from the viewer.

When I first learned it, I felt powerful, like I could use Photoshop to "paint in 3D" and make my Starcraft fan forum avatar look even more professional. But then I realized that the bevel had a very specific look to it, and I started seeing that look everywhere. My astounding bevels quickly lost their sheen. To this day, the conventional wisdom in 2D game art is that you should just handpaint your own bevels, and it only takes a few minutes when you get good at it anyway.

Today in 2017, the bevel has arguably taken over 3D environment art, and like all the other game art gods, it demands labor from us. But unlike 2D bevels, there's no strong consensus on what the best 3D bevel techniques are, which means we're free to experiment...

from "Technical and Visual Analysis of Overwatch" by Timothy Bermanseder
It's worth reviewing why we want to go to all this trouble: bevels, or any kind of detailed edges, are basically what make a 3D game world look expensive and high poly. Most recently, Overwatch (2016) features some beautiful bevels and corners with clever edge breakups, but this aesthetic and value system was popular way before that -- consider the towering handpainted bevels of World of Warcraft (2004) or the normal mapped bevels of Doom 3 (2004). Detailed edges connote artistry and require more human labor, which means it's more expensive and can be sold for $60. Even "low tech" 2D pixel-art game dev communities like RPGMaker dev forums adopted a "three tile rule" that prescribed breaking-up your RPGMaker map tile boundaries at least every 3 tiles. Detailed edges, in whatever sense, signify your game's attention to detail, which raises fidelity, which raises the level of professionalism and realism, etc.

image by Andy Durdin
This appeal to realism never really stands up if you just look at what we try to pass for realism. Far Cry 3 slathered itself in SSAO (glossary: "Screen Space Ambient Occlusion") in a totally unrealistic way. This absurd edge treatment demonstrates how realism is often in tension with the demands of "realistic graphics"; sharp punchy bevels and overflowing SSAO are not realistic at all. Perhaps it is "hyperrealistic", it refers to a supposedly real-world phenomenon that doesn't actually exist. Experienced industry artists create this hyperreality with high self-awareness and intent; in a talk on Uncharted 4's character art, the artists confessed that they incorporated a lot of classical sculptural forms into the characters' faces -- idealized anatomy for idealized action heroes. Video game realism is not realistic, it is hyperrealistic. Bevels, and all the other fanciful edge treatments we do in 3D video games, help us idealize a world in a hyperreal way.

Do gamers generally notice or care? I'd predict most of them readily accept non-realistic-but-realistic graphics, just like the way they look past "ludonarrative dissonance" all the time -- which, I argue, is a meaningless concept when it doesn't feel dissonant, and anyway we actually love and celebrate dissonance in games. In a similar way, bevels and SSAO may look dissonant to any trained artist, but to the average player, it looks more like $60 well spent. I can't wait for even better toilet shadows in Far Cry 6!

Ideally, our buildings look like action heroes too: crunchy, punchy, angular, defined, sharp, focused, exaggerated, accentuated. This kind of action hero architecture ornament is time-consuming, but luckily, we can partially automate some of that labor in 3D art. At GDC 2015, Insomniac Studios' Morten Olsen presented their bevel reuse workflow as used in their open world city game Sunset Overdrive. The video of"The Ultimate Trim: Texturing Techniques of Sunset Overdrive" is online (+ the slides are here), so watch that for more details, but I'll try to interpret it here:

It is argued that even the sharpest edge in real-life has a slight bevel to it -- and that faintest of bevels will catch light in a way that makes your game look more expensive. It is especially crucial today in the age of physically based shaders; if you work more angles into your surfaces, that means more fresnel. And just like everything has bevels, everything also has fresnel. But when you model a bevel into an object using polygons, you can't really change that object and you can't adjust the thickness or softness of that bevel. The 3D model basically becomes immutable.

That's where Morten Olsen introduces the idea of the "ultimate trim" texture, a standardized texture atlas layout with trims of different sizes. Now you can re-use the same exact 3D model but still swap out brick for wood for metal for concrete, and the result will generally look pretty good. Their standard layout starts with thin trims at the top, with thicker trims as you descend, with miscellaneous endpieces at the bottom. Different trim thicknesses are crucial to maintain consistent-ish texel density, and it also helps you follow the logic of your materials. A brick trim, for instance, would use different arrangements of bricks based on trim thickness. You wouldn't want arbitrarily stretched "long bricks" or "thin bricks", because a standardized brick should stay the same general size and proportion no matter what. If we extend that methodology to a whole category of problems known as "bevels", then we can treat bevels like bricks, and standardize that workflow as well.

(This is a break from game art orthodoxy, where the norm involves handpainting / handsculpting everything, and they hate my beloved Photoshop Bevel tool.)


In real-life, other industries often use bevels or bevel-like operations to soften edges for reasons of safety (sanding off sharp edges) or functionality (e.g. a miter joint in woodworking) -- but if you'll bear with me, I'd like to argue that we still essentially use video game bevels to make a game "safer" to play, in a sense.

Many video games certainly facilitate a fantasy of agency. However, given its importance, what fantasy does the bevel fulfill?

Let's consider a fantasy of perception: the ability to effortlessly read the game world, to quickly discern threats and boundaries and escape routes. Bevels (along with lighting design) help us track the contours of our game worlds, and present it as a consistent space to parse and explore. Every edge is marked-off with glowing caution stripes / craggy plaster bevels.

A fantasy of perception also assumes a deeper fantasy of consistency, a fantasy of a stable world. In so many video games, brick walls (and their bevels) survive countless bombs and blasts. Here, decay and erosion are just ornament, and they don't signal structural weakness. It reassures us of the game's materiality and endurance, that it is 100% solid video game, that it is worth $60, that it won't crumble under the weight of our play... that the game world won't suddenly end. Who can enjoy a playground in imminent collapse?

But a stable world is embarrassingly unrealistic -- imagine living today in a world that wasn't dying? -- still, I guess it's important that we try to sand-off the edges. Maybe it helps take the edge off.