Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Couple noob object texture questions

Discussion in 'Editor & General Support' started by bigkahuna, Jul 17, 2006.

  1. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Just ordered my iMac which will take 2 weeks to get here (argh) so am looking for things I can do until then.

    One is to start converting my models in preparation for importing into Unity. I already read that my textures need to be scaled to a power of 2 and Unity wants only one diffuse texture, which means I'll need to combine textures (most of my models have 2 or 3 textures).

    This leads to a couple questions:

    1. Let's say I have to combine 3 256x256 textures, is it more efficient in Unity to combine these to a single 256x768 texture or a 512x512 texture?

    2. My textures are currently in Windows .bmp and .jpg format. What is the best/preferred texture format in Unity?
     
  2. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    Unity does support more than one texture per model - it is only a performance tradeoff... In Intifada all buildings use 2-3 textures. It depends on how many objects you have. Is it a lot of trees? Then you want to combine - if you only have a <20 objects on-screen at the same time, it won't matter.

    Since 768 is not a power of 2, you either need to use 1024x256 or 512x512.... Which of these you use doesn't make any difference

    What you could do was to find some other 256x256 texture to put in the last 4th of the texture.

    As for the format, Unity doesn't really care. However, jpg is really bad to use as each open->edit->save cycle introduces more compression artifacts.

    Most people use .psd or .tiff as you can save photoshop layers in those. Unity flattens them internally, so you don't lose any space from having all layers in there. When you've tried this, you will not be able to switch to something that doesn't support it ;-)
     
  3. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Thanks Nicholas,

    One of the reasons I'm switching from another engine is speed: loading speed and playback speed. Considering these two criteria, would I be better off using the 512x512 as a .tiff or .psd? PSD is easier for me (I haven't used a .tiff file for over a decade!), but I can learn to adapt. So Unity doesn't support .PNG? Shame, that's become my primary file format for textures.
     
  4. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Unity also supports bmp and png.

    If you are working directly with photoshop it's easiest to just store them as a psd file. Unity postprocesses optimizes all imported files. So if you are concerned about size or performance, it really doesn't matter if you store it as a psd, tiff or bmp, because of the optimization step Unity does anyway.

    Just store them in whatever is most convenient for you work flow.
     
  5. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Cool! Thanks!