Unity3D performance optimization of art resource specifications

  • 1. Specifications for making scene models:

  1. The number of surfaces on the same screen is limited to less than 30,000 planes. Full consideration should be given to locking the viewing angle. The back of the invisible model can be simplified as much as possible. Building models that are far away from the walking area can be made into low-profile, because it is Will come closer to see.
  2. On the same screen, the surface drawcall is limited to 50-70 (including dynamic buildings). Dynamic buildings can be output separately after the surface production test is completed and placed correctly, and cannot appear in the scene surface when submitted.
  3. Resource merge rules: area map merge, area mesh merge, merge with same material
  4. Try not to use the grass objects that come with unity, you should use the grass texture of the ground brush
  5. Large buildings and special effects resources are independent of the scene , no need to put on the ground, and are controlled dynamically by technology
  6. Excessively large surface, such as over 150 meters (15000 pixels), can be output by cutting the surface, the program is dynamically loaded
  7. The area where the monsters are scrubbed and the area where the players fight is as gentle as possible, otherwise the effect of playing monsters and putting skills is not easy to control, and it is not suitable to put small buildings and dynamic buildings, which affects performance.
  8. Scene model and try to ground less transparent textures , with scenes of transparency as far as a texture map
  9. Without real-time lighting , all effects are realized by post-baking
  10. Each scene needs to make a walking area patch. In addition to the surface range, the height must also be consistent with the ground, and finally add a mesh collision body
  11. The texture size is preferentially 256 or 512 , the maximum is 1024, calculated by 1024, the number of textures in a scene is normally controlled within two
  • Second, the character model specification

  • Pay attention to the problem:
  1. The effect of excessive bones : each bone is an independent whole. When the parent bone moves, it will drive the child bones. This movement process needs to be calculated in real time, and the scene creatures in the game are basically in motion. Next, the calculation of the bones has been continued. The more bones, the greater the performance cost caused by the calculation.
  2. The effect caused by the excessive number of model faces : each model face is an independent triangle, and each triangle and its texture area need to be rendered. The more the number of faces, the greater the consumption of rendering.
  • Set and clarify the value:
  1. The protagonist is below 1500, and the mobs are 500-800.
  2. The protagonist bones should be controlled below 40, and the mobs should try to be around 20.
  3. The texture is controlled below 1024, and can also be 512 and 256, depending on the specific situation.
  4. In the novice stage, several professional equipments are put together.
  5. In the advanced stage, several sets of equipment of a profession are put together.
  6. The protagonist texture is generally controlled at about four to five
  • Take the standard of 30,000 screens on the same screen for conventional 2.5D mobile games as an example
  1. In the on-hook scenario, there are 12 mobs and 10 characters. The standard number of faces to be restricted is 800 for ordinary monsters and 2000 for characters.
  2. When on the BOOS map, the boos specification can be loosened a little, but it can't exceed 3000. At this time, 13 characters are supported.
  3. In functional scenarios, there are relatively few NPCs on the same screen. When you need to express the effect, you can release the number of faces, but try not to exceed 2000. At this time, 5 NPCs and 10 characters on the same screen can be supported.
  4. The above is just a general calculation. In addition to the scene object model, there are also winged mount pets, as well as UI and special effects. Due to the shielding mechanism, only the protagonist is displayed, which will account for a small part of the consumption. When we are making, we must use this standard to see the desired effect can float up and down, but the mobs on the hook can not exceed 1000, the same screen does not appear a lot or the plot monsters and mounts, partners, pets, wings, etc. can be released to 1500 The NPC cannot exceed 2000, the character cannot exceed 2500, and the boss cannot exceed 3000.
  • Bone specifications
  1. The limit for hook mobs is also the highest. You can't do too much performance. It needs to be composed of the simplest bones. 25 bones is the best configuration, and no more than 30.
  2. Story monsters and elite monsters, partners, pets, mounts, wings, etc., the effect can be released to 40.
  3. NPCs need to show effects, no more than 40.
  4. The protagonist plus streamers and hair and other bones in need of effect, the maximum can not exceed 50, can support three bone lines, a three bone streamer and two bone lines, a three bone hair.
  5. Boss is large and needs real effects. It can be released up to 60 pieces, but it includes various accessories.
  • 3. Action production specifications:

  1. The protagonist: general attack skills are limited to 20 frames; non-general attack skills are limited to 30 frames
  2. Non-protagonist: Standby and running are limited to 8 to 10 frames, leisure can be released
  • Four, special effects production specifications:

At present, there are generally two modes for special effects, one is the particle emission system, and the other is the direct model plus u3d's own animation system.

In general, it is to control the drawing area , control the drawing batch , and control the size of the animation . The following are the issues that should be noted when making:

  1. The first thing to determine is that most of the time spent depends on your drawing area first, then the number of particles
  2. Can't use a lot of very transparent, large area overlays, such as the effect of clouds, even if your number of particles is small, such as your area is super large, a particle is the size of a screen, and then superimposed several, then the drawing pressure will be special Big
  3. For particles that emit a mesh, the equivalent of a mesh is a batch, so the quantity must be strictly controlled for this
  4. There is no strict control over how many particle systems a skill effect has. After all, this has something to do with the duration, but it should be as simple as possible. For example, for the main character, it is best to control the existence of 12 or more at the same time, and some complicated ones can be added to the top.
  5. It must not appear. For example, there are 30 particle systems in a skill. Many particle systems cannot be seen because the alpha becomes 0, but they must be 0 particles at that time point. Because the alpha is 0, it will be drawn, but the effect is not visible.
  6. When making a particle system, the particle system was originally equipped with many animations. For example, don't go to k-color frames, because the particle system itself comes with it, which will increase the size of the animator file and initialize a lot of data.
  7. If it is particle system's own animation data, use the particle system's own tone. Multi-k frames will increase the initialization time.
  •  Set and clarify the value:
  1. The maximum number of particles of a single emitter should not exceed 12, generally 8-9;
  2. The limit is less than 20 particles (only for special needs full screen or the entire special effect is only within 10 particle systems, the maximum number of single particles can be close to the limit)
  3. It is forbidden for the particle system to launch complex models (the total number of vertices of the special effect model used must not exceed 300 vertices and note that the model must not exceed 1 set of UVs without transparent vertices)
  4. The particle system can only use the particle shader that comes with the default
  5. It is forbidden to use super particle emitters, that is, particle systems emit particle systems
  6.  Particle system scaling mode must be Hierarchy
  7. Cast shadow .Receive shadows. Light probes and reflection probes remain closed
  8. The sequence size 256 within the texture size 128 can use small textures. Use small textures as much as possible; use png or tga for the texture format; the texture resolution can only be 16, 32, 64, 128, etc., do not have a strange resolution like 76X129 rate.
  9. The principle of special effect production is to use the model K animation to do as much as possible without the particle system. (For a one-shot explosion model animation, K Mesh Renderer Enabled animation must not be controlled by color transparency to completely disappear, remember)
  10. For a particle system that is launched at one time, the maximum number of particles and the number of explosive particles must be the same.

 

  1. The model in the special effect guarantees the options in the red box, and one special effect model can only use one shader;

  1. Import the model file under model, the properties panel should ensure the options in the red box, animation and materials go off the hook, do not import animations and materials. If the animation is not used under Rig, remove the tick.

  1.  Camera parameters, pay attention to this will affect the size of special effects, be sure to remove the check HDR

 

Guess you like

Origin www.cnblogs.com/wwhhgg/p/12704216.html