---
kind: concept
slug: space-warping
title: Space warping
summary: >-
  A space warp maps points into a new coordinate space before a grid or network reads them, so the grid's cells spread over the parts of a scene that need detail. One card covers it so far: F²-NeRF's per-region perspective warp, fitted by PCA over projected camera coordinates, for unbounded NeRF scenes with arbitrary camera paths. Its ablation compares it with no warp and the inverse-sphere warp.
tags: [nerf, coordinate-transform, unbounded-scenes, grid-representation]
papers: ["2303.15951"]
related: [neural-radiance-field, novel-view-synthesis, explicit-feature-grid]
status: draft
updated_at: 2026-11-15
---

## Overview

A grid of learned values covers a fixed box. If the scene is larger than the
box, or most of the box is empty, the grid spends its cells on the wrong
places. A space warp fixes this by bending the coordinates first: a point x
is replaced by F(x) and the grid is read at F(x) instead of x
[arxiv:2303.15951 §3.1]. The shared invariant is that the warp is a fixed,
differentiable map, and the rest of the pipeline (sampling, lookup, volume
rendering) works in warp space.

For unbounded scenes with a long camera path, the paper argues that the warp
should follow the cameras: a region's warp should keep distances between its
sample points in proportion to distances in the cameras' image coordinates
[arxiv:2303.15951 §3.2, Definition 1]. The paper calls such a warp "proper".

## Variants

### No warp

Points are used as they are, inside a bounded box. In the paper's ablation on
the Free "pillar" scene, this is the lowest-scoring setting with disparity
sampling (26.81 PSNR) [arxiv:2303.15951 tab. 4].

### NDC warp

A warp for forward-facing camera sets. The paper names it as the warp used by
earlier grid NeRFs on forward-facing scenes [arxiv:2303.15951 §1]. Its
perspective warp reduces to it when all cameras face one way [arxiv:2303.15951
§3.2]. No separate card covers this variant.

### Inverse-sphere warp

A warp for 360-degree, object-centred camera paths. The paper names it as the
warp used by earlier methods on such scenes [arxiv:2303.15951 §1] [arxiv:2303.15951 §3.2]. In
the same ablation it reaches 27.09 PSNR with disparity sampling and 27.86 with
exponential sampling [arxiv:2303.15951 tab. 4]. No separate card covers this
variant.

### Per-region perspective warp (F²-NeRF)

The paper's method, and the only variant with a full card. The scene is
divided into an octree. Each leaf gets its own warp, built as follows:

- choose a few visible cameras spread out in direction, and rotate each to
  face the leaf centre at a common distance [arxiv:2303.15951 §3.3]
  [arxiv:2303.15951 app. A.1];
- stack the image coordinates of sampled points in those cameras, and take the
  top three principal components of that data as the linear map M
  [arxiv:2303.15951 §3.2] [arxiv:2303.15951 app. A.2];
- set the warp to F(x) = M G(x), then normalise it so the region sits near the
  origin [arxiv:2303.15951 §3.2].

All leaves are then mapped into one common warp space, where one shared hash
grid is built. Each leaf uses its own hash functions [arxiv:2303.15951 §3.4]
[arxiv:2303.15951 eq. 2]. Along each ray, samples are spaced so that a fixed
step in warp space is taken each time, with the step computed from the warp's
Jacobian [arxiv:2303.15951 §3.5] [arxiv:2303.15951 app. A.3]. The paper
reports that this sampling gives a small gain over exponential sampling with
the same warp: 28.76 against 28.65 PSNR in the ablation [arxiv:2303.15951 tab.
4].

## When to use which

The paper reports one main comparison (Free, NeRF-360-V2, LLFF) and one
ablation on a single scene, so the table below states only what those results
show.

| Situation | Use | Why |
|---|---|---|
| Long, narrow camera path, several foreground objects, grid model, minutes of training | Per-region perspective warp | Highest PSNR among the fast grid methods on the Free set (26.32 at 12 min against 24.43 for Instant-NGP at 6 min) [arxiv:2303.15951 tab. 1] |
| Forward-facing scene, MLP model | NDC or perspective warp; the difference is small | On LLFF with an 8-layer MLP, the mean PSNR is 26.31 for NDC and 26.29 for perspective, and 26.02 for inverse-sphere [arxiv:2303.15951 app. C.2] |
| 360-degree scene, grid model | Perspective warp (reported on NeRF-360-V2 only) | 26.39 PSNR at 14 min, against 26.24 for Instant-NGP at 6 min [arxiv:2303.15951 tab. 2] |
| Bounded or nearly bounded scene, held-out viewpoints at new elevations | No warp is close | On the Lego scene with elevations above 30° held out, the two are within 0.5 dB [arxiv:2303.15951 app. C.3] |
| Camera poses unknown | Not this family | The method assumes all input poses are known [arxiv:2303.15951 §3] |
| Limited GPU memory | Smaller hash table, with care | Doubling the entries per level to 2^20 raises Free PSNR from 26.85 to 27.19, at 36 min instead of 30 min; the paper gives no memory figures [arxiv:2303.15951 app. C.1] |
| Need the fastest training and a simpler implementation | Instant-NGP-style grid without warp | Instant-NGP trains in about 6 min on all three datasets; F²-NeRF needs the octree, the per-leaf warps and the perspective sampler [arxiv:2303.15951 tab. 1] [arxiv:2303.15951 §4.1] |

The paper's training times come from one 2080 Ti and are author-reported
[arxiv:2303.15951 §4.1].

## Implementation sketch

Common core of any warp-before-grid method, with the per-leaf warp of
F²-NeRF as the example. Details of the warp construction are in the Per-region
section above.

```pseudocode
# Space warp in front of a grid  [arxiv:2303.15951 §3.1]
# Input:  sample point x in world space, octree leaves with their warps
# Output: interpolated grid feature for x
def grid_feature(x, leaves):
    # Find the leaf whose region contains x  [arxiv:2303.15951 §3.3]
    leaf = leaf_containing(x, leaves)
    # Map x into the shared warp space with this leaf's warp  [arxiv:2303.15951 §3.2]
    y = leaf.warp(x)                      # 3D point in warp space
    # Hash the 8 corners of the cell around y, with this leaf's
    # hash functions  [arxiv:2303.15951 §3.4]
    corners = cell_corners(y)
    feats = [lookup(hash_leaf(leaf, c)) for c in corners]
    # Trilinear interpolation of the corner features  [arxiv:2303.15951 §3.4]
    return trilinear(feats, y)
```

Along a ray, the sample spacing is set in warp space, not in world space
[arxiv:2303.15951 §3.5]. The lookup code is the same for any warp; only
`leaf.warp` and the hashing change between variants.

## Contradictions

None known between papers: only one card covers this concept. The paper and
its official code disagree on several settings (learning rate, disparity
weight, split rule, sampling step); the card's Paper vs code section lists
them and should be read before reimplementing [/papers/2303.15951].

## Papers

- [F²-NeRF: Fast Neural Radiance Field Training with Free Camera Trajectories](/papers/2303.15951): the per-region perspective warp, octree subdivision with per-leaf hash functions, and warp-space perspective sampling for grid NeRFs on unbounded scenes.
