March 28, 2024, 19:45
bigger smaller reset     1020px Wide width Full width Reset   * *

Gildor's Forums

  Homepage Facebook Read news on Twitter Youtube channel Github page
Welcome, Guest. Please login or register.
Did you miss your activation email?

« previous next »
Print
Author Topic: Could the tool be used as a base for a diff viewer?  (Read 3200 times)
Dbug
Newbie
*
Posts: 3


View Profile
« on: August 09, 2016, 18:07 »

Hi,
people working with Unreal are probably aware of the problem with uasset files: They are not diff-able out of the editor, which makes it very painful to track changes in an asset control system.

I did some tests today, and it looks like UE Viewer is perfectly able to parse and extract the uasset files of a normal Unreal project (ie: Non cooked, actual production assets), the only problem being that it takes very long to show the content because the tool seem to be parsing the entire project on startup.

What I was wondering is if it would be possible to:
- add a special mode where you can specify a uasset file and have it been displayed fast by just loading the required dependencies instead of the entire project
- add a mode where you can specify multiple paths to "the same" uasset, to be able to compare side by side two different revisions of the same model or texture
- add a mode that can automatically generate thumbnails for a bunch of files (using the screenshot feature)

Does that look totally impossible, or is it worth looking at it Smiley ?
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #1 on: August 09, 2016, 22:31 »

Hi,
1) Only required assets are loaded. If uasset file holds only one asset inside, and you're clicking on it, only this asset will be loaded. Also referenced objects loaded - materials, textures. In my opinion, this happens quite fast.
2) You may open 2 umodels to see them side-by-side. There's no mode in umodel where you can see 2 models.
3) No thumbnails, sorry. I see it quite useless, because mesh is automatically positioned in viewport based on its bounds, and material rendering is very tricky (very far from exact representation in game).
Logged
Dbug
Newbie
*
Posts: 3


View Profile
« Reply #2 on: August 10, 2016, 11:54 »

Then I must be doing something wrong, here is what I did:
Quote
C:\UnrealTest\umodel_win32>umodel.exe C:\UnrealTest\TheGame\Content\Items\Placeables\Meshes\SK_container_basic_wood1.uasset

and here is the result:
Quote
Detected game root C:/UnrealTest/TheGame/Content
-----------------[Blinking cursor for about 10 minutes and 11 seconds]-----------------
Found 16978 game files (0 skipped)
Loading package: Items/Placeables/Meshes/SK_container_basic_wood1.uasset Ver: 505/0 Engine: 0 Names: 139 Exports: 3 Imports: 11 Game: 10000
Loading SkeletalMesh4 SK_container_basic_wood1 from package Items/Placeables/Meshes/SK_container_basic_wood1.uasset
Loading package: Items/Placeables/Meshes/SK_container_basic_wood1_Skeleton.uasset Ver: 482/0 Engine: 0 Names: 21 Exports: 1 Imports: 2 Game: 10000
(...)
Loaded in 7.2 sec, 209 allocs, 89.65 MBytes serialized in 117 calls.
******** Items/Placeables/Meshes/SK_container_basic_wood1.uasset:  SkeletalMesh4'SK_container_basic_wood1' ********
*** Unknown texture format: PF_Unknown (0)
WARNING: Texture2D T_container_basic_wood1_D has no valid mipmaps
*** Unknown texture format: PF_Unknown (0)
WARNING: Texture2D T_container_basic_wood1_N has no valid mipmaps

Apparently I can force the tool to display the file fast by providing a fake game root:
Quote
C:\UnrealTest\umodel_win32>umodel.exe -path=C:\UnrealTest\TheGame\Content\Items\Placeables\Meshes\SK_container_basic_wood1.uasset C:\UnrealTest\TheGame\Content\Items\Placeables\Meshes\SK_container_basic_wood1.uasset
but would that not cause problems with eventual dependencies?

If I try to use "-obj" then all I get is the "Choose a package to open" UI.

What would be the actual command line parameters to use to correctly display one uasset Smiley ?
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #3 on: August 10, 2016, 12:17 »

...
and here is the result:
Quote
Detected game root C:/UnrealTest/TheGame/Content
(...)
WARNING: Texture2D T_container_basic_wood1_N has no valid mipmaps
I think you've extracted everything from pak file, but there should be also .ubulk file which actually holds texture mipmaps (at least for PARAGON).

Quote
Apparently I can force the tool to display the file fast by providing a fake game root:
Quote
C:\UnrealTest\umodel_win32>umodel.exe -path=C:\UnrealTest\TheGame\Content\Items\Placeables\Meshes\SK_container_basic_wood1.uasset C:\UnrealTest\TheGame\Content\Items\Placeables\Meshes\SK_container_basic_wood1.uasset
"path" is not intended to accept package files, only directories. In your case this is a side effect of missing checks for parameter correctness, I think.

Quote
but would that not cause problems with eventual dependencies?
When you're loading just a single package with all referenced packages missing, you'll get warning messages in console, and dependencies (textures, materials etc) will be empty.

Quote
If I try to use "-obj" then all I get is the "Choose a package to open" UI.
-obj works nice for me. You should specify a package name in order to skip UI. However I see no point of specifying -obj for UE4 - every package has just a single object inside, so package name is enough.

Quote
What would be the actual command line parameters to use to correctly display one uasset
Example for "ARK: Survival Evolved"
Code:
umodel.exe -path=ARK\Content\PrimalEarth\Dinos\Raptor -game=ue4.5 raptor_Saddle_RIG.uasset -obj=raptor_Saddle_RIG
(-obj could be missing, as I said - it won't change anything for UE4)
Logged
Dbug
Newbie
*
Posts: 3


View Profile
« Reply #4 on: August 10, 2016, 14:12 »

I think you've extracted everything from pak file, but there should be also .ubulk file which actually holds texture mipmaps (at least for PARAGON).
That's the thing: It's not on a released game, I'm trying your tool on the production Content folder of an Unreal game being made at the moment.

There's no PAK file, there's no cooked data, just umaps, uassets, umaterials, etc... in the game project Content folder, along with a .uproject file.

I know it was not the intended usage, but since Epic does not provide any stand-alone diff tools for the uasset, I thought that being able to use your tool for that would be neat.

Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #5 on: August 10, 2016, 14:16 »

Understand. You're working with uncooked data. Textures are not working in this case - their data are in DDC (Derived Data Cache), and uasset files contains textures in png format which is not supported by UModel.
Logged
Print 
« previous next »
Jump to:  

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