06-29-2023, 03:18 AM
(06-25-2023, 01:46 AM)DerVVulfman Wrote: Hrm... So now I have a fun (not) issue with the Layered Spritesheet tool. Everything I currently have is functional, but with a feature that needs to be addressed. And that feature is that certain layers need to be connected when it comes to chromatic alterations.
In other words... If I change the hue or color of the character's body, things like overlaid faces, ears or tails should also be immediately affected by the same change. Likewise, hair-based layers would have their own links as it were.
I did this when I created CharGen Ex. However, that tool had all the paths hardcoded. Layered Spritesheet however has all the base resource pathways defined within the INI, so this has to be a scripted system. And each time any chromatic change is made to one of the resources, Layered Spritesheet will need to check a 'list' of links. And if a list is detected... it runs the changes upon all other resources defined.
Well, I got that stage done!
If I have a spriteset in the works with a body, a custom head (mebby klingon?), and special elf ears which all belong to a suggested 'Skin Set', I can adjust the Hue and/or Color Balance which will automatically set and adjust all the layers at the same time!
Now there is a drawback to this. After it process the change to the hue and color balance data to a given set (the body, ears, etc), the system must affect the actual graphics for that set. So when one changes the hue to a set of ears, it not only sets the value to the ears, body and related content, it 'reloads' and changes the hue to all of the related content. And likewise if the color balance is changed, though it must execute the scripted color balance system which takes longer.
Currently, this feature now cycles through >ALL< of the layers, not just those affected. Aka... bummer. If you had changed color balances to Hair, eyes and skin, making a change to the color of a sash would ... sadly... cycle through and reload the hair, eyes, and skin which would take time that should NOT be spent.
I do have something in mind (as I usually do) in order to lessen this amount of graphic processing. As I said, it is currently cycling through all of the layers. This I plan to change so it checks to see if the change is to merely a single layer or a layer set, and then just process the layer or layerset. While color balanced graphics will still take time depending upon the end-user's PC, at least the processing time should be lessened.
But currently, changing the color balance and/or hue of one item in a layer set, the change affects all within that layer set.