Marvel Rivals’ destructible environment was apparently the ‘first major technical challenge’ the devs had to overcome

One of Marvel Rivals’ most distinctive features (apart from all the superheroes running around) is the destructible terrain. If you press B, the map in front of you will turn grey, except for everything that you can destroy, which will turn yellow. Give it a try for yourself and you’ll see just how much is breakable in this game.

In various places across the maps, you’ll be able to find breakable areas that can lead to the enemy backlines or expose a flank. Next to the first point on Tokyo 2099: Shin Shibuya, there’s a breakable wall that will expose one of the defending team’s paths back to the point. If you break it around head height and then just hold that line of sight, you can kill players before they even make it back to the first point, and usually, they never see it coming.

But taking advantage of the breakable terrain doesn’t just make strategic sense; it’s also just worth it for the sake of making use of the dev’s hard work. The lead technical designer, Ruan Weikang, explained in an interview with Unreal Engine how the destructive environments presented the developers with some pretty significant issues.

First off, the developers had to make sure the rubble fell in distinct motion patterns according to the hero responsible for it. “Whether it’s Hulk’s devastating punches, Punisher’s sustained turret fire, or Storm’s sweeping tornados, debris exhibits carefully crafted motion patterns that reinforce each hero’s identity,” Weikang says. It may not be obvious at first, but Magik’s blade and Punnisher’s gunfire will break the terrain in slightly different ways.

Then there’s the performance cost of having all this large-scale destruction. Initially, I found that Marvel Rivals performed pretty badly, whether I came across harsh FPS spikes, which at times turned my game into a PowerPoint presentation, or it just took an age for the map to load each game. While this has changed for the better since launch, it was apparently in an even worse condition beforehand.

Marvel Rivals Season 1 screenshots

(Image credit: NetEase)

“Implementing large-scale environmental destruction while maintaining competitive performance standards presented our greatest technical challenge,” Weikang says. “Fragment count emerged as the critical performance factor. To meet both gameplay and visual requirements, we implemented a two-tiered fragmentation system for static structures (this turns big rubble into little rubble). Additionally, post-fragmentation scenes experienced dramatic increases in polygon count, significantly impacting GPU rendering loads and memory utilization.”

To optimise this, the developers had to implement a couple of fundamental improvements. These include hiding the transition from primary to secondary fragments so players’ GPUs don’t explode and reducing the fragment polygon counts by adding native unsupported LOD functionality to Geometry Collections (assets that can break apart using the fracture mode). However difficult all of this may seem, the biggest obstacle turned out to be how the rubble impacted the lighting in Marvel Rivals.

“Implementing extensive environmental destruction presented our first major technical challenge: selecting an appropriate global illumination solution,” lead technical designer Weikang says. “Traditional baking approaches proved inadequate for environments dominated by dynamic objects and frequent lighting changes.”

Marvel Rivals tier list - A big group of heroes fighting

(Image credit: Netease)

It turns out that Lumen’s software-based ray tracing couldn’t quite get the lighting right at first for the destroyed areas of the map. There would be light leakage in the wrong places or just static flat lighting next to the rubble. Now, this isn’t a game-breaking issue, but it does look funky and ruins the pretty aesthetic of the maps.

It was only until the team took a hybrid approach to Geometry Collections, “attaching Static Meshes (SM) capable of distance field generation to each fragment,” Weikang says. “During the fragmentation process, we convert building collision geometry to SM components and process them simultaneously.”

This may sound complicated, but it’s essentially just a way to help convince UE5 that the destroyed buildings are consistent material properties, not just confusing rubble. All of this means that when you break a wall, you’ll get a nice little shadow in the correct areas. It may not be much, but it sure is honest work.

Advertisements

Leave a Reply

Your email address will not be published. Required fields are marked *