Guide: Proxy LOD Tool in Unreal 4.20
Events
Subscribe:  iCal  |  Google Calendar
Las Vegas US   8, Jan — 12, Jan
Zürich CH   31, Jan — 4, Feb
Leamington Spa GB   31, Jan — 3, Feb
Bradford GB   6, Feb — 11, Feb
Bradford GB   7, Feb — 9, Feb
Latest comments
by Rowlan
59 min ago

If you go for Unity and Biomes, as you wrote in your article, please do support Vegetation Studio Pro. Your work is awesome, can't wait to see it on the store.

by Dara Burke
2 hours ago

Great breakdown of the process and optimization, thanks for sharing.

This article just not only provides great tools for level design. It's also useful vocabulary to express ideas with our team. https://xbeasts.blogspot.com/2018/12/Remove-Wall-Decals.html

Guide: Proxy LOD Tool in Unreal 4.20
31 July, 2018
News
Tutorial

Have you tried using the new Proxy LOD tool, in Unreal Engine 4.20? This tool allows users get massive performance advantages by reducing rendering cost due to poly count, draw calls, and material complexity. It is also great when optimizing content for mobile and console platforms. Want to learn more? Let’s check out a thorough guide from the Epic team. 

Consistency is Key

Whether you’re destroying cars to harvest resources in order to build the fort of your dreams, or frantically building walls to avoid oncoming fire, the construction and destruction of objects is a crucial feature when playing FNBR. 

When we were implementing crossplay, it was vital for Epic to make sure that every player had a fair chance to win matches, regardless of platform. To do this, the Fortnite team had to come up with a way to reduce the number of draw calls or the number of objects that are displayed on screen at one time to overcome any performance problems that might arise for two of the most important mechanics in FNBR, constructing and destroying objects. 

Constructing a Modular World

To better understand the problems that are introduced with player-caused destruction, you first need to know how the buildings in FNBR are constructed. Each building you see in FNBR is built out of a series of modular pieces that can be quickly “snapped” together to make any structure that is needed. This modular approach to building also helps cut down on the number of unique assets that are required, saving precious resources like memory. This is because you can reuse the various modular pieces in different ways with different materials and textures to give your buildings an unlimited amount of variety without having to load additional objects into memory. You can see an example of the types of results that can be achieved when using modular construction in the image below. 

Building___Modular_Assets_00.png
The building that is on the left-hand side of the image (above) is constructed using only the nine Static Mesh Actors that you see on the right-hand side of the image, minus the various Trim and Props that live inside each building. Constructing the buildings in this manner also makes it incredibly easy to display the player-caused destruction because all that needs to be done to signify a piece has been destroyed is to disable both the rendering and collision of the destroyed piece. While this method of displaying destruction works well for both PC and consoles, it does present some issues on less powerful platforms, such as mobile devices. The reason for this is due to the sheer rendering cost of drawing the 350 to 400 individual pieces that make up the buildings in FNBR. In the following GIF, you can see just how many pieces make-up a typical building.

BuildingExplode.gif
While this is not an issue for PC and consoles, it is an issue for platforms like smartphones where the entire scene needs to be composed of less than 1,000 pieces. 

Now that we understand a little bit about how buildings are created as a whole, let’s take a look at how each component is built, as that also plays a role in how destruction is displayed. The following flowchart breaks down how the information in the rest of this document is laid out.

ProxyLOD_InDepth_Overview.jpg
Less is More (Optimized) 

Even with the modular type construction that is used in FNBR, you will eventually hit a hard limit on how many objects you can have on-screen at one time. This hard limit, referred to as Draw Calls, presents a big problem as each platform you can play FNBR on will have a different amount of draw calls that can be displayed at one time. To ensure that each platform that you can play FNBR on has a smooth and stable framerate, each Static Mesh that is used in FNBR contains multiple Level Of Detail (LOD) Static Meshes. LOD’s are a commonly used video game optimization technique that works by displaying a new lower triangle version of the Static Mesh when the Static Mesh is a certain distance away from the camera.  

Mesh_With_LOD_s_Wireframe_00.jpg
The above image shows one of the many modular wall Static Meshes that are used to make the various buildings you see in FNBR. When you are very close to the wall, you will see the Static Mesh that is on the far left-hand side of the image above. As the camera is moved further and further away from the wall, the different LOD’s will be displayed, like in the following GIF.

LOD_Transition_00.gif
When this technique is applied to an entire building, you will get something that looks like the following image.

Building_OrginalGeo_VS_LODGeo_00.jpg
On the left-hand side of the above image, you can see what the original building looked like and on the right-hand side, you can see what the building looks like using only the last LOD.  While the version of the building on the right-hand side is what we want, it is still made of far too many pieces to be rendered efficiently on some platforms. To address this issue and still be able to display player-caused destruction, we are going to need to employ some new tools and some “old school” Static Mesh production techniques. 

Kicking it “Old School”

Before we take a further look at how player-caused destruction is displayed, we first need to take a look at the very last LOD that is used in each of the modular Static Meshes as it was created in a special way. Using the UE4 Static Mesh Editor to open up one of these modular building pieces and then forcing it to display the last LOD will give us something that looks like the following image:

Last_LOD_In_UE4_00.png
While this looks like an average Static Mesh, make sure to take note that the Triangle count is 12 with the Vertex count being 18. While these numbers seem low, they are actually smaller than you can get when using a Digital Content Creation (DCC) to create a cube that is the exact same size and shape. In the following image, the same modular building piece was created in a DCC and then exported to UE4. The created Static Mesh is the exact same size and shape but notice that this Static Mesh has six extra vertices.

Last_LOD_In_UE4_01.png
While having only six extra vertices does not sound like a lot, it can quickly add up. For example, if the above piece is used 30 times in a single building, it would add around 36 additional vertices to the building. Now take the 36 additional vertices and multiply that by 100 structures and you get 3,600 additional vertices that have to be rendered but are otherwise not used. To get rid of these extra vertices, these modular Static Meshes where adjusted in the following way:

  • First, each modular piece that could support it was forced to not use any Smoothing Groups.

3dsMax_NoSmoothingGroups_00.jpg

  • Next, the Static Meshes UV’s where set up so that there would be as few UV Islands as possible. For this modular piece, the front and back faces of the box where mapped to the entirety of the 0 to 1 UV space. Then, the parts around the side where all welded together and scaled to match the current setup of the modular pieces.

3dsMax_UVLayout_00.jpg

  • Finally, the Normals were modified to make sure that any smoothing artifacts on the vertical faces would be mitigated as much as possible.

3dsMax_NormalFix_00.jpg
When all of that was completed, the newly fixed-up modular piece was exported and then imported over the existing piece. This same process was then applied to the last LOD on every single Static Mesh in FNBR. 

In the next section, we explain why all of this was done to show player-caused destruction.

Epic Games 

You can find the full breakdown here

Comments

Leave a Reply

2 Comments on "Guide: Proxy LOD Tool in Unreal 4.20"

avatar
dilemmachine
Guest
dilemmachine

Because the higher poly version can have higher resolution vertex paint…

Krystian
Guest
Krystian

About this image:
comment image
Why do you even have 330 polygon version when it indistinguishable from 82 polygon version?!?! Even 82 seems to be an overkill.

wpDiscuz
Related articles