Creating Assets for a Wide Range of Hardware
From Multiverse
| Creating and Importing Models |
|
Creating Assets • Creating Collision Volumes • Exporting Models to COLLADA • Targeting a Wide Range of Hardware • Model Conversion Tool • Creating Material Scripts |
| Using 3ds Max |
|
Using the 3ds Max Export Tool Creating Attachment Models Creating Morph Animations Transferring Biped Skeletons Implementing Vertex Lighting |
| Other Tools |
|
Blender: Static Model • Blender: Anim. Model • Blender Physics • DeleD: Static Model • DAZ Studio: Creating Characters • DAZ Studio: Avatars • Using Poser |
Contents |
Overview
Personal computers today have graphics processors with a wide range of performance and functionality. While the avid gamer may have a dual core processor and a graphics card that supports DirectX 10, many others may have five-year-old PCs with motherboard integrated graphics.
In general, the best practice is to create assets that take advantage of features of high-end graphics hardware, with a series of "fallbacks" that provide a reasonable frame-rate on lower-end hardware. Multiverse provides features such as level of detail (LOD) and multiple rendering techniques in materials to enable you to develop a gameworlds that run well across a wide range of hardware and degrade gracefully on lower-end machines.
This document discusses some of the feature and performance limitations of low-end hardware, and how you can build assets that will work on these systems. It is impractical to provide a a concrete set of asset requirements because of the variety of hardware and the range of requirements for different types of gameworlds.
Create an asset budget for your world based on your desired target audience and your world's design requirements. Estimate scene budgets so that the total rendering cost of any scene does not exceed the capabilities of your target hardware.
Converting assets
For models to work properly on low-end graphics cards (such as Intel integrated graphics chipsets), you must convert your models using the 1.1 Conversion Tool, even if you previously converted them.
Performance tools
One of the most useful tools for Diect3D performance analysis is NVIDIA PerfHUD. You must have an Nvidia graphics card to use it, even if you are targeting cards from other manufacturers such as Intel.
We recommend this tool for budgeting, planning and performance testing performance of your gameworld.
Budgeting
To create a world that performs on a wide range of systems, pay close attention to use of the following resources:
Keep use of these resources below the levels viable on your target hardware.
Sample hardware capabilities
As part of each DirectX release, Microsoft provides hardware manufacturers with a set of hardware capabilities that they must meet to call their device "DirectX Compatible". For example, a DirectX 8 Compatible graphics device must support textures of at least 2048x2048 pixels and 65,535 triangles per draw operation.
The table below shows several key capabilities, the minumum requirements for several versions of DirectX, and the actual capabilities of several common graphics devices. Use the information in this table to determine target texture sizes, number of triangles per submesh in your models, and which material and shader capabilities to use.
| Capability | DirectX 7 Minimum Requirement | DirectX 8 Minimum Requirement | DirectX 9 Minimum Requirement | Intel 945G | ATI 9200 | ATI X300 | NVIDIA GeForce4 Ti4200 | NVIDIA GeForce 6200 |
|---|---|---|---|---|---|---|---|---|
| Texture Width | 2048 | 2048 | 2048 | 2048 | 2048 | 2048 | 4096 | 4096 |
| Texture Height | 2048 | 2048 | 2048 | 2048 | 2048 | 2048 | 4096 | 4096 |
| Texture Blend Stages | 8 | 4 | 8 | 8 | 8 | 8 | 8 | 8 |
| Simultaneous Textures | 2 | 4 | 8 | 8 | 6 | 8 | 4 | 8 |
| Maximum Primitive Count | 65,535 | 65,535 | 65,535 | 65,535 | 65,535 | 1,048,575 | 1,048,575 | 1,048,575 |
| Maximum Vertex Index | 65,535 | 65,535 | 262,143 | 65,534 | 16,777,215 | 16,777,215 | 1,048,575 | 1,048,575 |
| Vertex Shader Version | None | 1.1 | 2.0 | 3.0 | 1.1 | 2.0 | 1.1 | 3.0
|
| Pixel Shader Version | None | 1.1 | 2.0 | 2.0 | 1.4 | 2.0 | 1.3 | 3.0 |
Graphics memory
There is no standard or minimum requirement for graphics memory. Since the days of DirectX 7, graphics cards have gone from 32 MB to 1 GB of dedicated graphics memory. For the last few years many graphics devices have been able to directly access system memory as well, although it is generally slower than dedicated graphics memory. Many graphics cards use both dedicated memory and system memory, and the graphics driver manages storage of particular assets.
For any scene, you must keep the total memory consumption under the memory limit on the card. So for any scene, make sure that all textures and models in the scene including avatars use less than the available memory. A lot of the process comes down to pre-production memory budgeting to ensure that you meet your design goals.
Follow these guidelines to minimize use of graphics memory.
Use DDS textures
Textures are the primary consumer of graphics memory. It is important to budget use of textures to fit within the space available with your lowest target hardware. To minimize memory consumption, use DDS compressed texture formats:
- DXT1 for textures with no alpha channel. Uses one eighth (1/8th) the graphics memory of uncompressed textures
- DXT5 for textures with alpha. Uses one-fourth (1/4th) the graphics memory of uncompressed textures.
The Client uncompresses image formats such as GIF, JPEG and PNG it loads them as textures into graphics memory, so they end up using much more graphics memory than their file size indicates.
Budget for all objects on screen simultaneously
Graphics drivers dynamically manage the graphics memory, moving textures between system memory and dedicated graphics memory based on the textures used to render the current frame. If an object is not rendered because it is not within the camera view area, the graphics driver moves its textures off the graphics card to make room for other textures. So, when budgeting, you only need to consider the objects that will be on screen at any one time. So if your budget for textures is 50 MB, you can use 50 MB each for separate areas where one is not visible from the other.
Use low-resolution texture fallbacks
Use the Client Scripting API function ClientAPI.SetTextureNameOverride() to switch between low and high resolution texture sets. Default to the high resolution textures, and switch dynamically to the low resolution textures if the graphics card has lower memory. Use the HardwareCaps object to determine hardware capabilities.
Add low-resolution level of detail
You can also use Material level of detail to switch the textures used by an object to lower resolution versions when it gets far from the camera. Using level of detail to switch to lower resolution textures allows you to use high quality textures for objects close to the camera, and lower quality textures for object that are farther away, where the high resolution would not be visible anyway.
Set level of detail when you convert models from COLLADA format to Multiverse format; See Setting level of detail for more information.
Vertex count
Vertex count is particularly important for some Intel integrated graphics processors that use the main CPU for vertex processing, rather than dedicated hardware. Because these systems perform all vertex processing (including execution of vertex shaders) on the main CPU, increasing vertex and triangle counts increases CPU load and decreases performance significantly more than for systems with dedicated vertex processing hardware. For example, on a machine with dedicated vertex processing hardware, you might see little performance difference (a few percent) between models with 500 triangles and models with 1500 triangles. The same models drawn on a machine doing vertex processing on the CPU will see a much larger performance difference.
Limit number of triangles and vertices in each submesh
Older and lower end hardware also has limits on the number of triangles and vertices per draw call. The Multiverse Client uses a separate draw call for each submesh of a 3D model, so each submesh has to conform to these restrictions. For most older graphics processors, the maximum primitive count and maximum vertex index are 65,535 (as shown in the table above). To enable your world to run on these devices, keep the number of triangles and vertices per submesh below 65,535.
Model submeshes
The Multiverse Client uses a separate DirectX draw call for each submesh of a 3D model. Each draw call is a fairly costly operation so, minimize the number of submeshes for best performance. Generally the number of possible draw calls per second is more dependent on the speed of the CPU than the graphics processor. For more information, read the NVIDIA paper, "Batch, Batch, Batch: What Does It Really Mean?".
