Search Unity

packing textures together?

Discussion in 'General Graphics' started by craig4android, Oct 21, 2019.

  1. craig4android

    craig4android

    Joined:
    May 8, 2019
    Posts:
    124
    I have 2 3D-objects both use a simple image as texture and default material.
    If I pack those 2 images into one image, alter the uv maps of the 3d-objects and use a single Material, will this lead to better performance or will unity do this for me automatically, if I use sprite mode for those textures?
     
  2. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,639
    I've never attempted to use Unity's sprite-atlas for textures for 3D models but somehow I doubt if it will work. At best you'll be missing features like mipmaps and anisotropic filtering that improve the appearance of 3D rendering.

    You can try it and see if it works, but with only two images your performance improvement will be so small that it's probably not worth bothering with. You can't fix a problem that you don't have.
     
  3. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Sprites only work properly with sprite renderers. You do need to do it manually.
     
    craig4android likes this.
  4. craig4android

    craig4android

    Joined:
    May 8, 2019
    Posts:
    124
    good to know, so I use SpriteRenderer for my buttons and for complex objects I pack manually (if it's worth the effort)

    I mean if I expect multiple object to be in the same scene most of the time, I'll pack them to use a single material.

    Fortunately it didn't take me too much effort to change my buttons from textured plane to sprite.
    But only since I'm only at the beginning of my project. Don't want to imagine having to change everything at a later point.
     
    Last edited: Oct 24, 2019