Relevant engine nodes
These nodes come with Unreal Engine. They are useful alongside Spectral's own nodes, particularly when a material needs different baked and visible behavior. Add them by searching their names in the Material Editor.
LightmassReplace
LightmassReplace chooses between a value for normal rendering and a value for the lighting bake. It does not blend them and has no runtime toggle or fade amount.
| Input | Purpose |
|---|---|
| Realtime | The value used by the material during ordinary rendering. |
| Lightmass | The value supplied for the Lightmass baking path. |
Connect both inputs with compatible values, then connect the output to the material property you want to control. See Epic's LightmassReplace reference.
How it relates to Spectral
Spectral's Subsurface Boost uses this same bake-versus-runtime separation internally. LightmassReplace gives you a more general way to author that distinction yourself. It affects the property you connect it to, not every property of the material automatically.
Use a small test bake when changing a graph. The ordinary material preview shows the Realtime branch, so it cannot prove that the baked branch produced the intended lighting.
Example: a visible glow without baked emission
Suppose a decorative sign should look luminous but should not cast baked light into its surroundings:
- Create the color and strength you want for the sign's visible emission.
- Connect that result to Realtime.
- Connect a Constant with value 0 to Lightmass.
- Connect LightmassReplace's output to Emissive Color.
- Apply and save the material, then bake the scene again.
Visible emission → Realtime
0 → Lightmass
LightmassReplace → Emissive Color
The surface can still look bright in the game while its bake-side emission is zero. Old illumination already stored in lightmaps or probes remains until you rebake.
For a whole mesh component, Emissive Boost: 0 is a simpler alternative. Use the graph approach when the distinction belongs to a particular material or material instance rather than all material slots on that component.
Example: separate visible and baked strengths
Use one emission color with two separate scalar multipliers. Feed the visible result to Realtime and the baked result to Lightmass. This lets you adjust the light recorded by the bake without forcing the surface to have the same displayed brightness.
Remember that the component's Emissive Boost also scales its baked emission. Keep that at 1 while testing the material branches so you are not changing two multipliers at once.
A flickering material can change its visible emission during play, but the surrounding baked illumination stays fixed. LightmassReplace does not make baked lightmaps or probes dynamic.
ScalarParameter and VectorParameter
ScalarParameter exposes one number, such as strength. VectorParameter exposes multiple channels, commonly a color. Give each a meaningful Parameter Name, set its default, then create a Material Instance and enable the relevant override to tune it. See Epic's material instance guide.
Useful Spectral connections include:
- A ScalarParameter connected to the Boost input of Spectral Subsurface Boost. The pin overrides Bake Boost in the node's Details.
- A VectorParameter supplying the surface color multiplied by Spectral Sampler lighting.
- Separate scalar parameters named Visible Emission and Baked Emission for the LightmassReplace example above.
Parameters make material instances easier to tune; they do not remove bake requirements. A parameter that changes bake-side emission or subsurface color still needs a new bake. A runtime tint applied to a sampled Unlit surface can change immediately without capturing new lighting.
Multiply, Lerp, and Clamp
These standard math nodes are useful for combining or limiting values around Spectral nodes. They do not add lighting data themselves. Epic documents their inputs in the math expression reference.
| Node | Inputs and behavior | Practical use |
|---|---|---|
| Multiply | Multiplies A by B, channel by channel. A scalar can scale an RGB color. | Surface color times Spectral Sampler's Normal output for an Unlit material. |
| LinearInterpolate (Lerp) | Blends A and B using Alpha. 0 selects A; 1 selects B. | Blend two authored tints or processed colors. |
| Clamp | Limits Input between Min and Max. | Keep a user-controlled blend factor within its intended range. |
Do not use Lerp as a substitute for LightmassReplace. Lerp blends values in the graph; it does not know which value you intend for baking.
Do not automatically clamp probe lighting or emission to 0–1. Lighting can legitimately exceed 1, and clipping it can flatten bright areas. Clamp a control value when needed, rather than discarding the range of the entire lighting result.
SceneTexture: PostProcessInput0
For a Post Process material, add SceneTexture and set Scene Texture Id to PostProcessInput0. Its Color output supplies the scene image entering that pass. Use its RGB channels for the Spectral fog nodes. See Epic's post-process material reference.
The intended Spectral fog graph is:
SceneTexture: PostProcessInput0
→ Spectral Remove Fog
→ your color operation
→ Spectral Reapply Fog
→ Emissive Color
Use Material Domain: Post Process and Blendable Location: Scene Color Before DOF for this pair. Connect the material to the post-process setup so it actually runs. See Remove Fog for prerequisites and dense-fog limitations.
SceneTexture also exposes texture size information and an optional UV input. Leave the sample at the current pixel for this basic graph. Warping its UVs does not make Spectral's internally sampled fog follow the same warp.
What about GIReplace?
Unreal also provides GIReplace, with Default, StaticIndirect, and DynamicIndirect inputs for different GI paths. It is not interchangeable with LightmassReplace. See Epic's GIReplace reference.
The Spectral source reviewed for these docs does not establish a separate supported workflow for those GIReplace branches. Use LightmassReplace for the bake/runtime distinction described here rather than assuming every native GI-specific branch applies to Spectral's GPU bake.