Search Unity

Question Best way to optimize multiple textures per sub-mesh/sub-part?

Discussion in 'General Graphics' started by graphicsayy97, Jul 18, 2021.

  1. graphicsayy97

    graphicsayy97

    Joined:
    Dec 24, 2020
    Posts:
    50
    hello

    i want to understand something, what way is best to optimize multiple textures for a limb or part of a mesh? like multi colored variation or similar?

    i understand that batching only takes place if the texture sheet is the same per frame rendered but if you want variations on only part of a whole mesh or sub-mesh which uses the same sheet, adding extra versions or materials eventually slow it all down

    making copy of say the entire sheet seem bad too

    i think:

    1. you must separate and use other material,
    2. you must limit it
    3. UV coordinate must be custom per sub mesh or make use of previous sheet.

    or you have to make a script to change colors of mesh material rgb, best way i think.. but not useful for custom work...or wide change.

    what i want is to change custom materials on only part of a mesh but not have 100x these different version loaded in memory, while making them save UV coordinate

    oh i forgot another potential solution is:

    1. batch new materials by hand into custom texture when loaded, but not sure if UV coordinate is preserved. might be messy and have to do per frame or hold alot of memory, but it may help per frame batch calculation but determining what to do is difficult

    what is the most efficient way to handle this issue?
     
  2. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
    @graphicsayy97
    For the texture part, I would say to take all of those textures, and make them into a whole texture atlas.
     
    graphicsayy97 likes this.
  3. graphicsayy97

    graphicsayy97

    Joined:
    Dec 24, 2020
    Posts:
    50