61st Development Status: How Developers Improved Game with Unity URP
In this update, devs want to show their audience what they have been working on in the past few weeks. They have made some major changes to their game’s environment, graphics, and performance by switching from built-in to URP. Here are the details:
Environment Overhaul
URP stands for Universal Render Pipeline, and it is a new technology that allows them to create better visuals for their game. They had to redo their shader for trees and other vegetation to match their new standards. Devs also addressed the issues that their community reported in the demo tests a few weeks ago:
- Performance
- Overall look & feel
To improve their performance, they reduced the geometry of the trees. Before, they had 30,000 trees with 3-4K triangles each, which put a lot of pressure on the GPU. Now, they have halved the number of triangles, which freed up more resources.
This also affected how their game looks from a distance. Unity automatically hides geometry that is too small to render (like tree leaves). This made the trees look unnatural. To solve this, devs used a higher alpha cutout threshold based on the distance from the camera. This made the trees look better and blend better with the environment. Devs also added specular and emission fading to enhance the volume of the vegetation. They also used a special depth pass on the shader.
The depth pass writes the geometric information of every mesh on the scene to the Z buffer, which prevents overdraw for semi-transparent materials (like leaves). This reduces the number of times the GPU has to rewrite the same pixel. To further optimize this, they reduced the alpha cutout, as mentioned above. This made the tree leaves cover more screen space, which reduced the pixel rewrites even more.
Devs also used atlas textures for every tree and grass in the game. This reduced the use of RAM, VRAM, and GPU cycles to render everything.
New lighting model
For the overall look, URP introduced a new lighting model. Physical Based Shading uses physics principles for lighting. The main difference is the conservation of energy. Light behaves more naturally in the scenes. Before, their lighting model was based on Blinn-phong, which is a good approximation of natural lighting, but not realistic.
Devs also added new features to the shader. Their vegetation now has a simple implementation of subsurface scattering, which makes the light go through the leaves. They also baked Ambient occlusion to the vertex color, to increase the volume and make the trees look less flat. Devs also changed the vertex normals, to make the shading smoother and more natural.
On top of that, Tank Squad now has dynamic time and weather. Everything on the scene is calculated in real time, no baking required.
They also made changes to their sky, fog, and clouds. Now the environment feels more cohesive. They also added decals to their workflow.
Tank tracks and other small details will be added to Tank Squad in the next development cycles, which will help them create more realistic terrains.
URP also brought Screen Space Ambient Occlusion, but they aren’t satisfied with it, so they are replacing it with HBAO+. They will also add AMD FidelityFX Super Resolution, which will help people who have performance issues.
AI enhancements
They have been working on the next phase of AI enhancement, focusing on attacking and ambushing. Here is a quick summary of both behaviors:
Attacking means that the level designer sets up an event with an Attack Command for specific squads to:
- Move to a certain place or along waypoints
- If they encounter enemies while moving to the target position, they switch to assault mode
source – steam channel of Tank Squad