Game Development Reference
In-Depth Information
Normally, polygon count, shader complexity, fillrate, and the target platform should be considered when creating
3D content, but in our case none of these is an issue because
The models are either very simple or were created with a low polygon limit in mind.
Textures are small (256 x 256, 512 x 512), opaque, and can be combined. The fillrate is also not
an issue because everything is opaque and almost no overdraw occurs.
The pixel shader currently consists of just two instructions (multiplying the diffuse map color
with the lighting).
All content runs fine on the target platforms. The engine optimizations (see next section)
also help.
Normally you should be a little more aware of texture sizes, reducing shader complexity, and removing unused
content. One of the most challenging problems for artists is finding the right balance for texture sizes; you want to
make everything look the best it can while still staying within platform limits. Optimizing a complex 3D game for
mobile platforms can be a very hard task. The earlier you start profiling and making sure you don't add too many
complex rendering features, the easier it becomes to keep high frame rates in your game.
As we worked on this chapter and the sample game, most of our time was spent fighting with exporting
issues (missing normals, shader parameters, different issues exporting from different programs—all that fun) and
programming the actual importing and rendering. As the engine developers, we obviously spent more time than a
game development team would; those programmers can use existing engines or tools and simply agree on using 3D
content creation programs that work for them.
However, having control over the import process can be a huge advantage for optimizations, and thanks to
that, atlas generation and UV remapping (see Figure 3-11 ) can be accomplished easily with the Delta Engine. UV
remapping is a technique usually performed manually by artists. It involves combining several meshes into a bigger
one and merging the original textures into a bigger atlas texture. One caveat: tiling is usually not possible, so we
added an extra flag to exclude tiled textures. It makes sense to fine-tune this process manually, but it can get very
complicated when building for different platforms with different texture sizes and shaders, thus we tried to automate
it in the Delta Engine. This allowed us to optimize for mobile platforms, leaving out features and texture maps that
would be too slow (e.g., normal mapping, specular mapping, etc.).
 
Search WWH ::




Custom Search