RELEASE Noesis-Mod - Tiling texture for UE4

Discussion in 'Switch - ROM Hacking, Saves, Translations & Tools' started by masagrator, Apr 9, 2019.

  1. masagrator
    OP

    masagrator File digger

    Member
    9
    Oct 14, 2018
    Poland
    Some of you probably remember Noesis made by Rich Whitehouse - big tool for extracting data from many games. It turns out that it has hidden function for tiling UE4 games textures.
    You need Unreal Engine 4.19!
    Changes in code

    Restrictions:
    Informations

    Both functions are working only with *.uasset (+ *.uexp & *.ubulk, but it's loaded by *.uasset file only), so you need installed Unreal Engine 4.19 to make textures.

    Making textures in Unreal Engine 4 will need tutorial for people who are too scared to learn by mistakes.
    Still I'm learning how this textures works.
    As it's a lot of informations, it will be added many days later.

    F.e. Octopath Traveler logo made by me.
    When it's untiled
    Bez nazwy2.
    When it's tiled
    bez_nazwy2.
    When putted to Octopath Traveler:
    Mapped.

    You can download tiled image (make sure that this is 55,4 kB PNG, not recompressed image) and make from this cooked texture in Unreal Engine for Octopath Traveler and swap files with
    Code:
    \Content\UI\Title\Texture\UiTX_Title_logo_00.uexp
    \Content\UI\Title\Texture\UiTX_Title_logo_00.uasset
    How to get tiled image:
    Copy assets from Cooked folder to noesis folder. Drop *.uasset file ready for tiling to "Swizzle.cmd". It will create new png that needs to be cooked again in UE4 (better with version that your game uses) with the same settings. And that's it.

    How to untile texture:
    Copy assets to noesis folder. Drop *.uasset file ready for untiling to "Unswizzle.cmd". It will create PNG with the same name.

    Big thanks for making this tool by Rich Whitehouse. You can download whole tool here (without enabled tiling function and with broken untiling function for UE4 textures):
    https://www.richwhitehouse.com/index.php?content=inc_projects.php&showproject=91

    Code:
    #10.04.2019: added v2 with repaired untiling textures and tiling textures with dimensions different than multiplication of 128 (still not recommended for some files).
    //added Unswizzle-nop.bat for assets made by swizzle.bat without regular resolution (dimensions are not multiplications of 128 with padding)
    #27.04.2019: added v3 with support for DXT5 textures.
    #09.06.2019: added v4 with updated support for DXT5 textures (it was not working correctly for textures with height <= 256)
     

    Attached Files:

    Last edited by masagrator, Jun 9, 2019
  2. masagrator
    OP

    masagrator File digger

    Member
    9
    Oct 14, 2018
    Poland
    Added new version with working untiling textures. Added Unswizzling.bat.
    It was just a matter of adding "4" to height for correct untiling and swizzling textures with different dimensions than multiplication of 128 (still it's not working properly for some sizes).
    Now we can use in game textures with nonstandard dimensions without walking in hex edit.
     
    Last edited by masagrator, Apr 10, 2019
  3. fraggerman91

    fraggerman91 Member

    Newcomer
    2
    Jan 4, 2016
    Germany
    The (un-)swizzling works fine for me. I can confirm that by looking at the textures in noesis and umodel.
    For some reason the re-cooking seems to mess something up though. The texture still looks fine(like it was swizzled on the switch) in noesis but when I load it on the switch it's all garbled.
    Some screenshots and the steps I take:
    • No changes done:
      Warning: Spoilers inside!
    • Unswizzle and re-cook:
      Warning: Spoilers inside!
    • Reswizzle and re-cook:
      Warning: Spoilers inside!
    • This is how it looks on the switch:
      Warning: Spoilers inside!
    Just loading the unchanged one works but if I run it through the un- and reswizzle and cook it it doesn't work any more even though it looks fine in noesis. Any idea why this happens? Do I need to set any special parameters or should the default parameters for dxt1 work?
     
    Last edited by fraggerman91, Apr 10, 2019
  4. masagrator
    OP

    masagrator File digger

    Member
    9
    Oct 14, 2018
    Poland
    I was uploading today many versions of this tool and I don't know if you have glitched version or not. Just now I came to the point of start.
    Uploaded again working mostly package.

    So there are cases when only what you can do is add paddings for right and bottom for your texture to make it multiplication of 128 (960x720 -> 1024x768), cook it, swizzle it, cook it and swap texture data from swizzled texture with texture data from original *.uexp by hex editor. It should be exactly the same size for b8g8r8a8. DXT5 and DXT1 is harder to do because of compression and you need to change file size inside *.uasset and probably *.uexp too.

    And please don't post big images. Thumbnails or take them to spoiler.
    And noesis itself has some issues with tiling some resolutions (except multiplications of 128). Already wrote bug report to author and waiting for reply, because it's an executable issue and I can't fix it.

    For now everything is possible.

    One more thing: if it's unswizzling in unswizzle.bat, then it should be correct for Switch. If it's unswizzling only with unswizzle-nop.bat, then it would not work on Switch and there is an issue with noesis.

    For now settings that I can confirm are working:
     
    Last edited by masagrator, Apr 10, 2019
    fraggerman91 likes this.
  5. fraggerman91

    fraggerman91 Member

    Newcomer
    2
    Jan 4, 2016
    Germany
    These settings work! Thanks for the mod and help.
     
  6. masagrator
    OP

    masagrator File digger

    Member
    9
    Oct 14, 2018
    Poland
    So next thing I've probably discovered.
    For textures with one dimension lower than 64 pixels textures have dimensions as multiplications of 64. So 180x41 -> 192x64, 200x60 -> 256x64. (for lower than 32 I didn't checked)
    And then additional work space needs to be added after swizzling. Not before. But still noesis for this values is bugged. So there may be no way of adding textures with proper resolution with one dimension lower than 64. You can still add texture with higher resolution than original to game, but it will be downscaled.
     
    Last edited by masagrator, Apr 13, 2019
  7. masagrator
    OP

    masagrator File digger

    Member
    9
    Oct 14, 2018
    Poland
    Added new version with support for tiling and untiling DXT5 textures.
    DXT5 needs to be created for swizzling. Swizzling RGBA8 texture and putting it to DXT5 texture will not work.
     
    Last edited by masagrator, Apr 27, 2019
  8. masagrator
    OP

    masagrator File digger

    Member
    9
    Oct 14, 2018
    Poland
    Next update. Earlier (un)swizzling DXT5 textures with height <= 256 was not working correctly. Now it's working.
    I can't check if height >512 is working correctly. I'm waiting for textures to test. :P
     
    Last edited by masagrator, Jun 9, 2019
  9. eaZy41

    eaZy41 Newbie

    Newcomer
    1
    Dec 15, 2009
    Russia
    Got this when trying to process 512x1024 file in v4:

    Noesis console mode activated.
    File "G:\Tools\noesisv4395-modv4\fmt_ue4.py", line 2779
    elif pixelFormat == "PF_DXT5":
    ^
    IndentationError: unindent does not match any outer indentation level
    Noesis initialized.
    Source file: G:\Tools\noesisv4395-modv4\font_0_0.uasset
    Dest file: png
    Options: -ue4texungob -ue4serialver "516" -ue4gamehack "0"
    ===
    Unknown option: -ue4texungob
    Unknown option: -ue4serialver
    Unknown option: 516
    Unknown option: -ue4gamehack
    Unknown option: 0
    Detected file type: Unknown
    Nothing was exported!
     
  10. masagrator
    OP

    masagrator File digger

    Member
    9
    Oct 14, 2018
    Poland
    And I tested it before uploading that this error will not show... Eh, it will be updated in couple of hours. This is bug in code, not a issue with file (There should be Tab key, but somehow there is a space used - probably I forgot to update package with correct file).
     
    Last edited by masagrator, Jun 10, 2019
  11. masagrator
    OP

    masagrator File digger

    Member
    9
    Oct 14, 2018
    Poland
    Now it should work.
     
Quick Reply
Draft saved Draft deleted
Loading...