• Runtimes
  • In PixiJS runtime, how can I adjust some of the parameters in the Unity runtime

How do I adjust Material -> Straight Alpha Texture, Texture -> sRGB (Color Texture) and Texture -> Alpha Is Transparency parameters in Unity runtime in PixiJS runtime?

  • Misaki님이 이에 답장했습니다.
    Related Discussions
    ...

    In PixiJS runtime, you can adjust texture filtering and alpha settings by modifying the .atlas file and the texture settings in your code. For smooth edges and anti-aliasing, ensure that the filter entry in your .atlas file is set to Linear, Linear instead of Nearest, Nearest. This can be done by exporting your assets with Linear as the value for Filter min and Filter mag in the Texture Packer Settings. Additionally, you can manually update these values in your code if needed. PixiJS does not have direct equivalents for Unity's sRGB (Color Texture) and Alpha Is Transparency, but you can manage transparency and color space through shader adjustments and texture settings in your PixiJS application.

    • NijiNeko님이 이에 답장했습니다.
      NijiNeko님이 제목을 In PixiJS runtime, how can I adjust some of the parameters in the Unity runtime(으)로 변경했습니다. .

      Spinebot Sorry, I don't quite understand, this doesn't seem to be what I need

      NijiNeko Sorry for the late reply. The spine-pixi runtime does not provide a parameter to manually set whether a texture is PMA or not, but I think it would be better if you could tell us exactly what you are having trouble with. In spine-pixi, PMA textures are used even in the examples, and I think you should use PMA textures unless there is a very special reason not to. Is there a specific reason why you need to use straight alpha textures? And have you encountered any problems when actually using it?

      • NijiNeko님이 이에 답장했습니다.

        Misaki Because the animator used a lot of Bleed instead of Premultiply alpha when exporting, if these three options are not enabled, the light will be overexposed after rendering. Hundreds of assets have been used, so there is no way to modify the assets themselves.

        • Misaki님이 이에 답장했습니다.

          NijiNeko If the original Spine projects have not been lost, a few hundred projects is not that many. Using the export shell script that we made available, you can re-export all Spine projects within a specific folder. Unless re-exporting is truly difficult, I recommend repacking the textures in PMA.

          Davide, who is responsible for the spine-pixi runtime, will be away for a while, so he may be able to advise you when he returns, but for now, I think it would be best to look for an easier way to repack the textures.

          • NijiNeko님이 이에 답장했습니다.

            Misaki At present, we really can't repackage everything, so we can only hope that this problem can be solved.

            • Davide님이 이에 답장했습니다.
              7일 후

              NijiNeko

              Which runtime, runtime version, and Spine assets version are you using?
              Could you share a comparison screenshot or video showing the actual result versus the expected one?
              If possible, sharing the assets here or via email could help us provide more targeted assistance.

              As Spinebot already mentioned, in PixiJS the only texture parameters you can control are the min/mag filters and mipmap generation. These values are typically read from the .atlas file, but you can also override them manually by accessing the Pixi texture directly.
              As a last resort, you might consider modifying the shader, though that would be a more advanced approach.

              • NijiNeko님이 이에 답장했습니다.

                Davide
                The runtime version used is "@esotericsoftware/spine-pixi-v8": "4.2.81", and the version of spine assets is also 4.2
                I don't quite understand how to control the shader, I lack knowledge in this area

                Davide I'm sorry I can't provide screenshots at the moment, I'm still on vacation today, but I can confirm that these options must be enabled in the Unity engine for normal rendering, so I would like to know how to enable these settings on the PIXI side

                • Davide님이 이에 답장했습니다.

                  NijiNeko

                  Until I can see a comparison between the actual and expected results, and have access to one of your assets, my ability to help will remain limited.

                  In spine-pixi-v8, straight alpha / PMA is automatically read from the atlas file—there’s no need to set it manually.
                  You can adjust the min/mag filters by editing the filter values in your .atlas file. See here for how Spine filter values map to Pixi's.
                  If you prefer not to modify the atlas file, you can override those values directly on the Pixi textures, as mentioned earlier.

                  I don't quite understand how to control the shader, I lack knowledge in this area.

                  Shaders aren’t simple toggle settings, they’re actual GPU-side programs you have to write. Modifying them requires a good understanding of graphics programming and could impact your game’s performance, since a custom shader must be used to render Spine skeletons.

                  • NijiNeko님이 이에 답장했습니다.

                    Davide OK, I will give it a try. If possible, can you please leave me an email address and I will send the assets to you via email during working hours?

                    • Davide님이 이에 답장했습니다.