vallcrist

  • Jul 24, 2019
  • Joined May 18, 2017
  • Hey Erikari, thanks for the swift response.

    I am aware of the error messages, as I stated in my post. This was an error my artists made, no doubt on that.
    My post was more about asking if there is any way I can turn this around without investing a lot of work hours into reanimating stuff. Maybe a different Region drawing function that accounts for trimmed whitespaces in atlas or something like that?

  • Hello guys. ๐Ÿ™‚

    So, we've hit another problem. The artists that produced the cloths in our game actually did some of them with a lot of extra white space around the item.
    Problem with this is that this is adding up to about 50% extra size on the texture packing, which is a lot when you factor in memory and download constraints of the project.

    I tried using Spine's built-in "strip whitespace" options when exporting, but turns out using it actually ruins everything, 'cause the meshes kinda depend on those whitespaces to work. That means if we want to optimize this, the artists will have to basically reanimate all problematic clothes (which are a lot, and takes time).

    But, I figure there might be a way to do something similar to how unity handles this. if you add an image that can be trimmed to an unity atlas, it actually trims it up, but it saves the extra space information somewhere. That way when you actually use the sprite inside the game you do get the extra whitespace that was there originally, it's just a packing time optimization that results in smaller atlases. Could we do something similar for Spine atlases? How hard would it be to pull this off?

    Thanks for your time!

  • Hello everyone. ๐Ÿ™‚

    We're hitting some issues in our project. Our main character is kinda huge (30+ textures on the atlas), mainly due to it being authored the wrong way. Due to that we're hitting some issues, specially regarding RAM usage and whatnot. Sadly we can't really afford to re-author the character at this stage of development.

    Thing is, out of these 30 textures, realistically only 34 should be used at once due to the way the game is structured (Thing fashion game with wearable clothes), so one thing we were thinking about is having clothes separated into multiple, smaller atlases, and load/unload them as needed throughout the game so we could manage the RAM usage a bit better, but I could not find a way to do that.

    The MixAndMatch example was a nice try, but the skeleton was authored in a really sub-optimal way that does not let us use it. So, does this idea look feasible/good? If so, how can I do that? I found no interfaces to assign different atlas assets to a skeleton so far.

    Thanks for the help. ๐Ÿ™‚

  • We indeed have a bunch of atlas pages, haha.
    This skeleton currently has 13 different atlas pages, I'll try updating our unity runtime and see if this fixes it? Otherwise I'll see if I can isolate the issue for further debugging

  • Hello everyone. ๐Ÿ™‚

    we've been facing a weird atlas glitch in our project, sometimes, at specific animation frames and with specific attachments, we get what looks like an atlas desync for a frame or two, looks like this:

    On the next frame this gets fixed and it goes back to normal

    This does not happen in the Spine Editor, only during runtime and with a specific set of attachments. Any idea why this is happening and how to fix it?

  • Hey there. ๐Ÿ™‚

    I need to do this in Unity: during a certain event, fast forward the current animation to the end and apply it's animation properties to the skeleton. I tried some stuff already like iterating over the track entries in the AnimationState and setting their time to 0.99f, but nothing I did seemed to achieve this result. Any tips?

  • Ah, I see. So I can create an atlas with just the needed pieces out from the usual export pipeline. That helps a lot, thanks!

  • @Nate, playing with both atlases in the runtime (Unity, in this case) isn't the issue, though.

    The thing is, I don't need all attachments from the skeleton to be available in the hi-res version. Here's why: The first time the player meets the character he can customize the facial attributes, this is the scene where we need a hi-res version. In that scene the character has a default set of clothes, so all we need in this atlas would be all the facial variations (noses, lips, hairs, eyes, etc) and the 3 pieces of clothing the character has on that scene. Having all pieces of clothing in this hi-res atlas increases the size by a lot and is totally not necessary.

    That's why I added this question to the editor sub-forum, because I want a way to export the hi-res atlas with only a subset of all the attachments, without having to manually remove all attachments from the model prior to exporting.

  • Hey man, apologize for just seeing this message now. We've ended up ditching the sprite in unity altogether. we're going with one giant mess of a spine file. =P

    We've gone this way because lots of clothes required custom animation. :/

  • Hello there. ๐Ÿ™‚

    I have a worflow related question, if this is not the appropriate category please apologize.

    Here's my use case: We're doing a game that requires extensive character customization, involving both clothes and facial features. We currently build the assets and export them from spine at a resolution of 0.4, this makes it look clear in the game due to how the character model shows up on the screen.
    When we added the option to change the facial features of the character we also added a scene that puts a zoom in the character's face, and the resolution of 0.4 looks blurry and awful, after some testing we decided that 0.7 looks sharp enough in that scene.

    Now here's the issue, we need a 0.4 model and a 0.7 model in the game, however, the 0.7 model does NOT need all the pieces available in the 0.4 model, since it is only used in one specific scene (it only needs one basic set of clothes instead of all the cloth items in the game), we could export the 0.4 model, then remove all "useless" attachments and export the 0.7 model, but that does not seem to be a good workflow as this seems error prone and tiresome. Is there a better way to achieve the desired results?

    tl;dr: Is there a way to export a model with all attachments in a size, and a model with stripped down attachments in another size, that doesn't involve removing the attachments manually every time we need to update the models?

  • Oh I see, so it's possible to add images after loading the skeleton? I always assumed you had to load it all together at once.

    That's really helpful guys. I think I can take this knowledge and build a proof of concept of sorts to test it out. Thanks a lot!

  • Hey Nate, thanks for the reply. ๐Ÿ™‚

    What I mentioned about size has nothing to do with the Spine internals, it is exactly about the image data you mentioned. Currently all the attachment files for every cloth item are on the Spine Project, and when we export those to Unity, it generates about 8 2048x2048 image files, and currently we have only 1/10 of the final clothes ready.

    In the ideal world I would like to have the core of the model (base skin layer + default clothes) being exported from spine, and have all the rest of the clothing items externally, preferably bundled in "Sets" for easier loading, and in a way that all these clothes can be mix and matched even between sets.

    Since I'm kinda new to Spine I'm not sure how to do that, or if it's even possible. From your links and scavenging the forum so far I saw that I can create an attachment during runtime, with a Unity Sprite. That's a good way forward already, but then we hit another issue: Our images are authored in a higher resolution and downscaled via spine when exporting the skeleton to Unity. That works well for the "All-clothes together" model, but in order to have the clothing parts inside unity for runtime loading, we would have to generate all the textures in the correct size, right?

  • Hello there everyone. ๐Ÿ™‚

    Need a bit of help over here, we're working on a 2D fashion game, the game is supposed to have a lot of different clothes for the player to pick from (1500+).

    The way the clothes are being made is that the main character has a "Master" Spine project where you got the character model with slots and different skin tones, and all clothes on the same project, as attachments. Inside the game we turn on/off each attachment depending on the clothing items being worn.

    The problem with this approach we're now seeing are 2:
    1) File size is gonna be ridiculously huge when we hit 1500 clothing items, there's no apparent way to split all the clothes in chunks that can be downloaded as needed.
    2) Every time we make an update with a new batch of clothes, all the items will have to be redownloaded

    I realize those 2 issues are deeply ingrained in the way we're authoring the assets and using it ingame, but is there a different way to tackle these requirements with Spine? We could maybe do multiple overlayed skeletons, but then we wouldn't be able to mix and match clothes from different batches, I assume.

    So, any tips/insights on what we could do?