modular level and component design

6
lee perry WORLD BUILDING Modular Level and Component Design S o the future has finally arrived. Technologies we’ve only dreamed about are closer than ever, and if you’re lucky enough to be on the right project, you’re knee deep in it already. With polygon counts off the charts and hardware pushing more detail than you care to create, environ- ments can be simply staggering. But with every step forward in graphics capabilities, many find themselves won- dering how to utilize those advances. The question of “Wouldn’t it be cool if 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 make sure those worlds can be easily modified and made flexible to design whims? How do we break up the team to handle these tasks? These are daunting problems to address, and even the most stalwart industry veterans will find themselves intimidated quickly at the prospects. As we stare down the future, it may help to take a page out of history, from tile-based platform games. Much like Super Nintendo worlds of old, it will inevitably boil down to modular com- ponents in some way. Until recently tex- tures provided the bulk of a world’s detail, but for the foreseeable future, more and more players will expect that detail to be full-blown geometry. That’s a big order to fill, particularly in the competitive realm of first-person shoot- ers, where eye-candy often reigns supreme. However, the solutions to these problems are not limited to the worlds of the running guns, they can solve dilemmas for many genres and many settings. Using prefabricated geometry in cre- ative ways is key to achieving the detail levels players expect to see in their game worlds. This article will look at how we at Epic arrived at the modular solution, how we implement such a system, and the benefits and limitations of a compo- nent-driven workflow. You May Ask Yourself, How Did I Get Here? T he modular level design solution arose from the need to have great- looking, high-detail levels without hav- ing to build and texture every nook and cranny of the environment. Asking a traditional level designer to create an environment (usually from simple tools) that holds up to artist-like scrutiny is not a practical idea. Many level design- ers aren’t familiar with high-end model- ing packages, and even knowing the tools doesn’t necessarily translate to cre- ating great content. The days of align- ing textures and moving on have them- selves moved on. Asking traditional artists to design an engaging level is not an ideal solution either. Doing so may produce great- looking yet highly unpredictable game- play. Questionable gameplay and per- formance sacrifices arise regularly when artists focus on creating large master- pieces. And both systems easily end with the creator losing inspiration after weeks of working on the same content. Another system many developers work with is having a dedicated level designer block out an environment and pass that progress on to an artist for final polishing. This works to a degree, but it can still benefit from modular design decisions made early on. Model- ing and texturing an entire level at Or: How I Learned to Stop Worrying and Love Making High-Detail Worlds LEE “EEPERS” PERRY | Lee is currently a designer and artist for Epic Games. Among numerous other projects, previous work includes art and level director for Ion Storm’s ANACHRONOX, and modeling for Square’s R&D depart- ment. He can be contacted at [email protected]. november 2002 | game developer 30

Upload: truongmien

Post on 30-Dec-2016

233 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Modular Level and Component Design

l e e p e r r yW O R L D B U I L D I N G

Modular Level and Component Design

So the future has finallyarrived. Technologies we’veonly dreamed about arecloser than ever, and ifyou’re lucky enough to be

on the right project, you’re knee deep init already. With polygon counts off thecharts and hardware pushing moredetail than you care to create, environ-ments can be simply staggering. Butwith every step forward in graphicscapabilities, many find themselves won-dering 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 cre-ate those worlds. How do we quicklygenerate enough consistent quality con-tent 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 like

Super Nintendo worlds of old, it willinevitably boil down to modular com-ponents in some way. Until recently tex-tures 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 shoot-ers, 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 cre-ative 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 compo-nent-driven workflow.

You May Ask Yourself,How Did I Get Here?

The modular level design solutionarose from the need to have great-

looking, high-detail levels without hav-ing to build and texture every nook andcranny of the environment. Asking atraditional level designer to create anenvironment (usually from simple tools)

that holds up to artist-like scrutiny isnot a practical idea. Many level design-ers aren’t familiar with high-end model-ing packages, and even knowing thetools doesn’t necessarily translate to cre-ating great content. The days of align-ing textures and moving on have them-selves moved on.

Asking traditional artists to design anengaging level is not an ideal solutioneither. Doing so may produce great-looking yet highly unpredictable game-play. Questionable gameplay and per-formance sacrifices arise regularly whenartists focus on creating large master-pieces. 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. Model-ing and texturing an entire level at

Or: How I Learned to Stop Worrying and Love Making High-Detail Worlds

L 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 depart-ment. He can be contacted [email protected].

n o v e m b e r 2 0 0 2 | g a m e d e v e l o p e r30

Page 2: Modular Level and Component Design

w w w . g d m a g . c o m 31

Page 3: Modular Level and Component Design

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 founda-tion for your creative process? Followingare some of the considerations we keepin mind when designing our environmentconstruction process around modularity.

Scale

With intelligent planning, modulari-ty is not as restrictive as you

might think. Indeed, modularity can beimplemented on many scales. Some may

choose a path along the lines of MOR-ROWIND, wherein large buildings are sin-gle prefabricated items, and entire cas-tles may break down into a handful ofwall pieces. Other projects, with an eyeon very dense environments, may workon a smaller scale that incorporates sev-eral 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 deter-mined by the scope of your environ-ments. 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 nar-row, abandoned corridors of a derelictspacecraft, you’ll want to work at avery fine detail level with layers of components interacting in a complexfashion.

Grids

Regardless of scale, when creating aset of modular components, noth-

ing is as important as the almighty grid.Grids may fluctuate wildly betweenengines and projects, but whatever sys-tem you decide on, stick to it religiously,and always use even divisions of thatgrid when working on smaller compo-nents. 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 interac-tions. Deciding in advance at whatheight various animations will happencan save you a great deal of pain later.Of particular importance here is stan-dard 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 dur-ing later production.

Planning

Now’s the time to sit down with thedesigners and artists responsible for

a given area of the game and discusswhat type of pieces will be required.Make a list of key features for the envi-ronment and the unique componentsthat define the level. These could be any-thing from a vast missile hangar to acomplex volcano mesh.

Leave the specialized pieces aside,focusing on the meat of the environ-ments, 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 sec-tions 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.

W O R L D B U I L D I N G

n o v e m b e r 2 0 0 2 | g a m e d e v e l o p e r32

FIGURE 1A. A larger-scale building set.

FIGURE 1B. The scale has been taken down anotch, using more components in a singlewall.

Page 4: Modular Level and Component Design

Start with the Basics

At this critical point, be sure to gothrough 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 transi-tional 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 varia-tions. If you have a large stairway piece,make short, medium, and large versionsfor added flexibility, and be sure to con-sider texture variations as well. With achange of color scheme, an office hall-way may appear completely different. By incorporating relatively minor varia-tions, an area can feel far removed fromanother area that uses many commonelements.

Find out in advance if your prefab setswill require back-facing polygons.Leaving the back of a prefab hollowguarantees someone will make an envi-ronment to display it.

Mirror, Mirror

Designers will love you for creating aflexible set that is painless to work

with. Of key importance to achievingthat flexibility is making sure your geom-etry can be mirrored easily on as manyaxes as possible, so keep a line of sym-metry 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 16-sided 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 mir-rored vertically as well as horizontally,and consider creating transition piecesthat will allow an object to be mirroredto itself for added flexibility.

Origins

You may have a prefab modeled rigid-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).

w w w . g d m a g . c o m 33

FIGURE 2B. A centered origin results in havingto move off the larger grid to cover an angledgap, scaling in multiple directions, and creat-ing seams on both walls thereby using morecomponents in a single wall.

FIGURE 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.

Page 5: Modular Level and Component Design

Don’t Forget toAccessorize

The next step in the system is to createa handful of accessory pieces that

can be used to break up the appearanceof tiling. A castle hallway created frommodular wall sections can look entirelyunique with the placement of a few bust-ed 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 corri-dors 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 stat-ue 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 vari-ous kinds of level work. Your systemmight match up very well overall, but it’s

a good idea to have some generic con-cealment 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 Pieces

After you’ve got a base set andenough accessories to embellish the

environment, the next step is to createcustom areas that the design calls for. It’s important that this step come afterthe basics, as you’ll often need informa-tion such as how the basic set will transi-tion into the custom pieces. If the pieceneeds to fit very specifically, you or thedesigner may consider blocking it in firstand using that work as a template for thefinal geometry.

You can take a bit more freedom fromthe grid when constructing a made-to-order section of geometry, but youshould get back on the grid at the edgesof the piece to ensure everything will fittogether seamlessly. Also, when buildinga custom mesh, as with the accessories,ask yourself if there’s an easy way todivide it that would allow it to be usedmore flexibly than just drag-and-drop.For example, if you’re creating a detailedstarship control room that connects withmodular hallways, look for a way todivide the room so an extra section couldbe added to expand the area. Or perhapsthe customized railing that spans thebridge could be broken into sections andused elsewhere.

Level Assembly

Now comes the payoff, designing thelevel by snapping together the Lego-

like units. The particulars of this processwill vary greatly from one project to thenext, but there are still a few general tipsthat can help (see figures 4a-4c).

First, rough in a few ideas before start-ing construction. Take a blank slate andsee what you can do with the pieces youhave before going back and requesting

more. You might not need that custompiece at all if you can find a cleverworkaround.

There’s nothing wrong with using apiece in a way it wasn’t intended. If youcreate the level simply by snappingtogether TETRIS unit shaped corridors,the player is likely to reject the modularnature of the environment. It’s critical tothe workflow’s success that users havethe ability to improvise and invent newuses for prefabs. Some environmentstyles are more flexible than others, butthere are generally areas of flexibility forany genre. A complicated sci-fi doorwaymay end up mirrored and used as a win-dow. An altar may be duplicated andused as an archaic column. The possibili-ties for variation are greatly increased ifyour particular technology allows fornon-uniform scaling of components.

Mix it up even more by using youraccessory elements in key constructionroles. For instance, you might take a sin-gle wooden beam mesh and build a shod-dy doorway with it, or take a piece ofductwork and duplicate it in an array toform a unique wall. Each set of geometrypresents an array of possibilities.

Finally, if your engine allows for pro-jected textures or lighting, be sure to usethem in key spots to further break uprepetition of detail throughout the level.

Consider the Benefits

Even if modular construction tech-niques don’t seem like something

your project could utilize, there are a fewkey benefits to consider before makingthat decision.

First and most importantly, after-thoughts are rampant and a fact of life ingame development. Working with pre-fabs offers an unprecedented degree offreedom to go back and edit an originalpiece, while having every instance of thatpiece automatically update throughoutyour entire world. Don’t like the textureon that monitor? Implement it for now,and change it when you have the time. Inmany engines, an entire piece of geome-try could be replaced as long as the newone fits the function of the old piece rea-sonably well. Working with movable

n o v e m b e r 2 0 0 2 | g a m e d e v e l o p e r34

FIGURE 3. Modular boundary systems can givesimple level geometry great detail while main-taining flexibility.

W O R L D B U I L D I N G

Page 6: Modular Level and Component Design

chunks of geometry also allows for easyrevisions on the designer’s end, withouthaving to go back and consult withartists. Are testers telling you they need an alternative exit from that room?That’s no problem in a modular environment.

Regardless of rendering power, memo-ry will always be a concern. Workingmodular generally allows an engine towork with many instances of the sameobject. A complicated wall piece can beduplicated many times with minimalmemory impact after the initial place-ment. Even the densest-detail environ-ment can get away with using only ahandful of meshes in memory.

Another important consideration isconsistency, and with bigger teams it’s abigger concern. By using a prefab set thathas been built with minimal cooks in thekitchen, even a sprawling, robust levelwill maintain a style throughout. Suchconsistency is far more difficult toachieve in an entire world built of uniquegeometry.

We all want to reach as many playersas possible with our games, and a modu-lar system allows you to create very scal-able levels of detail (LODs) for differentplatform specifications. Developers canflag high-detail extra touches so theywon’t draw on various video settings. Ifyour technology allows or requiresLODs, you’ll find a modular construc-tion technique facilitates that very well.

In addition, modularity allows teammembers to concentrate on doing whatthey are best at. Level designers with

strong gameplay skills needn’t worryabout creating the loads of detailsrequired in high-end graphics. With amodular construction set they can focuson laying out the game and not getbogged down trying to create whatshould be considered art assets.

Finally, working with prefabs can helpgreatly if you plan on releasing a game-editing utility. Titles such asMORROWIND, NEVERWINTER NIGHTS, theWARCRAFT series, and countless past titlesthat have used modular or tile-basedtechniques have made their editability akey selling point. Editability helps extenda title’s shelf life and creates a strongeruser community.

Limitations andDrawbacks

Developers on some projects may seethe word “modular” and panic.

Initially, old-school, graph-paper-designed Dungeons & Dragons levelscome to mind. Ninety-degree hallwaycorners and evenly spaced doorwayscreep into their nightmares.

The bottom line is that modular con-struction is indeed more restrictive thanhaving a staff of dozens create an entirelevel as custom geometry and unique art-work. But for most teams, that kind ofcontent creation workflow just isn’t feasi-ble. The key point is that having to fixsome obvious tiling along the way is stillfar easier than creating a game full ofcustom content. Based on your game andits goals, you can decide the right level of

modularity for it. If you’re nervous, trystarting on a smaller scale of prefabs that will allow for more detail in a smaller area.

Some designers find it incredibly sti-fling to work with geometry they didn’tcreate. This can be a common scenario,but as graphics continue to improve at astartling rate, those designers will eventu-ally have to accept that level-editing toolsare not going to be able to create thekind of detail we’ll be seeing in the nextfew years of AAA titles. It’s really no dif-ferent from using textures created bysomeone else. After getting accustomedto it, it’s hard to ignore the benefits ofbeing able to see one’s gameplay ideasrealized quickly.

Farther Down the Road

Looking farther into the future ofgame environment creation, who

knows what we may encounter? Perhapsmodular techniques may lead to trulyimmersive procedural worlds. Some saythat’s inevitable to some degree, and oth-ers aren’t happy about it and want toresist moving in that direction. Whereverwe all end up, and regardless of the spe-cific nature of your current project,you’re using modular construction insome fashion already. If your artists arecreating tiling textures, if you have astandard step height, or if you have atile-based terrain system, you’re alreadyin the mentality of building in a modularway; you merely need to extrude it intothe rest of the environment. q

w w w . g d m a g . c o m 35

FIGURE 4A-4C (LEFT TO RIGHT). A relatively small selection of instanced prefabs (left) can turn a basic level (center) into a far more complexworld (right).