Static Mesh Editor User Guide
Document Summary: Guide to using the Unreal Static Mesh Editor.
Document Changelog: Created by Chris Sturgill (Demiurge Studios?). Maintained by Richard Nalezynski.
Introduction
The Static Mesh Editor is the tool used to set and manipulate the properties of static meshes in the Unreal Engine.
Using the Static Mesh Editor
Opening the Static Mesh Editor
You can open the Static Mesh Editor by double-clicking a static mesh or Right-clicking open its "Properties.." in the Generic Browser.
Static Mesh Editor Overview
Static Mesh Editor Layout
| 1 | Menu Bar and Tool Bar. | Easy-to-click Icons are shortcuts for navigation functions in the above Menus. |
| 2 | Preview Pane. | (tumble and zoom) the static mesh. Also features counts of relevant geometric data. |
| 3 | Properties Pane. | Assign Materials, edit collision, set up Shadow Maps, etc. |
Menu Bar
Tool Bar
View Window (Navigation)
In the view window to the left you will find the following:
- Triangles: Total triangle count.
- Open Edges: In older builds of the engine, this displays the number of open edges in the mesh.
- Double-sided shadow triangles: In older builds of the engine, triangles directly or indirectly adjacent to open edges require a slower shadowing algorithm (see ShadowingReference ).
- UV channels: Number of UV channels. Unique, non-overlapping UVs are required for shadow mapping (see ShadowingReference ).
Along the top are the following buttons:
The Show... buttons are replicated in the View menu above. Clicking Lock Camera off allows you to move the camera as you would elsewhere in the editor. Otherwise it is locked to rotating about the static mesh. Use Save Thumbnail Angle if you want to change the static mesh image used in the Generic Browser.
The Collision menu at the top is used to assign basic collision volumes to the static mesh. Further documentation on this is on the way.
Properties Pane
Properties for a given static mesh are set here. These properties will apply to all instances of the static mesh unless overridden locally in the map.
BodySetup
Documentaton for BodySetup is on the way.
Materials
This has two subfields:
- EnableCollision: When EnableCollision is True for a material, all the triangles of the mesh textured with that material will be used for collision calculations. This means that the collision calculations will be based on exactly the triangles you see. This will, in most cases, be slower than using simplified collision models.
- Material: The name of the material to be used for this texture ID. Simply select the material you wish to use in the Generic Browser and then click the 'Use" button. If you don't see the static mesh's material change immediately, try clicking in the view window.
LightMapCoordinateIndex
Determines which set of UVs will be used for calculating shadow maps and light maps. Shadow maps require unique, non-overlapping, non-tiling UVs. Since this is not always the most efficient option for texturing an object, a separate set of unique UVs can be used for Shadow mapping. For more on shadow maps see the Shadowing Reference.
LightMapResolution
Determines resolution of shadow map. Type only one dimension of desired shadow map (enter "256" if you want a 256x256 shadow map). No value (the default) means no shadow map will be created (only vertex shading will be used). Again, the Shadowing Reference has more information.
ForceDoubleSidedShadowVolumes
Forces the engine to use a slower algorithm to calculate shadow volumes. See the Shadowing Reference for more information.
UseVertexColor
Toggles whether the mesh's pre-assigned vertex colors (if any) are used. ( Note: at present has no visible effect.)
UseSimpleKarmaCollision
The UseSimpleKarmaCollision field has extensive documentation. See the Collision Reference for a handy reference. For a general guide to static mesh collision, see the StaticMeshCollisionReference doc.
UseSimpleBoxCollision
The UseSimpleBoxCollision field has extensive documentation. See the Collision Reference for a handy reference. For a general guide to static mesh collision, see the StaticMeshCollisionReference doc.
UseSimpleLineCollision
The UseSimpleLineCollision field has extensive documentation. See the Collision Reference for a handy reference. For a general guide to static mesh collision, see the StaticMeshCollisionReference doc.
UseFullPrecisionUVs
By default static meshes use half precision (16 bit) UVs in order to save memory. Enabling this option forces the mesh to use full precision (32 bit) UVs. This might be needed for certain cases when seeing artifacts with texture mapping the mesh.
Controls
Mouse Controls
Keyboard Controls
Hot Keys
Working with Static Meshes
LODs
Unreal Engine 3 supports arbitrary LOD levels for StaticMesh objects. Lower-detail meshes are created by an artist or generated, and then imported as an LOD to use for an existing StaticMesh. Once you have added an LOD, you control at what distance that LOD is used in the game.
Viewing LODs
There are some buttons on the toolbar of the StaticMeshViewer which allow you to see how the different LOD levels for a mesh look:
| Auto | Select the LOD level to use automatically, based on the size of the mesh on the screen. This allows you to preview how the mesh will look in-game. |
| B | Force the display to use the `Base' mesh (ie LOD 0). |
| 1 | Force the display to use LOD 1. |
| 2 | Force the display to use LOD 2. This is gray in this case, as there is no LOD 2 imported for this mesh. |
| 3 | Force the display to use LOD 3. There is no LOD 3 imported for this mesh. |
There is also some information at the top of the 3D viewport showing the currently used LOD, as well as its vertex and bone count. If you have `Show Bones' or `Show Bone Name' turned on in the AnimSetViewer, it will only display bones being updated for the currently displayed LOD.
Importing An LOD
First open the StaticMeshViewer with the StaticMesh that you want to add an LOD to. Then under the `File' menu select `Import Mesh LOD...'. You will be asked to specify the ASE file that contains the lower-detail version of that mesh. Once you have selected the .ASE to import, a combo box will pop up allowing you to choose which LOD level to import this mesh as. LOD 0 is the `base', or highest poly mesh. LOD 1 is the first step down and so on. Importing at an LOD that already exists will replace the existing LOD mesh.
If your import goes successfully and does not generate any errors, you can press the appropriate `Force LOD' button on the toolbar to see if your mesh came in correctly.
You can remove any imported LOD level through the 'File' menu under 'Remove Mesh LOD'.
Configuring LODs
DisplayFactor is based on how large the objects bounding sphere appears on screen. 1.0 would indicate it completely fills the screen in one direction. In splitscreen it takes the largest DistanceFactor for any viewport.
LODInfo contains a list of all LODs for this StaticMesh. For each LOD you will find the following properties:
| Materials | An array of materials used by this LOD. LODs can have different materials. Additionally, LOD instances can override this setting for per-instance LOD materials |
Generating LODs
You can generate an LOD from the base LOD to quickly get simplified geometry. To generate a new LOD, choose Mesh->Generate LOD. Next choose which LOD you want to overwrite (the highest number available will let you add a new LOD) and input a target face count. The simplifier will do its best to get the mesh down to this target, but the resulting face count may not be exact. Generating an LOD for a large mesh may take several minutes.
UVs
Generating UVs
The Static Mesh Editor includes a built-in tool for unwrapping unique UVs for your mesh LODs. That is, it will create UV coordinates such that every point on the mesh's surface maps to a unique point in the UV map. You can find it under Mesh menu as Generate Unique UVs.... This will summon a window that allows you to configure unwrapping options and apply the changes to your mesh.
First, select the mesh LOD number and the UV channel to save the results to. Usually you'll set the UV channel to 1 when generating unique UVs for use with light maps.
The next settings are the most important. This is where you'll configure how your model is unwrapped into "charts" and packed into the UV coordinate space. There are two modes of operation here, and you have to choose one of them:
| Limit maximum stretching | Tries to prevent texels from being stretched disproportionally to the mesh's surface area. You can provide a value between 0.0 and 1.0 that sets the "stretch limit", or the amount of stretch that you're okay with. Lower values allow less stretching and are appropriate for rigid models like architectural pieces, while higher values allow for more stretching and generally work better for organic models. In any case, lower values will usually result in a larger number of separate charts and thus, more UV seams. |
| Limit maximum number of charts | Tries to keep the number of UV seams to a minimum by limiting the total number of charts that are created. Start out by setting this to a very low number. If the UV generation process fails, it simply means that the algorithm wasn't able to unwrap the model into such a low chart-count. Use progressively larger values until you get an acceptable result. Note that if you use a very large value here, usually the algorithm will always use the maximum number of charts! This often results in many UV seams, so try to keep this number low. |
Next you can set the Spacing between charts. The spacing is specified as a percentage of total texture space along an axis. So, a value of 1.0 means that at least 1% of the texture's space should appear between adjacent charts. Higher values will yield additional spacing. Keep in mind the resolution of the texture you'll be using. You'll want to set this number large enough to avoid texture bleeding artifacts, especially with lower mip levels.
Finally, you can use the Pack UVs only option to repack the existing mesh's charts instead of generating entirely new charts. This is useful if you've manually created nice charts with the seams where you want them, and now you just want to repack them with new spacing, etc.
When you're ready to generate the UVs, click the Apply button! It may take a few minutes for large models. If all goes well you can preview your UVs using the UV viewing tool in the Static Mesh Editor (see below for more info.) If for some reason UV generation fails, you should tweak the generator's setting and try again.
Note that currently only square textures are supported.
False Edges
One last thing -- if your finding that UV seams are appearing where you don't want them to, that is, edges are being split that you definitely don't want split, you can tell the tool to ignore those edges while it's generating charts.
To do this, simply select the edges on your model in the Static Mesh Editor before you click the Apply button. For example, you can select on the diagonal edge in a quad to prevent the UV generator from splitting that quad in two. It's fairly restricted in it's usefulness otherwise, but sometimes you can get better results by selecting edges before generating UVs.
Viewing UVs
You can bring up the UV Overlay by clicking on its toolbar icon or by choosing it from the View menu. The UV channel specified by LightMapCoordinateIndex will be shown, on the current LOD. The origin in texture space is the top left corner.
Fracture Static Meshes
As of the December 2007 QA-Approved build, a new feature exists which allows for physics-based fracturing of a destructible object.
Here's a quick run-down of how you author a fracturable object:
- Open a mesh in the Static Mesh browser.
- Select the Fracture Tool menu item, from the Tools menu.
- This will open a dialog that has functionality which allows you to calculate the fractures for the mesh. The options let you select how many chunks the mesh will be fractured into, as well as allowing you to flag individual chunks to be destructible or not. The chunk shape values scales the planes that the chunks are created along, and the noise does just that - adds noise to the fractured planes.
- Once you've sliced the mesh using the precalculated fractures, you can use the show mode and slider to view the fractures.
- After slicing, a new object will be created. This object can be placed as a FracturedStaticMesh and shooting the object will cause the relevant chunks to be thrown off based on the averaged normals of the fracture planes (ensures that the chunk doesn't try to travel back into the base mesh).
The chunks that are created when you interact with the object will use physics simulation to bounce around in the world.
The Fracture tool will work on any static mesh, however some complex geometry shapes will not give optimal results. Optimal results will be obtained if the entire object is convex. A non-convex object has a chance (high chance if the object has interpenetrating faces or has internal open space such as a tube or hollow cube) of creating incorrect faces across the non-convex portions of the object that are split.
The FactureStaticMesh Actor is a lot cheaper to render than using a skeletal mesh. It is basically the same speed to render as a StaticMeshActor (there is no animation or skinning cost). The base mesh uses precomputed vertex lighting like a StaticMeshActor as well which helps. There is a one-time cost when you change the visibility of pieces, as it has to repack the index buffer. Because the FractureStaticMesh Actor stores connectivity information for pieces, it only draws internal faces for a chunk when at least one of its neighbours are hidden. It also doesn't draw the core mesh until at least one piece is hidden.
The pieces that spawn off are separate Actors that currently use a light environment, so if you are seeing them turn black it might be a problem with your lighting channels. Although doing so increases the actor count in the map while the pieces are around, you can easily destroy them individually - which is hard when using a skeletal mesh.
The system auto-generates UVs for the new faces, and maps them automatically as well. It also creates a new material ID for the new faces, so you can easily assign a broken material to the insides.
See the FractureTool page for more information.
Mesh Simplification Tool
This tool allows you to reduce the complexity of static mesh assets by creating simplified copies of the meshes on a per-level basis. The tool is available as of the February 2008 QA-Approved build.
See the Mesh Simplification Tool documentation page for the for more information.