Defining a visual style is HARD.
Rendering style is a key part of the visual style in a 3D game — and defining it is also HARD.
…But I love graphics programming, so that’s not going to hold me back from trying some cool things out. This post shows some of the rendering experiments that have been happening behind the scenes for Keep Talking and Nobody Explodes.
Silly. Tense. Social.
Our game can become pretty ridiculous at times. But someone’s life is on the line and they need help from their friends. This juxtaposition between silliness and tension in a social environment is a core foundation of our experimental party game — And we need a rendering style that helps set the tone and puts the players into the right state of mind.
Looking for Inspiration
We’re not alone in trying to create a silly tone, so we looked to existing media for inspiration. Illustrative and cartoon-like rendering seemed attractive…
Outlines and Stereovision
At first, imagining yourself in a virtual cartoon, like Archer shown above, sounds like a neat idea, but designing a game for virtual reality comes with its own requirements on rendering style beyond that of just performance. Each eye is rendered as a different view (or camera), which means that view-based lighting components, like cartoon outlines, can render a very different result for each eye.
Here’s an example of when dark rim outlines, like those you may see in a dark comic book style, can give large variances between each eye. Note that the distance between the shadow edge and the HP logo on the printer is much greater in the right eye. When you see this effect in the Oculus Rift, it’s similar to holding a hand up in front of one of your eyes, except much worse. In this case your brain can’t understand the image at all because both objects have the same focal distance. It feels weird. ;)
For now, we’re going to shelf the dark outlines and rim shadows and focus on more natural lighting techniques that will work better with virtual reality.
Soft vs. Hard/Wet Surfaces
Shininess is a key component in natural lighting techniques, but we want a shine that fits with the silly and slightly surreal tone of our game.
One of the most common ways to give an object shininess while maintaining high performance for real time rendering in a video game is to use the Blinn-Phong shading model. This is a reasonable approach to give objects more depth, but only works well for hard or wet surfaces which directly reflect light.
Having these hard, shiny surfaces throughout the game doesn’t help support the tone that we’re going for, so we looked to rim lighting with a half-lambert to help us render a softer looking surface:
Rim lighting has become very popular, and with good reason: it helps clearly define shapes and has some very natural and realistic properties when used correctly. But when applied to the surface of an entire object, it can result in visuals that feel a little too soft and playful. This works great for Mario Galaxy, but doesn’t fit well with Keep Talking and Nobody Explodes.
To address this issue, the solution is simple: Remove the rim lighting on the sides where the light doesn’t reach. In technical terms, we are applying the rim lighting for each light, but multiplied by the diffuse value of that light. This turns the rim lighting into a smooth and natural sheen, like what you would expect on a soft, dull plastic.
Blending between a Blinn-Phong and per-light rim lighting can also give a nice effect for surfaces which are somewhere between hard/reflective and soft/dull. The idea of blending between the two is very similar to the technique used in Team Fortress 2.
These are our thoughts so far, but there is much more to come for visual style in Keep Talking and Nobody Explodes…