Book Image

Unreal Development Kit Game Design Cookbook

By : Thomas Mooney
Book Image

Unreal Development Kit Game Design Cookbook

By: Thomas Mooney

Overview of this book

UDK is a free, world class game editing tool and being so powerful it can be daunting to learn. This guide offers an excellent set of targeted recipes to help game artists get up to speed with game designing in UDK.Unreal Development Kit Game Design Cookbook contains everything you need to jumpstart your game design efforts. The lessons are aimed squarely at the artist's field of production, with recipes on asset handling, creating content within the editor, animation and visual scripting to get the content working in gameplay.Unreal Game Development Kit Game Design Cookbook exposes how real-time environments are built using UDK tools. Key features are examined ñ assets, animation, light, materials, game controls, user interface, special effects, and game interactivity - with the view of making UDK technically accessible so users can transcend technique and focus on their creative design process. The book has well prepared recipes for level designers and artists of all levels. It covers core design tools and processes in the editor, particularly setting up characters, UI approaches, configuration and scripting gameplay. It is a technical guide that allows game artists to go beyond just creating assets, and it includes creative, extensive demonstrations that extend on mere functionality.
Table of Contents (17 chapters)
Unreal Development Kit Game Design Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Accessing assets in the Content Browser


The Content Browser is the key staging area of assets used to furnish levels. Before you make a level, this is the window UDK opens up onto. If your job is making assets then you may do a lot of work here without even doing any level layout. In this recipe, we look at how to find something that we need to find, how to move content around, how to create or import new content, and shortcuts to using the Browser effectively.

How to do it...

Examining the assets belonging to a plant model

  1. After starting UDK, the Content Browser should be open. If not, press Ctrl + Shift + F or the icon: [ ]
  2. Locate the Type here to search field, which is near the top. Click in there if your cursor isn't already flashing there and type PLANT.

  3. You will probably see a lot of textures of leaves display in the assets panel under the filters. If not, make sure ALL [ ] is ticked in the Object Type filter, just below the search field. Click on All Assets. This ensures that we're searching the entire body of provided content.
  4. Now filter only Static Meshes in the Object Type list.

  5. Look for S_BananaPlant_01 in the resulting display of assets. If necessary use the sliders on the edges of the red-edged asset panel to scroll and locate it. You can also scroll the middle mouse scroll wheel.

  6. When you mouse over S_BananaPlant_01 it turns orange. When you click on it, it turns yellow. Assets the scene is not using aren't loaded with the editor, which saves memory for the scene. When an asset is fully loaded, its dependencies are also loaded, for instance the material and textures used by a model like the Banana Plant. Click on the small orange square [ ] in the corner of the banana plant asset's icon, which will fully load the mesh. The asset will state there is NO COLLISION MODEL! This means that if the model is placed in the level then a player will be able to run right through it. For now, ignore that. We discuss collision later.
  7. Drag the icon over the perspective view to drop an instance of the asset into the editor. You should see a purple tinted banana plant in the editor. This tint indicates it is selected. You should also see a movement cursor.

  8. This screenshot shows the highlighted BananaPlant asset in its specific package. Right-click on the model in the editor window (not in the Browser) and choose Show in Browser. Notice how the Browser will jump from showing just PLANT in the search field to showing other objects too. These are all the objects in the same package as the banana plant asset. You don't actually need to pull the object into the editor for this step. Instead, you can right-click on the asset in the Browser and choose Find Package.

  9. For convenience, you can also right-click on the asset and choose Copy Full Name to Clipboard. This allows you to paste its name into search strings or assign it to property channels where needed.

  10. Look to the left, in the Packages list, and see how the package displaying is UDKGame/Content/Environments/Foliage/FoliageDemo/Mesh. This indicates the folder structure for the package FoliageDemo. The current model is properly indicated as FoliageDemo.Mesh.S_BananaPlant_01 because the naming convention is Package.Group.Asset for all assets in UDK.

Accessing materials used by a model

  1. Double-click the Banana Plant model to open it in the Static Mesh Editor , which provides us with a closer look at the asset and allows key properties to be set for the asset, including collision, mesh simplification, and materials. On the right of the mesh viewer you will see a list of Properties (as with most panels in UDK this can be dragged by its heading to be floated and docked on either side of the view). Here, expand LODInfo, to reveal the Material the object uses.

  2. Next to the Material name there are three small icons [ ]. If you click the green arrow you can load a new Material, if one is highlighted in the Browser. The magnifying glass takes you to the current Material asset in the Browser. The square clears the Material channel. For now, click on the magnifying glass.
  3. Notice that in the Content Browser the Material for the plant is highlighted. It just so happens this mesh uses a Material Instance Constant, a special type of material which depends on a parent Material for certain variable parameters (which can be animated or allow you to create many variations from one parent). The Material Instance Constant, discussed in depth later, has its own editor. Double-click MI_BananaPlant_01_INST to open the Material Instance Editor, and notice the Parent channel in the left-hand side Properties panel also has a green arrow, magnifying glass, and a Clear texticon. Click the Parent's magnifying glass [ ] to highlight the Parent Material in the Content Browser.
  4. That's quite a long thread to follow if you're new to these ideas, but it does expose how elements in UDK may connect together. You'll find that from editor to editor the icons for navigating between the assets remain the same, and hopefully you'll quickly get used to the assign icon [ ], the find in browser icon [ ] and the add entry icon [ ], which appear everywhere.
  5. To see what textures a Material uses (and there may be many) you can right-click on a Material in the assets panel of the Content Browser and choose List Referenced Objects. This will display a lot of information. Amongst this, the texture nodes are the ones named Texture2D in the list, for example: Texture2D FoliageDemo.Speedtrees.T_ShaneTobacco_D.

  6. You can also simply double-click on a Material to edit it and follow the Material channels back to their Texture2D or Param2D nodes in the Material Editor. Doing so is a good way to become familiar with Material shader instructions. Without going into the Material Editor, you can see how many Texture Samplers nodes are in use by the Material by holding your mouse over the Material and reading the floating display info. A Texture Sampler is a node that holds a Texture asset.

  7. Double-click the highlighted Parent Material which the MIC of the banana plant is based on. The Material Editor is discussed later, but you should be able to spot in the network the texture assigned to the Material by following the nodes from the Diffuse channel. You'll also see a huge network of nodes controlling the orientation of the leaves of the tree (which are mostly math operations).