• Editor
  • Having one rig, have two seperate altases

  • تم التحرير
Related Discussions
...

Hello Esoteric!

I'm working with a company where we are building a game with characters and musical instruments. The idea is, the characters will have multiple skins (there is no set amount of skins, as they will be added over the life of the game) for the characters, and same for the instruments. The issue we are running into, is that the atlas for the instrument and character are all one sheet, as presently, I have animated each instrument, together with each character (bassist, guitarist, drummer, vocalist).

So swapping out the instrument as it stands now, means creating multiple versions of a base character atlas through Spine, and then having multiple guitars with the character remaining unchanged in each atlas, but the guitar always being different. Likewise, for the character, changing the character skin in the atlas, but the instrument remaining the same, so that only the character changes, and not the guitar. We thought of building the skins right into the rig, but because we expect a huge number of skins, it would make that impossibly large, memory wise, for each rig.

My next thought, was to have a separate rig for a character, and then a separate rig for an instrument, and then import that instrument rig project, into the character rig project, and then animate them together that way. Is this a viable solution to the problem? My thought being that the imported rig project (the instrument) would now have it's own atlas, separate from the character. Or is it impossible to have the character rig interact with the imported instrument rig?

Hello, you don't need to have separate rigs:
I'd recommend to have a skin or set of skins for the characters, and the same for the instruments. Combine them at runtime, pin them in the editor using the skins view so you can see them together:
Skins view - Spine User Guide
Blog: Spine 3.8 released: Improved skin API

But most importantly, organize your images folder structure so that there's a folder for the instruments, and another for the characters, then pack them using texture packer as explained here:
Texture Packing - Spine User Guide: Folder structure

Thanks for replying! So basically, instead of leaving the instrument in the same image source folder, place the instrument in it's own folder, and get the rig in Spine to point to that folder instead?

You'd have a folder structure as follows:
(example)

images/
├── instruments/
│   ├── piano.png
│   ├── trumpet.png
│   ├── violin.png
│   └── traingle.png
└── people/
    ├── green-dress-person/
    ├── red-hair-boy/
    ├── long-hair-girl/
    └── teacher/

Ah ok! Now is this the folder structure you refer to the one within the Spine Project itself, in the Hierarchy, or the actual folder structure of the source images on my hard drive, in this case my C: ? ALSO, I noticed the folder structure is ignored when exporting the atlas and JSON together. If I export the JSON on it's own, then using the texture packer, export the images on their own, will the JSON still work with the separately exported atlases?

Also I attached three images, the first image is my Spine Skin Hirearchy, and the second my source folder structure on my C:, the third, the folder structure in my Spine Images, reflecting the structure of my images source folder on my C:

Gryphon509 wrote

is this the folder structure you refer to the one within the Spine Project itself, in the Hierarchy, or the actual folder structure of the source images on my hard drive, in this case my C: ?

I suggest to have this in your C and reflect it in your Spine project. Use find and replace to easily change the paths of your images if needed:
Tree - Spine User Guide: Find and Replace

Gryphon509 wrote

ALSO, I noticed the folder structure is ignored when exporting the atlas and JSON together.

Yes, this is precisely why you'd want to use texture packer instead.

Gryphon509 wrote

If I export the JSON on it's own, then using the texture packer, export the images on their own, will the JSON still work with the separately exported atlases?

Yes it will 😃

Gryphon509 wrote

Also I attached three images, the first image is my Spine Skin Hirearchy, and the second my source folder structure on my C:, the third, the folder structure in my Spine Images, reflecting the structure of my images source folder on my C:

Looks like you need to reorganize your structure to make sure the instruments are in their folder, unless you want to have an atlas page for each single folder you have here.