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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

2D Animation package - PSB workaround?

Discussion in 'Animation' started by redstripeart, Jan 26, 2019.

  1. redstripeart

    redstripeart

    Joined:
    Jan 26, 2019
    Posts:
    2
    Hey there,

    I am new to 2D rig and animation in Unity and I am kind of confused with the new skinning editor. I was able to do some basic rigs and animations in the previous version of 2D animation package (late 2018) but with the new version, I can't even set up bones and weights. From checking youtube tutorial (afaik there is only one for the current version) and official documentation, I need the character exported in PSB file from Photoshop, but I draw everything in Krita and I don't feel like getting photoshop only for the sole purpose of this (I love the idea of putting in the whole character with bits and pieces already split as sprites, but why would this be only photoshop-exclusive when every graphic editor has layers nowadays?). When I tried doing it the old way, importing the png file with all pieces separated, I was able to put bones to secific sprites but I couldn't find way to parent these bones and found that whole "pose preview" function is totally useless that way.

    Is there a solution for non-photoshop users or something that I missed while rigging character through classic png map? Thank you for your answer,
     
    Last edited: Jan 26, 2019
    jlittle489 likes this.
  2. InfiniteDesign8

    InfiniteDesign8

    Joined:
    Aug 22, 2017
    Posts:
    33
    its by design that you must pay for PS..could you imagine if we let you set your rig up easy without someone getting paid?
     
    awsapps likes this.
  3. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,415
    AFAIK, krita can export to .PSD -- Do those krita-exported .psd files not work with your version of Unity or something?
     
  4. InfiniteDesign8

    InfiniteDesign8

    Joined:
    Aug 22, 2017
    Posts:
    33
    no PSB only ...hence my salty reply
     
  5. apapryk

    apapryk

    Joined:
    Sep 21, 2019
    Posts:
    1
    same problem here.. keep it bumped
     
  6. gavinjboyd

    gavinjboyd

    Joined:
    Jan 29, 2019
    Posts:
    6
    I'm glad it's not just me with this issue, I would gladly pay for ps or ai if it wasn't priced so high, I will give KRITA a go to see if it works as a workaround
     
  7. kuro_sk

    kuro_sk

    Joined:
    Dec 10, 2014
    Posts:
    3
    I spent last four hours trying to find any solution, and actually did. Yay!

    https://imagemagick.org/script/download.php

    Use from command line like this:

    magick convert base.psd base.psb
    (replace 'base.psd' with the name of your psd file, obviously)

    Worked for image exported as .psd from Gimp 2.10.8

    Hope this helps. GLHF
     
  8. Arnklit

    Arnklit

    Joined:
    May 18, 2015
    Posts:
    48
    I've been banging my head against this for the last hour. I cannot fathom how you rearrange your sprites if they are imported as a normal multiple sprite instead of a PSB. People say in the documentation that it's supported to use normal files, but there are no examples of it being done. This is really frustrating.

    EDIT: My sprite doesn't even turn into a prefab that I can drag into the scene, even though I've added bones and geometry. Hmmm. I'll try with 2019.3 beta instead and see if that makes any difference.

    EDIT 2: Gave renaming my PSD file from Krita to PDB a go as someone mentioned that working and that works, but what a crappy solution. You should be able to use a normal flat file and they should definitely make the "PSD Importer" support more layered file types if they aren't going to support flat files.
     
    Last edited: Nov 1, 2019
    facundoreno likes this.
  9. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,415
    Crazy how much simply renaming a file can kick you in the teeth when iterating on your artwork, isn't it?
     
  10. fsena

    fsena

    Joined:
    Dec 11, 2018
    Posts:
    1
    Thhhhaaannnkksss!!!
     
  11. FlavrTown

    FlavrTown

    Joined:
    Dec 19, 2016
    Posts:
    4
    You can do it with flattened pngs. Watch the first half or so of this video
     
    Rany_AN likes this.
  12. RandomComm3nt

    RandomComm3nt

    Joined:
    Feb 2, 2016
    Posts:
    6
    Last edited: Jun 10, 2020
  13. jay3sh

    jay3sh

    Joined:
    Dec 30, 2013
    Posts:
    14
    Thanks a bunch for this video. This solution should work without PS.
     
  14. ManieBesselaar

    ManieBesselaar

    Joined:
    Nov 1, 2018
    Posts:
    26
    This it what works for me at the moment. Create character in krita with layers. Export to psd. Open psd in gimp. Export to psd from gimp. Rename resulting psd to psb. Import into unity. I knownthat the psd importer for unity is on github. Inhave thought of maybe taking a look at the source code and creating a fork . Any one game to try and fix this? I may be in over my head but maybe some team work will get us there. Beats just complaining about it
     
    MortuaryWax2003 likes this.
  15. ManieBesselaar

    ManieBesselaar

    Joined:
    Nov 1, 2018
    Posts:
    26
    Here is something else that works for me in a pinch.


    This involves using a flat png ( just put arms , legs head etc away from body. Import sprite as single not multiple.
    Rest of the video explains everything clearly. Setup is about the same amount of work as psb import.
    Hope someone finds this useful.
     
  16. Jarestrepogu

    Jarestrepogu

    Joined:
    Feb 18, 2018
    Posts:
    9
    Just tried with a file created in Krita and exported to .PSD

    I simply changed the file extension to .PSB and it worked just fine... Which leads me to a cuestion, why would Unity "not support" .PSD files in first place?

    I might be mistaken but, from what I've read on the web, the only difference between the two formats is the file size they can handle... And is not a good enough reason to use it for 2D projects in any case (seriously, when/why will anyone need to handle a sprite heavier than a few MB's?)

    They also have a script to allow the use os .PSD files (the override mentioned above). That's not supporting a thing, why would an artist require a script to import a file? It should be supported by default (not to mention that the package, as pointed several times in the forums, is called "PSD importer").

    The features and the workflow allowed by the package are great, but this silly limitation makes no sense.
    Do review the way you are delivering packages, Unity, or make a clear statement on your support for creation software... But, please, stop making us waste time looking for tricky workarounds to access the funtionality of your packages.
     
  17. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,415
    The only point I _might_ disagree with is this one -- at least where texture atlases are concerned (mainly UDIMS -- but really nowhere else). Outside of that (super-tiny!) nitpick -- I agree wholeheartedly.


    The PSB workflow should be the exception -- not the rule.


    No idea why the heck Unity doesn't just acknowledge this whole workflow is great -- but backwards. :p
     
  18. Th0re

    Th0re

    Joined:
    Sep 4, 2015
    Posts:
    39
    Here is what I learned:
    1. It is reportedly possible to directly open a PSB, make changes and save, and the rig will remain intact. Alas, this requires specifically Photoshop (or programs that support it sufficiently).
    2. It is currently not entirely possible to do this with other programs using the "rename trick" -- but somewhat with a few workarounds.
    3. The scary sounding "Reslice" option in the Sprite Sheet preserves the information.
    4. You can import to Unity using the "rename trick". This works for Affinity Designer and Affinity Photo and possibly other programs. You would export to PSD, and then rename the file, then drag it into Unity.
    5. If you want to update the file, you must use a workaround and there are some limitations. Many Bothan spies died to obtain this information. The general workflow is to save it to desktop, change the ending, open the location of the Unity file to overwrite in finder/explorer and replace it. There is a catch.
    6. You can open the file out of Unity and make changes, but you can not save it straight away. Since you must export via PSD and rename, it somehow messes with hidden information Unity uses. This seems to cause no issue when you stay within the layers, layer names, and general size of the sprites already created. If you add/remove anything, it will break your rig. Then it will break your will after it happened for the ninth time.
    7. However, it's often possible to repair the rig by redoing the geometry, rather than doing it all again.
    8. It worked for me to add elements by placing them above all other layers, and in an extra group. Might also work below or without the group, however it clearly doesn't work between existing layers.
    9. You absolutely must use versioning, like GitHub or something or you will lose your mind. Commit your good version that works. Then replace the file, observe the damage and if the adding-layers-on-top trick and such work, or you can salvage the rig, go ahead, else find the "discard" option.
    10. It's a cool package nonetheless, and not their fault that other programs don't preserve esoteric hidden data inside PSBs.
    Hope that helps.
     
    Last edited: Apr 28, 2022
    awesomedata likes this.
  19. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,415
    That is great information. Thanks.
    Working this way would make me lose my mind though. :(

    It kinda is their fault they didn't just make a PSD exporter plugin for a free (well-supported) drawing application like Krita that appends data or creates a JSON or XML file to use alongside as more modular "esoteric data" -- which is kinda an industry-standard way to solve this problem.

    They could still keep the PSB as a "premium" feature, but open up the bread-and-butter stuff in a more modular format. Doing otherwise is just an asshat way of designing a feature-set. I mean, c'mon -- these are just images with sizes. In the end -- data is just data. :(
     
  20. Unrighteouss

    Unrighteouss

    Joined:
    Apr 24, 2018
    Posts:
    585
    For anyone looking for a Photoshop alternative, I've been using Clip Studio Paint for years and it works fine. It can export PSB's and edit/save PSB files in Unity. The only limitation I've seen is that it doesn't have layer IDs, so instead Unity will automatically match layers by name (I actually prefer this anyway).

    The $50 Pro version has everything you'll need for image editing, no need to get the more expensive EX version (it has extra features for comics and animation).
     
  21. Th0re

    Th0re

    Joined:
    Sep 4, 2015
    Posts:
    39
    I agree, there should be a way. For example expose the layer/id/name to Unity “translation” so you can also fix it, assign it in the sprite editor. Maybe just an array of all layers detected and the corresponding sprite that Unity would make of it.
     
    awesomedata likes this.
  22. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,415
    I very much enjoy Clip Studio Paint (more than PS actually) -- but my point is that Unity should not make this so limited.

    This is just bad design for a tool.

    Have we not learned _anything_ from the 90's software/tooling?? -- Tools must be flexible and cover as many unforeseen (by the tool developer) environments and use-cases as possible -- while still fulfilling its main functionality (in this case importing layers, etc, in-tact).
    Modularity is critical in tools because it easily extends the use-cases (and environments) in which a tool can be used and reused (and not need to be rewritten each time).

    Unity itself follows this philosophy, so why shouldn't its tools?
     
    Last edited: Apr 29, 2022
  23. Unrighteouss

    Unrighteouss

    Joined:
    Apr 24, 2018
    Posts:
    585
    Yeah, I 100% agree. I just wanted to make the recommendation for anyone that feels they need an expensive Photoshop subscription to make this workflow convenient.

    I've always thought it was unintuitive that the "PSD Importer" only takes PSB files. Improving this is definitely something Unity should be considering for the future.
     
    superkerokero and awesomedata like this.
  24. superkerokero

    superkerokero

    Joined:
    Dec 9, 2015
    Posts:
    8
    > I've always thought it was unintuitive that the "PSD Importer" only takes PSB files. Improving this is definitely something Unity should be considering for the future.

    Yeah, at least they should call it "PSB Importer" at the current stage to avoid confusion. A "PSD Importer" that can not import PSD files is very unprofessional.
     
    awesomedata and Unrighteouss like this.
  25. hellemia

    hellemia

    Joined:
    Jan 23, 2023
    Posts:
    1
    3 years later, the 2D animation package is still borderline useless without Photoshop.

    If we can't properly arrange the character parts into a default pose, the pose preview and more importantly the auto-generated weights don't work properly.

    Just let us arrange the rig from regular sprites exported as "Multiple". Requiring Photoshop for this is at best incompetent, and at worst malicious
     
  26. ManieBesselaar

    ManieBesselaar

    Joined:
    Nov 1, 2018
    Posts:
    26
    Hi Hellemia.
    This is not ideal as you have said, but I use The Gimp and Krita daily for my 2d character design needs. The workaround that works for me is to create my character with limbs on seperate layers (all correctly arranged) and then export to a .psd file.
    Counterintuitively Unity PSD importer only imports PSB files, so I pop into explorer and rename the file extension to PSB and import.
    There are also 2 scripts at https://docs.unity3d.com/Packages/com.unity.2d.psdimporter@2.1/manual/index.html which solve the file extension issue which you could add to your project. Just remember to put the editor script under a folder called Editor . Unity will find the folder and use that as an editor script.

    Feel free if you need help implementing this. I will answer as many questions as I can.

    I also saw someone in this thread mention ClipStudio which is available as a one time purchase and has a free trial for you to try and see if it works for your needs. Just checked, it is on special offer for $19 at the moment.Tried for free. Exported to Photoshop Big format. Imported rigged. No issues. Could be a good option for you as well.

    Hope this helps.
     
  27. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    838
    Just to chime in here, PSD Importer supports .psd files, and has been supporting them for a while.
    In Unity 2022.2 and onwards, the PSD Importer package contains the override files, so you do not need to add the additional scripts in those versions.

    In PSD Importer 9.x (2023.1), we added it to the front page of the documentation (link), as we noticed that we haven't been telling users this enough. But this thread makes it even more apparent that we should talk about it more.

    Do note that we do not test with all kinds of .psd generating DCC tools, so you might experience different results depending on the editor you use. That said, do file bug reports if you come across strange behavours.
     
    Unrighteouss likes this.
  28. ManieBesselaar

    ManieBesselaar

    Joined:
    Nov 1, 2018
    Posts:
    26
    Thank you for this. I've known about this script for a while, but renaming has just been simpler and faster for me. Still it is good to know that the Unity team are listening and responding to the community. Thank you guys and girls for making an awesome tool available to us (Unity 3d editor of course ), even though we do grumble sometimes.

    Just tested the newest psd importer on 2023.1.0.a21 and it definitely works as advertised. Yay my life is complete! No more renaming, no more extra scripts to set up before I start.

    Quick note for anyone with the same issue, when exporting from Krita to psd for Unity , the imported sprite is sometimes darker than intended. If I go to the platform settings under the properties for my sprite, then setting the (color ?) format to RGBA half solves it. I don't know enough about color formats and standards to give an intelligent explanation as to why or how this works. Feel free anyone to school me on this.

    Do you know if Unity has any plans to support some open graphics formats for importing layered 2d sprites for character rigs? That would be a definitive wishlist item for me. More open standard mean more choice for devs.

    Either way for now the "new " psd importer does it for me.
    Thanks again Unity.
     
    Ted_Wikman likes this.
  29. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    838
    Thanks for testing and reporting back, I'm happy to hear that everything works as intended!

    We are always interested to hear what we can do improve the editor (and runtime), and that also goes for supporting new file formats. We collect feature requests on our roadmap pages. Also note that you can create your own importer for any kind of file format, by making use of the Scripted Importers API. This is the backbone of the PSD Importer, for instance.

    Speaking of file formats used for 2d projects, we have recently added support for Aseprites .ase/.aseprite file format. Aseprite is primarily used for Pixel Art, frame by frame animations. You can read about it here.
     
    ManieBesselaar likes this.
  30. ManieBesselaar

    ManieBesselaar

    Joined:
    Nov 1, 2018
    Posts:
    26
    Awesome, worth checking out. Would love to create an importer for Krita.
    Thanks!
     
    Ted_Wikman likes this.