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!
Restrictions:
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.
F.e. Octopath Traveler logo made by me.
When it's untiled
When it's tiled
When putted to Octopath Traveler:
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
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
You need Unreal Engine 4.19!
Code:
#My modifications
-Modified plugins\python\fmt_ue4.py:
>>Added function '-ue4texungob' which swizzle texture. Based on '-ue4texgob', but with call extension 'tile_blocklineargob' instead of 'untile_blocklineargob'
tile_blocklineargob is broken for some dimensions (it's cutting pieces of image), so it's preferable to have dimensions as multiplications of 128.
>>For 'def ue4UntileTexture' changed:
heightInBlocks = (height + (blockHeight - 1)) // blockHeight
to
heightInBlocks = (height + 4 + (blockHeight - 1)) // blockHeight
>>For 'def ue4ConvertTextureData' changed:
elif pixelFormat == "PF_DXT5":
textureData = ue4UntileTexture(asset, width, height, 4, 4, 16, textureData, 8)
to
elif pixelFormat == "PF_DXT5":
if height <= 128:
textureData = ue4UntileTexture(asset, width, height, 4, 4, 16, textureData, 8)
elif 128 < height <= 256:
textureData = ue4UntileTexture(asset, width, height, 2, 2, 8, textureData, 8)
elif height > 256:
textureData = ue4UntileTexture(asset, width, height, 1, 1, 4, textureData, 8)
#From this package I removed files that are not necessary for swizzling and to make this package lighter.
Restrictions:
Tiling works incorrectly for some dimensions.
For best results textures should have dimensions as multiplications of 16 (for example 499x258 -> 512x272) and it cannot be smaller than 64x64.
UE4 for Switch uses this method for their textures, so you can swap hex data between files if it's necessary.
The best settings for cooking untiled textures in UE4:
Compression Settings: UserInterface2D (RGBA) or Default (DXT1/5, BC1/3 on DX11) [second one tested only on DXT5]
Texture Group: UI
sRGB: unchecked
Mip Gen Settings: NoMipMaps
You can check if tool is tiling files correctly by using "Unswizzle.bat" for tiled cooked textures. If it's untiling wrongly, put it to "Unswizzle-nop.bat". If it's looks almost correctly, but something is amiss, then it's an noesis issue and you need to use different dimenions
For best results textures should have dimensions as multiplications of 16 (for example 499x258 -> 512x272) and it cannot be smaller than 64x64.
UE4 for Switch uses this method for their textures, so you can swap hex data between files if it's necessary.
The best settings for cooking untiled textures in UE4:
Compression Settings: UserInterface2D (RGBA) or Default (DXT1/5, BC1/3 on DX11) [second one tested only on DXT5]
Texture Group: UI
sRGB: unchecked
Mip Gen Settings: NoMipMaps
You can check if tool is tiling files correctly by using "Unswizzle.bat" for tiled cooked textures. If it's untiling wrongly, put it to "Unswizzle-nop.bat". If it's looks almost correctly, but something is amiss, then it's an noesis issue and you need to use different dimenions
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.
F.e. Octopath Traveler logo made by me.
When it's untiled
When it's tiled
When putted to Octopath Traveler:
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)
Attachments
Last edited by masagrator,