Search Unity

Question Draw Calls (Batches)

Discussion in 'General Graphics' started by oukibt_unity, Aug 22, 2022.

  1. oukibt_unity

    oukibt_unity

    Joined:
    May 6, 2022
    Posts:
    19
    Hello. I created a character 3D model through VRoid Studio, but when exporting to a Unity, the 3D model uses about 14 materials, because of this, the number of batches per 3D model is about 34.

    1 Material for Hairs, 7 Materials for Body and 8 Materials for Face.

    The tie, shirt, and trousers are of different materials, although they are not required, unlike the eyes, eyebrows, and mouth, which not use the bones. Maybe they can be combined







    How can this be optimized?
     
    Last edited: Aug 22, 2022
  2. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,637
    There's a skinned mesh combiner utility on the asset store:
    https://assetstore.unity.com/packag...haracter-mesh-merge-atlasing-support-m-135422

    It looks like it has all of the features that you'd need, but I've never used it. It's on my wishlist but I haven't bought yet.

    Frankly, I've not encountered a big enough performance impact from any of my inefficient character models that I really needed to fix it yet. Are you seeing slow-downs from using your character? If you are targeting desk top, then it may not be a significant problem.
     
    oukibt_unity likes this.
  3. Seedersj

    Seedersj

    Joined:
    Apr 22, 2016
    Posts:
    19
    You're basically going to want to make a texture atlas that has all of your hair, clothes, etc on the same image. Then you use a single material, but offset the drawing of the texture by the correct amount to get the pixels you want for the area you are currently drawing.
     
    oukibt_unity likes this.