Creating Dense Forests in Prologue: Balancing Immersion and Performance
November 15, 2024 Technology
How can we create visually rich, immersive forest environments without overwhelming hardware? And how can studies of player perception and psychology help game designers strike this balance? Truly dense forests simulations are extremely resource-heavy, that’s why video games have long sought economical ways to depict the natural world. For PLAYERUNKNOWN Productions' upcoming survival game Prologue these challenges are further complexified by the studio’s novel combination of machine learning (ML) heightmaps and procedurally generated asset population - creating a requirement for versatile art that looks right in any scenario.
This blog explores the unique techniques that our small team have used and developed to achieve believable forests that fulfills the demands of the game, build on our ML technology, all while getting the upmost from the available resources. Solutions that help reduce hardware overheads include using tile-based world structure, and other strategic shortcuts, ensure that forests feel expansive and alive without compromising game performance or the dynamism of the world.
We'll be discussing this blog and taking questions from the community over the coming days, join the conversation in our Discord.
Author: Michael van den Berg
The Prologue challenge
Prologue uses a machine learning agent to generate a new landscape on every playthrough. And we wanted to create a game with dense realistic forests. This means that we can’t use the offline methods to generate forests that you would normally use, so for instance we couldn’t use Houdini for any of the world building besides generating training data for the ML agent.^ So we had a requirement for procedural generation that could be as lightweight as it can be while maintaining the perceived realism and complexity that you would expect from a forest.
World structure
The first layer of this challenge was to structure the world in a meaningful way, which satisfies the need for an apparent realistic world. Such a structure becomes a kind of abstract ideology that informs all decision making. Foundationally, we made a static prototype (at scale) in which we could pre-author all game elements and find the appropriate balance for visuals and game flow. Meaning, we made a level using all the traditional approaches like one would approach making a game where there would be only one level. So we could prototype scale, gameplay and all other elements that would dictate the generational algorithms.
The findings from this process and level were used as a point of reference to discuss and inform the progress for the team working on the ML – Landscape and for the team working on the procedural systems.
Eventually as the vision of the game matured and design requirements started to become more concrete we started using schematics similar to the design drawing above, to influence the ML- generation with a technique called guided generation (more on this in a future blog from Joey Faulkner)!
Optimizing Forest Environments
Our first iteration of a fully procedural system became difficult to manage: It wasn’t quite living up to the art and design direction, and as demands grew, the complexity and the generation time ballooned, and it became difficult to maintain and adding features became cumbersome.
The breakthrough for this project came as I was exposed to the work of my colleague, Thijs De Haas, who had been producing some vignettes illustrating the artistic direction of the biomes. I was looking them over and I had a thought to try out spawning these stylised little square vignettes as tiling prefabs in the scene, to compare how far my procedural generation system was off. And to my surprise the experiment looked really good!
Not long after we did a playsession to gather feedback. We didn’t tell anybody about the tilling nature of the generation method to be able to gather unbiased impressions, and everyone was very positive! We had some discussions, I did a pitch, and we decided to go forward with this tilling architecture.
The benefit of this workflow in our use case is that it allows for direct art direction, because instead of tech-art being the bottleneck in generating all the rules for the spawning, they can just be adjusted in the level; the artist can submit the change and see it directly in the world, and variations can be made to suit the need of the game, and some procedural changes are added on top. As we playtested the game we also found that the tiles had advantages from a gameplay perspective; at times making the game world feel less formulaic due in no small part to having a human touch in populating the terrain with assets, while at other moments allowing us to add landmarks to allow for unique gameplay moments (for instance, a natural shelter) or simply to allow players to orient themselves in the terrain.
This also has the added optimization of being able to manage biome or spawning related data on the tile level. Things like density of the forest or what type of forest, this can then be propagated to the instance level. For example, if you have a 50% Pine and Beech designation, this will be propagated to a 50-50 chance to spawn a Pine or Beech tree in the instances under that tile.
What You See Isn’t Always What’s There
With a method of structuring the world we were creating in hand, I turned to the psychology of visibility to get a better idea for forest design. An important study for this was "An Eye-Tracking Study on Visual Perception of Vegetation Permeability in Virtual Reality Forest Exposure" by Chang Li, et al. Here, the researchers found that player reactions to various levels of vegetation permeability influenced their emotional state. Denser vegetation with lower visibility often triggered feelings of anxiety or unease, while more open environments led to feelings of safety and relaxation.
This concept of visibility and its emotional impact is something I carefully considered for Prologue. For instance, in sections of the forest with higher visibility—where the player can see through the trees and plan their route—the experience is more relaxed and exploratory. However, as visibility decreases, the forest takes on a different mood. The reduced sightlines make players feel more vulnerable, heightening tension and creating a sense of mystery or danger. This can make the player get lost quickly, forcing them to plan ahead.
With performance in mind, this kind of research was really useful to understand ‘when was enough’ as we constructed the tile system to generate forests. This, coupled with the work of my colleague Remco van de Ven, who had the great idea of using particles to LOD out distant trees, allowed us to set up a performant prototype. With an approximation of the forest generation setup that was made in PCG, entirely in Niagara (UE’s particle system) that could run completely on the GPU! And it works great!
Bringing It All Together
The forest generation for me is really defined by the tricks we’ve done to pre-compute, pre-author, or fake information to lighten the load on the player's machine. While maximizing visual effectiveness, and output with available resources. The final result is an amalgamation of different systems, from guided machine learning algorithms trained on a combination of real and synthetic (Made in Houdini) data, Particle based approximations of distant forests, and a layered PCG system that generates detail where it is needed.
The end result is a forest that feels alive and dynamic, a space where players can lose themselves while the game performs smoothly in the background.
As technology continues to evolve, we can expect even more sophisticated ways to create rich, immersive forests in games. But for now, blending procedural content generation, strategic data management, and a deep understanding of player psychology allows us to build environments that push the boundaries of what is possible while ensuring a seamless, engaging experience for the player.
We’ll be continuing the discussion in the PLAYERUNKNOWN Productions Discord, come and join in!
Notes:
^We did toy with the idea of using Houdini to create data to train an ML agent for placing foliage instances, but we decided it would be too resource intensive and time consuming to explore that route.
Further Reading:
Li C, Du C, Ge S, Tong T. An eye-tracking study on visual perception of vegetation permeability in virtual reality forest exposure. Front Public Health. 2023 Jan 24;11:1089423. doi: 10.3389/fpubh.2023.1089423. PMID: 36761146; PMCID: PMC9902884.
Share: Twitter Facebook Copy link Next article
Keep me posted
Stay updated on our journey to create massive, procedurally generated open worlds.
For more latest news and updates you can also follow us on Twitter