|
Unreal Tournament III Tips
This information is provided by DGUnreal. Please do not copy this and post it
elsewhere.
Lightmaps
Note: I have an in-depth lightmap tutorial coming soon on UDN.
Lightmap values on CSG surfaces and StaticMeshes are specified in two different ways.
CSG surfaces use a "texels per unreal unit" value. To change this value,
select the desired brush surfaces and right-click on one of them and choose Surface
Properties from the context menu. The Lightmap Resolution value is rated in TPUUs,
with a default of 32, which means that each pixel of lightmap texture is the size of 32
Unreal Units. So the smaller the Lightmap Resolution value, the smaller each
lightmap pixel is.
StaticMeshes actually define the lightmap size as proper texture size values. So a
bOverrideLightMapResolution value of 64 results in a 64x64 lightmap, a value of 256
results in a 256x256 lightmap.
StaticMeshes
In most cases you will want to use lightmaps on StaticMeshes instead of per-vertex
lighting. Check the LightMapCoordinateIndex and LightMapResolution settings for stock
staticmeshes in the StaticMesh Editor. If these are non-zero values then the mesh
supports lightmaps.
Note that some stock UT-III meshes have bad UVs and don't lightmap well, to check this,
click on the Show UV Overlay toolbar button (or choose it on the View menu). A good
lightmap UV layout will be a set of shapes that fill most of the UV area and are non
overlapping.
To enable lightmaps on each StaticMesh the
StaticMeshActor.StaticMeshComponent.bOverrideLightMapResolution must be unchecked to use
the default lightmap size specified in the StaticMesh Editor properties. If you wish
to increase or decrease the lightmap size over the default value, leave the
bOverrideLightMapResolution checked and modify the OverriddenLightMapResolution
value. An OverriddenLightMapResolution value of 0 is per-vertex lighting.
Even on a well tesselated mesh, lightmaps will still look superior to per-vertex.
This is because per-vertex lighting uses a vertex-to-vertex gradient across the
triangle, whereas lightmaps can actually create complex shadow outlines on each triangle
at the lightmap texel resolution. The best method on custom meshes would be to
create the model as low poly, use normalmaps for detail, and lightmaps for lighting.
This is preferable to creating heavily tesselated models which will increase the
scene triangle count, increase the line collision testing, and may have a hit on dynamic
lighting.
Lightmap Totals
Total lightmap use can usually be as high as 32MB and still play well on lower-end PCs and
the PS3. This value can be viewed in the Generic Browser's Primitive Stats tab in
the Lightmap (KBytes) column. Common lightmap totals will be in the 10MB to 25MB
range. If you are targetting current high-end PCs with 512MB through 1GB of video
memory, you may be able to get lightmap use as high as 64MB or more.
Optimizing the Map
Be sure to make a pass through your map before releasing the final version and optimize
the override lightmap values on StaticMeshes, looking for meshes or groups of meshes that
are using a high amount of lightmap texture size. You can also visually check the
Staticmeshes and any that are far outside of the play area or are not recieving a lot of
varying shadows across their surface, can usually have their lightmap resolution decreased
on a per object basis.
Double-click on the larger CSG brush ModelComponents in the Primitive Stats tab to have it
select the surface group in the editor, and change their lightmap size property if they
are excessively high in lightmap use.
|
|