andrey_chen_
< cd ../oracle
Workspace › NightWindow › Painting › SurfaceGui Client · BindToRenderStep Roblox Studio ▶ Play
WorkspaceCamera● RunningShowcase · 60 s

Night Window: Unreal to Roblox

The window in Oracle is a fake-glass material: an interior cubemap with parallax, rain on the glass, refraction and a flickering neon sign, all on one flat plane. Roblox has no custom shaders, so I rebuilt the same effect from what the engine does expose. The goal was to match its look and its controls, so an artist can tune it with the same knobs, while staying cheap enough for phones.

▼

From a shader to a SurfaceGui

same knobs · no pixel shaders

In Unreal, everything happens per pixel inside one material. In Roblox, the plane just behind the glass carries a SurfaceGui (2D UI drawn on a part’s face). Every shader input becomes a UI layer, and every shader computation becomes a few property writes from one client script, which reads its settings from attributes named after the original material parameters.

Unreal material instance MI_FakeGlass_Parallax with its parameter panel
Unreal · MI_FakeGlass_Parallax
Roblox rebuild: rain on glass over the neon street
Roblox · same parameters as attributes
Unreal parameter
Value
Roblox equivalent
Interior Zoom
1.25
Each layer drawn 1.25× the window, leaving a margin to slide
Emissive Boost
6
SurfaceGui.Brightness, unlit (LightInfluence 0)
Rain Speed / Water Tiling
4 / 3
Scroll speed and 3×3 grid of the glass-rain tiles
Glass Refraction
3
Per-layer sine wobble and squash
Glass Opacity / Corner Dust
0.5 / 0.8
Tint frame over the view / four edge gradients
▼

Parallax without pixels

7 painted layers

Unreal’s bump offset shifts texture lookups by the view vector. Here the same idea moves whole layers: the camera is brought into the plane’s local space, and each layer slides by the view angle times its depth, clamped to the margin Interior Zoom leaves. Far layers slide most and near ones barely move, so the street shifts against the frame and blinds like a real view.

local rel = painting.CFrame:PointToObjectSpace(camera.CFrame.Position)
local tanX = math.clamp(-rel.X / -rel.Z, -1.5, 1.5)
local room = (InteriorZoom - 1) / 2 * 0.98  -- slide margin
layer.Position = 0.5 + math.clamp(tanX * depth + wobble, -room, room)  -- y likewise

A cubemap does not split into depths, so the scene became seven separately painted layers, from sky to street. A first pass cut one painting into bands by colour, and anything crossing a band, such as the water tower, tore apart as the bands slid. Painting each depth as its own image keeps every building whole.

The seven painted layers stacked back to front
Layer stack · sky 0.12 → street 0.022
Window seen at an angle, far layers sliding behind the frame
Parallax from an angle
▼

Glass & rain

no particles
  • Streaks: two layers of droplet tiles that scroll and wrap by exactly one tile, so panning never seams. Bands fall at different speeds, so the rain never reads as one sheet.
  • Drops: round drops that fade in, hold and fade out at their own pace, then reappear elsewhere.
  • Refraction: each painted layer wobbles on its own pair of sines, so the layers drift against each other like water distortion.
  • Outside: diagonal rain and small Roblox-style walkers sit at street depth, so they parallax with the street.
Rain streaks and drops on the glass
Rain on glass
Outside rain and walkers behind the glass
Outside rain & people
▼

Neon & lightning

3 sines · 3 strike patterns

Each neon tower flickers on three sine waves at unrelated frequencies (a slow breath, a buzz and a fast jitter) with a cutoff for dropouts, and its own phase so nothing blinks in sync. To make painted neon switch off, the tubes were split out of the art into a base with the tubes off, the lit tubes, and a blurred glow, which gives bloom without post-processing. Lightning fires random bursts of pops and dips rather than a fade, and briefly drives a flash plane, exposure, colour correction and the neon together, then restores every value exactly.

Neon towers flickering over the wet street
Neon towers
Neon tubes lit and switched off
Tubes lit / off
Lightning flash washing the room toward white
Lightning peak
▼

Trade-offs & budget

phone-first
Approximated

Per-layer parallax instead of a per-pixel room box; refraction as layer wobble; no additive blending, so the exposure spike supplies the overblow; emissive from GUI brightness plus baked glow.

Budget

Updates at 30 Hz, only while the window is on screen and within 120 studs, at about 15 property writes per tick. No particles, render targets, shadows or added lights beyond one neon spill light.

Roblox Gotchas

Glass material hides SurfaceGuis behind it, so the pane is clear plastic with a UI tint. ImageColor3 can only darken, so sprites that light up in a flash are authored white and tinted down.

Artist Controls

Every value is an attribute on the window model, grouped like the Unreal material: Interior, Rain, Outside, Glass, Neon, Lightning and Budget.

Roblox Studio · client-side Luau · original effect: the Oracle window material in Unreal Engine