Home > Articles > Programming > Games

This chapter is from the book

Creating Your Own Worlds with the Unreal Engine

You now have a rudimentary grasp of the engine, its components, and how they work together to present an actual game. Now, let’s start looking at what you, the game designer, need to create in order to actually use the engine in your own games.

(And, by the way, not just games. The worlds you create are entirely up to you. The Unreal Engine can be used for virtually any visualization project. Imagine attending a bid meeting for a large-scale construction job, and showing your potential client a fully interactive 3D walkthrough they can control, powered by the jaw-dropping visuals of Unreal Engine 3. Ka-ching—sale made!)

Game Assets

Virtually all data that the Unreal Engine uses is stored in packages: collections of the assets needed for your game or project. Packages are often separated by the kind of assets they contain. You might, for example, have a package called ComputerMeshes that held only the static meshes needed to construct a game scene. However, you might also include the textures for those meshes in the same package.

In the end, just think of a package as a container used to load assets into the game. Except for maps (which in a sense are their own packages), all game assets are contained within packages. You learn more about each kind of asset as you move through this book.

Maps

Maps, also called levels and sometimes called scenes, are where you create environments in the Unreal Engine (see FIGURE 1.19).

Figure 1.19

Figure 1.19 Maps are the actual levels you play in the game.

Technically, a map is simply a collection of various game assets that are shown to the player, with many of these assets pulled from the packages you’ve created. Artistically, the map is where you set the stage for your game or visualization experience. It’s where you construct the overall shape of your environment, and use your assets to decorate it and bring it to life.

For convenience, each map contains its own package, where you can store assets that are only used in the game level the map displays. Most assets, however, are stored in separate packages, where they’re accessible to any level that needs them.

If you place an asset in a map’s package, but don’t actually use it the level, it is culled from the map’s level package next time the level is saved. For example, imagine that you add the texture of a brick wall to your level’s package, but you never actually display a brick wall. Unreal Engine 3 realizes it doesn’t need to waste precious memory on that brick wall texture, and dumps it from the package.

Textures and Materials

As you probably realize by now, both textures and materials are stored in packages. Textures are simply 2D images used to create materials in your levels and on other game assets (see FIGURE 1.20). We dedicate a whole chapter to materials and textures; for now, just know that every visible surface you create has a material applied to it, and most materials contain at least one texture. Think of a texture as part of a material: the 2D image that supplies color and other important information. Think of a material as an instruction for how light plays on your object’s surface. In Unreal Engine 3, each surface must have a material applied, and the material contains textures and other rendering instructions. (There’s a lot more to it, but that’ll hold you for now.)

Figure 1.20

Figure 1.20 Two different textures: one painted in Photoshop and the other acquired with a camera

Some textures, such as normal maps, present an illusion that the surface has much more physical detail than your hardware can actually render. Through the use of normal maps, models that are only comprised of a few thousand polygons can look like they were constructed from millions of polys!

You create textures using 2D graphics software that isn’t part of the Unreal Engine—for example, Photoshop, ZBrush, or Painter. You can also use images you’ve captured with digital cameras or scanners.

Once you have created your textures, you use them to create materials within the Unreal Editor. A single material can use multiple textures (though using too many can waste precious system resources). These materials can be applied to any surface in your maps. More on this in Chapter 6, “Introduction to Materials.”

Sounds

Like textures, sounds must be created outside of Unreal Engine 3. You can use an external software application, or get your sounds from audio file compilations, such as sound effect CDs or royalty free sound files available online. Sounds are usually played in response to events during gameplay, such as the opening of a door, the starting of a lift, or the firing of a weapon. Ambient sounds—for instance, running water, chirping crickets, or running machinery—might also run throughout an entire scene.

Once you’ve imported your sounds, Unreal Engine 3’s SoundCue Editor gives you tremendous flexibility in how you use them. You can mix multiple sound effects into a single sound, play certain sounds randomly, and even adjust the volume, speed, and modulation of individual effects. Using the SoundCue Editor, you can transform even the simplest audio into a complex and powerfully realistic symphony of effects.

Using Kismet, Unreal Engine 3’s embedded visual scripting system, you can also create complex music systems that play certain songs and effects in response to specific events, such as when a player’s health drops below a certain level, or when the player accelerates to high speed.

Static Meshes

We’ve already referred to static meshes a couple of times, in passing. As you work with Unreal Engine games, you use them constantly. So, what exactly are they?

Let’s step back a bit. In 3D graphics, objects are built from polygon meshes—collections of vertices, edges and faces that define the shape of objects. Different kinds of polygon meshes behave differently. You can do different things with each, but some work faster than others. Static meshes render really fast, and you can use them to create very complex shapes, which makes them great for gaming. They can’t be used for everything, however. (Among their limitations, you can’t animate their vertices.) But most modern Unreal Engine 3 game environments are so completely covered in static meshes that you can’t even see their underlying geometries.

Static meshes are designed to be instanced (reproduced) multiple times completely within your video card. They require essentially no work from your PC’s or game console’s main processor. This means they can be drawn extremely fast, even when you’re using thousands of them. Don’t get carried away, though. You still get the best performance if you reuse meshes wherever possible instead of creating new ones. Only the first instance of a static mesh uses a significant portion of memory. For all other copies, only positional, rotational, and scale information is stored in your video card’s memory and the other rendering bits don’t need to be copied again. It goes without saying that the more efficiently you use memory, the better your game performs.

Sometimes, of course, you’ll have good reasons to create new meshes. Just remember, with everything in game creation (and life), you need to know the tradeoffs. Using the Unreal Editor’s Primitive Stats browser, you can sort all of a level’s assets by memory usage (see FIGURE 1.21). Notice that your level is playing a tad slow? Find your biggest memory hogs. If static meshes are at the top of the list, maybe you want to throttle back on how many you’re using, or how complex they are. (We talk more about the Primitive Stats browser in Chapter 11, “Level Optimization.”)

Figure 1.21

Figure 1.21 The Primitive Stats browser can help you see if you are using too many static meshes in your level.

Animations and Skeletal Meshes

Game characters typically aren’t static meshes. They’re skeletal meshes: meshes that deform based on a digital skeleton. You create them and add their skeletons through a process called “rigging.” That’s another task that happens outside the Unreal Engine, typically in 3D applications such as 3ds Max or Maya. Once a skeletal mesh is rigged, it can be animated to make it look like it’s running, jumping, shooting, doing pelvic thrusts, or whatever else your wild imagination conjures up.

Meshes and their corresponding animations are, unsurprisingly, stored in packages. Animations are stored as a separate type of asset that you can assign to any character with a similar skeletal structure. This simplifies animation, and frees up precious game resources by reducing the number of animation sequences that must be loaded into memory.

The Tools of the Trade

Now that you have a general idea of the types of game assets you’ll build, let’s talk tools. As you’ve seen, many assets must be created in external software applications. In this section, we mention a few of the most popular, but you can certainly use others. We start, however, with an immensely powerful tool that is part of the Unreal Engine, and one that every Unreal level and game developer needs: the Unreal Editor itself.

Unreal Editor (UnrealEd)

The Unreal Editor (a.k.a., UnrealEd) is the central application you use to create maps, populate them with meshes, create your materials, construct sound effects from audio files, and much more (see FIGURE 1.22). It’s also the only program used to open and browse the contents of an Unreal package. It’s not a content creator. It is an outstanding tool for transforming raw content into breathtaking games.

Figure 1.22

Figure 1.22 The Unreal Editor user interface

3D Applications

Because Unreal Engine 3 is a 3D gaming engine, you need 3D assets—whether they’re characters or the static meshes you pour all over your Unreal environments. Plenty of 3D applications can create content for Unreal Engine 3, but the two most popular are Autodesk’s 3ds Max and Maya (see FIGURE 1.23). You can find out more about them at www.autodesk.com, which sometimes—not always—makes trial or training copies available for download.

Figure 1.23

Figure 1.23 The 3ds Max user interface

Texturing Programs

To create textures for your game’s materials, you need graphics editing software such as Adobe Photoshop or Corel Painter (see FIGURE 1.24). Each of these contains huge palettes of tools for working with photographic references as textures, or for painting your own.

Figure 1.24

Figure 1.24 Textures can be edited inside Photoshop.

There are other applications as well, including some that enable you to paint directly on the surface of your models. For instance, there’s Pixologic’s ZBrush. This nifty package doesn’t just enable you to create textures; it allows you to model multimillion polygon meshes for producing super-realistic normal maps for your meshes. (Don’t understand all that just yet? You will soon. But for now, trust us: that’s impressive.)

Collada

With all the 3D applications out there, each with its own fave formats, it would be cool to standardize a single format for sending information into Unreal Engine 3. Then, users of any application could freely create and swap Unreal game assets without switching to different software. Unreal Engine 3 supports the Collada file format, which has plug-in versions for virtually every major 3D application on the market (see FIGURE 1.25). For more information about Collada, and to download its latest plug-ins, visit collada.org.

Figure 1.25

Figure 1.25 Collada offers a unified file format for 3D assets.

Sound Programs

For audio, Unreal Editor’s SoundCue Editor uses WAV files. Yup, theoretically you could use Windows’ ancient Sound Recorder application to create those. And you could rely on the SoundCue Editor itself to adjust modulation and volume. But we suspect you’ll want an audio environment that’s a little more comprehensive. Two good options are

Sony’s Sound Forge and Adobe Audition (see FIGURE 1.26).

Figure 1.26

Figure 1.26 Adobe Audition

Whatever program you choose, make sure it lets you edit waveforms to remove any slight pauses at the end of your effects. That’s essential for easy blending between different effects.

Training Sources

This book gives you an incredible amount of information on creating and using game assets. But, let’s face it: Some of these third-party applications are pretty technical. Many aspiring game artists will want some sort of training to help them along the way.

There are plenty of online and offline locations for 3D application and texturing training. Your humble authors would like to recommend their own site, 3DBuzz.com. Come visit: We have hundreds of hours of free training videos available for download, as well as professional level training videos that help us pay the rent (see FIGURE 1.27).

Figure 1.27

Figure 1.27 3DBuzz.com, the original home for free 3D training

A quick commercial (just one, we promise): 3D Buzz has been in the online 3D training business for over five years now. We work very closely with Epic Games; in fact, we produced the 60+ hours of training videos released with the Unreal Tournament 2004 DVD Special Edition as well as a series of training videos included with the Special Edition PC release of Unreal Tournament 3. So, yeah, we know this stuff.

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