Dolphin, the GameCube and Wii emulator - Forums

Full Version: Incorrect assumption about pixel aspect?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Hey guys,

Are you assuming 1:1 pixel aspect (or 1.33:1 in anamorphic widescreen) when you're copying from external to the final window? (Referring to NTSC/480p here, obviously PAL is different). If so, that's actually incorrect. The Wii does *not* display square pixels over NTSC or 480p.

Problem is, a game's graphics engine programmer who knows about the proper pixel aspect will adjust his render aspect to compensate for the slightly non-square pixels. If you then assume 1:1 pixels and a 4:3 displayed image (or similarly for widescreen) in Dolphin, his game will look squished, because you're not acting like the hardware did.

If you want the actual numbers for a Wii...

NTSC mode, assuming a 640x480 frame:
- Fullscreen pixel aspect is 0.9421875:1
- Widescreen pixel aspect is 1.25625:1
- Fullscreen image aspect is 1.25625:1
- Widescreen image aspect is 1.675:1

All 640x480@60hz modes are roughly the same. 480p and EURGB60 are a hair wider, but not enough to matter if you want to keep it down to just the two adjustments I'm talking about here. I can regurgitate those numbers too if anyone does care.

In PAL, assuming a 640x528 frame:
- Fullscreen pixel aspect is 1.158125:1
- Widescreen pixel aspect is 1:540625:1
- Fullscreen image aspect is 1.40378:1
- Widescreen image aspect is 1.86742:1

Note that PAL had a totally wrong aspect to begin with, even before adjusting for pixel aspect, since the Wii frame buffer can't hold the full 640x576. PAL images on a Wii wouldn't be 1.3333:1 or 1.7778:1, even with square pixels.

I think there are some display modes I'm not accounting for here, which use slightly different pixel or image aspects. These are just the ones I know about. I may be thinking of PS2, actually, so maybe this really is all.

So... what to do?

Easiest solution is to say screw it and deal with the slightly-wide images. I can't get behind this option. Smile

Next up, the so-so solution on the user's side is to switch to windowed mode, enable stretch-to-fit, and diddle the window until the aspect looks right. Not a great solution, but it works. Still, full-screen mode is so much nicer...

So, for full-screen, I think the easiest fix in code would be to offer a simple, numerical, advanced-user-style, "scale to screen" setting, with two factors, one for horizontal and one for vertical. Less than 1.0 pillarboxes or letterboxes, and more than 1.0 crops. That gives complete control to those who know how to use it.

Slightly better would be to add a dropdown next to those numbers with a few standard presets, plus "Custom" for those who want to enter the numbers by hand. The presets could be written in For-Dummies style, e.g. "Fix for Slightly Too Wide / Fix for Slightly Too Tall / Custom Fix".

I'm not sure there's a super-duper fix-all solution. A lot of programmers never try to accommodate the oddball pixel aspects, so you can't just fix it across the board with one change. I think a manual option is the only good choice.

Anyway, food for thought. It's non-critical, but I figured I'd throw it out there and see if anyone thinks it's an interesting problem to solve.
Are you talking to the developers? Are you saying the current implementation is not correct?
Yes that's what he is saying.

Screenshots please.
Ah, yeah. Sorry if that wasn't clear. Smile

(09-07-2013, 03:25 AM)NaturalViolence Wrote: [ -> ]Yes that's what he is saying.

Screenshots please.
Okay, using 3.5-2274 with these settings:
- full-screen
- 1920x1080
- auto *or* 16:9 aspect
- internal res is window size
- don't skip EFB accesses
- EFB copies to RAM, no caching
- external frame buffer disabled
- progressive scan enabled
- PAL60/EURGB60 on or off, doesn't matter

Attached is what I get when playing Fatal Frame 4 (NTSC-J), and also what I get if I multiply their widths by 0.942.

You can see the circles get ... well, circular, and her face gets more proportional. Well, anime-proportional, but you know what I mean. Her irises get round, anyway.

The center pair is the best example I could find. Turns out that, while I can see the effect quite clearly, finding something with a known aspect ratio to demonstrate it with is difficult in this game. Smile

It's easiest to see if you open a pair in two tabs or two windows and just flip between them.
Quote:Turns out that, while I can see the effect quite clearly, finding something with a known aspect ratio to demonstrate it with is difficult in this game.
I think it's pretty clear when looking at any of those screenshots together that 1:1 is wrong.
I'm going to assume the first of each comparison is dolphin and its incorrectness
(09-07-2013, 08:21 AM)ExtremeDude2 Wrote: [ -> ]I'm going to assume the first of each comparison is dolphin and its incorrectness
Right.

By the way, to illustrate what I meant about the aspect only needing correction in some games, here's a Dolphin/corrected pair from Xenoblade Chronicles. You can see the 3D render was set up to accommodate the non-square pixels (note his medallion after correction), but the 2D UI was not (note the circular icon below his medallion). Sometimes, you can't win. Smile
Quote: You can see the 3D render was set up to accommodate the non-square pixels (note his medallion after correction), but the 2D UI was not (note the circular icon below his medallion). Sometimes, you can't win.

That's usually the normal behavior, which is why dolphin has mostly ignored it up to this point. Fatal Frame 4 is more or less a weird exception.
(09-07-2013, 11:26 AM)MaJoR Wrote: [ -> ]That's usually the normal behavior, which is why dolphin has mostly ignored it up to this point. Fatal Frame 4 is more or less a weird exception.
True, it's pretty commonplace now for the UI to neglect this. With many games employing Scaleform (Flash) for UI, there's no real programmer involvement or intervention going on. The UI/UX folks are mainly content creators and don't tend to be detail-oriented about exact scales and other such fine points of display hardware.

Still, speaking purely for myself, it's usually the 3D scene I want to have the correct aspect, so I'd favor correcting a game even if the UI became incorrect.

Edit: Ah, I think you meant it's normal behavior for *all* render phases to neglect the correct aspect. I think all *major* dev houses, at least ones with their own long-existing engines, have discovered these discrepencies and added tweaks to accommodate them in all games going forward. I assume smaller places, e.g. one-hit-wonders, are much less likely to have noticed or bothered.
Does this only affect Wii games? I've been playing many GameCube games and haven't noticed that the aspect ratio is incorrect.
Pages: 1 2 3 4