Runtime PCG generation does not respect a non-identity LevelInstance transform (offset/instanced content generates in the wrong frame)

When a World Partition map containing Generate-at-Runtime PCG is loaded as a LevelInstance at a non-identity transform (a translation offset), the runtime-generated PCG output is placed in the un-offset world frame and is desynced from the instance’s own WP-streamed content (road/landscape), which is offset correctly. Cooked/partitioned content offsets correctly; runtime-generated content does not.

Root cause (from source)

- Runtime-gen partition actors are pooled/spawned into World->PersistentLevel at world-axis grid cells — PCGRuntimeGenScheduler.cpp (World->PersistentLevel at line 212; SpawnParams.OverrideLevel = World->PersistentLevel at 2013), cell coords via UPCGActorHelpers::GetCellCoord = floor(worldPos / GridSize) (PCGActorHelpers.cpp:817, no origin/transform), PA placed at the raw world cell center (pool Teleport ~1981; create in PCGSubsystem.cpp ~1321).

- They never receive the owning instance’s LevelTransform*, unlike cooked content, which is saved inside the instance level and gets the transform applied at stream-in (LevelInstanceLevelStreaming.cpp:412). There is no LevelInstance / LevelTransform / GetLevel awareness anywhere in the runtime-gen scheduler.

- Secondary determinism issue: point seeds derive from absolute world position (PCGHelpers::ComputeSeedFromPosition, PCGHelpers.cpp:50), so even a grid-size-aligned offset reshuffles the scatter relative to the authored/editor layout. ~18 element call sites compute seeds this way; only PCGSplineSampler exposes a bSeedFromLocalPosition precedent.

Steps to Reproduce

1. Create a WP stage map with a PCG component set to Generate at Runtime + Is Partitioned (scatter on the level’s landscape/surface).

2. Drop that map in another level as a LevelInstance at a non-identity translation. (eg offset : X=1000, Y=0, Z=0)

3. Observe: the WP-streamed meshes/landscape appear at the correct offset position; the runtime-generated PCG (foliage/rocks) appears 1000cm offseted from where it should be.

Hey Titouan!

Thanks for the report. As you pointed out, the runtime partition actors are spawned according to the persistent level’s world partition grid, not the level instance. This is expected, so any scattering that is done relative to the partition actors will also be relative to the persistent level instead of the level instance.

That said, your generation will still be culled outside of the PCG component volume (unless you’re doing some unbounded sampling), so I’d expect the results to look as expected, not offset by the LI origin. But depending on your graph setup the results might be unintuitive. If you share more about your graph I could take a look.

You make a good point about being able to compute seeds from local space so that the seeds are stable when translating the Level Instance. You can work around this by re-computing the seed yourself in the graph (if you haven’t already) to get something that is more stable relative to your level instance.

Cheers,

Wyatt