I'm trying to rebuild a Paperdoll using Spine that I built once already using 3D software, but I'm running into some issues with the way Spine is optimized... As I'm reaching a fairly messy solution, I wanted to post here to see if there are any obvious ways I could achieve my ideal scenario:
- Separate renderer per slot
- Single material shared across all slots
- Textures and shader settings set through MaterialPropertyBlocks
Having a renderer per slot with settings set through MaterialPropertyBlocks is essential unless I had a separate material per slot per skeleton instance... which could mean pushing over 100 materials in a single frame. Maybe that's okay? But I'm fairly sure it's not a good idea.
I'm not too concerned about texture atlasing... although it would be nice to figure out how to incorporate it a little bit. The 3D version of my paperdoll used very little atlasing and worked fine... So I'm currently generating my own .atlas to make a material per image to satisfy the SkeletonDataAsset... this way I figure I can just override each material in the with a single material and set the textures with MaterialPropertyBlocks since I have other shader settings I'm going to have to set per slot anyway.
So, I have a Paperdoll SkeletonAnimation with a SkeletonRenderSeperator separating each slot and a SkeletonRendererCustomMaterials overriding all the materials with a single material. I'm about to look into figuring out how I can figure out how to associate a SkeletonPartsRenderer with a specific slot and attachment since I know that's fluid depending on the draw order... and finally set the MaterialPropertyBlock per slot.
Depending on how hard it is to determine which slot a SkeletonPartsRenderer represents, I think this should work... question is, are there better ways to achieve this? Or are there any major red flags with this plan?
Thanks!