Game Development Reference
In-Depth Information
all the materials as flat Diffuse shaders. If the shadows and lighting are baked
into the color texture in Maya then this import goes well and quickly. But if
the scene has some tiled textures applied to a UV set that is bigger than the
1,1 quadrant in the UV Texture editor, then this isn't possible. In Maya, the way
around this is to make a separate UV set that tells a separate texture (a lightmap)
how to apply to a surface without any overlapping UVs. This then generates
another problem when the scene is brought into Maya because all the materials
then have to be rebuilt to include this new lightmap. This remapping and
rebuilding is not a trivial task and can suck up a lot of time.
Alternatively, Unity 3 includes some new, really amazing technology (Beast)
that allows for lighting solutions to be baked within Unity. Essentially this
does the same thing as baking in Maya but with much added flexibility. Unity
will generate its own lightmap UV set (more on this later), and after baking
automatically builds the materials appropriately to show the lightmap. Plus, if
the scene suddenly needs to be at night, or in different weather, the lighting
can be rebaked in Unity without having to go back to Maya, relight, rebake,
and then reimport (including all the material rebuilds).
To further empower this new system, Unity's lightmapping process creates
texture atlases to ease the hardware requirements. To really make things
exciting, this baked lightmap can be swapped out for dynamic lighting based
upon the player's distance from an object. So if a door opens and changes
the lighting in the scene, this lighting can update in game rather than stay
painted on as it would with a Maya lightmapped scene. Talk to most scenic
game artists who work in Unity—the new lightmapping capabilities are
among the new features of Unity they are most excited about.
Limitations to Unity Lightmapping
Before we all get too euphoric there are some restrictions and problems with
Unity's new lightmapping. First, the demo videos seem to show that Unity's
lightmapping is quick and easy and that users can continue to work while
their scenes bake. It is true that clicking the Bake button is easy, but getting
the settings right to provide for the best quality in the least time can take a
bit of practice and patience. In the demo videos on Unity's site, the baking
time is indeed phenomenal, but the scenes are also not particularly complex
either. It's one thing to bake a four-sided room or a collection of buildings
without any overhanging areas—it's an entirely different issue to bake a
complex scene with real spaces and corners. It means that baking can take a
while. A big scene with a complex lighting scheme can take several hours to
bake and it almost always takes multiple sessions of baking to get the look
just right. Here at our studio, with some particularly complex scenes, baking
has taken over 5 hours on very well-equipped machines. Additionally, it is true
that other things can be done on the machine doing the baking (e-mail, web
browsing, even some basic Maya work), but you'll find that trying to work in
Unity while it is baking is a jerky, losing process. Press the Bake button as you
leave for the day; it'll save lots of frustration.
Search WWH ::




Custom Search