Modular Level And Component Design - Unreal Engine

Transcription

W O R L DB U I L D I N Glee perryModular Level andComponent DesignOr: How I Learned to Stop Worrying andLove Making High-Detail Worldso the future has finallyarrived. Technologies we’veonly dreamed about arecloser than ever, and ifyou’re lucky enough to beon the right project, you’re knee deep init already. With polygon counts off thecharts and hardware pushing moredetail than you care to create, environments can be simply staggering. Butwith every step forward in graphicscapabilities, many find themselves wondering how to utilize those advances.The question of “Wouldn’t it be cool ifthe engine could do feature X?” is nowrephrased, “Do we have the talent toutilize feature X at all?” Nowhere in theindustry is that question more apparentthan with environment design.When we can draw limitless detail, itseems limitless talent is required to create those worlds. How do we quicklygenerate enough consistent quality content to fill a highly detailed world? Howdo we make sure those worlds can beeasily modified and made flexible todesign whims? How do we break up theteam to handle these tasks? These aredaunting problems to address, and eventhe most stalwart industry veterans willfind themselves intimidated quickly atthe prospects.As we stare down the future, it mayhelp to take a page out of history, fromtile-based platform games. Much likeS30Super Nintendo worlds of old, it willinevitably boil down to modular components in some way. Until recently textures provided the bulk of a world’sdetail, but for the foreseeable future,more and more players will expect thatdetail to be full-blown geometry. That’sa big order to fill, particularly in thecompetitive realm of first-person shooters, where eye-candy often reignssupreme. However, the solutions tothese problems are not limited to theworlds of the running guns, they cansolve dilemmas for many genres andmany settings.Using prefabricated geometry in creative ways is key to achieving the detaillevels players expect to see in their gameworlds. This article will look at how weat Epic arrived at the modular solution,how we implement such a system, andthe benefits and limitations of a component-driven workflow.You May Ask Yourself,How Did I Get Here?he modular level design solutionarose from the need to have greatlooking, high-detail levels without having to build and texture every nook andcranny of the environment. Asking atraditional level designer to create anenvironment (usually from simple tools)Tthat holds up to artist-like scrutiny isnot a practical idea. Many level designers aren’t familiar with high-end modeling packages, and even knowing thetools doesn’t necessarily translate to creating great content. The days of aligning textures and moving on have themselves moved on.Asking traditional artists to design anengaging level is not an ideal solutioneither. Doing so may produce greatlooking yet highly unpredictable gameplay. Questionable gameplay and performance sacrifices arise regularly whenartists focus on creating large masterpieces. And both systems easily endwith the creator losing inspiration afterweeks of working on the same content.Another system many developerswork with is having a dedicated leveldesigner block out an environment andpass that progress on to an artist forfinal polishing. This works to a degree,but it can still benefit from modulardesign decisions made early on. Modeling and texturing an entire level atL E E “ E E P E R S ” P E R R Y Lee iscurrently a designer and artist for EpicGames. Among numerous other projects,previous work includes art and leveldirector for Ion Storm’s ANACHRONOX,and modeling for Square’s R&D department. He can be contacted atlee@epicgames.com.november 2002 g a m ed e v e l o p e r

www.gdmag.com31

W O R L DB U I L D I N GFIGURE 1A. A larger-scale building set.choose a path along the lines of MORROWIND, wherein large buildings are single prefabricated items, and entire castles may break down into a handful ofwall pieces. Other projects, with an eyeon very dense environments, may workon a smaller scale that incorporates several modular components to create asingle wall’s detail, as shown in Figures1a and 1b.Where do you start when building aset of prefabs? First you must decide thescale of modularity your project is goingto need. This can generally be determined by the scope of your environments. If you’re going to be shoving aplayer through entire cities in a Porsche,you’ll want to break everything downinto chunks of geometry as large asentire city blocks. If you’re going to becreeping a single player through the narrow, abandoned corridors of a derelictspacecraft, you’ll want to work at avery fine detail level with layers ofcomponents interacting in a complexfashion.Gridsegardless of scale, when creating aR set of modular components, nothFIGURE 1B. The scale has been taken down anotch, using more components in a singlewall.extremely high detail levels can result inmany months of work that may end upneeding significant retooling. Eventuallysomeone undergoing such a task will endup aiming to reuse as much artwork aspossible from one area to the next; whynot keep that tendency in mind from thebeginning and work with it as a foundation for your creative process? Followingare some of the considerations we keepin mind when designing our environmentconstruction process around modularity.Scaleith intelligent planning, modulari-W ty is not as restrictive as youmight think. Indeed, modularity can beimplemented on many scales. Some may32ing is as important as the almighty grid.Grids may fluctuate wildly betweenengines and projects, but whatever system you decide on, stick to it religiously,and always use even divisions of thatgrid when working on smaller components. If your system dictates that ageneric wall be 256 units tall, try tokeep smaller details at 128 units, or 64units, and so on.Be aware of game mechanics whendetermining the system. If a character is128 units tall, or a leaping character cancover 64 units forward, your systemshould take advantage of those values.Working on a gameplay-conscious gridaids the level design process greatly,while significantly reducing “trial anderror” early testing.Keep animations in mind. Charactersmay interact with computer panels, usedoor handles, be able to sit on surfaces,or perform any number of other interactions. Deciding in advance at whatheight various animations will happencan save you a great deal of pain later.Of particular importance here is standard stair heights and depths. Lockdown these standards early, print upguides, and distribute them as soon aspossible. A few hours’ work here willsave weeks of potential headaches during later production.Planningow’s the time to sit down with theN designers and artists responsible fora given area of the game and discusswhat type of pieces will be required.Make a list of key features for the environment and the unique componentsthat define the level. These could be anything from a vast missile hangar to acomplex volcano mesh.Leave the specialized pieces aside,focusing on the meat of the environments, the areas where players willspend the majority of their time. Decidewhich key modular components areneeded and plan out the general use ofthose pieces. Make a shopping list ofcomponents needed for a flexible baseset; this could range from hallway sections to generic city streets.The challenges in this step often comedown to transitions. Plan out how toblend one theme into another, and saveeffort by clarifying which transitionswon’t be needed. Note which structuresmay need capping off, and give athought to how that should be done. Forexample, if you have a modular riverrunning through your game’s landscape,have a method handy for capping offthat river by making it run into a grateor sinkhole, or dissipate over a waterfall.If you’re building entire buildings fromprefab corridors, make sure you’ve got apiece to cap off that structure.Your system could have conceptualartists start their work at this point, orthey may be involved earlier and haveconcepts presented when the initialshopping list is created.november 2002 g a m ed e v e l o p e r

Start with the Basicst this critical point, be sure to goA through the prefab list methodically,building the necessary components onthe agreed-upon grid system. Don’t beginconstruction with a complicated junctionpiece, start with the basics and create thebase unit from which variations can becreated. If you’re making a 3D terrainset, start with the base tile, duplicate it,and create variations off the motherpiece. After the various themes and setsare completed, lay them out and begin“tweening” them and creating any transitional prefabs needed. Establish anapproval process at some point in thebasic construction, so you don’t end upwith a polished set of geometry only tofind out the basic theme isn’t quite right.Sign off on work along the way.Test-map your work by periodicallydropping what you have created so farinto a test environment and verify thatyour work tiles correctly and works welltogether. As a bonus, you may find itinspirational to see complex geometryemerging as you work.If your project allows it (and most do)try to keep multiple purposes in mind foryour work as you go. A cave system mayhave ceilings that could easily be used asfloors. Typical metal-plated bulkheads willoften look good regardless of orientation.Don’t assume a large structure has tobe a single modular piece. For example,instead of building an entire modularcorridor, build modular wall sections,ceilings, and floor tiles that snap togetherto form a complete corridor. This willallow for more flexibility when the setgets into the designer’s hands.It also helps to provide plenty of variations. If you have a large stairway piece,make short, medium, and large versionsfor added flexibility, and be sure to consider texture variations as well. With achange of color scheme, an office hallway may appear completely different.By incorporating relatively minor variations, an area can feel far removed fromanother area that uses many commonelements.www.gdmag.comFind out in advance if your prefab setswill require back-facing polygons.Leaving the back of a prefab hollowguarantees someone will make an environment to display it.Mirror, Mirroresigners will love you for creating aD flexible set that is painless to workwith. Of key importance to achievingthat flexibility is making sure your geometry can be mirrored easily on as manyaxes as possible, so keep a line of symmetry through your work as you go.Cylindrical structures are an importantspot in this regard. It’s a good idea togive objects such as pipes a number ofsides divisible by four. Initially this mayseem odd, but the first time you have arow of pipe sections and try to pivot aseven-sided length of pipe 90 degrees, thelogic will become apparent. Seamsappear, edges don’t line up, and thingsget messy quickly. With an eight- or 16sided pipe, you can mirror or rotate anelbow easily without risks of seams.When working with symmetry inmind, you’ll want to restrict any letteringthat can’t be mirrored to detail pieces.Try to create pieces that work when mirrored vertically as well as horizontally,and consider creating transition piecesthat will allow an object to be mirroredto itself for added flexibility.OriginsFIGURE 2A. With an origin in the wall’s lowercorner a wall can be rotated and stretched tofill an angled gap easily, while the origin stayson-grid.ou may have a prefab modeled rigid-Y ly on a grid, but if your origin is off,it may come into the engine off grid aswell. To what degree this happensdepends on your particular technology,but be aware of it as you build yourmeshes in world space. A handy trick forplanar wall sections is to place the originin a corner of the mesh, instead of thecenter. This allows the wall prefab to bestretched or pivoted around while onecorner remains on grid. An origin in thecenter of a rotated wall leaves both edgesoff-grid and makes it difficult to linethem up again (see Figures 2a and 2b).FIGURE 2B. A centered origin results in havingto move off the larger grid to cover an angledgap, scaling in multiple directions, and creating seams on both walls thereby using morecomponents in a single wall.33

W O R L DB U I L D I N GDon’t Forget toAccessorizehe next step in the system is to createT a handful of accessory pieces thatcan be used to break up the appearanceof tiling. A castle hallway created frommodular wall sections can look entirelyunique with the placement of a few busted overhead beam meshes, a worn statue,or loose stones from a collapsed wall. Itdoesn’t take much to fool a player intothinking two essentially identical corridors are unique places; their differencesjust need to have enough visual impact tocount.A good technique to use when creatingaccessories is to build them in a furthermodular fashion. If you’re planning tobuild three different detail statues for thecastle in the preceding example, youcould separate the statue meshes into alower section, a torso, and a head. Mixand match those parts, and with a littleplanning before diving in, your castle canbe filled to the parapets with unique statue variants in every hallway.Prefabs can be very flexible if built in away that frames rough level geometry.Use a shell system like the one show inFigure 3 to give otherwise plain geometrya more detailed profile.You can also create accessoriesexpressly with the intent to conceal various kinds of level work. Your systemmight match up very well overall, but it’sa good idea to have some generic concealment pieces handy. For example, ifyou’re working with a natural-lookingrock wall system, there may be instanceswhere the walls are used at odd anglesand cause seams. Example concealmentpieces might be a rustic beam that can beplaced over the intersection, a large sliverof a stone slab, or perhaps some foliage.Custom Piecesfter you’ve got a base set andA enough accessories to

the engine could do feature X?” is now rephrased, “Do we have the talent to utilize feature X at all?” Nowhere in the industry is that question more apparent than with environment design. When we can draw limitless detail, it seems limitless talent is required to cre-ate those worlds. How do we quickly generate enough consistent quality con-tent to fill a highly detailed world? How do we .