A Cockpit with a View — First-Person Gameplay Camera
Cinemachine and Timeline Final Framework Log 3
After finishing the global post-processing of my scene, it was time to tackle the cockpit area of the ship.
Objectives: Progress update on Cinemachine and Timeline Final Framework detailing how I put together a cockpit area with its own dedicated reflection probe and post-processing profiles. As such, this article serves as a reiteration of the importance of having multiple post-processing profiles as well as reflection probes in scenes that feature indoor and outdoor variation.
Table of Contents
· Cockpit Lighting — Box Volume
· Dedicated Reflection Probes
· Adjusting Imported Object Normal Maps
· First-Person POV Gameplay Camera
· The Result — Finalized Cockpit with First-person Gameplay Camera
∘ Before
∘ After
∘ First-person Camera
Cockpit Lighting — Box Volume
I fashioned a cockpit ala kitbash using Filebase. I wanted to make sure I selected a cockpit frame with transparency so that I could give the players a nice view of the surrounding area.
However, you probably already notice that it’s really dark in here for a transparent surface in an otherwise well-lit environment. This can sometimes be the case when we have scenes that include both outdoor and indoor areas, for this reason, we implement multiple post-processing profiles.
By adding a box volume and specifying the size to fit this indoor area, I was able to take control of the exposure of the room.
The result is a well-lit room that appears to have natural light gracing its facets.
This Box Volume gives you access to all sorts of overrides for post-processing, but I was happy with the results I got so far and decided to move on.
Dedicated Reflection Probes
In order to depict accurate reflection in the Cockpit, I added a dedicated reflection probe that only encompasses this area. This follows the same principle as the Box Volume — environments with a variety of areas need their own dedicated care. If you use one reflection probe for an entire scene, and the scene happens to have a mixture of enclosed rooms and open areas you risk generating inaccurate reflections.
You can instantly see the difference when I add the reflection probe.
This addition also fixed a lighting/reflection issue I was having in the cockpit. The outside of the ship has emission textures as you can see in the following image.
Since I had one large reflection probe covering the area, the emission reflection was bleeding all the way inside the cockpit. Once I added a dedicated reflection probe inside, it easily solved this problem.
Furthermore, you can see how the sunlight reflects on the floor and side panels as soon as the reflection probe is added.
Adjusting Imported Object Normal Maps
Imported objects sometimes have their Normal Map values reset or altered upon being added to projects, at least this has been my experience so it’s a good rule of thumb to check on those.
Now this surface has a really nice bumpy texture.
Some adjustments were also applied to the Controls’ surface Normal Map and Coat Mask to make the texture appear more worn out like the floor.
First-Person POV Gameplay Camera
By using Cinemachine, I added a Virtual Camera with a POV Aim. The vertical and horizontal thresholds were set to -30,30 and -40,40 respectively, these values dictate how far the player can look in each direction. The wrap has been toggled off for both horizontal and vertical values because we don’t want the player to have a 180° viewing capacity.
The virtual camera is placed on the chair’s head support to create a realistic first-person point of view.
Note: This POV camera follows the same logic as the one created for my Interactive Security System.
The Result — Finalized Cockpit with First-person Gameplay Camera
Before
After
Indoor Cockpit Environment
First-person Camera
Note: This article is the third part of a log documenting my process to complete a Cinemachine and Timeline Framework assigned by my apprenticeship at GameDevHQ. Catch up with the first one here. The finalized version will be an animated spaceship scene with diffrent camera angles.