• 日本語
  • ゼロピクセルのアトラスを表示するとエラーが出る

お世話になっております。

透明なテクスチャのアタッチメントまたは、縮小出力した事によってピクセルが消失したアトラスを読み込んだ際に出るエラーを回避する方法はありませんでしょうか?

つまり、0pxのアトラスのロードもランタイムで許容して欲しいです。


An error occurs when displaying a zero pixel atlas

Hi.

Is there a way to avoid attachments that are transparent textures, or errors when loading an atlas that has lost pixels due to a reduced output?

In other words, I also want to allow the 0px atlas load at runtime.

Related Discussions
...

発生しているエラーを教えてください。 どのような脊椎ランタイムを使用していますか? 0pxアトラスはどのように作成しますか?

Could you show us the error you are getting? What Spine Runtimes are you using? How do you create the 0px atlas?

返信ありがとうございます。

ランタイムはspine-cランタイム(b6686111dca55cc92eb2523ca6febf35cb121cb1)を利用しています。

書き忘れましたが、エクスポート設定で「無駄な空白を除外」にチェックを入れている為、エクスポート時にアトラス情報まで除外されているようです。(チェックを外す事で当然アトラス情報は生成されますが、テクスチャーが肥大化してしまう)
結果として、存在しないアトラスを参照しようとしてクラッシュしています。

透明が生成されるフローとしては、連番で一部だけ透明なテクスチャーが生成される場合や、テクスチャーの管理構造上、ピクセルが存在しないテクスチャーを自動生成する場合などです。

「無駄な空白を除外」にチェックを入れても、1x1ピクセルの最小で完全に透明アトラス情報を保持して読み込むように出来ないでしょうか?


Thank you for your reply.

The runtime uses the spine-c runtime (b6686111dca55cc92eb2523ca6febf35cb121cb1).

I forgot to write, but it seems that even Atlas information is excluded at the time of export because "Strip whitespace X and Y" is checked in the export settings. (If you uncheck the box, atlas information will be generated as a matter of course, but the texture will be enlarged.)
As a result, it is crashing trying to reference a non-existent atlas.

The flow that generates transparency is, for example, when a partially transparent texture is generated in a sequential number, or when a texture without a pixel is automatically generated because of the control structure of the texture.

Even if "Strip whitespace" is checked, is it possible to hold and read at least 1x1 pixel minimum and completely transparent atlas information?

問題を再現できるように、Spineプロジェクトとエクスポートした .skel /.json.atlas.pngファイルを送ってください。

Please send me a Spine project and your exported .skel/.json, .atlas and .png files so I can try to reproduce the issue.

7 jours plus tard

返答ありがとうございます。お手数をおかけいたします。

ファイルを添付しましたが、特別な事は何もしておらず、ピクセルが描画されていないテクスチャを配置しただけの物になります。
プロジェクトをエクスポートすると、skeleton.atlasは空になっており、アトラスデータを読み出そうとしてエラーが出てしまうので、画像が全部除外されたとしても1x1pxだけは残すような状態であってほしいのです。

よろしくお願いします。


Thank you for your response. We apologize for the inconvenience.

I have attached a file, but nothing special is done, it's just a texture with no pixels drawn.
When I export a project, skeleton.atlas is empty, and I get an error when I try to read the data here, so I want it to be in a state where only 1x1px is left even if all the images are excluded. is.

Thank you.

問題を再現することができました。 あなたのテクスチャアトラスパッキング設定は、 '空白の画像を無視する'が有効になっています。 透明なアタッチメントが1つしかない場合、結果のアトラスは空になります。 アタッチメント画像がアトラスから解決されているときにクラッシュが発生します。 それが見つからないため、読み込みが続行できず、クラッシュが発生します。 デフォルトでは、spine-cランタイムで足りない添付ファイルを処理する方法を決定することはできません。 ただし、動作は変更できます。

これには2つの解決策があります。

1.テクスチャアトラスパッカーの設定で「空白の画像を無視」を有効にしないで、完全に透明な画像を1x1pxにします。

  1. spSkeletonBinary_createWithLoader()を使用し、 spAtlasAttachmentLoaderに基づいて独自のspAttachmentLoaderを提供してください。 spAtlasAttachmentLoaderがアトラス内で画像を見つけられないときは、空の領域を生成します。

I was able to reproduce the issue. Your texture atlas packing settings has Ignore blank images enabled. With only a single transparent attachment, the resulting atlas is empty. The crash then happens when the attachment image is being resolved from the atlas. It can't be found, and hence loading can not continue and you receive the crash. By default, we can not decide how to handle missing attachments in the spine-c runtime. You can however modify the behaviour.

There are two solutions to this:

  1. Do not enable Ignore blank images in the texture atlas packer settings and make your fully transparent images 1x1px.
  2. Use spSkeletonBinary_createWithLoader() and provide your own spAttachmentLoader based on the spAtlasAttachmentLoader. When the spAtlasAttachmentLoader does not find the image in the atlas, generate an empty region.