0.13.5 - Portrait scaling issue on large HUD

Moderators will move topics here from Help & Support once an issue has been confirmed and enough information provided to reproduce.
Post Reply
User avatar
Ninelan
Posts: 170
Joined: Wed Jun 30, 2021 10:30 am
Location: Under your bed
Contact:

0.13.5 - Portrait scaling issue on large HUD

Post by Ninelan »

There appears to be a mistake in handling the portrait in the large GUI as of 0.13.3!
1.png
1.png (294.81 KiB) Viewed 1125 times
The portrait is squished onto a square format, it is most apparent with taller faces.

This is how they used to appear in a previous version, and they used to vary from each other a lot in size depending on how much whitespace or how compact the sprite was.
2.png
2.png (119.95 KiB) Viewed 1125 times


As far as I know in classic Daggerfall, the portrait sprites are true to their size in context to the GUI.
As we see, the pixels in the portrait and the GUI are proportionate to each other, and of the same scale. The face does not appear bigger or smaller depending on what head you are using.
3.png
3.png (71.33 KiB) Viewed 1125 times
You can support me and in turn my art on my Patreon.
https://www.patreon.com/fireflyness

User avatar
Interkarma
Posts: 6938
Joined: Sun Mar 22, 2015 1:51 am

0.13.5 - Portrait scaling issue on large HUD

Post by Interkarma »

Thanks, I'll take another pass at this one. The way I used to handle this (in your second screenshot) is the most technically correct and flexible, but people complained about the smaller size on larger portraits.

It's not possible to do this exactly like classic here. The large docked HUD in DFU has to work across whatever resolution and aspect ratio the player throws at it, whereas classic only has 320x200 to worry about. I'm sure I can do better though.

User avatar
Ninelan
Posts: 170
Joined: Wed Jun 30, 2021 10:30 am
Location: Under your bed
Contact:

Re: 0.13.5 - Portrait scaling issue on large HUD

Post by Ninelan »

Oh yeah, an exact match would be something for pedants, even the old method was good enough on the smaller heard sprites to not really be significantly distracting.

As long as the face area on all the sprites takes up the same rough area, and is big enough in comparison to the box it sits in, it'll be just perfect.
It also doesn't hurt if things like hair go slightly out of the box. I know in DFU there's this buffer zone that's especially noticeable in the squished faces between the face and the portrait box edge, which is probably contributing to the smallness that got exaggerated on the bigger sprites.
You can support me and in turn my art on my Patreon.
https://www.patreon.com/fireflyness

User avatar
pango
Posts: 3210
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: 0.13.5 - Portrait scaling issue on large HUD

Post by pango »

I think the ScaleToFit mode was actually correct, to preserve aspect ratio; The reason why heads look smaller than classic is because headPanelRect size is conservative, leaving like 2 pixels of padding in all directions vs the HUD frame.
If headPanelRect is increased to the maximum allowed by the HUD (Rect headPanelRect = new Rect(5, 4, 37, 37) or so), all heads are scaled as large as possible, with no distorsion.

Large heads are then displayed correctly, but the smallest heads are displayed larger than in classic! If this is an issue, I think all face textures could be padded with transparent pixels up to the largest width and largest height of all faces before scaling. Maybe the same effect could be achieved without padding using an extra in-between Component of largest-face-width x largest-face-height size?

WIP: https://github.com/Interkarma/daggerfal ... ce-scaling

P.S.: Just noticed that some faces gfx are very tall, or already contain transparent padding... And do not always totally fit inside the HUD frame in classic
The quest is not over!
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Post Reply