PrepAIOverview

PrepAI

AI scene prep for Unreal Engine: clay render, segmentation, depth / normal / line art guide passes, one-click export of every pass, and image generation from the viewport with a built-in local AI engine.

Unreal Engine 5.8Windows 64-bitEditor pluginNon-destructive

Clay & Segmentation

Swap all materials to clay or flat ID colors with one click. Original materials are always backed up and restored.

Guide passes

Depth, normal and line art, ready for ControlNet, ComfyUI and video-to-video tools, shimmer-free.

Export All Passes

Render Beauty, Clay, Segmentation, Depth, Normal and Line Art from a Level Sequence with Movie Render Queue, as PNG / EXR / JPG / MP4.

PrepAI Gen

Generate a photoreal image from what you see in the viewport, compare it with a draggable before/after line, and keep a professional shot list.

Requirements

Installation

  1. Epic Games Launcher → Fab Library → PrepAI → Install to Engine (5.8).
  2. Open your project, go to Edit → Plugins, search PrepAI, enable it and restart the editor.
  3. A PrepAI menu appears in the Level Editor menu bar.

Quick start

  1. PrepAI → Open PrepAI Panel.
  2. Click Clay: every material becomes gray clay. Click Original to restore.
  3. Pick a guide pass (Depth, Normal, Line Art) to see it live in the viewport.
  4. Open a Level Sequence, go to the Render tab and click Export All Passes.
  5. Want an AI image? Open PrepAI Gen, install the engine once, write a prompt and click Generate from Viewport.

PrepAI Panel

PrepAI → Open PrepAI Panel (also in Tools → PrepAI). A dockable window: the header always shows what is active (render mode, guide pass, export progress). The panel has a Scene tab and a Render tab; the export button is always visible at the bottom.

Render mode

ModeWhat it does
OriginalThe scene as you built it.
ClayReplaces every material with gray clay. Emissive and unlit materials (LEDs, screens, sky) keep their look, masked materials keep their cutout, glass becomes light translucent clay, skeletal meshes get a separate character color.
SegmentationA flat, unlit, exact color per group (segmentation map). Sky, fog and atmosphere are hidden, and colors are output with no tonemapping, no anti-aliasing, no depth of field and no motion blur.

Segmentation

Visible only when the render mode is Segmentation.

SettingDescription
Group byActor, Layer, Outliner folder or Tag. All actors in a group share one color.
Colors: DistinctWell-separated colors, editable per group with the color picker.
Colors: SemanticADE20K class colors, the code used by ControlNet segmentation models. Classes are guessed from names (person, floor, stage, light, screen…) and can be changed per group from the class menu.

Guide passes

PassDescription
DepthNormalized depth, near = white, far = black. Auto sets the far distance from what the camera sees, for maximum contrast.
NormalCamera-space normals.
Line ArtEdges from depth and normal changes, white on black (or black on white), with Threshold to remove noise and Thickness.

While a guide pass or Segmentation is on, viewport anti-aliasing, depth of field and motion blur are turned off so the image does not shimmer. They are restored when you switch back.

Options

OptionDescription
Keep emissive materialsLEDs and screens keep their original look in Clay.
Keep unlit materialsSky domes and screens keep their original look.
Hide decalsDecals are hidden in Clay and Segmentation.
Hide sky / Hide fogA clean background for AI.
Hide on-screen warningsHides the engine messages drawn over the viewport (shadow overflow, sky light, lighting needs rebuild…) for clean captures and recordings. Works in every mode; it only hides the text.
TranslucentGlass (light translucent clay), Hide or Keep.

Render tab & Export All Passes

Renders the open Level Sequence once per enabled pass with Movie Render Queue. Files go to <output folder>/<Sequence>/<pass>/ (default <Project>/Saved/MovieRenders/PrepAI). A progress bar shows each pass; the scene is restored to its original materials at the end.

SectionSettings
PassesBeauty, Clay, Segmentation, Depth, Normal, Line Art.
OutputFolder, file name pattern ({sequence_name} {pass} {frame_number}), format PNG / EXR / JPG / MP4, or an image sequence plus “Also export MP4”.
Resolution720p, 1080p, 1440p, 4K, 9:16, 1:1 or custom.
FramesWhole sequence or a custom range; frame rate from the sequence or a preset / custom value.
QualitySpatial / temporal samples and warm-up frames for Beauty and Clay. Segmentation and guide passes are always rendered without anti-aliasing so ID colors stay exact.

PrepAI Gen

PrepAI → Open PrepAI Gen. Generates an image from the viewport with a local AI engine (ComfyUI with FLUX.2 Klein) that runs hidden in the background: no external windows, no browser. Every long operation shows a progress bar.

First start

  1. Engine → This PC: choose an install folder (default %LOCALAPPDATA%\PrepAI\ComfyUI) and click Install ComfyUI. Already have a ComfyUI portable? Use the existing folder instead.
  2. Model: pick a workflow and click Download missing models.
    • FLUX.2 Klein 4B — Apache 2.0, commercial use allowed, faster. Recommended to start.
    • FLUX.2 Klein 9B — higher quality, FLUX Non-Commercial License. Gated: accept the license on Hugging Face and paste a Hugging Face Read token.
  3. Click Start (or just generate: the engine starts automatically).

Generate

The viewport is captured exactly as you see it — Original, Clay, Segmentation, Depth or Line Art — and sent to the AI with your prompt. Set Seed (or Random), Steps and Megapixels, then click Generate from Viewport. Free VRAM unloads the models; Stop shuts the engine down. The engine also stops when Unreal closes.

Tip: describe the scene and add “keep the exact composition and the position of every object”. Segmentation and Line Art inputs keep the layout better than Depth.

Prompts (style library)

About 630 ready-made prompt styles in 19 categories — photography, cinema, camera views, illustration, 3D, materials, architecture, interiors, eras and more. Click styles to build an ordered chain: it is added after your prompt when you generate (your prompt, style 1, style 2…), so you can change the look without rewriting the scene.

FeatureDescription
ChainNumbered chips in the order they are applied: move ◀ ▶, remove ✕, Clear. The final prompt sent to the AI is shown below.
PresetsSave the current chain (e.g. “Concert night look”) and load it with one click.
Search & favoritesFilter by category, ★ Favorites or My styles; search by name, text or tag.
Insert into promptCopies the styles into the prompt text to edit them by hand.
Your own stylesNew, Edit, Duplicate, Delete, new categories, Import / Export (.json). Built-in styles can always be restored with Reset built-in styles.

Your styles, edits, favorites and presets are saved in %LOCALAPPDATA%\PrepAI\prompt_styles_user.json and are shared by all your projects. Each generation stores the scene prompt and the styles separately; Use settings restores both.

Viewport compare

After each generation a before/after overlay appears over the viewport: drag the line to compare. The image keeps its aspect ratio and lines up with the camera frame. Live viewport compares with the scene as it is now, Capture with the exact frame that was sent to the AI.

Generations (shot list)

Every result is saved in <Project>/Saved/PrepAI/AIRefs with the viewport capture and its metadata: prompt, seed, workflow, level, sequence, frame, frame rate, camera, lens (focal length, aperture, focus, sensor, FOV) and transform.

ActionDescription
Compare in viewportShows the before/after overlay. With Match shot camera on, the viewport first goes back to the shot.
Go to shotOpens the sequence at the shot frame and switches the viewport to the shot camera, like the Camera options menu. Free-view shots go back to Perspective at the saved position. Cameras are found even if renamed.
Use settingsLoads prompt, seed and settings to iterate on a shot.
Rename / ★ / DeleteName shots, mark favorites, filter by ★ or search by name, prompt, sequence or camera.
Save selected / Save allCopies images (optionally with captures and metadata) to a folder.
Shot list CSVExports the shot list for production.

Remote server

Run the AI on another computer (for example a workstation with a bigger GPU): start ComfyUI there with --listen, then in PrepAI Gen choose Engine → Remote server and enter its address, e.g. http://192.168.1.20:8188. The required models must be installed on that machine.

Actor tags

TagEffect
PrepAI_KeepThe actor is never modified.
PrepAI_CharThe actor uses the character color in Clay.

settings.json

<Project>/Config/PrepAI/settings.json — open it from the panel (Open settings.json), then click Rebuild materials after editing colors.

KeyDescription
clay_color, character_colorLinear RGB 0–1.
roughnessClay roughness.
emissive"keep" or "clay".
translucent, glass_opacity"glass", "hide" or "keep"; opacity of the glass material.
keep_unlit, hide_decals, hide_sky, hide_fogSame as the panel options.
emissive_name_keywordsMaterial names containing these words are treated as emissive.
depth_near_cm, depth_far_cmDepth range in centimeters.
normal_axis_signFlip normal axes to match your AI tool.
seg_group_by, seg_colors"actor" / "layer" / "folder" / "tag"; "distinct" or "ade20k".
seg_default_classADE20K class for unrecognized names (default "wall").
lineart_*thickness, depth_strength, normal_sensitivity, threshold, white_bg.
export_*Passes, resolution, folder, format, MP4, name pattern, frame range, frame rate, samples.

Tips & troubleshooting

Third-party software and models

PrepAI does not include ComfyUI or any AI model. They are downloaded only when you click Install / Download, from their official sources, and are subject to their own licenses:

You are responsible for complying with the license of each model you use, including restrictions on commercial use of generated images.

Support

Questions, bugs or feature requests: info@salvonostrato.com
Please include your Unreal Engine version and, for errors, the lines starting with “PrepAI” from the Output Log.