RemDust I learnt recently about "GetRepackedAttachments" but I'm not sure how to use it on so many folders or if there is a better way of doing this ?
Could you please explain what you mean by "you're not sure how to use
GetRepackedAttachments on many folders"? In general
GetRepackedAttachments is called on a list of
Attachments, no matter what atlas page texture they are coming from. Folders where these attachmentr originally came from are not relevant here in any way.
GetRepackedSkin serves to pack those given attachments to a single new atlas page texture.
RemDust While it's very easy to manage (I can set any material/shader to any "folder" (specific for body, weapons etc) it seems very unoptimised (I have different folders for arms, legs etc when they should be exported as a "body" atlas and have one shared material ) 😉
I'm not aware of your typical skeleton setup, whether you can mix any type of arm with any type of leg. Nevertheless, attachments should ideally be grouped according to which will likely be used
- 1) in combination and
- 2) in succession in regards to draw order.
So it does not sound too efficient to have one atlas page for arms, one for legs, one for chests, one for heads, and so on, if you end up always requiring all 15 of the atlas page textures in the end for a complete skeleton. You might instead want to group by typical combination, like having the base skin-underlayer ("real" skin) on one atlas page, low-tier armor on another atlas page (leather armor), separate from high-tier armor in another (obsidian armor) atlas page. Then you might additionally also think about grouping by draw order, which groups skin and underwear together, and groups "outer" items like gloves, helmets and weapons together as well.
If your game allows any combination of arm / leg / head / helmet from all your current atlas pages (folders), then you might want to give repacking a go to combine them to a single atlas page.