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

PSB file quality loss in unity

Discussion in '2D' started by Qothal, Mar 27, 2020.

  1. Qothal

    Qothal

    Joined:
    Mar 11, 2020
    Posts:
    5
    Hi, I just finished drawing a character for my game in photoshop and I saved the file as a PSB so I can animate it using bones. But when I opened the skinning editor, my character is blurry, I searched everywhere to fix it, everybody said to turn off compression, switch to point no filter, etc. That removed the blurriness, but my character lost its quality it had in photoshop, its like I zoomed in. It's not made with vectors.
    What should I do? Does it matter the size of the image in photoshop when I save it? How large should it be? I cant really enlarge the image now without losing the original quality and look ,you know..
    Let me know if you need more details..

    Edit: Forgot to mention, I put my character on the scene before i head to the skinning editor and it looks great, no quality loss. When the game window is minimized it kinda looks blurry, but in max window when hitting play, it looks good.
     
    Last edited: Mar 27, 2020
    EvOne likes this.
  2. aaron-jackson1993

    aaron-jackson1993

    Joined:
    Oct 4, 2019
    Posts:
    1
    I am having a similar issue and would love to know if this is simply an issue with the PSD importer or some setting that I am missing as well. I've attached a screenshot of a test I did after experiencing a loss in image quality. I imported the file as a PSB file (image left) and a PSD file (image right). I used the same settings for both images and the PSD file came out at the quality expected while the PSB looked pretty bad as seen in the screenshot.

    For now, there are two possible workarounds. First, increase the image size to twice that of the image size you need... Unfortunately, that means redrawing over your previous work to maintain image quality. So if you have an image that is 256x256, increase it to 512x512. Then when you import the image, change the pixels per unit to 200 so that the image will take up the same amount of screen space.

    The other option is to break up your file into its individual components and export it as a PSD. The drawback here is that you will have to break the PSD up into multiple sprites and rearrange them the way you want them. Then you can go in and rig them just as you would a PSB. If you need help with this method, there should be some video tutorials on youtube that walk you through it step by step.

    As for what size you need, that depends entirely on how much screen space you want the sprite to take up and what resolution you want. So if you want your sprite to take up about 5% of the screen space and you want a maximum resolution of 1098x, then you should make your sprite 256x256 pixels. Always design for the maximum resolution you want, because you'll lose quality if your sprite gets scaled up. A lot of people aim for 4k which is typically 3840x2160 pixels, so if you want the highest quality, start there.

    Hopefully, someone will respond with a better fix that allows for importing PSB files at the expected quality, but in the meantime, one of these two workarounds should get you moving ahead on your project.
     

    Attached Files:

  3. UmbraGame

    UmbraGame

    Joined:
    Mar 15, 2018
    Posts:
    1
    Open PSB in inspector, click "Advanced" and then turn off "Alpha is Transparency". I found this by clicking everything in a row .-.
     
  4. JufJannieApps

    JufJannieApps

    Joined:
    Jan 8, 2016
    Posts:
    26
    What "fixes" it in my case was to change the max texture size to 4096 instead of 2048.

    In my case the sprite atlas unity generates is bigger than the 2048x2048. So it scales it to make it fit. iOS should support the higher 4096, but check to make sure.
     
    Last edited: Jul 7, 2020
    PatientTurtle, povsod and ow3n like this.
  5. aj-fix

    aj-fix

    Joined:
    Sep 4, 2018
    Posts:
    7
    I had a very similar problem, and what fixed it for me was turning off "Generate Mip Maps" in the advanced texture import settings. Went from nearly unusable quality to perfect with no change to the texture size.

    upload_2020-7-13_14-0-35.png
     
  6. timotewb

    timotewb

    Joined:
    Nov 7, 2020
    Posts:
    1
    "Generate Mip Maps" worked for me too. Thanks!
     
    casalepeter likes this.
  7. ed_s

    ed_s

    Unity Technologies

    Joined:
    Apr 17, 2015
    Posts:
    165
    Nice; glad you were able to solve your issue and thanks for sharing the tip.
     
  8. Mercuri

    Mercuri

    Joined:
    Sep 23, 2013
    Posts:
    2
    I've tried removing "generate MIP MAPs" and bumping the max size to 4096, but I'm still seeing noticeable downres-ed sprites when I animate from layers in a PSB file compared to making my own single sprite sheet PNG and importing...
     
  9. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    434
    would you able to share your art with us?
     
  10. ShashankV1993

    ShashankV1993

    Joined:
    Mar 7, 2021
    Posts:
    2
    Hey everyone
    m facing an issue with PSB import which is actually in photoshop i made a character with grey as i wanted a shadow character and gave it borders/stroke with black but after import in unity all i see is grey and there is no border/stroke just a single colored shadow.
    Anyone got a clue ??
    used black bg in sprite editor for better visibility. focus on hairs n u'll get the hint

    also attatched 2 screenshots 1 of actual photoshop file and the other is imported psb in unity Screenshot (29).png Screenshot (30).png
     
    Last edited: Mar 19, 2021
  11. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Try to rasterize the layers in PS. If I recall correctly the PSB importer doesn't support effect and blend modes.
     
  12. ShashankV1993

    ShashankV1993

    Joined:
    Mar 7, 2021
    Posts:
    2
    thank you for the suggestion :)
    i did the same but still facing same issue:(

    i have an idea....could you suggest me any tutorial about designing a character and importing it's in unity from photoshop? maybe i could find out what's wrong if i follow the details
     
    Last edited: Mar 20, 2021
  13. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    434
    Would you able to share your file so that we can take a look?
     
  14. masoudkazemijouqi

    masoudkazemijouqi

    Joined:
    Nov 10, 2019
    Posts:
    1
    There is only one solution to this problem. You have to edit the desired geometry in the skinning editor and move its borders a little so that the parts left outside the frame enter the frame :))
     

    Attached Files: