天天看點

Simplygon plugin for Unreal Engine 4

This tutorial will describe how to use the Simplygon plugin for Unreal Engine 4, both for the basic and advanced integration.

Basic  Advanced

Basic

First of all you will have to obtain the Unreal Engine 4 source code and the 6.X SDK version of Simplygon. Then follow steps 3.0-3.1 in:

UE4 Integration

Please note that UE4 requires visual studio 2013 or higher. For this tutorial I will assume that you have completed the installation and compiled UE4.

First of all I create a new project. The blank template is ok.

Simplygon plugin for Unreal Engine 4

Let’s create a level so we can display the results a little easier. We can select the default level to get a skybox and some ground.

Simplygon plugin for Unreal Engine 4

Now it is time to import an asset that we want to create LODs for, in the Content Browser you can select Import and browse to the file on your computer.

Simplygon plugin for Unreal Engine 4

Once imported I can put my asset into the level by simply drag-n-dropping it. However as you can see in the screenshot we should also add a light to demonstrate the effect of reductions later.

Simplygon plugin for Unreal Engine 4
Simplygon plugin for Unreal Engine 4

Next step is to double click the mesh in the details window to open a separate window for it

Simplygon plugin for Unreal Engine 4

Locate the LOD settings, for this example I will create 4 LODs which is also the maximum so we can demonstrate the differences. The first one will always be the original so in reality we only create 3 new LODs.

Simplygon plugin for Unreal Engine 4

For each LOD we need to select it and expand the Reduction Settings.

For the first LOD I will reduce triangles by 50%.

The Max Deviation setting is the alternative factor you can reduce on, it will set a threshold of how far each vertex are allowed to deviate from the original.

The Silhouette, Texture and Shading options are used to define if any of them are more or less important for your specific asset, in my case neither are prioritized over the others.

The welding threshold will close holes that are smaller than the threshold, in my case my asset is already closed so there is no need to change this.

The recompute normals option will just like the name says recalculate the normals after reduction, this can be useful for some assets if the results get strange lightning or texture effects. You will have to see what fits best for each individual asset.

The Hard Edge Angle is the threshold for what Simplygon will consider a hard edge and therefore not try to smooth out. This is mostly applicable to buildings and assets with corners.

Simplygon plugin for Unreal Engine 4

The second LOD will keep the same settings except for the reduction percentage.

Simplygon plugin for Unreal Engine 4

And the same is true for the third LOD, which will be half again of what LOD 2 was

Simplygon plugin for Unreal Engine 4

And here are the 4 LODs

Simplygon plugin for Unreal Engine 4
Simplygon plugin for Unreal Engine 4

In Unreal Engine 4 the editor has the ability to automatically switch between the LODs depending on zoom-level. You can change the threshold for this by going into details for the asset once again and look under LOD Settings, if you uncheck Auto Compute LOD Distance this will enable the Screen Size field for each LOD.

Simplygon plugin for Unreal Engine 4

I will set my Screen Sizes to 1, 0.9, 0.8 and 0.7 so I can clearly spot the popping between LODs

Simplygon plugin for Unreal Engine 4

Now I can see the popping even when close to the model

Simplygon plugin for Unreal Engine 4