---
id: "infinigen"
title: "Infinigen (Procedural Photorealistic Worlds)"
aliases: [Infinigen Nature]
domain: "procgen"
stage: "procedural"
realtime: "offline"
platforms: [blender, python, cpu, cuda]
year_introduced: 2023
outputs: [mesh, material-params, texture, layout]
style: "photoreal"
dynamic: "static"
cost: "offline"
authority: "Raistrick et al., 2023"
url: "https://texelatlas.vercel.app/t/infinigen/"
sources_verified_at: "2026-11-29"
---
# Infinigen (Procedural Photorealistic Worlds) (Raistrick et al., 2023)

> A Blender-based procedural generator of natural scenes: terrain, plants, creatures and materials all come from random parametric programs, with ground-truth geometry labels for training vision models.

## Reach for it when

- need endless varied natural scenes for training data
- generate terrain, plants and creatures procedurally in blender
- want reproducible photoreal worlds from a seed
- synthetic dataset with ground-truth geometry labels
- hand-modelling natural environments takes too long

## How it works

Every asset is a program with parameters sampled from priors: terrain from SDF-based elements with erosion and tectonic features, trees and plants via grammar-based branching, creatures from skeleton-and-skin templates, materials as shader node graphs with noise-based textures. A scene composer places assets according to ecological and spatial constraints (terrain slope, water, density), then Blender renders with Cycles. Because the whole scene is generated from code, exact depth, normals, segmentation, flow and occlusion edges are produced without annotation. Level of detail is controlled by distance from camera so only visible detail is generated. The code is open source (BSD-3-Clause).

## When to use it

Choose it for synthetic training data and for hero-quality natural scenes you can script and reproduce from a seed. Prefer [Plant Ecosystem Distribution Simulation](https://texelatlas.vercel.app/t/ecosystem-plant-distribution.md) and the individual terrain and plant techniques for engine-integrated runtime generation, and learned generators in the genai domain when you want text-conditioned results rather than rules.

## Cost

offline — Cycles rendering and heavy asset generation: minutes to hours per scene depending on resolution and detail.
Measured GPU Weight: 303.7× baseline (extreme) — 9.9916 ms median / 10.1357 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 295.96× baseline (extreme) — 4.7058 ms median (2.12× faster on L4).
Ampere A100 scaling: 236.91× baseline (extreme) — 6.8229 ms median (1.46× faster on A100).

## Failure modes

- Blender and Python dependency stack is heavy; builds break across versions or platforms
- Asset diversity is limited to the shipped generators (natural scenes), so urban or interior content needs the Indoors extension
- Scene composition is rule-based, so structural realism (e.g. consistent ecology) can fail in corner cases
- Generation time is high; tuning a scene means re-running long jobs

## Engine support

- blender: plugin — `Install from github.com/princeton-vl/infinigen (runs on bpy / Blender)` (evidence: https://github.com/princeton-vl/infinigen, checked 2026-12-01)

## Dataflow

- Inputs: —
- Outputs: mesh, material-params, texture, layout
- Platforms: blender, python, cpu, cuda

## Presets

### Infinigen — ground-truth semantic & surface-normal labels (left) vs procedural photoreal alpine terrain (right) (glsl-fragment; rendered 2026-11-30)

```json
{
  "P_TERRAIN_SEED": 1.4,
  "P_RIVER_CARVE": 0.75,
  "P_SUN_AZIMUTH": 0.52,
  "P_SPLIT": 0.48
}
```

```glsl
const float P_TERRAIN_SEED = 1.40; // P World Seed [0.0, 6.0, 0.2]
const float P_RIVER_CARVE = 0.75; // P Valley Carve [0.2, 1.4, 0.05]
const float P_SUN_AZIMUTH = 0.52; // P Sun Azimuth [0.0, 2.0, 0.05]
const float P_SPLIT = 0.48; // P Labels / World Split [0.0, 1.0, 0.02]

float hash21(vec2 p) {
  p = fract(p * vec2(127.1, 311.7));
  p += dot(p, p + 34.5);
  return fract(p.x * p.y);
}

float vnoise(vec2 p) {
  vec2 i = floor(p);
  vec2 f = fract(p);
  f = f * f * (3.0 - 2.0 * f);
  return mix(
    mix(hash21(i), hash21(i + vec2(1.0, 0.0)), f.x),
    mix(hash21(i + vec2(0.0, 1.0)), hash21(i + vec2(1.0, 1.0)), f.x),
    f.y
  );
}

float fbm(vec2 p) {
  float s = 0.0, a = 0.5;
  mat2 m = mat2(0.80, -0.60, 0.60, 0.80);
  for (int i = 0; i < 5; i++) {
    s += a * vnoise(p);
    p = m * p * 2.04;
    a *= 0.5;
  }
  return s;
}

// Procedural alpine valley terrain heightfield with carved winding river & rocky ridges
float evalTerrain(vec2 xz, float seed, float carve) {
  vec2 q = xz * 0.34 + vec2(seed * 1.7, seed * 0.9);
  float ridge = 1.0 - abs(fbm(q) * 2.0 - 1.0);
  float base = fbm(q * 1.45 + 3.1) * 1.15 + ridge * ridge * 1.25;
  // Meandering glacial river channel along z
  float riverX = 0.72 * sin(xz.y * 0.35 + seed) + 0.25 * cos(xz.y * 0.85);
  float dRiv = abs(xz.x - riverX);
  float valley = smoothstep(0.18, 2.25, dRiv);
  float h = base * mix(0.22, 1.48, pow(valley, 0.85)) - (1.0 - valley) * 0.45 * carve;
  // Subtle procedural pine-tree cluster bumps on mid-elevation forested slopes
  float forestBand = smoothstep(0.14, 0.32, h) * smoothstep(0.95, 0.58, h);
  float trees = smoothstep(0.45, 0.78, vnoise(xz * 5.8 + seed)) * 0.14 * forestBand;
  return h + trees;
}

vec3 calcTerrainNormal(vec2 xz, float seed, float carve) {
  float e = 0.035;
  float hL = evalTerrain(xz - vec2(e, 0.0), seed, carve);
  float hR = evalTerrain(xz + vec2(e, 0.0), seed, carve);
  float hD = evalTerrain(xz - vec2(0.0, e), seed, carve);
  float hU = evalTerrain(xz + vec2(0.0, e), seed, carve);
  return normalize(vec3(hL - hR, 2.0 * e, hD - hU));
}

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 sx = fragCoord.x / max(iResolution.x, 1.0);
  float split = clamp(P_SPLIT, 0.0, 1.0);
  bool showPhoto = sx >= split;

  float seed = clamp(P_TERRAIN_SEED, 0.0, 8.0);
  float carve = clamp(P_RIVER_CARVE, 0.1, 1.6);
  float sunAz = clamp(P_SUN_AZIMUTH, 0.0, 2.5) + iTime * 0.14;

  vec3 ro = vec3(0.45 * sin(iTime * 0.18), 1.45, 3.6 - iTime * 0.25);
  vec3 ta = ro + vec3(-0.25 * sin(iTime * 0.18), -0.45, -2.5);
  vec3 fw = normalize(ta - ro);
  vec3 ri = normalize(cross(fw, vec3(0.0, 1.0, 0.0)));
  vec3 up = cross(ri, fw);
  vec3 rd = normalize(fw * 1.45 + ri * uv.x + up * uv.y);

  vec3 sunDir = normalize(vec3(cos(sunAz) * 0.78, 0.48, sin(sunAz) * 0.55 - 0.45));
  vec3 sky = mix(vec3(0.76, 0.84, 0.94), vec3(0.16, 0.36, 0.72), smoothstep(-0.05, 0.55, rd.y));
  sky += vec3(1.8, 1.4, 0.9) * pow(max(dot(rd, sunDir), 0.0), 42.0);
  vec3 col = showPhoto ? sky : vec3(0.14, 0.36, 0.78); // Sky semantic class ID on left

  float waterLevel = 0.08;
  float t = 0.12;
  bool hit = false;
  for (int i = 0; i < 72; i++) {
    vec3 p = ro + rd * t;
    float h = max(evalTerrain(p.xz, seed, carve), waterLevel);
    float d = p.y - h;
    if (d < 0.008 * t) { hit = true; break; }
    t += max(d * 0.55, 0.035);
    if (t > 24.0) break;
  }

  if (hit) {
    vec3 p = ro + rd * t;
    float th = evalTerrain(p.xz, seed, carve);
    bool isWater = th <= waterLevel + 0.01;
    vec3 n = isWater ? normalize(vec3(0.04 * sin(p.x * 12.0 + iTime * 2.0), 1.0, 0.04 * cos(p.z * 12.0 - iTime * 1.8)))
                     : calcTerrainNormal(p.xz, seed, carve);

    // Procedural biome semantic classification: 0=Water, 1=Pine Forest, 2=Alpine Rock, 3=Snow Peak
    float slope = 1.0 - n.y;
    float snowMask = smoothstep(0.92, 1.18, p.y - slope * 0.45);
    float rockMask = smoothstep(0.24, 0.46, slope);
    float forestMask = smoothstep(0.14, 0.30, p.y) * smoothstep(0.95, 0.62, p.y) * (1.0 - rockMask);

    if (!showPhoto) {
      // Left: Infinigen ground-truth semantic segmentation + depth contours & crisp class boundaries
      vec3 semCol = vec3(0.10, 0.65, 0.88); // water class
      if (!isWater) {
        if (snowMask > 0.5) semCol = vec3(0.92, 0.94, 0.98); // snow class
        else if (rockMask > 0.45) semCol = vec3(0.68, 0.42, 0.24); // cliff rock class
        else if (forestMask > 0.35) semCol = vec3(0.18, 0.78, 0.32); // evergreen vegetation class
        else semCol = vec3(0.76, 0.72, 0.26); // meadow/shore class
      }
      // Overlay subtle ground-truth surface-normal tint & depth iso-lines
      float depthIso = smoothstep(0.08, 0.02, abs(fract(t * 0.65) - 0.5));
      col = mix(semCol * (0.65 + 0.35 * (n.y * 0.5 + 0.5)), n * 0.5 + 0.5, 0.22);
      col = mix(col, vec3(0.04, 0.05, 0.08), depthIso * 0.35);
    } else {
      // Right: Full photorealistic procedural alpine world with crisp sun shadows & aerial perspective
      float sh = 1.0;
      float st = 0.08;
      for (int s = 0; s < 16; s++) {
        vec3 sp = p + sunDir * st;
        float shH = evalTerrain(sp.xz, seed, carve);
        if (sp.y < shH) { sh = 0.0; break; }
        st += max((sp.y - shH) * 0.65, 0.09);
        if (st > 6.0) break;
      }

      vec3 alb;
      if (isWater) {
        vec3 refl = reflect(rd, n);
        float fres = 0.08 + 0.85 * pow(1.0 - max(dot(n, -rd), 0.0), 4.0);
        vec3 waterBody = vec3(0.04, 0.20, 0.28);
        vec3 reflSky = mix(vec3(0.45, 0.62, 0.82), vec3(0.95, 0.86, 0.72), pow(max(dot(refl, sunDir), 0.0), 12.0));
        col = mix(waterBody, reflSky, fres) + vec3(1.5, 1.3, 1.0) * pow(max(dot(refl, sunDir), 0.0), 96.0) * sh;
      } else {
        float strata = 0.82 + 0.18 * sin(p.y * 24.0 + fbm(p.xz * 3.0) * 4.0);
        vec3 meadow = vec3(0.24, 0.36, 0.16);
        vec3 pine = vec3(0.08, 0.22, 0.10);
        vec3 rock = vec3(0.36, 0.34, 0.32) * strata;
        vec3 snow = vec3(0.90, 0.93, 0.97);
        alb = mix(meadow, pine, forestMask);
        alb = mix(alb, rock, rockMask);
        alb = mix(alb, snow, snowMask);
        float ndl = max(dot(n, sunDir), 0.0);
        vec3 skyAmb = mix(vec3(0.14, 0.18, 0.24), vec3(0.34, 0.48, 0.72), 0.5 + 0.5 * n.y);
        col = alb * (vec3(1.55, 1.38, 1.12) * ndl * sh + skyAmb * 0.52);
      }

      // Exponential aerial perspective haze
      float fog = 1.0 - exp(-t * 0.068);
      col = mix(col, sky, clamp(fog, 0.0, 0.92));
    }
  }

  float sep = smoothstep(0.0035, 0.0008, abs(sx - 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.

## Sources

1. [primary] Alexander Raistrick, Lahav Lipson, Zeyu Ma, Lingjie Mei, Mingzhe Wang, Yiming Zuo, Karhan Kayan, Hongyu Wen, Beining Han, Yihan Wang, Alejandro Newell, Hei Law, Ankit Goyal, Kaiyu Yang, Jia Deng (2023) Infinite Photorealistic Worlds Using Procedural Generation. 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). https://doi.org/10.1109/cvpr52729.2023.01215 (verified via crossref on 2026-11-29)
2. [implementation] princeton-vl (2023) princeton-vl/infinigen. https://github.com/princeton-vl/infinigen License: BSD-3-Clause. (verified via github on 2026-11-29)

## Cite this entry

Texel. "Infinigen (Procedural Photorealistic Worlds)." https://texelatlas.vercel.app/t/infinigen/ (accessed 2026-12-01).
