Development Blog

The Challenge of Optimizing the Expanded Sandbox Area

The Challenge of Optimizing the Expanded Sandbox Area

Author Introductions

“Ohkuma Daisuke”
Position: Engineering Dept. Client Team
Date joined: January 2022
Industry experience: 13 years in mobile and browser game development and operations. He is primarily responsible for using Unity in developing the sandbox field area, networking aspects, and optimization.

“Kajita Haruka”
Position: Art Design Dept. 3D Team
Date joined: May 2023
Industry experience: 7 years including in non-gaming industries with Unity. As a technical technical artist, she utilizes her wide-ranging skill set to help with various aspects of client-side development, from live performances and visuals, to graphics optimization and other engineering areas.

Introduction

A major appealing aspect of the sandbox game is that players can freely explore a wide open area. We are working daily to further expand this area in Holoearth and give players a great place for a new adventure experience.

However, keeping optimization in mind while creating the terrain is incredibly important in realizing this larger field area.

A vast and complex terrain may provide the most fascinating experience for players, but it also comes with technical challenges such as poor performance and longer loading times.

In this article we will touch on some of the methods we have deployed to address these challenges to optimize performance of the game.

Creating the Field Area and Performance Issues (Ohkuma)

We develop the Holoearth sandbox area using Unity’s “Terrain” tool.

Terrain is useful in efficiently generating terrain and vegetation, but as the size of the field area increased it began to have a big impact on performance. In particular, just using large Terrain tiles as-is and integrating them into the game caused a significant slowdown in rendering and frame rates.

Because of this we developed some optimization techniques to address these issues.

Terrain Partitioning & LOD (Ohkuma)

First of all, we decided to divide each large Terrain tile into smaller sections.
To be specific, we partitioned tiles into smaller 100m x 100m sections that could be optimized individually.

After this, we made low-poly meshes out of partitioned tiles and introduced LOD (Level of Detail) to improve performance.
By segmenting the field area into a grid like this and loading the high-detail Terrain immediately around the player while loading the low-poly mesh on the rest of the grids we were able to improve rendering performance.

Improving Terrain Meshes (Kajita)

The next step is to take the partitioned Terrain tiles and merge the entire landscape.

The landscape is made up not only of Terrain tiles, but a large number of objects including rocks. As the number of these objects gets exceedingly large, the rendering requirements increase, which negatively impacts performance.

In particular, a lot of objects are partially buried into the terrain or overlap with one another, so we were able to improve rendering performance by cutting out overlapping polygons and merging their meshes. After merging, we reduced the number of polygons to generate LOD meshes.

We utilized Houdini to merge these meshes, remove redundant polygons, and generate the new LOD meshes. The goal is to semi-automate as much of the process as possible by taking advantage of Houdini’s capabilities for advanced geometry processing and as a useful pipeline tool. Terrain is a standard Unity feature and the rocks used for the landscape are also placed as part of the Unity workflow.

Since all of this terrain data exists in Unity scenes, it needs to be converted into a format that Houdini can work with, so Terrain data is converted into .obj files and rocks are transferred to Houdini directly using Houdini Engine for Unity.

Houdini Engine for Unity is extended to include necessary information and attributes on Terrain materials for use in Houdini. This allows us to use Houdini without disrupting existing workflows because it can flexibly handle information that is specific to Unity.

▲Geometry generated in Houdini by loading Terrain objects

▲Rock geometry sent to Houdini

First we only merge all of the rocks. This involves identifying rocks that may overlap each other, and use Boolean SOP on all of these to remove unnecessary polygons. After this, we do the same Boolean procedure with the Terrain and the merged rocks.

In order for this Boolean operation to work, each geometry actually needs to be pre-processed in various ways, but that is outside of the scope of this article.

▲Terrain geometry after merging

After all this merging is complete, we use PolyReduce SOP on the combined geometry to generate LOD meshes.

Houdini’s strength is that it allows you to specify the degree of polygon reduction needed and weigh it based on a set of conditions, and adjustments and rework can be done here based on feedback from the art and QA teams.

▲LOD mesh generation results (From the left: LOD0, LOD1, LOD2)

Future Prospects (Ohkuma)

As we continue to expand the sandbox area, we will need even more advanced techniques to optimize performance.
To give some examples, we are looking into switching from the partitioned, grid-based method described herein to methods that involve things such as voxel-based generation, procedural generation, or other innovative methods for creating a more expansive and dynamic world.

When considering these new technologies we maintain performance optimization as a top priority, and we aim to continue improving the world of Holoearth without negatively impacting the experience of the players.

Final Thoughts (Ohkuma)

Terrain generation and performance optimization are critical aspects of developing a sandbox game, and achieving both successfully presents a number of significant technical challenges.

But if we can overcome these challenges then we can provide a truly engaging and immersive world and experience for players.
To that end, we will continue doing our best to introduce new technologies in efforts to further optimize the world and provide an even larger area to enjoy.