Emulator Issues #12942
openArbitrary Mipmap Detection fails for water in F-Zero GX
0%
Description
Game Name?
F-Zero GX
Game ID? (right click the game in the game list, Properties, Info tab)
GFZJ01
MD5 Hash? (right click the game in the game list, Properties, Verify tab, Verify Integrity button)
81293462cf48c6a482c33e25c4097ac0 for US, i can't verify the japanese version
What's the problem? Describe what went wrong.
F-zero GX uses a similar effect to Mario Sunshine in stages with water. Attached are some renderdoc captures of textures and their mipmaps, showing that the mipmaps do indeed contain different textures. Despite this, arbitrary mipmap detection does not seem to trigger on them.
What steps will reproduce the problem?
Play F-zero GX, and go to Big Blue: Ordeal, the last track of Emerald Cup. Alternatively, use this savestate for 5.0-16607, which is for the japanese version of the game, with a debug menu. This will load you into the stage in the debug stage viewer, so you can freely move the camera. https://cdn.discordapp.com/attachments/390278971880636428/982778464501383228/GFZJ01.s01 . Then, simply turn on arbitrary mipmap detection, then change the anisotropic filtering option in dolphin and watch as the depth of the specular mipmaps change.
Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.
5.0-16607
Is the issue present in the latest stable version?
[Yes/No and version number here]
If the issue isn't present in the latest stable version, which is the first broken version? (You can find the first broken version by bisecting. Windows users can use the tool https://forums.dolphin-emu.org/Thread-green-notice-development-thread-unofficial-dolphin-bisection-tool-for-finding-broken-builds and anyone who is building Dolphin on their own can use git bisect.)
[First broken version number here (if applicable)]
If your issue is a graphical issue, please attach screenshots and record a three frame fifolog of the issue if possible. Screenshots showing what it is supposed to look like from either console or older builds of Dolphin will help too. For more information on how to use the fifoplayer, please check here: https://wiki.dolphin-emu.org/index.php?title=FifoPlayer
[Attach any fifologs if possible, write a description of fifologs and screenshots here to assist people unfamiliar with the game.]
3 frame fifolog of the stage in the debug stage viewer
https://cdn.discordapp.com/attachments/390278971880636428/982779802446598225/fzerojp.dff
What are your PC specifications? (CPU, GPU, Operating System, more)
ryzen 3600
16gb 36000mhz CL16 ram
GTX 1060
Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)
[Anything else here]
Files
Updated by Luig over 2 years ago
Strange thing i just noticed! The pit zones that recharge your boost, Arbitrary Mipmap detection actually works for those, as those use the same effect! So it works for that, but not for the water, just to clarify.
Updated by Techjar over 2 years ago
Arbitrary mipmap detection is just a heuristic that works by comparing a downscaled version of the full size texture to the mipmap actually in the game. If it looks different enough (this threshold is configurable as ArbitraryMipmapDetectionThreshold under Video_Hacks, it has a default value of 14), we flag it as an arbitrary mipmap. As such, it doesn't work 100% of the time. There unfortunately isn't better way to detect these mipmaps. There are perhaps ways of improving the heuristic, but speed is a key consideration.
Updated by Luig over 2 years ago
So would it just be best to change the game's default value till the water works?
Updated by pokechu22 over 2 years ago
- Subject changed from Arbitrary Mipmap Detection nonfunctional in F-Zero GX to Arbitrary Mipmap Detection fails for water in F-Zero GX
I can confirm this issue with the fifolog you've attached. But oddly, I only see 2 mipmaps for the first water texture (there's the 256 by 256 base texture, then a 128 by 128 mip and a 64 by 64 mip). I don't see that 3rd 32x32 one in RenderDoc or with Dolphin's texture dumping function (where the first one is tex1_256x256_m_95174e72264b2d63_14
and the second is tex1_128x128_m_963fc8f2bbf430b9
).
I hacked in some functionality to output the arbitrary mipmap heuristic's value with texture dumping, and for the first water texture the final average is 9.182014 (where the value for mip0 → mip 1 is 2.1886106, and for mip 1 → mip 2 is 16.175419), while the second water texture has a final average of 8.320979 (mip 0 → mip 1 is 0.99523807, mip 1 → mip 2 is 15.092288, and mip 2 → mip 3 is 8.87541). Both of these exceed the default threshold of 14 for one of the mipmaps, but since the average value is used it doesn't get triggered (the threshold would need to be set to 8.3 or less).
I also tested making HasArbitraryMipmaps
always return true and it does behave correctly in that case, so it's only a detection issue here; the game isn't doing something else that's breaking it.
Updated by JMC4789 over 2 years ago
You could try the value from Super Mario Sunshine's INI and see if that works. Forgot all about it.
Updated by AdmiralCurtiss over 2 years ago
Maybe it'd be worth exposing a 'always use native mips' option? Not sure how much worse that makes non-arbitrary textures but it'd definitely be useful for checking if a texture has arbitrary mips or not -- plus it would be very cheap, and likely even work with GPU texture decoding!
Updated by pokechu22 over 2 years ago
Here's an example at 4X IR: without arbitrary mipmap detection: https://i.imgur.com/R1iHdJ5.jpg and without adjusting the mipmap level for higher IRs: https://i.imgur.com/9iNSCsU.jpg (i.e. HasArbitraryMipmaps
is always true). The quality is noticeably worse, especially on the roadway.
Updated by iwubcode over 2 years ago
FWIW, there was a discussion on the graphics mod PR that maybe it'd be worthwhile to be able to call out arbitrary mip map textures in some sort of graphics mod pack or as game ini configuration as an alternative to relying on the configuration. This wouldn't help for discoverability but it would solve the issue of false positives and would avoid having to tweak the algorithm in specific scenarios.
Updated by pokechu22 almost 2 years ago
- Related to Emulator Issues #12047: Arbitrary mipmap detection fails for certain textures in Toad's Factory added