author-pic

Georgi Tsaklev

Programmer struggling with art

The Cake is a Lie - Dev Log Four

GDD730 Dev Logs


Published on June 28, 2021

Week 4 for The Cake is a Lie team was single-handedly the busiest week so far!

Creating the first-person hands

One of the reasons we chose to go for a first-person game is to reduce the complexity of models and animation we have to do. However, this isn't an easy job. Daniel Floyd in his video "How Overwatch Conveys Character in First Person" (2017) talks about the complexity of character, emotion and story that is conveyed through the first-person animation of Overwatch.

When creating a model for the hands, I started from simple low poly models and tried to bring the quality up gradually. Unfortunately, I quickly hit the wall of my skill and realised that I won't have the time to properly learn and complete the model. I quickly swallowed my pride and took the lesson I learned from an earlier blog post and started looking for an already complete model. Luckily, David Fischer (2014) has uploaded a model he created to Sketchfab (2021) of first-person hands that were already rigged and ready for animation.

With the model ready, I started animating. In total, I created 7 animations - Idle, Running, Holding an object, Jumping, Falling, Looking at an interactable object and using an ability. Creating animations in Blender (2021) to be exported to Unity was a task I faced for the first time, so I decided to be on the safe side and tried the whole workflow once I finished the first animation. This step I can recommend to anybody who is doing it for the first time as it can save a lot of pain and suffering later on down the line.

blender
Click to view full size

Another improvement I made to my workflow was to set the export directory for the fbx file to be directly in the Assets folder of the Unity project. Unity is an amazing engine and it can dynamically reimport and reload assets of all kinds, including fbx files. With this small alteration of my workflow, I was able to hit the Play button and jump around the level and test the animations on one screen and make alterations in Blender (2021) on the other without ever stopping the game. This allowed me to find small places for improvement which would normally be quite tricky to find and take a ton of time to go back and forth until they are resolved.

Another learning opportunity was to set the animation controller for the game. So far I have been only triggering interactions from character controllers to the animation controllers but it has been the animators that have been setting them up. It wasn't a difficult task, however, setting them up in a way so that the animations trigger without overwriting others did require a couple of iterations.

animator
Click to view full size

Additionally, I had an issue with one animation missing once imported in Unity. This issue took a good few days to resolve as there wasn't a lot of resources around the issue. After resolving it I can see why that was the case - I caused it. I accidentally deleted one of the animations and while it was in the fbx file it wasn't showing in the editor. Thankfully it was a quick fix once I figured it out.

animInspector
Click to view full size

Camera setup

As David Floyd (2017) mentioned in his video, first-person hands have to be rendered with a set field of view in order for them to appear consistent regardless of personal player preference. This is normally achieved through a second camera, so I researched how to achieve this camera stacking in Unity (Unity, 2020). However, while I was implementing it I stumbled upon a video talking about how to achieve the same effect using the brand new rendering pipeline we are using for this project (Unity, 2019).

The Universal Rendering Pipeline allows developers to specify custom rendering passes and override default renderer behaviour, which is a much more performant way to achieve the exact same visuals! I am always super excited when I find simpler ways to implement things and my journey with Unity keeps satisfying this itch as I am learning more and more with each task I pick up.

fwdrenderer
Click to view full size

Lastly, I wasn't happy with the capsule shadow we had below the player. After all, in our universe, the character is not just a simple capsule. To fix this I disabled the shadow casting from the player capsule and employed a package called "Projector for LWRP" (Nyahoon Games, 2021) which also works on the Universal Rendering Pipeline we are using. This was required due to the built-in projectors in Unity not working with URP or HDRP.

shadow
Click to view full size

A helping hand (or two)

Collaboration wasn't missing this week. Members of the team jumped on and off from the Discord channels and worked together to progress the project. Personally, I assisted Luke Quinn with the implementation of the new Input System.

Unity has decided their Input System is not flexible enough and decided to create a brand new implementation from scratch. They were not wrong as evident from the sheer number of Input Systems on the Asset Store. However, while the new system is much better in many ways, it is new and most game developers aren't familiar with the differences from the previous system paradigms.

inputsys
Click to view full size

Thankfully, the many game jams I have participated in this year have taught me how to use the system and I was able to help Luke with the troubles he was facing and unblock his progress.

Reflection

This week has been light on reflection, but I feel this is due to our development picking up and everybody digging into their respective disciplines and doing their best. I learned a lot and can't wait for the next challenge in this project.

References

The Blender Foundation. 2021. Blender. [Software]

Fischer, D., 2014. First Person hands rigged. [online] Sketchfab. Available at: https://sketchfab.com/3d-models/first-person-hands-rigged-547a45535f0c4fe787948f7a7a6a88db [Accessed 28 June 2021].

Floyd, D., 2017. How Overwatch Conveys Character in First Person. [online] Youtube.com. Available at: https://www.youtube.com/embed/7Dga-UqdBR8 [Accessed 28 June 2021].

Nyahoon Games, 2021. Projector For LWRP | Nyahoon Games Pte. Ltd.. [online] Nyahoon.com. Available at: https://nyahoon.com/products/projector-for-lwrp [Accessed 28 June 2021].

Sketchfab. 2021. Sketchfab - The best 3D viewer on the web. [online] Available at: https://sketchfab.com [Accessed 28 June 2021].

Unity, 2020. Camera Stacking in Unity with URP! (Tutorial). [online] Youtube.com. Available at: https://www.youtube.com/watch?v=OmCjPctKkjw [Accessed 28 June 2021].

Unity, 2021. FPS Game Rendering and Graphics in Unity! (Tutorial). [online] Youtube.com. Available at: https://www.youtube.com/watch?v=5AmI2yOx0Nc [Accessed 28 June 2021].

If you like it, share it!