DGUnreal Home

Site

Home


 

Unreal Tournament III Tips
This information is provided by DGUnreal.  Please do not copy this and post it elsewhere.


StaticMeshes

Textures

StaticMeshes should preferably be single textured (skinned).  The engine splits multi-textured StaticMeshes into separate objects at render time.  This adds additional overhead to perform the split and another Draw Call for each separate object.  If there are more than three or four textures on a StaticMesh, consider baking a single skin.

Lightmaps

StaticMeshes should preferably be set to use Lightmaps.  This is superior to Vertex-Lighting and usually looks better and renders faster.  See the Lightmap vs Vertex Tip.

For stock UT3 StaticMeshes, verify that the StaticMesh is designed to support Lightmaps.   Locate the StaticMesh in the Generic Browser and either double-click on it or right-click and choose Static Mesh Editor from the context menu.

In the StaticMesh Editor, if the top-left viewport status shows 2 or more UV Channels, then the StaticMesh may support Lightmaps.  The default Lightmap settings for a StaticMesh are determined by the LightMapCoordinateIndex and LightMapResolution properties.  If the LightmapCoordinateIndex property is a number other than 0 and optionally if the LightMapResolution is a value other than 0, then the StaticMesh is most likely set up to use Lightmaps.
The final test is to click on the Show UV Overlay toolbar button.  This will overlay the LightMapCoordinateIndex's UV Channel layout onto the viewport.  If this is a set of nicely layed out and non-overlapping triangles, then the Lightmap should work properly.   If this is empty, if it has everything squished down into one corner, or if it is a total mess of lines going everywhere and overlapping each other, then the Lightmap will fail when the map is Built.

Note that you cannot change the settings for Lightmaps for stock UT3 content in the StaticMesh Editor as this would require you to save the package, which will prevent your UT3 game from functioning properly.  Any StaticMeshes that you wish to modify the default properties will have to be duplicated to your map package first and then modified there.

After determining that the StaticMesh correctly supports Lightmaps, for each inserted instance of the StaticMesh in the map, set its Lightmap properties accordingly.

For StaticMeshes that do not support Lightmaps or if their Lightmap UV is messed up, they will have to stay at Vertex Lighting.  Vertex Lighting is enabled when the StaticMesh's StaticMeshActor.StaticMeshComponent.StaticMeshComponent.bOverrideLightMapResolution property is checked (enabled) and the OverriddenLightMapResolution value is 0.

For StaticMeshes that do support Lightmaps and their Lightmap UV is good,
The OverriddenLightMapResolution property value determines the resolution of the Lightmap texture.  This is essentially the same as the resolution for standard geometry textures, and is measured in pixels.  An OverriddenLightMapResolution value of 64 is a 64x64 texture, a value of 128 is a 128x128 texture.  So the higher the value, the larger the Lightmap texture and the better the shadow detail.

Note that the value that you choose for the OverriddenLightMapResolution is important for performance and memory optimizations.  Always keep this in mind.  It takes more time to correctly set all of the map's individual StaticMesh LightMap properties, but it results in a better looking and better performing map.

When the StaticMesh's StaticMeshActor.StaticMeshComponent.StaticMeshComponent.bOverrideLightMapResolution property is not checked (disabled), then the default Lightmap settings as found in the StaticMesh Editor are used, and the OverriddenLightMapResolution value is ignored.

When the StaticMesh's bOverrideLightMapResolution property is checked (enabled), and the OverriddenLightMapResolution value is a power-of-two value other than 0, that will be the Lightmap texture size that is used on that StaticMesh.

In most cases, the value used for the OverriddenLightMapResolution will be 32 or 64.   A value of 16 or smaller will only be used for StaticMeshes that are far out of the main play area, since the engine does not use padding on the Lightmap textures and using a small Lightmap size can cause shadow error fringing along triangle edges.  For StaticMeshes that are very large or are more relevant in the play area, the value may be set to 128 to provide better visual quality.  In most cases the values 256 or higher will not be used as they consume a large amount of Lightmap texture memory.   Exceptions to this rule would be a StaticMesh such as a large complex statue or one or two trees, which may look better at a 256 or 512 Lightmap texture resolution, but be careful with the total Lightmap usage in the map and use values of 128, 256 or 512 very sparingly.

The total Lightmap texture use can be checked in the Generic Browser's Primitive Stats tab.  Click on the Lightmap (kbytes) column header to sort the table by size, and consider optimizing any StaticMesh actors that are consuming large amounts of Lightmap texture space.

Size

StaticMeshes should be designed to be smaller building-block chunks.  In other words, a house would be individual walls, floors and ceilings.  If it were one large complex house mesh, it would significantly impact rendering time since a small dynamic light change such as a projectile hit on one wall would require the entire house to be re-rendered.  If it was split into pieces, only those pieces that get "touched" are re-rendered.

Stats

Use the console command "stat engine" to check on the number of StaticMesh triangles that are being rendered in the map.  Any areas that exceed 500,000 triangles may be cause for framerate issues on current average PC hardware (Dual Core 2.5GHz with NVidia 8000 series or ATI HD3000 series).


0807.28 · 6966 page accesses · Copyright ©2008 David R. Green · All Rights Reserved.