Prefabs
A prefab is a reusable Blueprint actor, such as a room module, an elevator cabin, or a piece of scenery. Spectral lets you bake a source copy, save its lighting into the Blueprint, and reuse that lighting on other copies. You can also include probe coverage that travels with the prefab.
This section explains the setup and everyday workflow. The two component pages cover their individual settings, buttons, and status fields.
The two components
| Component | What you use it for |
|---|---|
| Spectral Lightmapped Prefab | Stores the Blueprint's captured surface lighting and any included probe fields. This is where you click Capture. |
| Spectral Prefab Volume | Defines optional probe coverage inside the Blueprint. Add it alongside the Lightmapped Prefab component, not instead of it. |
Both are added through Add Component in the Blueprint editor. They are not separate actors in Unreal's Place Actors panel. For probe coverage that belongs to the surrounding level, use a Spectral Probe Volume instead.
Bake Lighting calculates the source's lighting. Capture saves that baked result into the Blueprint for reuse. Capture does not bake lighting, and saving the Blueprint alone does not capture it.
Where prefabs are useful
- Elevator cabins. Bake the cabin walls, floor, and ceiling once, then use a Movable copy for the elevator. Add a Spectral Prefab Volume inside the cabin if objects riding in it need its probe lighting. The cabin carries its captured lighting between floors; it does not rebake to match each landing.
- Reusable room modules. Capture a furnished room, corridor section, or modular interior and place static copies around a level. This works best when the copies should share the same baked appearance. A room that needs a different lighting setup should use a separately authored Blueprint capture.
- Vehicle interiors. A train carriage or enclosed vehicle cabin can keep its authored interior lighting while moving. Optional probe coverage can serve objects inside. Changing daylight outside does not rewrite the captured interior lighting, so test transitions through windows and doors.
- Moving scenery and platforms. A moving stage section or a lift with its own surrounding structure can carry baked surface lighting without leaving a static baked shadow behind. Use Movable copies and keep a static source for future updates. The capture does not provide a newly baked shadow on the ground beneath every new position.
- Repeated props and set pieces. Reuse the same authored surface lighting on displays, machinery, or scenery built from several meshes. You do not need a Prefab Volume if no objects around the set piece need an embedded probe field. Check that any lighting from the original surroundings still makes sense in the new placement.
- Rooms or scenery spawned during play. Spawn a Blueprint with an existing capture when you need its stored lighting available without running a new bake. The capture must be prepared and saved beforehand; spawning does not calculate lighting for the new surroundings.
Use prefabs when the lighting should stay with the assembly. Use ordinary level lightmaps and Spectral Probe Volume actors when lighting should describe a fixed place in the world. A prefab capture is not a substitute for live lighting that needs to change as the scene changes.
Build a source copy
Open the Blueprint containing the meshes you want to reuse and add Spectral Lightmapped Prefab. The meshes still need suitable lightmap UVs and resolution, just as they would for an ordinary bake. Use Lightmaps if you need to prepare them.
Place one copy of the Blueprint in a level and use it as your source. Keep its root and the meshes you intend to bake Static while authoring the capture. Arrange the lights and surroundings to produce the appearance you want to reuse. Give the source a clear name so it is easy to find when you need another bake.
A separate authoring level can make this easier to manage, but it is not required. What matters is that you know which placed copy you are baking and capturing.
A room captured with warm lighting keeps that baked appearance when placed somewhere else. The capture does not recalculate itself to match a new room, a different sun direction, or nearby geometry. Choose source lighting that makes sense wherever you plan to reuse the prefab.
Add probe coverage if needed
Surface lightmaps light the prefab's own baked meshes. Probe fields provide lighting samples in the space around those meshes, for objects and other features that use Spectral probes. For example, an elevator cabin can carry both its baked wall lighting and a small probe field covering the cabin interior.
- In the same Blueprint, add a Spectral Prefab Volume component.
- Position and resize its box to cover the space that needs probe lighting. Keep the coverage focused on the prefab, rather than filling the whole level.
- Leave Enabled on. Start with the default Voxel Size, then reduce the spacing only where the lighting needs more detail.
- Turn on Visualize Probes to inspect the field. The markers help you check coverage; showing them does not bake the probes.
You can add more than one field for separate parts of a prefab. Each enabled field is included when you bake and capture the source. Smaller spacing and larger boxes increase the amount of probe data, so check Captured Data Cost after capture.
If you only need the prefab's baked surface lighting, you can leave these volumes out.
Bake, capture, and save
- With the source placed in the level, open Spectral > Baker and run Bake Lighting. Wait for the build to finish successfully.
- Select that placed source actor, then select its Spectral Lightmapped Prefab component in Details. Use the level instance, not the Blueprint template.
- Under Prefab Bake & Capture, click Capture.
- Read the capture message. Check Shared Capture for surface bindings and, if you added volumes, probe fields. A warning about missing fields means you should inspect those volumes before treating the capture as complete.
- Save the Blueprint and the changed level/build data.
Last Capture identifies the source that supplied the shared result. Captured Data Cost estimates the stored lighting cost, not the total cost of the Blueprint's meshes, materials, or gameplay.
Capture replaces the lighting shared by copies of that Blueprint. Loaded copies are refreshed, and future copies use the new result too. Keep a recoverable version before replacing lighting that is already used throughout your project. Capturing another instance is not a way to give only that instance a different baked appearance.
Place and move copies
Drag more copies of the Blueprint into a level, or spawn them through your normal Blueprint setup. Leave Apply Captured Lighting enabled to use the saved result.
Use Unreal's normal Mobility setting on the actor's root. Spectral does not have a separate prefab movement switch and does not change mobility for you.
| Copy | How to use it |
|---|---|
| Static | Use for modules that stay in place. A captured static copy reuses its surface lighting while still contributing baked shadows and bounced light to the level during a bake. |
| Movable | Use for a cabin, vehicle, or other moving assembly. It keeps its captured lighting and probe fields, but is excluded from the static bake so it does not leave a baked shadow behind when it moves. |
Keep your authoring source Static even if the copies used in gameplay are Movable. Moving a captured prefab is different from editing its internal mesh layout: the former carries the existing lighting along, while the latter needs an updated bake and capture.
Update the lighting
Return to the source when you change the meshes, lightmap UVs, probe bounds or spacing, or the lighting you want stored. Bake again, capture from the source, review the result, and save the changed assets. A previous Captured in Blueprint status does not prove that your latest edits have been captured.
Once manual capture is working, you can enable Auto Capture After Bake on the intended source. Future successful builds then replace the shared capture automatically. Check Last Capture before enabling it so you know which copy is supplying the lighting.
To stop one copy from using the saved result without deleting it, disable Apply Captured Lighting on that copy. To remove the shared result, use Clear Capture. Clearing affects the shared prefab lighting and disables automatic capture on the source; it does not delete the level's ordinary lighting build data.
Check the result
- Place a second copy and confirm that its surfaces use the expected captured lighting.
- If you included probe fields, use Visualize Global Probes to check the captured coverage on your copies.
- For moving prefabs, test movement in Play mode and check the lighting at the field boundaries.
- Use the Prefabs group in Memory to inspect the lighting cost.
If Capture reports that no baked lighting was found, check that you selected a placed static source and that its bake completed. If a copy has the wrong appearance after an edit, check the capture message and Last Capture, then rebake and recapture the intended source. The component reference explains the remaining status fields and recovery controls.