Skip to content
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

Exported UI images don't match width and height #15

Closed
drlocke opened this issue May 17, 2022 · 5 comments · Fixed by #125
Closed

Exported UI images don't match width and height #15

drlocke opened this issue May 17, 2022 · 5 comments · Fixed by #125
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@drlocke
Copy link

drlocke commented May 17, 2022

When extracting the map from Apex Legends, then the info column in the Legion+ application is showing "Width: 4096 Height 4096" but after the export the file size is 4256x4256 and the bottom and right sides have weird artefacts. I've tried with all different image formats but always got the same wrong file size. Tested with version 1.3.4.

How to reproduce:

  1. Only enable the "Load UI Images" in Legion+ settings
  2. Load a map file. For example "Apex\paks\Win64\mp_rr_tropic_island_mu1.rpak"
  3. Export the uiimage entry
  4. Take a look at the details (size values) of the exported image

Legion+ View

grafik

Windows Details

grafik

@biast12 biast12 added the bug Something isn't working label May 17, 2022
@IcePixelx
Copy link
Collaborator

Artifacts only occur on the outside of the asset which can be removed in post production.
Not a priority and will get a no fix for now.

@IcePixelx IcePixelx added the wontfix This will not be worked on label May 18, 2022
@drlocke
Copy link
Author

drlocke commented May 18, 2022

@PixieCore That's not true! The artefacts are about 27 pixels long but the image size is 4256x4256 which leads to 4256 - 27 = 4229 which is still not 4096 !
I've also checked the relative positions from an origin like top left and the positions are NOT correct. Some maps seems to be shifted from one side to another and the arena maps are looking like they are shifted to the top left corner which results in transparent artefacts on the right and bottom side.

Please reopen and have a look again.

@r-ex
Copy link
Owner

r-ex commented May 18, 2022

i'll reopen this but i don't expect it to be fixed any time soon.
we don't really understand how ui image data is supposed to be interpreted by the game, so it's kinda difficult to tell where the extraction "goes wrong" (or where it deviates from a "accurate" image)

@r-ex r-ex reopened this May 18, 2022
@drlocke
Copy link
Author

drlocke commented May 18, 2022

How about handling them like normal images?
As far as I remember the old Legion tool were extracting them like that. Of course, it's way more nice to have them sorted as uiimages, but I prefere perfectly extracted images and sort it later on.

@r-ex
Copy link
Owner

r-ex commented May 18, 2022

unfortunately it's not possible to treat it like that anymore:

tldr; respawn changed how ui images work in season 11

in season 11, respawn made a pretty major change to how UI images are stored/handled by the game, introducing the "uiia" asset type (which is "UI Image" in LegionPlus)

this is totally different to how ui images used to be handled, where there was a "txtr" asset ("Image" in LegionPlus, the asset that you would have exported previously) referenced by a "uimg" asset (currently unused by the game)

with this new asset type, the image data is split into chunks of different formats (BC7U and BC1U), which are defined by some kind of table at the start of the asset's raw data

the image data is also "swizzled", and sometimes even compressed, requiring a whole lot of extra processing

all of this was reversed by Porter before we started working on LegionPlus, and consequently no one else really knows how it works

@r-ex r-ex closed this as not planned Won't fix, can't repro, duplicate, stale Sep 1, 2022
@biast12 biast12 removed their assignment Jul 5, 2023
@r-ex r-ex closed this as completed in #125 Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants