Version: 2018.3 (switch to 2019.1 )
Draw call batching
Rendering Statistics Window
Other Versions

Modeling characters for optimal performance

Below are some tips for designing character models to give optimal renderingThe process of drawing graphics to the screen (or to a render texture). By default, the main camera in Unity renders its view to the screen. More info
See in Glossary
speed.

Use a single skinned Mesh Renderer

You should use only a single skinned Mesh Renderer for each character. Unity optimizes animation using visibility culling and bounding volumeA closed shape representing the edges and faces of a collider or trigger. More info
See in Glossary
updates and these optimizations are only activated if you use one Animation component and one skinned MeshThe main graphics primitive of Unity. Meshes make up a large part of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More info
See in Glossary
Renderer in conjunction. The rendering time for a model could roughly double as a result of using two skinned meshes in place of a single mesh and there is seldom any practical advantage in using multiple meshes.

Use as few materials as possible

You should also keep the number of MaterialsAn asset that defines how a surface should be rendered, by including references to the Textures it uses, tiling information, Color tints and more. The available options for a Material depend on which Shader the Material is using. More info
See in Glossary
on each mesh as low as possible. The only reason why you might want to have more than one Material on a character is that you need to use different shadersA small script that contains the mathematical calculations and algorithms for calculating the Color of each pixel rendered, based on the lighting input and the Material configuration. More info
See in Glossary
for different parts (eg, a special shader for the eyes). However, two or three materials per character should be sufficient in almost all cases.

Use as few bones as possible

A bone hierarchy in a typical desktop game uses somewhere between fifteen and sixty bones. The fewer bones you use, the better the performance will be. You can achieve very good quality on desktop platforms and fairly good quality on mobile platforms with about thirty bones. Ideally, keep the number below thirty for mobile devices, and don’t go too far above thirty for desktop games.

Polygon count

The number of polygons you should use depends on the quality you require and the platform you are targeting. For mobile devices, somewhere between 300 and 1500 polygons per mesh will give good results, whereas for desktop platforms the ideal range is about 1500 to 4000. You may need to reduce the polygon count per mesh if the game has lots of characters on screen at any given time.

Keep forward and inverse kinematics separate

When animations are imported, a model’s inverse kinematic (IK) nodes are baked into forward kinematicsThe geometry that describes the position and orientation of a character’s joints and bodies. Used by inverse kinematics to control character movement.
See in Glossary
(FK) and as a result, Unity doesn’t need the IK nodes at all. However, if they are left in the model then they will have a CPU overhead even though they don’t affect the animation. You can delete the redundant IK nodes in Unity or in the modeling tool, according to your preference. Ideally, you should keep separate IK and FK hierarchies during modeling to make it easier to remove the IK nodes when necessary.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答