DocsGRADEEffects

Ground Blend (Experimental)

12 min read

On this page

Ground Blend makes objects grow out of the ground instead of looking stuck on it. The ground's material (its colour, normal and roughness) continues smoothly up onto everything that rests on it or sticks out of it: rocks, walls, tree trunks, fences, props. It is automatic: no setup per mesh, no material changes, one actor per level.

It works in the editor, Play In Editor and packaged games, with dynamic lighting (with or without Lumen) and with baked lighting, and it does not need GRADE Studio to run: the actor carries the settings and is saved with the level.

Quick start

  1. Open Panels > Grade > Ground Blend in GRADE Studio (a closed tab next to Volumetrics in every built-in workspace).
  2. Press + Ground Blend. It adds a GRADE Ground Blend actor to the level (one undo step) and selects it. You can also place it from Place Actors ("GRADE Ground Blend (Experimental)").
  3. Look at the level viewport (Realtime on). The panel's status line says what it found: "Ground cache ready: 12 ground primitive(s), 2048 px over 60 m".
  4. Tune Transition Height (how far up the ground climbs) and Noise Amount (how broken its edge is).

If the status says no ground was found, add the tag GradeGround to the actors that are your ground (see What counts as ground).

How it works

Ground Blend is a small, cheap stand-in for a runtime virtual texture of the ground, managed for you:

  1. A ground cache around the camera. An orthographic camera looks straight down at the ground only (every other object is left out) and records, for a square around the camera (60 m by default), the ground's height, base colour, normal, roughness and metallic. Because only the ground is in that picture, the cache knows what the ground looks like under every rock and wall, not just around it.
  2. The blend, before lighting. Right after the base pass, before any light is computed, a full-screen pass looks at every object pixel: it finds its world position, reads the cache at that spot, measures how high the pixel is above the cached ground, and blends the pixel's material toward the ground's: fully at the contact, fading out smoothly over the Transition Height. Because this happens in the GBuffer, every light, shadow, Lumen, reflections and ambient occlusion then shade the blended surface exactly like the ground next to it: no visible seam.

What makes it look right:

  • World-stable. The weight of every pixel depends only on its position in the world (and the static ground under it). There is no screen-space search and no history, so the blend never trembles, swims or smears when the camera moves.
  • Long and soft. A smootherstep falloff with no visible start or end, broken by world-anchored noise that stays on the surfaces. Higher up, the ground is read more blurred, so its detail does not turn into vertical streaks on walls.
  • Up-facing surfaces take more. The top of a rock takes the ground higher than its sides (like soil and moss settling on it); faces pointing down never take it.
  • Seams lit like the ground. Near the contact the object's normal leans toward the ground's, so the contact line has the ground's lighting.
  • The ground itself is never touched. Pixels at the ground's height that face like it are left exactly as rendered, so the ground never gets blurrier.
  • Characters keep their look. With Skip Moving Objects (on by default) characters, vehicles and other movable objects that write motion vectors keep their own material.

The cache follows the camera in steps of an eighth of its range (7.5 m by default). The steps are whole texels on a grid fixed in the world, so a recapture of static ground gives exactly the same texels: nothing pops. Between steps nothing is captured. The edge of the cache fades out softly.

The Ground Blend panel

Header. The EXPERIMENTAL badge, Enabled, and a status line with a coloured marker (green when the cache is ready):

StatusWhat to do
No Ground Blend in this levelPress + Ground Blend.
Ground Blend needs deferred shading / the classic GBuffer layout / the desktop rendererThe project uses Forward Shading, Substrate with the Adaptive GBuffer format, or a mobile preview: nothing is drawn (the settings are kept). For Substrate, press Switch to Blendable GBuffer... under the status line (see Substrate GBuffer format) and restart the editor.
The project is set to Substrate's Blendable GBuffer format, but the editor still runs with the Adaptive formatThe switch is saved: press Restart Editor.
Waiting for a viewportThe cache is captured when a level viewport renders: turn Realtime on.
No ground found around the cameraTag the ground actors with the Ground Tag, or lower Ground Min Size.
Capturing the ground around the camera...Wait a moment.
The ground capture did not reach Ground BlendSee Limits; press Recapture Now.
Ground cache ready: N ground primitive(s), ...Working.

Substrate GBuffer format

Ground Blend edits the GBuffer before lighting, so it needs the classic GBuffer layout: Substrate off, or Substrate with the Blendable GBuffer format. When the project uses Substrate's Adaptive GBuffer format, the header shows a Switch to Blendable GBuffer... button under the status line. It first tells you what will change and asks:

  • It sets Project Settings > Engine > Rendering > Substrate > Substrate GBuffer Format (Project) to Blendable GBuffer in Config/DefaultEngine.ini (checked out first when the file is under revision control; if the file is read-only, GRADE asks before making it writable, and changes nothing if you say no or the file cannot be written).
  • This also lets Bevel (before lighting), the GBuffer normals of Ambient Occlusion, the Denoise scene guides and the GBuffer mask inputs work.
  • The trade-off: Blendable GBuffer keeps one closure (one material layer) per pixel, so Substrate materials that rely on several layers per pixel (layered coats, several slabs) are simplified and lose some visual fidelity. It is faster, and it is the format most new project templates use.
  • The editor must restart and shaders recompile (this can take a while the first time). A notification offers Restart Now or Later; until you restart, the header shows Restart Editor.

After the switch the header shows a small Restore previous Substrate format... button. It puts back exactly the value the project had (GRADE keeps it in your per-project editor settings), after saying which GRADE features turn off again; it also needs a restart. The buttons never appear in projects without Substrate. The same buttons are in the Bevel and Ambient Occlusion panels of the effects rack.

Recapture Now captures the ground again (after you move or edit ground meshes; with Refresh Interval 0 the cache only follows the camera and setting changes). Select Actor selects the level's Ground Blend actor (its settings are also in the Details panel).

Below, the settings in sections: Blend, Ground, Cache, Contact Shading and Debug. Every change is one undo step (a slider drag is one step), and several GRADE Studio windows can show the panel at once.

Settings

SettingDefaultWhat it does
EnabledOnTurns Ground Blend on / off for the level. Off costs nothing.
Strength100 %How much of the ground objects take at their base.
Transition Height40 cmHeight above the ground over which the blend fades out.
Noise Amount35 %Breaks the edge of the blend with world-anchored noise (0 = a clean, level edge).
Noise Scale90 cmSize of the noise features.
Up-Facing Bias50 %Up-facing parts take the ground higher (up to 1.75 x the transition at 50 %, 2.5 x at 100 %).
Normal Blend70 %How far object normals lean toward the ground's near the contact.
Max Height (Fill Only Below)0 (off)Objects whose underside floats more than this above the ground get nothing. On adds a small second capture of the objects seen from below.
Skip Moving ObjectsOnMovable objects with base-pass motion vectors (characters, vehicles) keep their own material.
Auto GroundOnFinds the ground automatically (landscapes, large flat static meshes).
Ground Min Size400 cmSmallest horizontal size (both axes) of a flat static mesh that counts as ground automatically.
Ground TagGradeGroundActors or components with this tag always count as ground.
Cache Range60 mSide of the cached square around the camera. Larger = farther blend, coarser texels.
QualityMediumCache resolution: Low 1024, Medium 2048, High 4096 texels per side.
Refresh Interval0 sSeconds between automatic recaptures (0 = static ground: only when the camera moves far enough or a setting changes).
Contact ShadingOffA soft darkening of the ground around the footprints of objects resting on it.
Contact Strength45 %How dark the ground gets right next to a footprint.
Contact Radius40 cmHow far the darkening reaches.
Debug ViewNoneSee Debug views.

Blueprint: Recapture Now and Set Blend Enabled on the actor; every setting is Blueprint read / write.

What counts as ground

  • Auto Ground (on by default): every landscape, and every non-movable static mesh whose bounds are at least Ground Min Size across on both horizontal axes and flat (its height at most 20 % of its smaller side), and not entirely above the camera (a ceiling or an upper floor is never the ground under the camera). Painted foliage and grass never count.
  • Ground Tag: any actor (or a single component) with the tag counts as ground, whatever its size or mobility: road meshes, a rocky floor piece, terrain tiles. Add the tag in the actor's Details panel (Actor > Tags) or on a component.
  • Everything else is an object and takes the blend near the ground.

The ground's decals are part of the cache (painted dirt and roads continue onto objects too).

Lighting

  • Dynamic lighting, with or without Lumen. The blend is in the GBuffer before lighting, so direct light, shadows, Lumen global illumination and reflections, sky light and ambient occlusion are computed on the blended material.
  • Baked lighting. The base pass has already added the baked (lightmap) indirect light, computed with the object's own colour. Ground Blend rescales it by the new / old diffuse colour, so the blended area takes the ground's colour under the object's own baked light.

What remains approximate (honest list):

  • With baked lighting, a blended pixel keeps the object's baked light and shadows (rescaled), not the ground's own bake; a strongly different lightmap on the object and on the ground can still show at the contact. Emissive on blended pixels is rescaled with it.
  • Lumen's own scene representation (used for bounced light and reflections of off-screen surfaces) still sees the original materials: the light bounced from a blended area keeps the object's colour.
  • The ground's material is cached once per capture: animated ground materials (moving water, wind on grass) are frozen in the cache until the next refresh.

Debug views

Debug views paint into the base colour, so the image stays lit and shapes still read.

ViewShows
WeightHow much ground each object pixel takes (dark blue = none, yellow = all); the ground itself in grey.
Ground Cache ColourThe cached ground colour under every pixel (magenta = outside the cache or no ground below).
HeightThe height above the cached ground: a ramp up to the transition height, a line every 10 cm, blue below the ground.
ContactThe contact footprints (red) and objects floating above Max Height (cyan). Turns on the footprint capture.

Cost

Estimates for a mid-range desktop GPU (measure in your own level with stat gpu: "GRADE Ground Blend (before lighting)" and "GRADE Ground Blend (cache)"):

PartWhenCost (estimate)
Blend passEvery frame, every viewabout 0.3 - 0.5 ms at 1080p, 1 - 1.5 ms at 4K (pixels with nothing to blend leave early)
Ground captureOnly when the camera moves a step (7.5 m by default), a setting changes or Recapture Now1 - 3 ms on that frame (only the ground is drawn), plus a few milliseconds of CPU to find the ground in large levels
Footprint captureWith Max Height, Contact Shading or the Contact view, on the same frames1 - 4 ms on that frame (draws the other objects at half resolution)
Video memoryWhile the level is shownLow about 20 MB, Medium about 80 MB, High about 310 MB (+ 3 / 10 / 40 MB with the footprint capture)

With no enabled Ground Blend actor in the level, nothing runs and nothing is allocated. A cache nobody looks at for 30 seconds is released.

Limits

  • Deferred shading only. Forward Shading, Substrate with the Adaptive GBuffer format and mobile previews draw nothing (the panel says so). Substrate with the Blendable GBuffer format (the default of projects created with 5.7 and later) is supported: it writes the same GBuffer as Substrate off. The panel's Switch to Blendable GBuffer... button changes the format for you (see Substrate GBuffer format).
  • One ground height per spot. The cache stores the top-most ground under each point: under a bridge or in a cave, the ground below is not blended (objects there are too far from the cached surface, so they are left alone).
  • Translucent and unlit materials are never changed, and neither are subsurface profile, hair, eye, single layer water and thin translucent materials.
  • Objects that move (with Skip Moving Objects off) take the ground under their current position; the ground itself is only recaptured on the steps above, so moving ground meshes need a Refresh Interval or Recapture Now.
  • Skip Moving Objects needs motion vectors written in the base pass. When the project writes them in a separate pass after it, characters near the ground take the blend too.
  • Scene captures of other systems that record depth, normals or base colour are not blended; captures of the final image (GRADE capture points, scene-colour captures) are.
  • Quality High (4096) needs a lot of temporary video memory while the ground is captured (several hundred MB on top of the cache). Keep Medium on 8 GB cards and use High only for close-up shots.
  • Split screen and several viewports share one cache per level, centred on the first view that rendered it; views far from it see no blend until they become the active one.
  • The ground capture is a scene capture that Ground Blend reads at the end of its base pass. If the status says the capture did not reach Ground Blend, another plugin or a project setting changed how scene captures render; press Recapture Now, and contact support with your engine settings if it stays.

FAQ

Do I need to change my materials? No. Nothing in your materials or meshes changes.

Does it replace a runtime virtual texture blend? For the common case (terrain and props) it gives the same kind of result without any material setup. A material-based blend still gives you full control per material.

Why does my road not blend onto the curb? The road is probably not ground: give it the Ground Tag.

Why does a floating platform take the ground? Turn on Max Height (Fill Only Below) (for example 20 cm).

Can I see what the cache holds? Use the Ground Cache Colour and Height debug views.

Does it work with Substrate? Yes, with the Blendable GBuffer format (the default of projects created with 5.7 and later). With the Adaptive GBuffer format nothing is drawn: press Switch to Blendable GBuffer... in the panel (it sets Project Settings > Engine > Rendering > Substrate > Substrate GBuffer Format (Project) to Blendable GBuffer after telling you what changes) and restart the editor. Restore previous Substrate format... switches back.