Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Model Import Size for Bone Weights and UV Maps

Discussion in 'Editor & General Support' started by tsphillips, Feb 13, 2008.

  1. tsphillips

    tsphillips

    Joined:
    Jan 9, 2006
    Posts:
    359
    I'm using C4D R10 to import models. Checking the Unity build stats, it looks like the vertex weights and UV maps are taking up far more space than I expected.

    Example data:
    Character model with 1040 vertices, bone weights, and UV map: 388K
    Same model only with UV map (no vertex weights): 250K
    Same model only with vertex weights (no UV map): 147K
    Same model with all maps deleted: 102K

    Does anyone know any obvious explanation why I might be seeing numbers this big? Any ideas on how to reduce the space used by meshes? (Not counting procedural creation of meshes -- these would be models coming in through an art pipeline.)
     
  2. WarpZone

    WarpZone

    Joined:
    Oct 29, 2007
    Posts:
    326
    Uh... you could try saving from Cinema 4D into an intermediate format that uses ints rather than floats or something. But since they all (presumably) end up in the Unity format under the hood, I'm not sure that would work.

    388k seriously doesn't sound that bad for a character model. The textures you'll be using on your characters will no doubt weigh several times that, even compressed. Unless you're planning on using a ridiculous number of meshes that share a common set of textures, I really don't see the value of optimizing that data.

    You're really probably gonna want the extra detail for something like bone weights. I'm thinking the slightest subtle difference between the original weight values in C4D and the final weight values in Unity could play havock with your weighted animations.
     
  3. tsphillips

    tsphillips

    Joined:
    Jan 9, 2006
    Posts:
    359
    388K for a 1040 vertex character model is unreasonably large. (Yes, we are generating a ridiculous number of meshes that share a common set of textures. :wink:)

    I kept digging and I believe I figured out why the size was so big. Most of the polygons were not connected in the UV map. Remapping so most UV polygons shared edges, the size went down considerably.

    Character model with 1040 vertices, bone weights, and original UV map: 388K
    Using a new UV map where most polygons shared edges: 184K

    In retrospect, this makes sense, and probably also applies to the mesh itself -- more shared edges = smaller asset size. I was surprised, though, at just how dramatic an effect the UV map can have.