← Back to Lab

Crowd Rebuild · headless MetaHuman Crowd builds

Pipeline tool · C++ · Python · Unreal Engine 5.8 · Planned

Status
Planned · not built yet
Stack
Unreal C++ plugin · Python · commandlet
Built for
Containment's crowd
Estimate
About a day to build

On Containment, every crowd dance lives in its own MetaHuman Crowd Collection, and Unreal 5.8 has to rebuild a Collection whenever its looks or characters change. Each rebuild pushed system memory commit from about 45 GB to about 67 GB on a 32 GB PC, and the editor never gave it back. So it was one rebuild per editor restart, and 16 dance Collections meant 16 restarts by hand. There was no way to script around it: the rebuild lives in one C++ function (UMetaHumanCollection::Build) with no Python call, console command or commandlet behind it.

The plan is a small C++ plugin that exposes that function to Python and a commandlet, plus a batch runner in the same shape as Darkroom: each Collection rebuilds in its own headless Unreal process, so the memory goes away when the process exits. It isn't built yet. For this piece, one rebuild per restart got the job done. The tool is worth building when full rebuilds keep coming: new looks, new characters, an engine update. The builds stay at 9 to 13 minutes each, but they run unattended, so a batch of 15 takes about 2.5 hours overnight.

What it will do

Expose the build: a small editor plugin that calls the Collection build from Python or a commandlet. The engine only runs it from the editor's Rebuild button.
One Collection, one process: each rebuild runs in its own headless Unreal process and saves, then the process exits and releases its memory. No restarts, nothing builds up.
Batch runner: a list of Collections rebuilt one after another overnight, reusing Darkroom's pre-flight checks (disk space, editor closed) and crash retry.
Checks each result: confirms each Collection file was rewritten and is the expected size before moving on, and logs the time and peak memory for every build.