Nate The area in the red box is the four-point range I obtained, which is determined by the SP_ATTACHMENT_REGION or SP_ATTACHMENT_MESH in the upper left corner.
Nate Maybe the skeleton has no region attachments?
In my opinion, this understanding is correct. This is indeed the reason for the fourth picture. I think I should count both SP_ATTACHMENT_REGION and SP_ATTACHMENT_MESH simultaneously. Theoretically, this is correct, but the final effect is not as good as only counting SP_ATTACHMENT_MESH (most models are similar to the comparison of Figure 1 and Figure 2, and Figure 3 and Figure 4).
Nate Both regions and meshes are important. A skeleton could be entirely regions.
I quite agree with this. It's just that using only SP_ATTACHMENT_MESH currently performs better. Of course, if the problem is eventually solved, it must be SP_ATTACHMENT_REGION and SP_ATTACHMENT_MESH.
Nate Is that the problem you are having?
This is almost the problem I have encountered. This is the difference in location when I use the runtime and skeletonViewer.
Nate "whitespace stripping".
I will consider using this method, but because of this problem here (the fifth picture).
ETO Because as shown in the figure, even the box containing the content of the picture is not necessarily attached to the image.
I think even if it is achieved, it is not necessarily possible to be "strictly centered".
ETO If the runtime of spine cannot achieve this, I might consider first obtaining the maximum boundaries obtained from SP_ATTACHMENT_REGION and SP_ATTACHMENT_MESH to obtain the PNG, and then processing the PNG in other ways to make it finally centered.
So I will try this method first, because in any case, it should be necessary for the above situation.
Nate Note this is in seconds. 16ms is .
This is my mistake. Thank you for your correction. But does 16ms correspond to 60 frames? You suggested I take one frame, but in fact, my animation only has the zeroth frame. There might be no difference between going through one frame and going through 16*60. I once tried to calculate the duration of the animation to reach the last frame, but there was no improvement either.
Nate what you want to do and why,
I hope to preview the image in the center.
I hope to render the image correctly.
I attempted to obtain bounding boxes using SP_ATTACHMENT_REGION and SP_ATTACHMENT_MESH, but the effect was not good.
The rendering code above me caused some images to be missing.
This is the problem I encountered. I'm sorry again for my ambiguous expression. ≦(._.)≧