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. Dismiss Notice

Question Sprites scaled badly?

Discussion in 'General Graphics' started by DonPeppu, Jun 15, 2023.

  1. DonPeppu

    DonPeppu

    Joined:
    Aug 23, 2021
    Posts:
    22
    I have a sprite scaling problem in a 2.5D game, i used a pixel perfect script but only work on 2D, same problem with or without mipmap. In
    screenshot4.png
    The sprite drawn at about 2000x1500 pixels and you can see it very well, when it is inserted into the scene and scaled you can see a huge jaggedness. If I change the sprite from 2048 to 512 it resolves in part but the image becomes very blurry and edge are much visible.
    Here in the picture you can see the pig clearly different in definition than the plane.
     
  2. Spencery98

    Spencery98

    Joined:
    Jun 16, 2023
    Posts:
    1
    Last edited: Jun 17, 2023
    DonPeppu likes this.
  3. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,326
    Do have the ppu set constantly for all sprites?
     
    DonPeppu likes this.
  4. DonPeppu

    DonPeppu

    Joined:
    Aug 23, 2021
    Posts:
    22
    currently the sprites are about 1500x1000, yes we have seen that you have to make them 1024x1024, always square, but initially my colleague and I didn't know it!
    If we set the canvas to 2048x2048 could we fix?
     
  5. DonPeppu

    DonPeppu

    Joined:
    Aug 23, 2021
    Posts:
    22
    at high resolutions, 4K or 2K, I have no problems at 1920 you start seeing at 1280x720 it's S***
     
  6. DonPeppu

    DonPeppu

    Joined:
    Aug 23, 2021
    Posts:
    22
    PPU standard set 100 and size 2048, tested with 2048x2048 canvas same problem. Right now GameObject is 0.55 0.55 0.55 size of original, I scaled to 1 1 1 with sprite scaled to 1126, proportional to scaled version, but same problem. But the problem is generally on the EDGE you see grainy could it be that the tip used for the drawing not being constant generates these errors?!
     
  7. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,326
    That'll probably help if your sprite is not in an atlas. If your texture is not a power-of-two then Unity will force it to be, causing resampling.

    Also, that resolution is pretty enormous. My whole monitor is only 1920x1080 so you'd be down-sampling there too unless you're targeting some kind of IMax theater experience. :p

    Any time you resample or down-sample you are losing fine details, so if your outline is too thin then it can be down-sampled completely away.