Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question PSD files lose quality

Discussion in '2D' started by jackychiu02, Aug 5, 2023.

  1. jackychiu02

    jackychiu02

    Joined:
    Aug 2, 2019
    Posts:
    5
    Hi, I wanted to use 2D spine system in Unity so im importing PSB files. But the color and image of PSB file seems strange compared to png file.

    upload_2023-8-5_17-53-42.png
    (left one: png file) (right one: psb file)

    Do anyone know what causes it? And how can i fix it?

    upload_2023-8-5_17-54-51.png
    fyi, here is the current setting of the psb file. I have tried turning on/off generate mip maps, and alpha is transparency and different wrap mode and different filter mode. All doesn't works..
    I have also tryed a few color profile in photoshop, but doesn't work either.
     
  2. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,694
    You have to use a .PSB Import prog to do that correctly. Google is your best friend...:)
     
  3. jackychiu02

    jackychiu02

    Joined:
    Aug 2, 2019
    Posts:
    5
    Ohh sorry, i misstyped in the question, I wanted to import psd instead of psb files…

    @warthos3399 thank you for your answer though, do you have any idea on psd files too?
     
  4. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,306
    Was having this myself today. Solved it by turning off compression in the platform settings.
     
    angrypenguin likes this.
  5. jackychiu02

    jackychiu02

    Joined:
    Aug 2, 2019
    Posts:
    5
    After I opened platform settings, error occured and the setting is not shown..

    NullReferenceException: Max Size: SerializedProperty is null
    UnityEditor.EditorGUI.BeginPropertyInternal (UnityEngine.Rect totalPosition, UnityEngine.GUIContent label, UnityEditor.SerializedProperty property) (at <7d481861b3d34328a9633ade22dcedd6>:0)
    UnityEditor.EditorGUI.BeginProperty (UnityEngine.Rect totalPosition, UnityEngine.GUIContent label, UnityEditor.SerializedProperty property) (at <7d481861b3d34328a9633ade22dcedd6>:0)
    UnityEditor.Modules.DefaultTextureImportSettingsExtension.ShowImportSettings (UnityEditor.BaseTextureImportPlatformSettings editor) (at <7d481861b3d34328a9633ade22dcedd6>:0)
    UnityEditor.BaseTextureImportPlatformSettings.ShowPlatformSpecificSettings (System.Collections.Generic.List`1[T] platformSettings, System.Int32 selected) (at <7d481861b3d34328a9633ade22dcedd6>:0)
    UnityEditor.U2D.Common.TexturePlatformSettingsHelper.ShowPlatformSpecificSettings () (at Library/PackageCache/com.unity.2d.common@7.0.0/Editor/InternalBridge/TexturePlatformSettings/TexturePlatformSettings.cs:158)
    UnityEditor.U2D.PSD.PSDImporterEditor.DoPlatformSettings () (at Library/PackageCache/com.unity.2d.psdimporter@7.0.1/Editor/PSDImporterEditor.cs:488)
    UnityEditor.U2D.PSD.PSDImporterEditor.DoSettingsUI () (at Library/PackageCache/com.unity.2d.psdimporter@7.0.1/Editor/PSDImporterEditor.cs:338)
    UnityEditor.U2D.PSD.PSDImporterEditor.OnInspectorGUI () (at Library/PackageCache/com.unity.2d.psdimporter@7.0.1/Editor/PSDImporterEditor.cs:287)
    UnityEditor.UIElements.InspectorElement+<>c__DisplayClass62_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <795c477f4b8b45c2b2848ba27f9a227b>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)


    Does anyone know how to change the platform setting?
     
  6. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,694
  7. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,609
    I'm quoting this because while you may indeed need the importer plugin as well to support all of the features you're using, the "strange" colouring shown in the OP is highly likely to be compression artifacts.

    Note that you can control compression per-texture in the file's import settings, so you don't need to turn it off at the platform level.
     
  8. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,306
    Yeah this is more what I meant. I just thought of this panel:
    upload_2023-8-8_21-13-41.png

    And my brain thought 'platform settings', though import settings makes more sense.

    I had the same sort of case as OP. Working on pixel art textures and was getting strange colours that weren't present in my .png files. Turning off compression solved it. Though testing it, high-quality compression was getting the same results, though with tiny 128 x 128 or so textures, I don't think compression is a big deal.
     
  9. jackychiu02

    jackychiu02

    Joined:
    Aug 2, 2019
    Posts:
    5
    Can you elaberate more on that? How to do it exactly?

    Btw i have been using psd importor all the time, but i cant find the control on compression..

    upload_2023-8-11_12-13-52.png upload_2023-8-11_12-14-7.png
     
  10. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,609
    In my previous comment I was referring to the platform-wide project settings. I hadn't realised that there's a platform section in the texture-specific settings as well (is it new?).

    What's in there?