Gildor's Forums

Author Topic: [PS4] Days Gone  (Read 3849 times)
spiritovod
Sr. Member
****
Posts: 358


View Profile
Re: [PS4] Days Gone
« Reply #45 on: March 14, 2021, 22:55 »

@VendorX: Almost all consoles are using their own algorithms for texture swizzling. So you should decompress and unswizzle them. You can take a look at current implementation for PS4 in umodel by looking for "SUPPORT_PS4" in UnTexture.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7926



View Profile WWW
Re: [PS4] Days Gone
« Reply #46 on: March 15, 2021, 08:36 »

Textures are exported in ExportTexture.cpp, see CTextureExportWorker class. It has different callback functions, depending on target format - e.g. ExportPNG_Worker. The function loads the texture from disk, performs unswizzling when needed (e.g. for PS4 texture) - this is done in class' "operator()()" - it opens the file, calls "TexData.Decompress" (if not saving the compressed DDS), then executes callback "Func()" for encoding the destination file and saving it to disk. Texture loading and unswizzling is done in UTexture2D::GetTextureData(), the function is shared between UE3 and UE4 (UnTexture3.cpp file).
Logged
VendorX
Jr. Member
**
Posts: 46



View Profile
Re: [PS4] Days Gone
« Reply #47 on: March 16, 2021, 22:11 »

Thx guys. I've checked your source code and end up with the same conclusion.
Anyway, I found a second app to export DG textures and exported image doesn't have artifacts like from your app.
So I assume, PS4 is using some kind of coustom swizling - not the regular one. Cause from the looking at those two images (attachement) you guys are using two different code for unswizzling.

BTW: why PNG? TGA isn't better? ... or even (faster) strade back to DDS.


* moss01_co_bc7.jpg (122.82 KB, 512x512 - viewed 34 times.)

* moss01_co_png.jpg (167.54 KB, 512x512 - viewed 43 times.)
Logged
spiritovod
Sr. Member
****
Posts: 358


View Profile
Re: [PS4] Days Gone
« Reply #48 on: March 17, 2021, 00:37 »

@VendorX: No issues with exporting BC7 textures from the game to png or tga with latest umodel here (samples). Maybe it happens only with some particular textures - if so, you can submit them for better understanding (extracted/saved assets, not exported ones).
Basically, umodel can export to dds as well, but it doesn't work for swizzled textures, they can be exported only to png/tga. Not sure if it's by design or just unimplemented feature.
« Last Edit: March 17, 2021, 00:44 by spiritovod » Logged
VendorX
Jr. Member
**
Posts: 46



View Profile
Re: [PS4] Days Gone
« Reply #49 on: March 17, 2021, 03:13 »

Engine Version: 4.13.34
moss01_co.uasset

Having an option to which format can be extracted (PNG or TGA) would be great.
Logged
spiritovod
Sr. Member
****
Posts: 358


View Profile
Re: [PS4] Days Gone
« Reply #50 on: March 17, 2021, 03:57 »

@VendorX: Use proper override settings (Unreal 4 -> Days Gone + Platform: PS4). And you can choose desired format for exported textures in the export options.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7926



View Profile WWW
Re: [PS4] Days Gone
« Reply #51 on: March 17, 2021, 08:57 »

BTW: why PNG? TGA isn't better? ... or even (faster) strade back to DDS.
TGA is not widely supported in software, PNG is more common. PNG takes much less space. DDS is better - fastest export (no transcoding), no quality loss, but you can't import it into UE4.
Logged
VendorX
Jr. Member
**
Posts: 46



View Profile
Re: [PS4] Days Gone
« Reply #52 on: March 18, 2021, 22:54 »

I've broke down the guys app and d end up with unswizzle for PS3 PS4 and Switch code, so if you guys need I can share it. Have also for Xbox (ARGB) ...

BTW: DDS is already lossy, so turning it to PNG will go even further with quality degradation. TGA in contrary, will keep 1 to 1 DDS quality ... and nowadays, most of the apps can load it - Unreal Engine include (it could from the beginning).

cya
Logged
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS