The Art of Cameras in 3D Games
“An illusion shared by everyone becomes a reality.” — Erich Fromm
A mastery of camera cinematics is vital to the world of video games. Cameras frame the subject matter in various lenses in order to orchestrate the desired narrative. Whether is it advancing the story progression of a game, or building up visual cues and crescendos, the value of camera compositions lies in their deliberate execution.
In essence, cameras are curated to define where we are supposed to look, what renders in the game world, as well as how long we should be paying attention to things. To maximize the player’s experience, one can even imagine this complex process like giving a set of specific instructions to a camera crew; as developers study storyboards and visualize how these transitions can be replicated through the use of various computations available in game scenes, recreating film techniques and cinematics. However, having the eye for such visuospatial composition is always easier said than done.
This article aims to serve as a foray into the fundamental cameras in 3D games and highlight some case studies in which developers capitalize on camera limitations to much success in framing their gameplay experience.
What was taught
During the course of my UXG2176 — Advanced Scripting class, we learned more about 3D game development and the extra overhead considerations that come with it as compared to 2D game development. One prime example is the need to distinguish different types of virtual cameras, more primarily Orthographic and Perspective projections to render objects in scene.
But first, let's get these definitions out of the way. The following abstract from Stack Overflow effectively explains the differences in the projection types in camera systems.
A perspective camera is how we see the real world. If we take a look at the things around us, they have depth and we can judge their distance. Objects appear narrower as they appear further into the distance. This is due to foreshortening and points of convergence known as vanishing points.An orthographic camera however removes this sense of perspective and establishes a fixed depth. Objects are drawn without perspective distortion, and communicates dimensions unambiguously through unit length and breadth.Perspective
- Objects are assimilated in a real world view
- The scene creates depth with vanishing points and fore-shortening
- Commonly used in 3D gamesOrthographic
- Objects have fixed depth (no z-axis considerations)
- The scene runs in parallel lines into the distance
- Commonly used in 2D games
From these fundamental projections, game developers can then decide on the optimal camera distance to frame their compositions, and employ dynamic or fixed cameras to observe the subject. These decisions help players make spatial judgments of the 3D scene more effectively.
What was researched
With a single viewport, the flexibility of a camera calls for a plethora of use cases: Whether it is used to capture the sprawling environment in an open-world game; or to establish a sense of intimacy with a character during high-intensity situations, there are camera tropes for each purpose; for instance, a macro/wide-angled Third-person camera gives you a lot of peripheral vision, whilst a First-person camera lets you make precise adjustments to your line of sight.
Through the use of cameras, a creative expression of the narrative sequence can be conveyed in more ways than one, such as deriving sympathetic or empathetic situations depending on the point of view.
With an added depth perception to the experience (A new dimension, no less), spatial awareness now becomes a finite aspect that requires more forethought when introducing new elements to the scene.
3D cameras require more considerations to factor in a player’s cognitive limitations to spatial awareness, and information needs to be progressively disclosed in the composition of a level so that the player is not overwhelmed. Camera designs are often surreptitious, and more often than not, only noticeable when they fail. When handled poorly, they obstruct the field of vision in a game or distract a player from the intended goal, whether it is getting to a destination or a colossal boss battle covering your entire screen with its gigantic bottom, or issues with polygon clippings when players appear too close.
In these cases, we see a mismatch between the environment design and the camera behavior used to approach the gameplay. To avoid these caveats, many developers employ special camera techniques to deliver unique experiences that are well balanced in composition and design. The following content focuses on 3 case studies and the techniques used:
- Forced Perspective
- Curved World Shader
- Rule of Thirds & Leading Lines
Art I — Forced Perspective
Forced perspective is a technique that utilizes optical illusions to make objects appear larger, smaller, farther away, or closer than they are.
Also known as the Trompe l’Oeil, (A French term that translates to “Deceive the Eye”) it is traditionally used to describe a fine art technique that uses realistic imagery to create an illusion of depth in a 3D environment. Inspired by Renaissance frescos of ceilings that look higher than they actually are, game developers have built upon this technique to use foreshortening as an advantage, working around limitations in their scene compositions effectively.
Forced Perspective: Using 2D assets in 3D environments
In Backbone (2021), game studio EggNut adopted a 3D rendering pipeline in their development for a side-scrolling dystopian adventure, conventionally designed in 2D. To achieve the level of immersion and realism, a lot of processes had to be redefined for a believable sense of lighting and depth. Considerations had to be made to take into account point renders for pixel art as assets intended for an Orthographic projection cannot be as easily reused for a Perspective projection.
These props are then populated manually into the background and foreground to ensure the correct depth is achieved. The player is then added to the middle ground where the main attention of the scene happens.
By keeping this perspective distortion in mind when creating assets, the objects look natural in every player position. Without stretching, pixels on the texture of walls may pick up too much visual noise. The trickery is invisible to players, yet creates visual occlusion to allow the camera’s focal point to be on the characters themselves.
In another example, in Octopath Traveler (2019), game developers sport a graphical aesthetic known as “HD-2D”, which combines retro Super NES-style character sprites and textures with polygonal environments and high-definition effects. This creates cinematic visuals that outdo 2D limitations with parallax effect while finding that balance between low poly pixel sprites and realistically rendered environments.
However, unlike the use case in Backbone, platforms, and buildings in Octopath Traveler are wrapped 3D objects, which the player is able to interact in the world by walking on the z-axis. In the case of Backbone, all layers in the scene are 2D, apart from the walls and floor as the navigation is limited to side-scrolling and depth is not a playable aspect to be considered.
Art II — Curved World Shader
In other camera exploits, developers maximize their usage of Shader Graphs to achieve either an inflection or extrusion of a linear platform, before framing the intended composition for the camera to hide distant objects that seemingly vanish into the horizon line.
This is a curved world shader done in the Shader Graph which bends the vertex of the world mesh away from the camera on the Z-axis, depending on the global position.
After achieving the said effect in the Shader Graph, the world will wrap like a sphere depending on the curvature values set by the developer. Next comes framing of the world in a scene camera to create an illusionary depth that recedes into the horizon line.
This technique is deliberately used for top-down games which still demand visibility of the skybox. Weather conditions and day-night systems in Animal Crossing: New Horizons (2021) affect the environment and whether NPCs should work/head home to rest. Thus, the visibility of sky elements becomes an important visual cue that validates the need for a Curved World Shader to bring out that experience.
In some situations, the Curved World Shader can also be used hand-in-hand with a Forced Perspective to make objects seem further or lower than actual. In the example above, the player creates an illusion of depth on his island by using larger objects closer to him on the higher platform, while making real-world objects appear smaller than actual on the lower platform (i.e using shrubs instead of trees, and a toy car instead of a life-sized one). Since the shader graph naturally reduces the scale of far objects, it looks as though the player stands at the edge of a cliff.
Art III — Rule of Thirds & Leading Lines
This last technique has seen more widespread applications and use cases as, unlike the first two mentioned, it is a fundamental compositional technique that is used in cinematography, photography as well as painting.
The Rule of Thirds proposes that an image should be imagined as divided into nine equal parts by two equally spaced horizontal lines and two equally-spaced vertical lines, and those important compositional elements should be placed along these lines or their intersections. To understand how to incorporate the Rule of Thirds, it is also worthy to note the difference in grounds and how to balance visual inputs on a camera.
Just like in cinema, different compositions and angles in a frame can convey tone, mood, and power dynamics. Tying back to the concept of forward-facing fields of vision in 3D games, understanding the importance of framing a camera view is quintessential as it helps to feed information that players need, instead of overwhelming them with visual cues in a scene.
This is a deliberate planning process to convey where the destination is, what the available paths forward are, and the obstacles he/she has to overcome in order to get there. As shown in the preproduction footage below, paths naturally converge in a 3D scene and set dressing a level plays as much significance as the camera placement during each segment of gameplay.
To support the aforementioned compositional techniques, commercial game engines are often well equipped with procedural camera systems, such as the Cinemachine & Timeline feature in Unity, which frees the team from expensive camera logic development by allowing creators to iterate and prototype new ideas on the fly while saving settings in play mode. These camera systems allow developers to adjust dynamic progression in real-time with a timeline so that the framed camera stays in the desired compositions.
What was learned
In conclusion, finding balance, as a result, becomes the primary challenge game developers sought to hone when it comes to camera handling. On one end of the balance, game developers need to assess the feasibility of a camera during gameplay, whether it serves a functional purpose to be presented in a specific fashion. On the other hand, they also need to understand how cameras can provide immersive gameplay and serve aesthetic purposes for the most optimal game experience.
This report merely scratches the surface of the myriad of techniques that exist to produce unique presentations of games. As employing these techniques are highly experimental and expensive in terms of time and effort, developers must also consider if these techniques would yield the desired player experience before undertaking the task of implementing it. Every game is made with different objectives and scope in mind. As it is impossible for a one-size-fits-all technique, game developers must filter and choose which techniques would be most beneficial for their game.
I do hope you enjoyed reading this article as much as I did researching, please feel free to applaud and follow me on my LinkedIn profile and join me on this journey to learn more about the latest trends in UX and game development.
To try out a Second-Person Perspective game where I created and implemented pixel sprites in a 3D environment, check out Monet Heist on itch.io:
In Monet Heist, you play as Salvador Daring, a wanted criminal on his way to the national museum for a heist! You need…
To try out a 3D minigame I made with the First-Person Camera, check out my Little Lemon Friends NFT game on itch.io:
Multiple Cameras and When to use them… [Unity3D]
If you have worked on unity and been overusing the Main Camera and thinking why even keep the option to add new cameras…
Octopath Traveler's "HD-2D" art style and story make for a JRPG dream come true
From the moment it was revealed, Square Enix's Octopath Traveler appeared to offer a unique experience that beautifully…
Developer EggNut highlights how they created Backbone's dystopian noir 2.5D pixel art style
Backbone is a side-scrolling dystopian noir adventure that has you filling the role of private detective Howard Lotor…