---
id: "4d-gaussian-splatting"
title: "4D Gaussian Splatting"
aliases: [4DGS, dynamic gaussian splatting]
domain: "capture"
stage: "capture"
realtime: "realtime"
platforms: [cuda, desktop-gpu, python]
year_introduced: 2023
inputs: [photos, camera-poses]
outputs: [gaussians, animation]
style: "photoreal"
dynamic: "dynamic"
cost: "heavy"
authority: "Wu et al., 2023"
url: "https://texelatlas.vercel.app/t/4d-gaussian-splatting/"
sources_verified_at: "2026-11-29"
---
# 4D Gaussian Splatting (Wu et al., 2023)

> Extends 3D Gaussian splatting to moving scenes by adding time: either a canonical set of Gaussians deformed per timestamp or primitives that are Gaussian in x, y, z and t.

## Reach for it when

- splat a scene that has moving people
- want free viewpoint video from multi view cameras
- reconstructed scene looks frozen when people or objects move
- replay captured motion in real time

## How it works

There are two main families. Deformation-field methods keep one canonical set of 3D Gaussians and learn a compact network, often a multi-resolution HexPlane over (x, y, z, t) plus a tiny decoder, that predicts per-Gaussian offsets in position, rotation and scale at a query time; the deformed Gaussians then go through the usual splat rasteriser. Native 4D methods instead optimise Gaussians in four dimensions and slice them at time t to get a 3D Gaussian, with spherindrical harmonics for view and time-dependent colour. Training uses multi-view video or monocular video with known poses and the same photometric loss as static splatting, plus regularisers on motion smoothness. Rendering at inference is the standard splat sort and blend, so frame rates stay real time.

## When to use it

Choose it to capture and replay people or scenes in motion from synchronised multi-view video with free viewpoint. Prefer [3D Gaussian Splatting](https://texelatlas.vercel.app/t/gaussian-splatting-3dgs.md) for static scenes, [Neural Radiance Fields (NeRF)](https://texelatlas.vercel.app/t/nerf.md)-based dynamic methods when memory per frame matters less than a fixed model, and [Web Gaussian Splat Renderers (three.js)](https://texelatlas.vercel.app/t/web-gaussian-splat-viewers.md) for playback in a browser once frames are exported; per-frame static splats are simplest but heavy for long clips.

## Cost

heavy — Rendering stays in the real-time range on a desktop GPU per the papers' claims, but training takes tens of minutes per short clip and storage grows with duration.
Measured GPU Weight: 103.29× baseline (extreme) — 3.3984 ms median / 3.6849 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 92.82× baseline (extreme) — 1.4758 ms median (2.3× faster on L4).
Ampere A100 scaling: 72.07× baseline (extreme) — 2.0756 ms median (1.64× faster on A100).

## Failure modes

- Fast, large motion or topology changes get smeared or leave floaters because the deformation is smooth in time
- Monocular video is under-constrained, so motion and geometry are ambiguous without additional depth or flow cues
- Memory and file size grow with sequence length, hurting streaming or web delivery
- Time-slicing artifacts appear when sampled time falls between training frames with sparse temporal coverage

## Dataflow

- Inputs: photos, camera-poses
- Outputs: gaussians, animation
- Platforms: cuda, desktop-gpu, python

## Presets

### 4D Gaussian Splatting — spacetime hexplane velocity trails (left) vs dynamic 4D splats (right) (glsl-fragment; rendered 2026-11-30)

```json
{
  "P_TIME_RATE": 1,
  "P_DEFORM_AMP": 0.75,
  "P_SPLAT_RAD": 0.12,
  "P_SPLIT": 0.46
}
```

```glsl
const float P_TIME_RATE = 1.0; // P Temporal Speed [0.0, 2.5, 0.05]
const float P_DEFORM_AMP = 0.75; // P 4D Motion Amp [0.1, 1.4, 0.04]
const float P_SPLAT_RAD = 0.12; // P Splat Radius [0.05, 0.24, 0.01]
const float P_SPLIT = 0.46; // P Trajectories / 4DGS [0.0, 1.0, 0.02]

mat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }

// Canonical 3D Gaussian i deformed by a smooth HexPlane spatiotemporal displacement field dX(x, t)
vec3 eval4DPos(float fi, float t, float amp) {
  float u = fi / 32.0;
  float phi = fi * 2.3999632; // golden angle
  float y0 = (u - 0.5) * 1.15;
  float r0 = 0.42 * sqrt(max(1.0 - y0 * y0 * 0.9, 0.05)) + 0.14;
  vec3 base = vec3(cos(phi) * r0, y0, sin(phi) * r0);

  // HexPlane time-varying shear, wave ripple & flapping wing motion
  float wave = sin(t * 2.2 + base.y * 4.2 + phi * 0.5);
  float wing = cos(t * 1.8 - abs(base.x) * 3.5);
  vec3 dx = vec3(
    0.22 * wave * sign(base.x + 1e-4),
    0.16 * wing + 0.10 * sin(t * 2.6 + phi),
    0.20 * cos(t * 2.0 + base.y * 3.8)
  ) * amp;
  vec3 pos = base + dx;
  pos.xz = rot2(t * 0.42) * pos.xz;
  return pos;
}

vec3 aces(vec3 x) {
  x = max(x, 0.0);
  return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
  float screenX = fragCoord.x / max(iResolution.x, 1.0);
  float split = clamp(P_SPLIT, 0.0, 1.0);
  bool isTrail = screenX < split;
  float t = iTime * max(P_TIME_RATE, 0.0);
  float amp = clamp(P_DEFORM_AMP, 0.05, 1.6);
  float rad = clamp(P_SPLAT_RAD, 0.04, 0.26);

  vec3 ro = vec3(0.0, 0.14, 2.35);
  vec3 rd = normalize(vec3(uv, -1.52));
  vec3 bg = mix(vec3(0.020, 0.026, 0.048), vec3(0.055, 0.072, 0.122), smoothstep(-0.55, 0.55, uv.y));

  vec3 acc = vec3(0.0);
  float T = 1.0;

  for (int i = 0; i < 32; i++) {
    float fi = float(i);
    vec3 pNow = eval4DPos(fi, t, amp);
    vec3 pPrev = eval4DPos(fi, t - 0.14, amp);
    vec3 vel = pNow - pPrev;
    float speed = length(vel);
    vec3 vDir = vel / max(speed, 1e-4);

    // Current Gaussian response
    vec3 oc = pNow - ro;
    float tProj = dot(oc, rd);
    if (tProj > 0.2) {
      vec3 perp = oc - rd * tProj;
      // 4D covariance elongates along instantaneous velocity direction
      float dV = dot(perp, vDir);
      vec3 dN = perp - vDir * dV;
      float stretch = 1.0 + speed * 5.0;
      float m2 = (dot(dN, dN) + (dV * dV) / (stretch * stretch)) / max(rad * rad, 1e-4);
      float g = exp(-m2 * 2.1);

      if (g > 0.012) {
        float a = clamp(g * 0.78, 0.0, 0.92);
        vec3 baseCol = mix(vec3(0.14, 0.76, 0.96), vec3(0.98, 0.42, 0.24), fi / 32.0);
        vec3 velCol = mix(vec3(0.18, 0.42, 0.92), vec3(1.0, 0.86, 0.24), clamp(speed * 7.0, 0.0, 1.0));
        vec3 gCol = isTrail ? velCol : baseCol;
        acc += T * a * gCol * (0.75 + 0.55 * g);
        T *= (1.0 - a);
        if (T < 0.02) break;
      }
    }

    // On left side, draw spacetime motion trails (3 past temporal slices)
    if (isTrail) {
      for (int s = 1; s <= 3; s++) {
        float fs = float(s);
        vec3 pOld = eval4DPos(fi, t - fs * 0.10, amp);
        vec3 oc2 = pOld - ro;
        float tp2 = dot(oc2, rd);
        if (tp2 > 0.2) {
          vec3 perp2 = oc2 - rd * tp2;
          float g2 = exp(-dot(perp2, perp2) / max(rad * rad * 0.18, 1e-5));
          acc += T * g2 * 0.22 * (1.0 - fs * 0.25) * vec3(0.24, 0.92, 0.88);
        }
      }
    }
  }

  vec3 col = acc + T * bg;
  float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));
  col = mix(col, vec3(0.95, 0.97, 1.0), sep);

  fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}
```

Attribution: MIT — written for this index.

## Lineage

- extends [3D Gaussian Splatting](https://texelatlas.vercel.app/t/gaussian-splatting-3dgs.md)

## Combines with

- [Structure-from-Motion (COLMAP)](https://texelatlas.vercel.app/t/structure-from-motion-colmap.md): Per-frame or first-frame COLMAP poses initialise the cameras and the canonical Gaussian set.

## Sources

1. [primary] Guanjun Wu, Taoran Yi, Jiemin Fang, Lingxi Xie, Xiaopeng Zhang, Wei Wei, Wenyu Liu, Qi Tian, Xinggang Wang (2023) 4D Gaussian Splatting for Real-Time Dynamic Scene Rendering. arXiv preprint (cs.CV). https://arxiv.org/abs/2310.08528 (verified via arxiv on 2026-11-29)
2. [implementation] hustvl (2023) hustvl/4DGaussians. https://github.com/hustvl/4DGaussians License: Apache-2.0. (verified via github on 2026-11-29)
3. [implementation] LogosIntelligenceLab (2023) LogosIntelligenceLab/4d-gaussian-splatting. https://github.com/LogosIntelligenceLab/4d-gaussian-splatting License: MIT. (verified via github on 2026-11-29)

## Cite this entry

Texel. "4D Gaussian Splatting." https://texelatlas.vercel.app/t/4d-gaussian-splatting/ (accessed 2026-12-01).
