---
id: "dreamgaussian"
title: "DreamGaussian"
aliases: [DreamGaussian text/image-to-3D]
domain: "genai"
stage: "generation"
realtime: "interactive"
platforms: [python, cuda]
year_introduced: 2023
inputs: [photos, text-prompt]
outputs: [gaussians, mesh, texture]
style: "both"
dynamic: "static"
cost: "heavy"
authority: "Tang et al., 2023"
url: "https://texelatlas.vercel.app/t/dreamgaussian/"
sources_verified_at: "2026-11-29"
---
# DreamGaussian (Tang et al., 2023)

> Generates a 3D asset from one image or a prompt by optimising Gaussian splats with score distillation, then extracting a textured mesh, finishing in about a couple of minutes instead of the hour-scale of NeRF-based pipelines.

## Reach for it when

- turn a single image into a 3d model in a couple of minutes
- need fast text to 3d prototype with a mesh export
- previous score distillation pipelines take an hour per asset
- want gaussian splat output from one photo
- generated 3d asset needs a textured mesh not just splats

## How it works

Stage one initialises a few thousand random 3D Gaussians and optimises them with score distillation sampling (see [Score Distillation Sampling (DreamFusion)](https://texelatlas.vercel.app/t/score-distillation-sampling.md)): renders from random cameras are scored by a pretrained multi-view or image-conditioned diffusion model (Zero-1-to-3 style for image input), while the input view is also supervised directly. Gaussian splatting converges quickly and its densification schedule is adapted to the stochastic SDS loss, which makes this stage far faster than implicit fields. Stage two converts the splats to a mesh by querying a local density grid with block-wise marching cubes (see [Marching Cubes](https://texelatlas.vercel.app/t/marching-cubes.md)), computes UVs, back-projects colour from splats into a texture, and refines the texture with an image-to-image diffusion loss on rendered views, using multiview-consistent denoising. Output is a standard textured mesh ready for game engines.

## When to use it

Choose it for quick single-image or prompt prototyping where a coarse textured mesh in a minute or two beats waiting for a heavy pipeline. Prefer feed-forward image-to-3D such as [TripoSR](https://texelatlas.vercel.app/t/triposr.md), [InstantMesh](https://texelatlas.vercel.app/t/instantmesh.md) or [TRELLIS (Structured 3D Latents)](https://texelatlas.vercel.app/t/trellis.md) when you need seconds and more reliable geometry, [Hunyuan3D 2.0](https://texelatlas.vercel.app/t/hunyuan3d-2.md) for higher-fidelity production assets, and [3D Gaussian Splatting](https://texelatlas.vercel.app/t/gaussian-splatting-3dgs.md) reconstruction when you have real multi-view photos.

## Cost

heavy — Minutes per asset on a single modern GPU; optimisation-based, so not interactive per frame.
Measured GPU Weight: 28.63× baseline (heavy) — 0.9419 ms median / 0.9653 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 20.16× baseline (heavy) — 0.3206 ms median (2.94× faster on L4).
Ampere A100 scaling: 19.72× baseline (moderate) — 0.568 ms median (1.66× faster on A100).

## Failure modes

- Janus (multi-face) problem and flat or hollow backs because SDS has no strong 3D prior
- Over-saturated, blurry textures typical of score distillation guidance
- Floaters and noisy geometry in the splat stage that survive into the extracted mesh
- Texture seams and smearing after UV back-projection on thin parts
- Single-view ambiguity: occluded sides are hallucinated and may not match intent

## Dataflow

- Inputs: photos, text-prompt
- Outputs: gaussians, mesh, texture
- Platforms: python, cuda

## Presets

### DreamGaussian — Stage-1 generative 3D Gaussian splats (left) vs Stage-2 UV-textured mesh (right) (glsl-fragment; rendered 2026-11-30)

```json
{
  "P_SPLAT_SIZE": 0.14,
  "P_REFINE": 0.85,
  "P_ROT_SPEED": 0.65,
  "P_SPLIT": 0.48
}
```

```glsl
const float P_SPLAT_SIZE = 0.14; // P Splat Radius [0.06, 0.26, 0.01]
const float P_REFINE = 0.85; // P Stage-2 Detail [0.1, 1.0, 0.02]
const float P_ROT_SPEED = 0.65; // P Orbit Speed [0.0, 2.2, 0.05]
const float P_SPLIT = 0.48; // P Splats / Mesh Split [0.0, 1.0, 0.02]

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

vec3 hash31(float x) {
  vec3 p = fract(vec3(x) * vec3(0.1031, 0.1030, 0.0973));
  p += dot(p, p.yzx + 33.33);
  return fract((p.xxy + p.yzz) * p.zyx);
}

// Sculpted stylized crystal-urn creature (smooth union of body, wings, and crown)
float smin(float a, float b, float k) {
  float h = clamp(0.5 + 0.5 * (b - a) / k, 0.0, 1.0);
  return mix(b, a, h) - k * h * (1.0 - h);
}

float mapAsset(vec3 p, float spin) {
  vec3 q = p;
  q.xz = rot2(spin * 0.52) * q.xz;
  float body = length(q * vec3(1.0, 0.78, 1.0) - vec3(0.0, -0.06, 0.0)) - 0.44;
  float head = length(q - vec3(0.0, 0.46, 0.06)) - 0.24;
  vec3 wq = vec3(abs(q.x), q.y, q.z);
  float wing = length((wq - vec3(0.42, 0.06, -0.08)) * vec3(0.7, 1.25, 2.1)) - 0.26;
  float d = smin(body, head, 0.14);
  d = smin(d, wing, 0.12);
  return d * 0.85;
}

vec3 calcNormal(vec3 p, float spin) {
  vec2 e = vec2(0.0025, 0.0);
  return normalize(vec3(
    mapAsset(p + e.xyy, spin) - mapAsset(p - e.xyy, spin),
    mapAsset(p + e.yxy, spin) - mapAsset(p - e.yxy, spin),
    mapAsset(p + e.yyx, spin) - mapAsset(p - e.yyx, spin)
  ));
}

// Stage-2 refined procedural UV texture
vec3 stage2Texture(vec3 objP, float detail) {
  float bands = 0.5 + 0.5 * sin(objP.y * 16.0 + sin(objP.x * 9.0) * 1.4);
  float plume = 0.5 + 0.5 * cos(atan(objP.z, objP.x) * 8.0 + objP.y * 10.0);
  vec3 cobalt = vec3(0.14, 0.36, 0.82);
  vec3 coral = vec3(0.95, 0.42, 0.26);
  vec3 gold = vec3(0.98, 0.80, 0.28);
  vec3 col = mix(cobalt, coral, smoothstep(-0.35, 0.45, objP.y));
  col = mix(col, gold, smoothstep(0.55, 0.92, bands * plume) * detail);
  return col;
}

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);
  float splatR = clamp(P_SPLAT_SIZE, 0.05, 0.28);
  float detail = clamp(P_REFINE, 0.05, 1.0);
  float spin = iTime * max(P_ROT_SPEED, 0.0);

  vec3 ro = vec3(0.0, 0.08, 2.35);
  vec3 rd = normalize(vec3(uv, -1.55));
  vec3 bg = mix(vec3(0.025, 0.032, 0.054), vec3(0.068, 0.085, 0.132), smoothstep(-0.55, 0.55, uv.y));
  vec3 col = bg;

  if (screenX < split) {
    // Left: Stage-1 generative 3D Gaussian Splats (28 anisotropic 3D Gaussians alpha-blended front-to-back)
    vec3 accum = vec3(0.0);
    float T = 1.0;
    for (int i = 0; i < 32; i++) {
      float fi = float(i);
      vec3 h = hash31(fi * 7.13 + 1.9);
      float theta = h.x * 6.2831853;
      float y = (h.y - 0.48) * 1.15;
      float rad = (y > 0.26) ? 0.22 : (0.42 + 0.22 * step(0.68, h.z));
      vec3 cObj = vec3(cos(theta) * rad, y, sin(theta) * rad * (h.z > 0.68 ? 0.45 : 0.9));
      vec3 cWorld = cObj;
      cWorld.xz = rot2(-spin * 0.52) * cWorld.xz;

      // Project 3D Gaussian center onto ray
      vec3 oc = cWorld - ro;
      float tProj = dot(oc, rd);
      if (tProj > 0.2) {
        vec3 dPerp = oc - rd * tProj;
        // Anisotropic stretch along tangent direction
        float aniso = 0.65 + 0.85 * h.z;
        float dist2 = dot(dPerp, dPerp) / max(splatR * splatR * aniso, 1e-5);
        float g = exp(-dist2 * 2.2);
        if (g > 0.015) {
          float alpha = clamp(g * 0.72, 0.0, 0.92);
          vec3 gCol = stage2Texture(cObj, 0.85) * (0.65 + 0.55 * clamp(cWorld.z + 0.6, 0.0, 1.0));
          // Slight Gaussian ellipsoid rim
          float core = smoothstep(0.65, 0.95, g);
          accum += T * alpha * (gCol + vec3(0.18, 0.22, 0.28) * core);
          T *= (1.0 - alpha);
          if (T < 0.02) break;
        }
      }
    }
    col = accum + T * bg;
  } else {
    // Right: Stage-2 extracted UV mesh with refined PBR shading
    float t = 0.0;
    bool hit = false;
    for (int i = 0; i < 56; i++) {
      float d = mapAsset(ro + rd * t, spin);
      if (d < 0.0025) { hit = true; break; }
      t += d;
      if (t > 5.0) break;
    }
    if (hit) {
      vec3 p = ro + rd * t;
      vec3 n = calcNormal(p, spin);
      vec3 objP = p;
      objP.xz = rot2(spin * 0.52) * objP.xz;

      vec3 l1 = normalize(vec3(0.55, 0.82, 0.52));
      vec3 l2 = normalize(vec3(-0.68, -0.20, 0.55));
      float diff1 = max(dot(n, l1), 0.0);
      float diff2 = max(dot(n, l2), 0.0);
      float spec = pow(max(dot(n, normalize(l1 - rd)), 0.0), 42.0);
      float fres = pow(1.0 - max(dot(n, -rd), 0.0), 3.0);

      vec3 alb = stage2Texture(objP, detail);
      col = alb * (0.28 + 0.85 * diff1 + 0.26 * diff2)
          + vec3(1.0, 0.96, 0.90) * spec * 0.45
          + vec3(0.32, 0.75, 1.0) * fres * 0.38;
    }
  }

  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 [Score Distillation Sampling (DreamFusion)](https://texelatlas.vercel.app/t/score-distillation-sampling.md)
- extends [3D Gaussian Splatting](https://texelatlas.vercel.app/t/gaussian-splatting-3dgs.md)

## Combines with

- [Marching Cubes](https://texelatlas.vercel.app/t/marching-cubes.md): A density grid sampled from the splats is meshed by marching cubes to get the exportable surface.

## Sources

1. [primary] Jiaxiang Tang, Jiawei Ren, Hang Zhou, Ziwei Liu, Gang Zeng (2023) DreamGaussian: Generative Gaussian Splatting for Efficient 3D Content Creation. arXiv preprint (cs.CV). https://arxiv.org/abs/2309.16653 (verified via arxiv on 2026-11-29)
2. [implementation] dreamgaussian (2023) dreamgaussian/dreamgaussian. https://github.com/dreamgaussian/dreamgaussian License: MIT. (verified via github on 2026-11-29)

## Cite this entry

Texel. "DreamGaussian." https://texelatlas.vercel.app/t/dreamgaussian/ (accessed 2026-12-01).
