March 28, 2024, 18:12
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: World Outliner hierarchy does not match GetFullExportName  (Read 286 times)
w4rum
Newbie
*
Posts: 2


View Profile
« on: October 10, 2020, 01:59 »

Hi,

I'm currently working on a project for the game "Squad" (UE4) that requires me to extract the tree shown in the "World Outliner" in the Editor. Unfortunately, the directory tree generated by the exporter tool does not match the World Outliner, as shown below:

World Outliner:


Directory tree generated by the exporter tool.
Code:
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 00-GBMain_4062
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 01-BP_CaptureZoneCluster
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 01-BP_CaptureZoneCluster.BP_CaptureZoneCluster_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 01-Hill24
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 01-Hill24.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02C-BP_CaptureZoneCluster
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02C-BP_CaptureZoneCluster.BP_CaptureZoneCluster_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02C-MineEntrance_8
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02C-MineEntrance_8.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02C-OPFortress
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02C-OPFortress.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02E-BP_CaptureZoneCluster
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02E-BP_CaptureZoneCluster.BP_CaptureZoneCluster_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02E-Hill13
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02E-Hill13.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02E-MineEntrance
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02E-MineEntrance.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02W-BP_CaptureZoneCluster
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02W-BP_CaptureZoneCluster.BP_CaptureZoneCluster_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02W-OPFortress
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02W-OPFortress.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02W-Ridgeline
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02W-Ridgeline.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 03C-AmmoHill
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 03C-AmmoHill.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 03C-BP_CaptureZoneCluster
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 03C-BP_CaptureZoneCluster.BP_CaptureZoneCluster_C
...

I've been searching around the UEViewer source code for quite a while and tried to use the existing functions but I wasn't able to find out, e.g., that "01-Hill24" has parent "01-BP_CaptureZoneCluster".

UPackage::GetFullExportName generates the same structure:
Code:
char buf[2000] = {0};
pkg->GetFullExportName(Exp, buf, 2000, true, false);
appPrintf("- %s: %s\n",
    *Exp.ObjectName,
    buf);

...

- 01-Hill24: Fools_Road_RAAS_v1.PersistentLevel.01-Hill24

It seems that for these objects, "PackageIndex" refers not to the parent object in the World Outliner hierarchy but to the top-level element. I'm not too familiar with the internals of UE4 so I don't know why this is. I suspect that the World Outliner hierarchy is actually saved in a different place and does not reside with the actual objects. Unfortunately, I didn't have much luck sifting through the binary files and trying to find out which bytes meant what.

Am I missing an already implemented feature here or can anyone give me pointers as to where I could try my luck?

On a side-note: Is there up-to-date documentation on the file formats apart from the source code of UEViewer and UE4?

Best Regards
w4rum
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #1 on: October 10, 2020, 09:42 »

Hi,

I think you messed with object hierarchy and actor hierarchy. Object hierarchy (which you're seeing in UModel) is reverse one: each object knows about its parent (owner), but owner doesn't know about children. It is intended for separating objects to packages (uasset files, upk files etc) and for lifetime tracking by garbage collector. It is not suitable for displaying any scene graph.

Actor hierarchy is built entirely in AActor and UComponent objects, it is not read by UModel, but it is what you're looking for. When some actor attached to its parent, the actor still belongs to PersistentLevel (as you can see in your export results), but its AttachParent will be some different object, and that different object will add attached actor to its children list.
Logged
w4rum
Newbie
*
Posts: 2


View Profile
« Reply #2 on: October 10, 2020, 10:59 »

Ah, that makes sense. Thanks a lot for the pointer! I'll see if I can find a way to extract that for my project.
Logged
Print 
« previous next »
Jump to:  

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