Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

PNG vs SVG 2d Pixel art games and resolutions.

Discussion in 'Editor & General Support' started by LeetRooster, Jul 28, 2013.

  1. LeetRooster

    LeetRooster

    Joined:
    Jul 20, 2013
    Posts:
    18
    I'm trying to decide whether I should build a game with SVG or PNG (or other pixel formats)? I would probably use 2d toolkit for PNG and RageTools for the SVG (Unless there are other tools to recommend checking out).

    I know some people make Pixel art in SVG format, but I'm wondering how well it scales. Your computer only has so many physical pixels on screen, so you're going to lose quality if you scale the SVG too small and how does it look when you scale the SVG to a multiple that's not an integer multiple (I.e. if you make it 1.5 times larger in each direction). Will you get blurring in SVG or PNG format?

    I was thinking it might be best to make pixel art for the lowest supported resolution (1024x768?, or maybe smaller to support SDTV?) and size it up. It might look fine when you double the size of each pixel in both dimensions. I might be able to pull this off for 1920x1080 if I use 32x32 for low res and 64x64 for high res. However, I'm worried it might look really bad at resolutions in the middle. Are there special resizing algorithms for pixel art that I need to make sure Unity/tk2d is using? Does SVG/PNG make a big difference here?

    Or It might be better to target 1920x1080 and resize down for the worse resolutions. At least this way the game will look really nice in high res. But it would probably look like garbage in low res. So maybe its not a good idea, I imagine there are still a significant number of players using low res (especially outside of NA/EU).
     
  2. LeetRooster

    LeetRooster

    Joined:
    Jul 20, 2013
    Posts:
    18
  3. iconsam

    iconsam

    Joined:
    Jul 24, 2013
    Posts:
    2
    Interested in this thread. I didn't know about RageTools for use in SVG. LeetRooster, have you used it in other projects before? How is the performance?

    Also interested in learning more about the way Unity2D handles PNGs. Can it autoscale between two resolution of images? So the assets doesn't appear pixelated(when too big) or blurry(when too small)?
     
  4. adturbo

    adturbo

    Joined:
    Feb 4, 2014
    Posts:
    2
    You can have a look at SVGAssets, it renders SVG files into Texture2D objects, at runtime, at the right resolution for your device (resolution independent sprite atlasing support is also there). Included examples show how to develop resolution independent texture/sprite-based projects.