Here are a few tips for creating models for optimal performance. Some of these tips apply to all models, and some apply only to animated models:
Using these techniques might help increase the animation and rendering speed of your models, but be aware that they might also reduce the visual fidelity and realistic effects you are trying to achieve. There is no single answer for every situation that can produce a perfect balance between better performance and visual realism. You have to find the perfect balance according to the complexity of your characters and your scene, vs. the overall appearance and realism that you require.
사용해야 할 폴리곤 수는 필요한 화질과 타게팅하는 플랫폼에 따라 다릅니다. 다음의 두 가지 대비되는 사실은 모두 참입니다.
Also consider what else is competing for rendering resources. If you have a lot of GameObjects or Terrain objects on screen at the same time, consider reducing the polygon count per meshes.
Keep the number of materials on each model as low as possible. Only use more than one material on a character when you need to use different shaders for different parts; for example, you might use a special shaders for the eyes on a character model.
For animated character models, you should use a single Skinned Mesh Renderer for each character. Unity’s animation system optimizes animation using visibility culling and bounding volume updates. It only activates these optimizations if you use one Animation component and one Skinned Mesh Renderer on a model.
Using two skinned meshes in place of a single one could roughly double the rendering time for a model, and there is seldom any practical advantage in using multiple meshes.
In general, the fewer bones you use, the better the performance is. However, sometimes you need to create character models with a large number of bones: for example, when you want a lot of customizable attachments. These extra bones increase the size of the build, and may have a relative processing cost for each additional bone. For example, 15 additional bones on a rig that already has 30 bones takes Unity 50% more operations to solve in Generic mode, which might impact the time it takes to solve.
일반 및 휴머노이드 타입의 경우에만 뼈대를 추가할 수 있습니다. 추가 뼈대를 사용하여 플레이되는 애니메이션이 없으면 프로세싱 부하는 무시할 만한 수준입니다. 부착물이 존재하지 않거나 숨겨져 있다면 부하가 훨씬 더 줄어듭니다.
When Unity imports animations, it bakes a Model’s inverse kinematic (IK) nodes into forward kinematics (FK), and so Unity doesn’t need the IK nodes at all. However, if they are left in the model, then Unity still includes them in calculations, even though they don’t affect the animation. You can either delete the redundant IK nodes in Unity or in your 3D modeling application. To facilitate removing the IK nodes, keep separate IK and FK hierarchies while modeling.