Search Unity

Pixels Per Unit and supporting large (4k) resolutions

Discussion in 'Editor & General Support' started by _eternal, Feb 2, 2016.

  1. _eternal

    _eternal

    Joined:
    Nov 25, 2014
    Posts:
    304
    I'm trying to decide what PPU I should use for my standard 2D tiles.

    As far as I know, it makes sense to create art assets in as big a res as you can, and then save the pngs at a smaller res. For example, if I save a tile at 256x256, I should get a tile that's around 1/8 the height of the screen on a 4k display, correct?

    In order to avoid upscaling, does that mean my camera's orthographic size should be 4 and my PPU should be 256? The screen would be around 8 units tall and a 4k screen can fit around 8 256x256 blocks without upscaling. I'm just confused about how to do this (and test it) because I'm developing on a 1080p monitor.

    I also don't know if there are any major performance downsides to using large sprites when most players will probably end up downscaling to 1080p anyway. I'm not targeting mobile; just PC and hopefully console.

    To summarize: am I correct in thinking that I should save my tiles at 256x256 if I want them to be about 1/8 of the screen and still look good on a large display? And is 4 a reasonable camera size in terms of Unity physics?
     
  2. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    Is this not something you can easily test yourself in the Editor? Just make a sprite that's 64x64 and then display that in 960x540 and then in 1920x1080 and see what want or need to do based on that? The results would be identical to using 1080p, 4k and 256x256 sprites. For ease of use you can go even smaller as well. :p

    What you're asking sounds like something which depends entirely on your game. To my knowledge Unity doesn't care about your PPU setting or orthographic camera size, you can tweak your physics settings to fit your game.

    Whatever 2D work I've done in Unity so far has been based on pixel art and I use a PPU setting of 1 and my orthographic camera size I usually set to 1/4 my screen height so that each pixel becomes 2x2 pixels on screen. The physics I just tweak until they look and feel correct.

    As for downsides to using large sprites I'm guessing a downscaled sprite will never look as crisp as a sprite displayed at its native resolution? Apart from that I can't think of any. Your game will take up more HDD space of course. As for performance I guess you can just supply your players with a graphics setting letting them choose their texture size. And inform them there's no point in choosing the highest option unless you're on a 4K monitor, but they'll surely notice that themselves and if they have any performance issues turn the setting down.