Home > Articles

This chapter is from the book

Preparing Geometry for UE4

Unreal Engine 4 refers to 3D Objects as either Static Meshes or Skeletal Meshes. A single Mesh can have Smoothing Groups, multiple materials, and vertex colors. Meshes can be rigid (Static Meshes) or deforming (Skeletal Meshes). You export each Mesh as an FBX file from your 3D application, and then import it into your UE4 Project.

Architecture and Prop Meshes

I think of my Static Mesh assets in two broad categories: Architecture and Props. Each follows similar rules but both have considerations that can make dealing with each much easier.

Architecture

Architecture Meshes are objects that are unique and are placed in a specific location, such as walls and floors, terrain, roads, and so on. Typically, only one copy of these objects is in your scene, and they need to be in a specific location.

You will usually keep a 1:1 relationship between the objects in your source art, your Content folder, and your UE4 Level. (For example, you’ll have one SM_Wall01 in each in the exact same place.)

You export these objects in place, import them, and place them into the scene at 0,0,0 (or another defined origin point). Keeping your UE4 content in sync with your scene using this method is easy because you can import or reimport Meshes or entire scenes without needing to reposition them.

Props

Prop Meshes are repeating or reusable Static Meshes that you place in or on your Architecture within your Level. An example is plates on a table. You could have a unique Static Mesh asset for each one in your scene or, because they are all exactly the same, you can reference a single asset and move it into position in the Viewport. The table would also be a Prop and could also be moved about easily.

Having multiple Props reference a single asset reduces memory overhead and makes updating and iterating on content easy.

Naming

Like all digital projects, developing and sticking to a solid naming convention for your projects is an important task for anybody developing with UE4. Projects end up with thousands of individual assets and they all have the extension of .uasset. Naming your objects in your 3D application is easy and fast—but this isn’t quite the case in UE4.

You will undoubtedly come up with your own standards and system to accommodate your specific data pipelines, but it helps to be on the same page as the rest of the Unreal Engine 4 community as you will likely use and share content with them.

Basics

Don’t use spaces or special/Unicode characters when naming anything (Meshes, files, variables, and so on). Sometimes you can get away with breaking these rules, but it makes things tough later when you encounter a system that won’t accept the space or special character.

UE4 Naming Convention

A basic naming scheme for Unreal content has been used over the last 15 years by Epic Games and developers using Unreal Engine. It follows the basic convention of

Prefix_AssetName_Suffix

If you looked through any of the content included with UE4, you have already seen this convention.

Prefix

The Prefix is a short one- or two-letter code that identifies the type of content the asset is. Common examples are M_ for Materials and SM_ for Static Meshes. You can see that it’s usually a simple acronym or abbreviation, but sometimes conflicts or tradition require others like SK_ for Skeletal Meshes. (A complete list is available on the companion website at www.TomShannon3D.com/unreal4Viz)

AssetName

BaseName describes the object in a simple, understandable manner. WoodFloor, Stone, Concrete, Asphalt, and Leather are all great examples.

Suffix

A few classes of assets have some subtle variations that are important to note in the name. The most common example is Texture assets. Although they all share the same T_ prefix, different kinds of textures are intended for specific uses in the Engine such as normal maps and roughness maps. Using a suffix helps describe these differences while keeping all the Texture objects grouped neatly.

Examples

You could find the examples shown in Table 3.1 in any common UE4 project.

Table 3.1 Example Asset Names

Asset Name

Note

T_Flooring_OakBig_D

Base Color (diffuse) Texture of big, oak flooring

T_Flooring_OakBig_N

Normal map Texture of big, oak flooring

MI_Flooring_OakBig

Material Instance using the big, oak flooring Textures

M_Flooring_MasterMaterial

The Material that the big, oak flooring Material Instance is parented to

SM_Floor_1stFloor

Static Mesh with the MI_Flooring_OakBig Material Instance is applied to

There are dozens of content types and variations in UE4, each with a different possible naming scheme. You can go to www.TomShannon3D.com/UnrealForViz for a direct link to a community-driven list of all the suggested prefixes and suffixes.

Although this list is exhaustive, none of these naming rules are enforced in anyway. What’s most important is consistency. Develop a system and stick to it.

UV Mapping

UV mapping is a challenge for all 3D artists and even more so for visualization. Most visualization rendering can make do with some very poor UVW mapping, and sometimes none. UE4 simply cannot.

UVW coordinates are used for a litany of features and effects; from the obvious such as applying texturing to surfaces to the less obvious but equally important things such as Lightmap coordinates.

All of your 3D assets will need quality, consistent UVW coordinates. For simple geometry, this can be as easy as applying a UVW Map modifier to your geometry; more complicated geometry will be a more involved, manual process. Don’t fear; most of the time you can get good results easily. Just keep an eye on your UV coordinates when you are working with UE4. If you have rendering issues that are difficult to diagnose, check your UV coordinates.

Real-World Scale

Many 3D applications can use a real-world scale UV coordinate system, where the texture is scaled in the material, rather than the UV coordinates. Although this is completely possible to accomplish in UE4, it’s not the best option.

If your scenes are already mapped to real-world scale, you should scale your UV coordinates using a modifier (Scale UVW in Max) or manually scale the UV verticies in a UV Editor.

World-Projection Mapping

A common “cheat” for visualization is to use world-projected textures (textures projected along the XYZ world coordinates) to cover complex, static models quickly with tiling textures. This method doesn’t require well-authored UV coordinates for good results. UE4 has methods for doing this and I rely on them heavily in my own projects.

It’s important to note that if you are planning to use pre-calculated lighting with Lightmass, you still need to provide good, explicit Lightmap UV coordinates, even when using world-projection mapping. This is because the Lightmass stores the lighting information in texture maps that need unique UC space to render correctly.

Tiling Versus Unique Coordinates

Most visualizations make extensive use of tiling textures. In truth, the texture does not tile; rather the UV coordinates are set or being modified by the material to allow tiling. A tiled UVW coordinate set allows UV faces to overlap and for vertices to go outside the 0–1 UV space. By the nature of UV coordinates, going outside the 0–1 range results in tiling. Essentially, 0.2, 1.2, and 2.2 all sample the same pixel.

Unique UV coordinates are defined by having no coordinates outside 0–1 and each face occupies a unique area in the UV map space without overlaps. This is useful when you are “baking” information into the texture map, because each pixel can correspond to a specific location on the surface of the model (see Figure 3.3).

03fig03.jpg

Figure 3.3 Unique versus tiled UV coordinates

Common examples of baking data into textures are normal maps generated from high-polygon models using reprojection or, in UE4, using Lightmass to record lighting and Global Illumination (GI) information into texture maps called Lightmaps.

Multiple UV Channels

Unreal Engine 4 supports and even encourages and requires multiple UV channels to allow texture blending and other Engine-level features such as baked lighting with Lightmass.

3D applications can often have trouble visualizing multiple UV channels in the Viewport, and the workflow is typically clunky and often left unused in favor of using larger, more detailed textures. This isn’t an option; massive textures can consume huge amounts of VRAM and make scenes bog down.

Instead, make use of multiple UV channels and layered UV coordinates in your materials to add detail to large objects.

Lightmap Coordinates

Making Lightmap UV coordinates can seem like an onerous task. Have no fear: Lightmap coordinates are easy to author and are simply a second set of UV coordinates that enforce a few rules:

  • If your project uses dynamic lighting exclusively, you probably don’t need to worry about Lightmapping coordinates at all!

  • Coordinates need to be unique and not overlap or tile. If faces overlap, Lightmass can’t decide what face’s lighting information to record into the pixel, creating terrible-looking errors.

  • A space must exist between UV charts (groups of attached faces in the UV Editor). This is called padding and ensures that pixels from one triangle don’t bleed into adjacent triangles.

  • The last major rule is twofold: Avoid splitting your Lightmap UVs across smooth faces because this can cause an unsightly seam and split your coordinates along Smoothing Group boundaries to avoid light bleeding across Smoothing Groups.

Auto Generate Lightmap UVs

The Auto Generate Lightmap UVs import option is one of the biggest timesavers for preparing models for lighting with Lightmass. I can’t recommend it enough. It generates high-quality Lightmap coordinates quickly on import (or after) and is artist-tweakable for optimal results (see Figure 3.4).

03fig04.jpg

Figure 3.4 Autogenerated UV coordinates with Lightmap UV coordinates overlaid (note the efficiency versus Figure 3.2)

In a broad sense, the Auto Generate Lightmap UVs system is simply a repack and normalization operation that takes a source channel and packs the existing UV charts into the 0–1 UV space as efficiently as possible. It also adds the correct amount of pixel padding between the charts based on the intended Lightmap resolution as set by the Source Lightmap Index. (Lower resolution Lightmaps have larger pixels requiring larger spaces between charts; higher resolution inversely has smaller pixels requiring smaller spaces.)

This only requires that the coordinates in your base UV channel follow the rules about being split along Smoothing Groups and don’t have stretching. They can be any scale, be overlapped, and more, if they are cleanly mapped to begin with.

Level of Detail (LOD)

UE4 has fantastic LOD support. LOD is the process of switching out 3D models with lower-detail versions as they recede into the distance and become smaller on-screen.

If you are developing content for mobile or VR, LOD and model optimization are incredibly important. Even if you’re running on high-end hardware, consider creating LOD models for your high-polygon props. For Meshes like vehicles, people, trees, and other vegetation that are used hundreds of times each in a large scene, having efficient LOD models will mean you can keep more assets on-screen, creating a more detailed simulation.

UE4 fully supports LOD chains from applications that support exporting these to FBX. That means you can author your LODs in your favorite 3D package and import them all at once into UE4. You can also manually import LODs by exporting several FBX files and importing them from the Editor.

Automatic LOD Creation

UE4 supports creating LODs directly in the Editor. Much like Lightmap generation, these LODs are specifically created by and for UE4 and can produce great-looking LODs with almost no artist intervention needed.

To generate LOD Meshes in the Editor, simply assign an LOD Group in either the Static Mesh Editor or by assigning an LOD Group at import. I recommend taking a look at it for your higher-density Meshes, especially if you are targeting mobile or VR platforms.

Several third-party plugins, such as Simplygon (https://www.simplygon.com) and InstaLOD (http://www.instalod.io/), can further automate the entire LOD generation process and have more powerful reduction abilities than UE4’s built-in solution.

If you regularly deal with heavily tessellated Meshes, I recommend considering integrating these plugins into your UE4 pipeline, because they are far more robust than the optimization systems in most 3D applications, and the time saved using automatic LOD generation can be significant, not to mention the obvious performance benefits of reducing the total number of vertices being transformed and rendered each frame.

Collision

Collision is a complex subject in UE4. Interactive actors collide and simulate physics using a combination of per-polygon and low-resolution proxy geometry (for speed) and various settings to determine what they collide with and what they can pass through (for example, a rocket being blocked by a shield your character can pass through).

Fortunately, because most visualization does not require complex physics interactions between warring factions, you can use a simplified approach to collision preparation.

Architecture Mesh Collision

For large, unique architecture you can simply use per-polygon (complex) collision. Walls, floors, roads, terrains, sidewalks, and so on can use this easily without incurring a huge performance penalty. Keep in mind that the denser the Mesh the more expensive this operation is, so use good judgment, and break apart larger Meshes to avoid performance issues.

Prop Mesh Collision

For smaller or more detailed Meshes, per-polygon collision is too memory and performance intensive. You should instead use a low-resolution Collision Proxy Mesh or Simple collision.

You might opt to generate your own, low-polygon proxy Collision Meshes1 in a 3D package, or in the UE4 Editor using manually placed primitives (boxes, spheres, capsules). You should also take a look at the automatic collision generation options the Editor provides.

Convex Decomposition (Auto Convex Collision)

UE4 also offers a great automatic collision generation system in the Editor called Convex Decomposition. This feature uses a fancy voxelization system that breaks down polygon objects into 3D grids to create good quality collision primitives. It even works on complicated Meshes, and I highly recommend it for reducing the polygon count on your props.

Do not confuse convex decomposition with the option to automatically generate collision during the import process. That system is a legacy system from UE3 and is unusable for most visualization purposes because it doesn’t handle large, irregular, or elongated shapes well.

Convex Decomposition is not enabled on import because it can be very slow for large Meshes or Meshes with lots of triangles. For these, you should author a traditional collision shell in your 3D application and import it with your model.

You can find more information about generating collisions in the official documentation and at www.TomShannon3d.com/UnrealForViz.

Pivot Point

UE4 imports pivots differently than you expect. UE4 lets you choose between two options for your pivot points on import via the Transform Vertex to Absolute option in the Static Mesh importer. You can either have the pivot set where it is in your 3D application (by setting Transform Vertex to Absolute to false) or you can force the pivot point to be imported at the scene’s 0,0,0 origin, ignoring the defined pivot point completely (by setting Transform Vertex to Absolute to true).

You might wonder why in the world you would want to override your object’s pivot point, but doing can be a huge time saver. By using a common pivot point, you can place all Architecture Meshes in your scene easily and reliably by putting them into the Level and setting the position to 0,0,0; they will all line up perfectly.

This works because you don’t typically move your Architecture Meshes around, so where they rotate and scale from is irrelevant. What’s important is their accurate position in 3D space.

Prop Meshes are the opposite. As you place props in your scenes, the pivot point is essential for moving, rotating, and scaling them into place.

To get the pivot point in UE4 to match your 3D application, you have a couple options. You can model all your props at 0,0,0, or move them each as you export. Newer versions of UE4 (4.13 and up) allow you to override the default import behavior and use the Meshes’ authored pivot point as well. This is usually the best bet to ensure your pivot points match.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020