Hello Epic Games Community,
I’m encountering critical errors and inconsistent behavior when using PCG with World Partition in Unreal Engine 5.5.2, and I’m seeking assistance to understand the root cause and find solutions.
Issue Summary:
When using PCG with World Partition, I’m experiencing a variety of critical issues that appear to stem from fundamental problems with how PCG manages its grid and interacts with World Partition.
Detailed Description:
- Critical Error 1: Ensure condition failed: FMath::IsPowerOfTwo(GridAsUint) [File:D:\build++UE5\Sync\Engine\Plugins\PCG\Source\PCG\Private\PCGCommon.cpp] [Line: 93]
- This error occurs in the PCGHiGenGrid::GridToGridSize() function, indicating a problem with the PCG grid size calculation. The function requires the grid size to be a power of two (1, 2, 4, 8, 16, etc.), likely for performance reasons related to bitwise operations and memory layout. However, under certain circumstances, the generated GridAsUint value is not a power of two, which causes the engine to halt.
- This issue seems to be related to the HiGen Default Grid Size parameter and related to FPCGDataFromActorElement (which indicates a problem processing the data from an actor).
- Critical Error 2: Assertion failed: NewActorPtr.IsValid() && ComponentPtr.IsValid() && PCGActor != nullptr [File:D:\build++UE5\Sync\Engine\Plugins\PCG\Source\PCG\Private\PCGSubsystem.cpp] [Line: 1385]
- This error arises from within the PCG subsystem, specifically in PCGSubsystem.cpp when creating or managing PCG actors. The error indicates that during some operations, one of three key pointers ( NewActorPtr, ComponentPtr, or PCGActor ) becomes invalid (null pointer).
- This issue may be due to incorrect handling of actor/component life-cycles or incorrect pointer usage during operations within the PCG subsystem.
- World Partition Issue: LogWorldPartition: Actor … is unreachable without properly detaching object …
- This warning occurs when unloading or deleting PCG actors with World Partition enabled. It seems the actor is not properly detached from World Partition due to metadata issues. It results in the inability to properly detach object or its PackageMetaData.
- PCG Instability with World Partition and Data Loss:
- I have observed that when creating a new, empty project, adding a simple PCG graph (that generates static meshes, for example, cubes), enabling “Is Partitioned” on a PCG Volume, setting the volume to roughly the same size as the landscape and activating “Clear PCG Link”, the generated actors detach incorrectly. Instead of a clean detachment, most of the generated cubes simply vanish from the level. Only a few sections might show partial detachment; the rest disappear completely, leaving no trace. This leads to significant inconsistencies and visual artifacts in the level.
- Furthermore, if the PCG volume slightly exceeds the bounds of the landscape, it leads to a crash in the editor. This seems to be more related to the PCG volume itself and the interaction of PCG with the World Partition system.
Additional context:
- These issues occur in Unreal Engine 5.5.2.
- The errors can be triggered even with a basic PCG graph and a simple landscape.
- I have identified that the PCG is generating different types of actors (rocks, trees, etc.), which all seem to have similar errors, regardless of actor type, which would imply problem on the PCG side or a problem in PCG-WorldPartition interaction.
- The HiGen Default Grid Size parameter in the settings of PCG graph is related to this, since it is directly used to calculate the PCG grid size.
- I also experience many recurring log messages that might be linked:
- LogPCG: [PCGPartitionGridActor_… - GetActorData_… (Tag: …)]: Actor ‘…’ does not have any previously generated data, or all its components were filtered out.
Questions and Requests:
- Can someone please shed light on the root causes of these PCG errors?
- Are there known workarounds or fixes for these issues?
- Is there an example of proper way to use PCG in partitioned worlds, for level creation and procedural generation?
- I’m particularly concerned about the FMath::IsPowerOfTwo check and the handling of NewActorPtr, ComponentPtr and PCGActor in PCGSubsystem.
- Could someone advise on how to properly configure PCG Volumes with respect to the size of landscapes?
I’d greatly appreciate any help or guidance from the community or Epic Games developers to resolve these critical issues, as they are currently blocking my development.
Thanks in advance!