-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to set depth for head layer #2657
Comments
Can you document here why you want the head specifically? Edit it into the original post to make it easier to read the issue. Basically, what are you attempting to do, what issues are you hitting, why adding this feature would help. When it comes to making changes, it's best for us if we fix the larger problem, rather than address the specific roadblocks of the moment. Engineers might think of a better solution, and we might find something that helps more people. Knowing your intentions helps, overall. From what my understanding, the entire paperdoll system could use a depth system, rather than force users to put gaps in their sprites. If we're going to fix heads, we might wanna think this through |
After offline discussion and some investigation on my end, I've determined the following. The current PaperdollRenderer has these categories of paperdoll parts to render:
These are listed from "back" to "front", as drawing something last will make it be on top of what was previously drawn. "Cloak Interior" tries to draw the interior sprite of your Cloak 2 (or Cloak 1 if the player only has one cloak). "Body" draws the naked headless body first, draws the underwear headless body if Player Nudity is disabled, then draws the head. "Items" draws all the equipped items in "draw order" (a property of each item). By this design, all heads are always drawn before all items, and therefore are behind all clothing and armor, but always above the body. Long hair on the left side looks "behind" the shoulder if the shoulder is clothed, and "in front" if the shoulder is naked. Pretty sure this inconsistency is a classic issue. It does not require modded graphics to observe. After my investigation, I've determined three approaches to fix this issue: The first solution has the issue of extra complexity when it comes to sorting equipment, but I think it's not that bad. Version A is opt-in for mods that want to fix this, while Version B always fixes the inconsistency without mods, with the drawback that some clothes or armor might be more covered with some faces. For solution two, the render order might look more like:
(We don't have to do the hand thing yet, it's just an idea for future proofing) With this, modders would simply have to provide an extra texture with an annotation on the name (ex: FACE14l0_Front.jpg), and if available, DFU would pick it up and render it. In addition, having a "_Helmet" variant for faces could be useful, as modders could make the face bald in order to avoid clipping through any helmet. Anyway, some ideas for whoever wants to tackle this. I'd rather not do 1a, as I feel it's not fully flexible and requires special casing all future similar problems, but it's also the easier and least controversial solution, so I'll take whatever someone manages to achieve. |
I'd rather not touch this value in DFU, it can probably be changed through code by either changing the base loincloth/long skirt, or by creating new item variants that have different draw orders. But that's not terribly accessible to artists. |
Would it be possible to have an in-game setting to change the depth for the head sprites? And I suppose also the same for helmets
Alternatively, make it possible to set the depth for sprites in an xml file
The text was updated successfully, but these errors were encountered: