UDN
Search public documentation

ImportingStaticMeshTutorial
Licensees can log in.

Red links require licensee log in.

Interested in the Unreal engine?
Check out the licensing page.

Questions about UDN itself?
Contact the UDN Staff

Importing Static Mesh Tutorial

Document Summary: A tutorial on getting non-animated meshes and geometry into the Unreal Engine.

Document Changelog: Created by James Golding.

Introduction

This document serves as an introduction to the Unreal Engine 3 art pipeline, as it applies to static meshes. Most attention will be directed toward features and procedures particular to the new engine. Features that have not changed in the new engine are discussed in detail elsewhere in UDN.

Realtime Bump Mapping: Detail Meshes and Render Meshes

UnrealEngine3 provides the ability to utilize realtime bump mapping. This new technology calls for new modeling techniques. A normal map is generated procedurally by reading geometric detail from a very high poly "Detail" mesh. The Detail mesh need never run in a realtime situation--it exists to provide normal map information. Therefore polygon counts become much less restrictive, allowing for detail of cinematic quality.

SideBySide.jpg

The generated normal map is then applied in UE3 to a lower poly "Render" mesh, the end result being a mesh which looks much more polygonally complex than it actually is.

Exporting Content

At this point you should have a Detail mesh and a Render mesh which are placed at the same point in space (probably the origin). The Render mesh should be unwrapped and it's UVs should be nicely laid out.

AtOrigin.jpg

This is important because the SHTools process is based on the unwrapping of the Render mesh.

A Few Words About UVs

The process of normal mapping requires special unwrapping considerations. For best results make sure UVs do not overlap. It is ok to stack UVs if the geometry involved is geometrically identical. For example, it is not a good idea to have different parts of a mesh overlap, like the following image:

OverlapUVs.jpg

It is fine to stack UVs, such as the case of mirrored geometry, as in the screenshot below:

StackedUVs.jpg

These restrictions do not necessarily apply to the Detail mesh as it doesn't need to be textured at all for the SHTools process to function.

Exporting Geometry

To export your Render mesh, simply export as a .ASE. Make sure you check the following options:

Output Options

  • Mesh Definition
  • Materials

Mesh Options

  • Mesh Normals
  • Mapping Coordinates

Generating Normal Maps

The process of generating normal maps from the Detail mesh can be handled by the SHTools plugin, or by tools in 3DStudio Max, Maya or Softimage XSI. This tutorial will cover simple step-by-step instructions.

Please note that the SHTools mesh processor and server were created before Max/Maya/XSI had their own normal mapping tools. We generally use those now for creating our normal maps. It is strongly suggested that you consider using a 3D Modeling package such as Maya to create normal maps.

For a detailed explanation of SHTools options and functionality, check out the handy SHTools Reference.

Getting Content into the Engine

Now we want to get our assets into the engine via the Unreal Editor. Here we will cover the process of creating packages and importing geometry.

For more information on the Generic Browser and the Package System, see the Generic Browser Reference.

Materials

The order on export is defined by the materials themselves. See the ActorX pages for more details, including tutorials for Max and Maya.

In Max, make your material a multi sub object material and name the sub materials skin00, skin01, skin02 etc. to define the order

In Maya, perform the following steps:

  1. Open up Hypershade.
  2. Double click on your shader node to open the attribute editor for that shader.
  3. At the top where the shader name is there is two arrows next to it, click the bottom one.
  4. This will take you to the shadingEngine properties, change the name to skin00, skin01, skin02 etc. to define the order.

Importing textures and creating materials is covered in the Materials Tutorial page.

Importing Geometry

To import your Render mesh, go to the Generic Browser's File menu and click Import. Find your .ASE file and click Open. A Generic Import window will open giving you several fields to fill in. Name your new package (by default named "MyPackage"). Fill in a Group and change the Name if desired.

Groups are a convenient way to organize content within a package. You can create a group for each type of content, eg: "Meshes" and "Textures"; "Soldier1" and "Soldier2." You can also choose to leave the Group field blank and keep all your content together in the package.

One thing to consider is the polycount of the objects intended for import. There is a 32,000 vert limit on importing meshes right now, technically that could be increased easily. Ideally, it is best to bring a in a lower-res model with a normal map.

Applying Materials

We will assume you have imported your new normal and mask/texture maps and created new Materials. To learn more about this process, look at the handy Materials Tutorial.

To apply a material to your new mesh, right-click the icon and open its Properties menu. This will bring up the Static Mesh Editor. Open Materials (by hitting the + to the left). Click the "None" field that comes up. The background should go white and buttons reading "Clear" and "Use" will appear to the right. Return to the Generic Browser and highlight the desired material.

MeshMaterial.jpg

Back in the Static Mesh Editor and hit "Use". Your material should appear. Repeat the process for any remaining material slots.

Collision

For more information on handling collision for Static Meshes, see the Collision Reference.