decoamorim

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:



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.



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.



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?
Developer/Founder at DCF Studios
http://www.studiosdcf.com/
Author of
Cruz Brothers[PS4 / STEAM] [upcoming on XboxOne] - http://www.cruzbrothersgame.com
Bunny Battle Arena[STEAM] - https://store.steampowered.com/app/872340/Bunny_Battle_Arena/
Аватара пользователя
decoamorim
  • Сообщения: 126

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
  • Сообщения: 5366

decoamorim

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.



What is the "Layer Mix modes" for ? It could be that? (just saw that this is for Mecanim layers)
Developer/Founder at DCF Studios
http://www.studiosdcf.com/
Author of
Cruz Brothers[PS4 / STEAM] [upcoming on XboxOne] - http://www.cruzbrothersgame.com
Bunny Battle Arena[STEAM] - https://store.steampowered.com/app/872340/Bunny_Battle_Arena/
Аватара пользователя
decoamorim
  • Сообщения: 126

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.
Аватара пользователя
Pharan
  • Сообщения: 5366

decoamorim

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.
Developer/Founder at DCF Studios
http://www.studiosdcf.com/
Author of
Cruz Brothers[PS4 / STEAM] [upcoming on XboxOne] - http://www.cruzbrothersgame.com
Bunny Battle Arena[STEAM] - https://store.steampowered.com/app/872340/Bunny_Battle_Arena/
Аватара пользователя
decoamorim
  • Сообщения: 126

Pharan

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
  • Сообщения: 5366

decoamorim

Pharan писал(а):How may submesh renderers did you have?
It was the same as the picture


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

That are

- Back Arm;
- Body;
- Front Arm;



The one highlighted in green is the submesh renderer you mean? Because it already existed when the bug was happening.
Developer/Founder at DCF Studios
http://www.studiosdcf.com/
Author of
Cruz Brothers[PS4 / STEAM] [upcoming on XboxOne] - http://www.cruzbrothersgame.com
Bunny Battle Arena[STEAM] - https://store.steampowered.com/app/872340/Bunny_Battle_Arena/
Аватара пользователя
decoamorim
  • Сообщения: 126

Pharan

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
  • Сообщения: 5366

decoamorim

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:
Developer/Founder at DCF Studios
http://www.studiosdcf.com/
Author of
Cruz Brothers[PS4 / STEAM] [upcoming on XboxOne] - http://www.cruzbrothersgame.com
Bunny Battle Arena[STEAM] - https://store.steampowered.com/app/872340/Bunny_Battle_Arena/
Аватара пользователя
decoamorim
  • Сообщения: 126


Вернуться в Unity