pixel pusher // steve theodore
Scoped and Groped
From TSA To FBX
aS a teenaGer, I once traveled
through what was still, at the time,
Communist Yugoslavia. The border
crossing was a straight John
LeCarre rip-off: wispy snow blowing
through an unheated train station,
a giant red star on the wall, lit by
a single, unshaded lightbulb, and
enormous border guards in fur hats
and greatcoats. If you didn’t mind
the intimidation factor (or standing
on a Serbian railway platform in
the snow for an hour), it was a
very ... informative ... look at the
machinery of authoritarianism. It
was also, alas, less intrusive and
demeaning than catching a flight
to Newark today. And, amazingly
enough, it actually relates to game
development—really.
You can’t run anything—a
communist dictatorship, an airline,
or an innocent game project—
without well-policed boundaries. In
our case, that means keeping bad
data out of the game: making sure
that our little errors can’t mess up
performance, create bugs, or blow
budgets. If you’ve been responsible
for an embarrassing howler (I
shudder to recall a character with
4 identical meshes overlaid on top
of each other, who looked fine but
dragged the game down to 6 fps
whenever he appeared on screen),
you want your data to be thoroughly
scoped and groped on its way into
the game. Enhanced productivity is
great, but keeping your teammates
from knowing what a dork you are
is priceless.
Of course, as we know a bit
too well these days, good security
involves a balancing act. A process
that’s too intrusive or too complex
becomes so discouraging that the
whole enterprise (game development
or airline travel) suffers. So this
month we’re going to look at the TSA
screener of game development: the
humble exporter plugin.
pleaSe place your
laptop In a Separate bIn
» Exporters are nearly universal
in game development. There
are a few notable exceptions
(for example, the popular Unity
middleware engine reads Maya
files directly) but most studios
opt for some kind of plugin that
reformats art data for use in game.
There are good reasons why
exporters are more common than
file importers. Partly it’s because
nobody wants to re-write their
pipeline whenever Max or Maya
revise their file formats. But more
importantly, the act of exporting
makes a useful distinction
between simply saving your work
and updating the game. For old Max
and Maya hands, who habitually
twiddle control-S after every vertex
push or stack operation, that’s an
important point.
There’s a lot of information
in our files that artists need, but
which the game doesn’t want to
know about. There’s construction
history, layers, groups, reference
material, experimental variants, and
all the other gadgetry that keeps
us productive but has no place in
the game. Keeping the debris of the
creative process out of the way of
the engine is good for both sides:
the engine doesn’t need to learn
your workflow to read your files, and
you don’t need to give up on tools
you want in order to get your data
into the game. Hence our friend, the
exporter plugin.
Have your
documentS ready
» As a metaphorical “border
crossing,” exporting offers a great
opportunity do a little pat down on
your data and make sure it’s not
smuggling something dangerous
into your runtime. Every engine
has a unique (and perpetually
evolving) list of taboos. From zero-
area faces to untextured geometry
to textures located in the wrong
folder, there are a lot of things
which could bring the game down if
they made it through security.
proHIbIted ItemS
» Of course, when most of us think
of exporter UI, we’re really thinking
of the infamous settings dialog.
Modern engines typically demand
a lot of very exacting control over
how data is laid out: geometry,
animations, and textures have
to be correctly arranged to make
the most efficient use of the GPU
and engine features. For example,
most engines want triangles
carefully arranged to maximize the
reuse of vertices, or bone weights
normalized to a particular tolerance.
Animations typically need to be
baked down from whatever system
of IKs, constraints, and simulations
the animator uses to a simple set
of bone rotations. On top of all that,
there are compression settings,
optimization strategies, and all
game developer | January 2011 46