• Unity
  • Missing arm in character with two atlas

  • Изменено
Related Discussions
...

First question, this should be happening? Having two atlas? All the images are in the same Spine file, and there will be a lot more.

So becouse of that one of the characters have two atlas as its possible to see in the image below:

Изображение удалено из-за отсутствия поддержки HTTPS. | Показать

And the result is, since my characters have separated images trough Unity's 2D layer system, when in gameplay one of the arms is missing (i belive thats why).
In a previous version it was behind the character.

Изображение удалено из-за отсутствия поддержки HTTPS. | Показать

I should make the atlas bigger so that wont happend again. But if gets to the size limit when in full version of the game, how to fix this type of error?


09 Mar 2016, 21:35


So yeah, setting the maximum atlas size to 4096 x 4096 made the bug go away.
The final size was 2048x1098.

Изображение удалено из-за отсутствия поддержки HTTPS. | Показать

But my question remainsabout that type of thing. If the amount of image pass the 4096x4096, and spine create several atlas, that bug probably will happend, how to fix it?

If skeleton_skeleton2 material exists, you probably packed two textures (two atlas pages).
Did you not know it was there? It should render correctly even if you have two atlas pages. The Dragon example in the Spine-Unity example folder demonstrates it.

Pharan написал

If skeleton_skeleton2 material exists, you probably packed two textures (two atlas pages).
Did you not know it was there? It should render correctly even if you have two atlas pages. The Dragon example in the Spine-Unity example folder demonstrates it.

Pharan, yes i knew that was there. I saw, as you can see in the image, that this character had two atlas pages.
It was already getting that bug. So i re done the submesh separation in Skeleton Animator (script).

Acctualy it should work right? Here is a print of my Skeleton Animator, now it works becouse the is only one atlas.

Изображение удалено из-за отсутствия поддержки HTTPS. | Показать

What is the "Layer Mix modes" for ? It could be that? (just saw that this is for Mecanim layers)

I see you're using Submesh Separators. The SubmeshRenderer for the arm was probably turned off or not working somehow.

I think Layer Mix Modes is for Mecanim multiple-animation layers.

Pharan написал

I see you're using Submesh Separators. The SubmeshRenderer for the arm was probably turned off or not working somehow.

I think Layer Mix Modes is for Mecanim multiple-animation layers.

Yeah but only for that character, because his arm was in the other Atlas. It is the same Gameobject for all Skins and Slots, the mesh game object for the arm wasnt turned off. Weird, might be a bug.

How may submesh renderers did you have? If you had two atlases and 2 separators, you may have needed 5 submesh renderers.
But if you had 1 atlas and 2 separators, you would have only needed 4 submesh renderers.
Theoretically speaking.

I mean you would need as many submesh renders as you see the number of Materials in your SkeletonAnimator's MeshRenderer's Materials array.

Pharan написал

How may submesh renderers did you have?

It was the same as the picture

Изображение удалено из-за отсутствия поддержки HTTPS. | Показать

2 submesh separators, so the character end up with 3 submeshes.

That are

  • Back Arm;
  • Body;
  • Front Arm;

Изображение удалено из-за отсутствия поддержки HTTPS. | Показать

The one highlighted in green is the submesh renderer you mean? Because it already existed when the bug was happening.

My bad. But you do need at least 4 and possibly 5 submeshes if you have 2 atlases.

This is because the atlas switch also automatically gets separated as a submesh (this is a requirement for correct rendering).
You can see this happen when you unfold the Materials array of your SkeletonAnimator's MeshRenderer.

If you only have 1 atlas, the 2 separators will give you 3 submeshes. Correct.

Pharan написал

....you do need at least 4 and possibly 5 submeshes if you have 2 atlases.
.....If you only have 1 atlas, the 2 separators will give you 3 submeshes. Correct.

Hey thanks for your help here. Probably in the end of this project the characters will have 2 atlases.
I ll apply this tip than.

:yes: