Geometry Images
Cuts a mesh into a single disc, parametrizes it onto a square, and stores x, y, z as three colour channels of an ordinary image. The geometry becomes a texture that GPUs filter, compress and tessellate naturally.
In the family Geometry, meshing & signed distance fields, surface parametrization
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | None found | No built-in geometry image parameterization or remesher. |
| Unity | None found | |
| Unreal 5.7 | None found | No built-in geometry-image parameterization or remeshing tool. |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Choose a cut graph that turns the surface into a topological disc, e.g. by shortest paths between handles after removing triangles until only a tree remains. Parametrize the disc onto a square so that the boundary maps to the border with matching sample points on the two sides of every seam. Then resample the surface on a regular grid in parameter space and store positions in a floating-point image, along with normals in a second one. The grid structure gives a mesh implicitly (connect neighbours), with no index buffer. Because the seams are consistent, 'zippering' the border samples makes the surface watertight. Standard image tools apply: mipmaps give levels of detail, compression gives mesh compression, and displacement-map-like editing works on the geometry directly.
When to choose it
Reach for it when
- want mesh geometry stored as a regular texture
- need lod through mipmaps on geometry
- neural surface needs a regular grid representation
- stream and compress meshes like ordinary images
Choose it for regular, GPU-friendly meshes: LOD via mipmaps, streaming, compression research and neural surface representations that need a regular grid. Prefer xatlas or Least Squares Conformal Maps when you want a conventional UV atlas for texturing a retained mesh, and Quadric Error Metric Simplification for LODs of an irregular mesh.
Field marks
- Seam artifacts and cracks where mip levels or filtering break the boundary correspondence
- Stretching in the parameter domain undersamples regions of high detail
- Single-chart parametrization of high-genus shapes is hard and distorts heavily
- Bilinear filtering of positions mixes across seams unless borders are handled
Presets
Geometry Images — 2D square RGB=[X,Y,Z] atlas (left) vs reconstructed 3D surface & cut seam (right)
{
"P_GRID_RES": 12,
"P_SEAM_VIS": 1,
"P_ROT_SPEED": 0.75,
"P_SPLIT": 0.48
}Show GLSL (136 lines)
const float P_GRID_RES = 12.0; // P Regular Grid N [6.0, 24.0, 2.0]
const float P_SEAM_VIS = 1.0; // P Cut Seam Highlight [0.0, 1.5, 0.05]
const float P_ROT_SPEED = 0.75; // P Spin Speed [0.0, 2.2, 0.05]
const float P_SPLIT = 0.48; // P 2D Atlas / 3D Mesh [0.0, 1.0, 0.02]
mat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }
// Octahedral geometry-image bijection: 2D square [0,1]^2 <-> 3D unit sphere S^2 (Gu-Gortler-Hoppe!)
vec3 octDecode(vec2 uv01) {
vec2 f = uv01 * 2.0 - 1.0;
vec3 n = vec3(f.x, f.y, 1.0 - abs(f.x) - abs(f.y));
float t = max(-n.z, 0.0);
n.x += (n.x >= 0.0) ? -t : t;
n.y += (n.y >= 0.0) ? -t : t;
return normalize(n);
}
vec2 octEncode(vec3 n) {
n /= max(abs(n.x) + abs(n.y) + abs(n.z), 1e-5);
if (n.z < 0.0) {
vec2 sgn = vec2((n.x >= 0.0) ? 1.0 : -1.0, (n.y >= 0.0) ? 1.0 : -1.0);
n.xy = (1.0 - abs(n.yx)) * sgn;
}
return n.xy * 0.5 + 0.5;
}
// Sculpted genus-0 organic displacement encoded into the Geometry Image RGB = (x, y, z)
vec3 evalSurfacePoint(vec3 dir) {
float disp = 0.68 + 0.14 * sin(dir.x * 4.2) * cos(dir.y * 4.2) + 0.09 * sin(dir.z * 5.5);
return dir * disp;
}
float mapShape(vec3 p, float spin) {
vec3 q = p;
q.xz = rot2(spin * 0.65) * q.xz;
q.yz = rot2(0.35) * q.yz;
float r = length(q);
vec3 d = q / max(r, 1e-5);
float targetR = length(evalSurfacePoint(d));
return (r - targetR) * 0.72;
}
vec3 calcNormal(vec3 p, float spin) {
vec2 e = vec2(0.0022, 0.0);
return normalize(vec3(
mapShape(p + e.xyy, spin) - mapShape(p - e.xyy, spin),
mapShape(p + e.yxy, spin) - mapShape(p - e.yxy, spin),
mapShape(p + e.yyx, spin) - mapShape(p - e.yyx, spin)
));
}
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;
vec2 uv01 = fragCoord / max(iResolution.xy, vec2(1.0));
float split = clamp(P_SPLIT, 0.0, 1.0);
bool is3D = uv01.x >= split;
float gridN = clamp(floor(P_GRID_RES + 0.5), 6.0, 26.0);
float seamVis = clamp(P_SEAM_VIS, 0.0, 1.5);
float spin = iTime * max(P_ROT_SPEED, 0.0);
vec3 col = mix(vec3(0.026, 0.036, 0.058), vec3(0.068, 0.088, 0.138), smoothstep(-0.55, 0.55, uv.y));
if (!is3D) {
// Left: 2D square Geometry Image texture where RGB encodes 3D vertex positions (x, y, z)
float panelCX = split * 0.5 * (iResolution.x / max(iResolution.y, 1.0));
vec2 rel = vec2((uv01.x - split * 0.5) * (iResolution.x / max(iResolution.y, 1.0)), uv.y);
vec2 gUV = rel / 0.72 + 0.5;
if (gUV.x >= 0.0 && gUV.x <= 1.0 && gUV.y >= 0.0 && gUV.y <= 1.0) {
vec3 dir = octDecode(gUV);
vec3 pos3D = evalSurfacePoint(dir);
// Map XYZ coordinates [-0.9, 0.9] -> [0, 1] RGB channels (exact Geometry Image encoding)
vec3 rgbPos = clamp(pos3D * 0.55 + 0.5, 0.0, 1.0);
// Regular 2D square sampling lattice (completely regular topology!)
vec2 gf = abs(fract(gUV * gridN - 0.5) - 0.5);
float gWire = smoothstep(0.055, 0.012, min(gf.x, gf.y));
col = mix(rgbPos, vec3(0.04, 0.06, 0.10), gWire * 0.52);
// Outer cut-seam boundary (the 4 edges of the square glue symmetrically onto the 3D cut tree!)
float bdr = min(min(gUV.x, 1.0 - gUV.x), min(gUV.y, 1.0 - gUV.y));
col = mix(col, vec3(1.0, 0.88, 0.28), smoothstep(0.024, 0.005, bdr) * min(seamVis, 1.0));
}
} else {
// Right: Reconstructed 3D surface sampled from the regular 2D Geometry Image grid
vec2 rightUV = vec2((uv01.x - (split + 1.0) * 0.5) * (iResolution.x / max(iResolution.y, 1.0)), uv.y);
vec3 ro = vec3(0.0, 0.04, 2.38);
vec3 rd = normalize(vec3(rightUV, -1.52));
float t = 0.0;
bool hit = false;
for (int i = 0; i < 64; i++) {
float d = mapShape(ro + rd * t, spin);
if (d < 0.002) { hit = true; break; }
t += d;
if (t > 7.0) break;
}
if (hit) {
vec3 p = ro + rd * t;
vec3 n = calcNormal(p, spin);
vec3 objP = p;
objP.xz = rot2(spin * 0.65) * objP.xz;
objP.yz = rot2(0.35) * objP.yz;
vec2 gUV = octEncode(normalize(objP));
// Regular quad mesh reconstructed directly from the 2D Geometry Image pixels
vec2 gf = abs(fract(gUV * gridN - 0.5) - 0.5);
float gWire = smoothstep(0.060, 0.014, min(gf.x, gf.y));
// Highlight the 3D cut seam (where gUV hits 0 or 1 boundary of the square)
float bdr = min(min(gUV.x, 1.0 - gUV.x), min(gUV.y, 1.0 - gUV.y));
float seamLine = smoothstep(0.025, 0.005, bdr);
vec3 l1 = normalize(vec3(0.58, 0.82, 0.55));
float diff = max(dot(n, l1), 0.0);
float spec = pow(max(dot(n, normalize(l1 - rd)), 0.0), 42.0);
vec3 rgbPos = clamp(objP * 0.55 + 0.5, 0.0, 1.0);
vec3 alb = mix(vec3(0.76, 0.80, 0.86), rgbPos, 0.62);
col = alb * (0.28 + 0.82 * diff) + vec3(0.95) * spec * 0.45;
col = mix(col, vec3(0.04, 0.07, 0.12), gWire * 0.55);
col = mix(col, vec3(1.0, 0.88, 0.28), seamLine * 0.92 * min(seamVis, 1.2));
}
}
float sep = smoothstep(0.0035, 0.0008, abs(uv01.x - 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.
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| geometry-images-live | Tesla T4 1920x1080 | 13.9× baseline (moderate) · 0.430 ms / 0.454 ms | opengl-timer-query · 36 frames · GPU Weight Atlas · Colab T4 sweep |
| geometry-images-live | NVIDIA L4 1920x1080 | 10.1× baseline (moderate) · 0.161 ms / 0.167 ms · 2.7× faster on L4 | opengl-timer-query · Cross-architecture validation |
| geometry-images-live | NVIDIA A100-SXM4-40GB 1920x1080 | 8.10× baseline (moderate) · 0.233 ms / 0.248 ms · 1.8× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): its primary source cites Progressive meshes; cited by Geometry clipmaps.
Crosses
- Least Squares Conformal Maps: A conformal or stretch-minimising parametrization places the chart on the square.
Sources
- primaryXianfeng Gu, Steven J. Gortler, Hugues Hoppe (2002). Geometry images. Proceedings of the 29th annual conference on Computer graphics and interactive techniques.Verified via crossref · 2026-11-29doi:10.1145/566570.566589