• RuntimesUnity
  • White seams when using Bleed + Straight Alpha with Unity on Android

Harald
I can confirm the values are correct in editor as the quality does change when I use other settings. I haven't tracking packing Rectangles yet and will get our artist to try and re-export with that.

Related Discussions
...

Misaki
All the material and texture settings appear to be correct. In the Spine Presets I don't have any of the materials set and my project doesn't have the mentioned Straight materials. Unless I'm mistaken this is just to help automatically configure the materials and isn't strictly necessary?

In the documentation it says the if you use Linear Colour you must use Straight Alpha. Does that also mean that you need Liner Colour to use the Straight Alpha pipeline or is that optional?

  • Misaki đã trả lời bài viết này.

    lindsayt

    In the Spine Presets I don't have any of the materials set and my project doesn't have the mentioned Straight materials.

    Hmmm, that sounds weird. Could you tell us what version of Unity and spine-unity runtime you are using?

    Unless I'm mistaken this is just to help automatically configure the materials and isn't strictly necessary?

    Yes, the materials set in the Auto-Import Settings in the Spine section of Preferences just set the materials that will be automatically assigned upon import, and can be manually modified to the correct settings. However, it is easy to make a mistake if you do this manually, so we basically advise users to modify the settings here depending on whether you are using PMA or Straights alpha textures.

    In the documentation it says the if you use Linear Colour you must use Straight Alpha. Does that also mean that you need Liner Colour to use the Straight Alpha pipeline or is that optional?

    Straight alpha textures can be used in both Gamma and Linear color space.

    • lindsayt đã trả lời bài viết này.


      Okay I did have some settings that were a bit off. But updating them appear to have made it much worse. For clarity, here is the import settings for the texture and the material.
      Does it matter if other skins on the same atlas haven't been updated? This character has 4 skins but we're only testing this one with the new export pipeline as it's a time consuming process

      @lindsayt Your settings look correct, sorry that none of the suggestions resolved your issue. Could you please send us a minimal Unity project which still shows your issue as a zip package? Please also include your Spine project files, including the attachment images folder. You can send it to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context. Then we can have a look at what's going wrong.

      entirely unrelated, but @lindsayt OMG I can't wait for a Lower Decks Android game 😃

      • lindsayt đã trả lời bài viết này.
        6 ngày sau

        Mario It's already live and I'm working to make it a bit more optimized. Check it out

        6 ngày sau

        Misaki
        Just confirmed we are using Spine 3.8.99 and Unity 2021.3.24f1
        We investigated updating to Spine 4.2 but it was not feasible for this project.
        I'll try and create a project to send through when I can, but that may take a while

          lindsayt
          I'll try and create a project to send through when I can, but that may take a while
          I did a quick project with just the one Spine character. Same files, same Unity version. Copy pasted all the build and quality settings. Looks perfect on this other project. What gives?

          • anaskhan đã trả lời bài viết này.

            lindsayt I think this can help

            • Misaki đã thích điều này.

            lindsayt We investigated updating to Spine 4.2 but it was not feasible for this project.

            I assume you meant Spine 4.1, since 4.2 is not yet out.

            I did a quick project with just the one Spine character. Same files, same Unity version. Copy pasted all the build and quality settings. Looks perfect on this other project. What gives?

            Please note that the Spine Preferences settings like default import settings are stored in the file SpineSettings.asset, by default located in Assets/Editor, outside the Project Settings folder.

            If you can later send us your reproduction project files, we're happy to have a look at what's the cause of your troubles.

            • lindsayt đã trả lời bài viết này.

              Also when you use straight alpha+bleed you have to manually adjust channels in unity prefrences>spine window.

              Harald
              Spine prefs are also the same across both projects.

              • Harald đã trả lời bài viết này.

                lindsayt Spine prefs are also the same across both projects.

                Thanks for checking. Please note that Spine Preferences only affect the first import of your skeleton asset. When copying your newly exported Straight-Alpha texture assets over PMA existing ones, the Spine Preferences Atlas Texture Settings preset is not applied, to not mess with your manually tweaked settings. Nevertheless, the Texture import settings and Material settings screenshots that you shared earlier already look correct.

                I assume you also receive the same issue when placing the exported assets in a newly created folder, right? So that no previous settings could mess up the import.

                • lindsayt đã trả lời bài viết này.

                  Harald I have narrowed down the issue to the BlendModeMaterialsAsset. We currently have a mix of PMA and Straight Alpha assets as it is going to take a long time to re-export them all. If I create an asset and build the scene with it, it works. If I create the asset at runtime it's using the Default Blend Mode Materials Asset to replace the Material at runtime with an incorrect one. The documentation says this is obsolete but I don't know if this applies to Spine 3.8 as the "Upgrade" button that's mentioned is not present. In the project there is only the PMA materials, is there supposed to be the Straight Alpha ones as well or is this specific to PMA?

                  • Harald đã trả lời bài viết này.

                    The documentation says:

                    If you have disabled Premultiply alpha, set Atlas Texture Settings to StraightAlphaTexturePreset and blend mode materials to SkeletonStraightAdditive, SkeletonStraightMultiply and SkeletonStraightScreen

                    But those files don't exist. I re-downloaded the 3.8 runtime and they're not there either

                    lindsayt We currently have a mix of PMA and Straight Alpha assets as it is going to take a long time to re-export them all.

                    Sorry to hear. To save you some trouble for future projects, please note that it is highly recommended to automate your exports using the Spine Command Line Interface (CLI) to be able to quickly re-export your skeletons in one go.

                    The documentation says this is obsolete but I don't know if this applies to Spine 3.8 as the "Upgrade" button that's mentioned is not present.

                    Sorry for the confusion. In spine-unity 3.8 it was not yet obsolete as the new alternative did not exist yet, so you have to use the SkeletonData Modifiers - BlendModeMaterialsAsset in 3.8.

                    Regarding straight alpha blend mode materials:
                    spine-unity 3.8 did not yet provide straight alpha option at the blend mode shaders out of the box. Please download the latest spine-unity 4.1 shaders (additive, multiply and screen) and straight alpha materials (again additive, multiply and screen variants) from github here:

                    Or alternatively import the same 3 shaders and 3 materials from a newly downloaded spine-unity 4.1 unitypackage.

                    • lindsayt đã trả lời bài viết này.
                      • Đã chỉnh sửa

                      Harald Is it expected that the BlendMode Shaders are the same for both materials? The only difference is that the Straight Alpha Texture is ticked

                      • Harald đã trả lời bài viết này.

                        I tried but I am also unable to use the 4.1 shader because they want the CGIncludes, which want a script, which want another script and so on.

                        • Harald đã trả lời bài viết này.

                          lindsayt Harald Is it expected that the BlendMode Shaders are the same for both materials? The only difference is that the Straight Alpha Texture is ticked

                          Yes, that's the only difference.

                          lindsayt I tried but I am also unable to use the 4.1 shader because they want the CGIncludes, which want a script, which want another script and so on.

                          Sorry, I forgot that these were based on includes already. Then you need to import the required include files as well. It's these three:

                          Spine/Runtime/spine-unity/Shaders/CGIncludes/Spine-BlendModes-NormalPass.cginc
                          Spine/Runtime/spine-unity/Shaders/CGIncludes/Spine-BlendModes-ShadowCasterPass.cginc
                          Spine/Runtime/spine-unity/Shaders/CGIncludes/Spine-Common.cginc

                          I will shortly compile a unitypackage (in a zip package so that the forum accepts the upload) which contains only the additional files to be imported to an existing spine-unity 3.8 project.

                          The documentation says this is obsolete but I don't know if this applies to Spine 3.8 as the "Upgrade" button that's mentioned is not present.

                          Upon testing the shaders I noticed that the latest spine-unity 3.8 runtime already provides the native support for slot blend modes and an Upgrade button at the SkeletonDataAsset, rendering the BlendModeMaterialAssets indeed obsolete. So if you don't see this Upgrade button, you are not using the latest spine-unity 3.8 package.