Megascans at shipping size¶
Level designer · 1 h · No code
Result: the rocks, cliffs and surfaces you placed from a large asset pack (Megascans, Fab environment packs, Epic sample environments) are in your project at a sensible size, with nothing missing on a fresh copy of the project, and look the same in game.
Before you start¶
- The pack is added to a separate project, or to this one in a folder you can remove later.
- Package a build explains why download size matters.
Why this needs a process¶
Scan-quality assets are huge and most of the size is invisible in play: 4K textures, and cliff meshes of several million triangles. A full environment pack is tens of gigabytes; a map uses a sliver of it. Three things go wrong if you just drag assets in:
- You ship the whole pack. Everything in the project's Content folder that is referenced gets cooked, and packs bring far more than you use.
- Pieces go missing on another machine. If you keep the pack folder out of source control to save space, every asset your map uses from it is on your disk only. A teammate's copy shows holes where the cliffs were. Nothing warns: Unreal loads from disk, not from source control.
- You ship full-resolution sources. A cliff at 25 % of its triangles and 1K textures is usually indistinguishable at gameplay distance.
The XenoCore sample map went from a 40 GB pack to about 180 assets and under 1 GB this way.
The sample's pack assets live in the plugin, under ThirdParty/ElectricDreams/, keeping the
pack's own sub-folders (Megascans, SmartAssets, PCG and the rest), so they travel with
XenoCore.
Steps¶
1. Place what you want, then list what it needs¶
- Build your map using the pack assets.
- Right-click the map in the Content Browser and open Reference Viewer or Size Map. Size Map shows the total and which assets dominate it.
- The set you must keep is the map's dependency closure: every asset it uses, and everything those use (materials, material functions, textures).
2. Bring in exactly that set¶
If the pack is in a separate project, open it there, select the assets your map uses, and use Asset Actions › Migrate. Migrate copies an asset and everything it depends on into another project's Content folder, at the same paths, so all references resolve with no redirectors.
Never copy a whole pack folder \"to be safe\"
That is how 40 GB ends up in a template. Migrate the map's closure and nothing else.
Check nothing comes from outside the pack
If Migrate wants to bring assets from another plugin or pack, stop and decide whether you want that dependency.
If the pack is already in this project, you don't need to copy anything, but you must make sure every asset in the closure is under source control (next step).
Fails silently: moving pack content that PCG assemblies use
Some packs (Electric Dreams among them) build cliffs and scatter from PCG assemblies that name their meshes and materials as text in point attributes, not as asset references. Moving or renaming those assets fixes every real reference and leaves the text pointing at the old path, so the next time the PCG graph generates, it spawns nothing there. Nothing warns. Decide where pack content lives before you place it; if you must move it, regenerate every PCG component afterwards and compare the instance counts before and after.
3. Make sure the set is in source control¶
If your repository ignores the pack folders, force-add each asset in the closure. Then clone the project somewhere else, or ask a teammate to, and open the map. Any hole is an asset you missed.
Fails silently: an ignored pack folder
The map works on the machine that built it and is missing geometry everywhere else. Do this check after every edit that places new pack content.
4. Cap texture sources at 1K¶
- In the Content Browser, open the pack folder and filter by Texture. Select the textures in the set (you can select many at once).
- Right-click and choose Texture Source Actions › Reduce Size. In the dialog, set
Texture size threshold to
1024and click OK. Textures already at or under 1024 are left alone. - Spot-check one: its Imported size in the texture editor now reads 1024 or less.
Resizing the source is what shrinks the project and the package. Maximum Texture Size and LOD Bias in a texture's Details shrink only the cooked output, and the full-size source still sits in source control.
The sample went from 1.77 GB to 191 MB of textures with no visible change up against a cliff.
5. Reduce rock meshes¶
For each large rock or cliff mesh:
- Open it in the Static Mesh editor. Under Nanite Settings, lower Keep Triangle Percent (the sample used 25 %), and click Apply Changes. This reduces what is cooked.
- Or, to reduce the source itself, use the Simplify tool in Modeling Mode. Leave Preserve Sharp Edges on and Discard Attributes off, which keeps the UV seams, then click Accept.
Leave foliage alone
Trees and plants use leaf cards that can collapse when simplified. Reduce rocks and cliffs; check any foliage up close before touching it.
6. Look at it¶
Take the same screenshots before and after, from the player's usual viewpoints and one right up against a cliff. They should match.
The first open after importing is slow
Nanite data for every new mesh is built on first open, which can take a long time and a lot of memory. Screenshots taken during that build are wrong; wait and shoot again.
7. Shrink before you commit¶
If you use Git LFS, do the size pass before the first push. LFS uploads every version you push, so pushing full-size assets and then reduced ones stores both, forever.
Test it¶
- Open Size Map on your map. The pack's share is a fraction of what it was.
- On a fresh clone, open the map. No missing meshes, no default grey materials, no warnings about missing packages in the Output Log.
- Play and compare with your before screenshots.
If it doesn't work¶
Grey checkerboard materials or missing meshes on another machine
Part of the closure isn't in source control. Re-run step 3.
The Output Log lists missing packages at load
An asset references something you didn't bring in. The warning names the path; migrate it.
A texture looks blurry up close
It is one the player sees very close (a hero rock, a surface the camera rests against). Give that one 2K.
Going further¶
- Build a world-partition map
- Package a build
- Check the licence of every pack you ship. Fab and Epic sample content each have their own terms for use in a product you sell.