Mixed-reality K-pop theatre · SM Entertainment

SM REALIVE

A mixed-reality K-pop theatre: 8K stereo video, frame-synced across headsets, with hand-held cheering.

VR Software Engineer

±1–2 frames
Playback sync across 5 Quest 3 headsets
8K
Stereo video from a single decode
50%
Less decode memory, and less on-site setup time
Watch the SM REALIVE demo

01

8K stereo, decoded once.

One VideoPlayer decodes a single 7680×3840 frame and custom UVs split it to each eye: half the decode memory, and the eyes can never drift apart.

02

Every headset, the same frame.

A master server sends play, pause and seek as future timestamps. Each Quest 3 converts that to its own clock and fires VideoPlayer.Play() at the same physical moment, holding drift to ±1–2 frames.

03

The concert fades into your room.

A custom HLSL shader fades the video sphere by height, so the stage melts into the real room through passthrough instead of ending at a hard edge.

04

A cheering stick that stays in your hand.

Physics grabbing jittered and dropped the stick when fans shook it. A thumb–index proximity check, anchor snapping and a holding-hand mesh keep it locked to the hand.

05

Before: physics grab.

With a collider grab the stick floated, lagged and fell out of shaking hands, the problem the anchor fix solved.

Frame logs from five headsets overlaid

06

Measured, frame by frame.

Every headset logs its CurrentFrame to CSV during stress tests. Five clients stay within one to two frames of each other.

Context

A shared VR concert only works if everyone sees the same frame, in full 8K, and can still feel the room around them.

The problem

Standard replication across 5+ Quest 3 headsets drifted by more than 100 ms, and two-player stereo doubled the decode load on mobile hardware. Physics-based grabbing also made the hand-held cheering stick jitter and fall out of fans' hands.

What I owned

As VR Software Engineer I built the master-client sync, the single-decode 8K stereo player, the passthrough blending shader and the cheering-stick interaction, plus the deployment pipeline.

Headset

UnityC#HLSL (ShaderLab)Meta XR SDKXR Interaction ToolkitPassthrough API

Server

Node.jsSocket.io

Ops

DockerMeta Horizon Managed ServicesKiosk Mode

Architecture

A master server keeps every headset on one clock; inside each headset, one decoder feeds both eyes, a shader blends the stage into the room, and hand tracking drives the cheering stick.

Master-client sync · single-decode 8K stereo · passthrough blend · hand interaction

swipe
Each Meta Quest 3 (× 5, HMS-managed)per headsetscheduledshared texturealphaMaster ServerScheduled playClock offsetOne 8K decodeL / R eyesHeight fadePassthroughCheering stick
  1. Critical path
  2. Master Server
  3. →Scheduled play
  4. →One 8K decode
  5. →L / R eyes

Critical path highlighted: a scheduled command reaches the single decoder, which feeds both eyes at the same frame.

Key decisions

Three choices shaped the show: schedule in the future, decode once, and fade on the GPU.

Decision 1

Schedule playback at a future server timestamp

Problem
Playing on packet arrival lets network jitter become frame drift above 100 ms.
Options
  • Play when the command arrives
  • Send a future server time and let each client wait locally
Decision
Each client computes timeOffset = ServerTime − LocalTime − RTT/2, waits until the local equivalent of the target time, and seeks forward if the packet arrived late.
Result
±1–2 frame (≈33 ms) sync across 5 devices, validated with frame logs.
Trade-off
Commands need lead time, and the RTT/2 estimate assumes symmetric latency.

Decision 2

One decoder for both eyes

Problem
Stock stereo players run two VideoPlayers, doubling decode load for 8K footage on a standalone headset.
Options
  • Two players, one per eye
  • One player rendering to a shared material, split per eye by UV
Decision
A single VideoPlayer in MaterialOverride mode feeds two duplicated materials (_EyeSelect 0/1) on left and right spheres.
Result
Stutter-free 8K stereo with about 50% less decode memory, and no left/right drift by construction.
Trade-off
Both eyes share one texture size, so per-eye resolution is half the frame width.

Decision 3

Blend reality in the vertex shader

Problem
The bottom edge of the video sphere cut hard into the passthrough view.
Options
  • C# opacity by head angle (MaterialPropertyBlock)
  • HLSL alpha by world height in the vertex shader
Decision
Fade per vertex with saturate((y − _EndY) / range), ZWrite Off and standard alpha blending, keeping the C# angle zones for global opacity.
Result
A smooth stage-to-room transition with no per-frame CPU work for the gradient.
Trade-off
The fade band is fixed in world height, so it is tuned per venue.

Measurement

Drift went from over 100 ms to about ±33 ms, measured by logging `CurrentFrame` from every client to CSV during stress tests.

Inter-device playback drift

Before
> 100 ms
After
≈ 33 ms

Reliability

Sync is checked with per-client frame logs, and a dropped headset can rejoin mid-show without a restart.

  • A real-time CSV logger records CurrentFrame from all clients during stress tests.
  • Fail-safe LOD: devices above 150 ms RTT downgrade video resolution to keep sync.
  • Disconnected clients hot-swap back in using the computed global time offset, without restarting the experience.
  • Late packets fall back to seeking to the correct position instead of playing behind.
  • Targeted emits (io.to(guestId).emit) correct only clients beyond ±3 frames; broadcasting to everyone had flooded client main threads.
  • In a 5-person test the cheering stick no longer dropped during vigorous shaking, the main complaint from the first session.

Limits and scale

The design is proven for one room of five headsets driven by one server.

TodayA single master server drives every device, so it is a single point of failure.

At scale—

TodayClock offset uses RTT/2, which assumes symmetric up and down latency.

At scaleUse multiple NTP-style samples and take the lowest-RTT measurement.

TodayValidated with 5 concurrent devices.

At scale—

Learnings

Real-time XR is a timing problem first and a rendering problem second.

  1. 01

    Schedule against a shared clock instead of reacting to packets; jitter then stops mattering.

  2. 02

    On standalone hardware, the cheapest frame is the one you only decode once.

  3. 03

    Real hands are noisier than physics engines expect, so interaction needs intent, not just colliders.

Engineering deep divePipelines, code flow and implementation notes

Key implementation

csharp
// Future Timestamp Execution Strategy
public void SchedulePlayback(long targetServerTime) {
    // 1. Calculate precise local offset using RTT
    // timeOffset = ServerTime - LocalTime - (RTT / 2)
    long localTargetTime = targetServerTime - this.timeOffset;
    
    // 2. Calculate exact wait duration
    // WaitTime = TargetTime - CurrentLocalTime
    double waitSeconds = (localTargetTime - DateTime.UtcNow.Ticks) / 10000000.0;
    
    if (waitSeconds > 0) {
        // 3. Schedule execution
        StartCoroutine(ExecuteAtTime(waitSeconds, () => {
            videoPlayer.Play(); // Triggers at the exact same physical moment
        }));
    } else {
        // Fallback: Seek to correct position if packet arrived late
        videoPlayer.time += Math.Abs(waitSeconds);
        videoPlayer.Play();
    }
}

Passthrough blend (vertex shader)

hlsl
v2f vert (appdata v) {
    v2f o;
    // Fade the video sphere by height so the stage melts into passthrough
    float alpha = saturate((v.vertex.y - _EndY) / range);
    o.alpha = alpha;
    return o;
}
// Cull Off · ZWrite Off · Blend SrcAlpha OneMinusSrcAlpha

Cheering-stick grab

A HandMeshActivationController runs four states: Initial (hidden) → Proximity (guide) → Mesh activation (holding-hand swap) → Full interaction (anchored grab). The thumb–index distance, not a collider, decides when a grab starts and ends.

Deployment

The architecture was deployed commercially for the SM REALIVE K-pop VR Theater. An automated Docker and Kiosk Mode deployment pipeline cut on-site setup time by 50%.

← All projects