FoamSurf: A Voronoi-Surfel Representation for Differentiable Rendering

Grzegorz Wilczyński, Julia Farganus, Krzysztof Byrski, Rafał Tobiasz, Mikołaj Zieliński, Dominik Belter, Przemysław SpurekarXiv 2026

TL;DR

When you photograph a coral reef or a foggy garden, every pixel is an intertwined soup of solid surface and murky medium. FoamSurf cleanly separates the two in 3D without needing masks, modeling surfaces as flat disks and the surrounding medium as a honeycomb of 3D cells. Because both components live explicitly in space and are rendered by a true ray tracer, you can drain the water, deform the seabed, or drop a reflective glass sphere into the scene—and watch light bounce realistically through the murky depths in real time.

Figure 1. FoamSurf gives the surfaces and the water their own primitives, so an edit reaches one and leaves the other in place. The scene was rendered in Blender and reconstructed from the resulting photographs, three of which appear in the inset. Every panel is re-rendered by the same ray tracer after the change, without retraining. Removing the medium inside a boundary uncovers seabed that the cameras saw only through the water. The spheres and the statue are traced along rays that cross the water as camera rays do. Statue: “Neptune – Louvre Museum” by Benjamin Bardou, CC BY 4.0.

What Problem Does This Paper Address?

Reconstructing 3D scenes from 2D photos has gotten shockingly good thanks to Neural Radiance Fields (NeRFs) and 3D Gaussian Splatting (3DGS). But drop a camera underwater or into dense fog, and things fall apart. A scattering medium does two things: it attenuates (dims and colors) light coming from surfaces, and adds backscatter (ambient glow from light bouncing off the water or fog itself).

Existing 3D reconstruction methods struggle to disentangle these effects:

  • NeRF-based underwater methods can separate water from rock, but they are painfully slow to train and render, and editing an implicit neural network is notoriously difficult.
  • Gaussian Splatting extensions render in real time, but they often suffer from "haze surfels" (floating blobs that accidentally bake fog into the solid geometry) or "medium leakage" (surface colors bleeding into the water model).

Crucially, almost all prior methods evaluate the medium only along primary camera rays. Because the water isn't modeled as a true 3D volume independent of the camera's view, you can't trace secondary rays—meaning if you insert a mirror or a glass orb into the scene, the reflections and refractions won't properly account for the murky water they travel through.

Methods

FoamSurf introduces a hybrid 3D representation paired with a custom, unified differentiable ray tracer:

  1. Two Distinct Primitives: Solid surfaces are modeled using planar Gaussian surfels (essentially flat, fuzzy, oriented 2D disks with view-dependent color). The scattering medium is modeled using a space-filling Voronoi diagram—3D space is partitioned around learned generator points ("sites"), where each cell holds constant RGB values for direct attenuation, backscatter, and water color.
  2. Exact Hybrid Ray Tracing: Instead of rasterizing (splatting) onto a screen, FoamSurf shoots rays using OptiX. As a ray travels, the tracer interleaves surfel hits and Voronoi cell boundary crossings front-to-back. Because cell properties are piecewise-constant, the math for light attenuation and backscatter integrates exact solutions along each segment, tracking separate transmittances for surface light and water glow.
  3. Unsupervised Separation Priors: Matching input photos doesn't guarantee a clean split between rock and water. Without using any segmentation masks, the authors introduce clever training nudges: a binarization and coverage/clearing loss forces surfels to either commit to being an opaque surface or vanish (preventing ghostly haze surfels), while chroma and depth-overlap priors keep solid surface colors out of the Voronoi cells.
  4. Physical Polish: The renderer incorporates a Henyey-Greenstein phase function (capturing how water gets brighter when looking toward the sun) and a physical camera model (PPISP) so exposure shifts between photos don't corrupt the 3D water parameters.
Figure 3. Overview of FoamSurf. Surfels (left, bottom) hold the surfaces and Voronoi cells (left, top) hold the water. One differentiable ray tracer visits surfel hits and cell boundaries in their order along the ray. It tracks one transmittance for the direct signal and one for the backscatter (bottom plot). Each medium segment lowers them at its own rates, and each surfel hit lowers both. The tracer also renders the surface alone, the medium alone, and the surfel opacity. The loss compares the rendered view with the photo. Its gradients update both representations, and densification and pruning adapt the surfels.

Datasets

The authors test FoamSurf across real underwater captures, synthetic volumetric scenes, and synthetic fog:

  • SeaThru-NeRF: Four real-world underwater reef scenes used to evaluate novel view synthesis and water-seabed separation (using Segment Anything masks strictly for evaluation, never training).
  • Synthetic Clouds (Lego & Ficus): Modified classic NeRF objects surrounded by three volumetric clouds. This provides exact ground-truth renders for the object alone, the clouds alone, and newly inserted objects.
  • Foggy Garden: Real outdoor scenes paired with synthetic "easy" and "hard" fog, providing clear-air ground truth to test scene restoration.

Key Insights and Ideas

  • Give the medium a place in space, not just along a ray: By putting water in space-filling Voronoi cells and using a ray tracer, secondary rays (reflections, refractions, shadows from inserted spotlights) naturally traverse the medium just like camera rays do.
  • Image quality hides terrible geometry: On real underwater scenes, a top baseline (Plenodium) matches FoamSurf's rendered image quality (30.68 vs. 30.75 PSNR), yet scores 0.505 on surface–medium separation—essentially a coin flip—because it leaves opaque primitives floating in open water. FoamSurf hits 0.901 by explicitly forbidding surfels from loitering in empty water.
  • Assets, not just recordings: Because surfaces and water only interact inside the ray tracer at render time, you can edit them independently without retraining—like deforming the seabed, painting a localized plume of dye into the water, or applying Van Gogh style transfer to the water while leaving the coral realistic.
Figure 2. Applications on reconstructed real scenes, re-rendered by our tracer after each change and without retraining. (a) The seabed is deformed while the water stays as reconstructed, and the inset shows the scene before. The close-ups follow rays that no camera carried. (b) The medium is edited inside a chosen region, and copies of one mesh stand at several distances. Each copy is attenuated and veiled in proportion to the water in front of it. (c) Inserted lights scatter in the water and reach the seabed. (d) Surfaces and water are stylized separately, and the close-ups show each component alone, because the reconstruction keeps them apart.

Key Results

  • Real Underwater Scenes (SeaThru-NeRF): FoamSurf achieves state-of-the-art reconstruction quality (30.75 PSNR), rendering in real time at 120 FPS after ~29 minutes of training on an RTX 4090, with a compact 159 MB model footprint. It achieves the highest disentanglement score (0.901 vs. 0.851 for SeaThru-NeRF and 0.624 for WaterSplatting), keeping surface opacity in open water near zero (0.005).
  • Component & Insertion Accuracy: On synthetic cloud scenes, FoamSurf dominates component-level recovery—scoring 34.77 PSNR on the Lego object and 38.04 PSNR on the clouds alone (compared to SeaSplat's 19.02 and 19.47). It also renders newly inserted spheres most accurately across both scenes.
  • Defogging: Under dense ("hard") synthetic fog, stripping away FoamSurf's Voronoi medium recovers background vegetation where baselines blur or darken, achieving the highest restoration score (16.81 PSNR, 0.584 SSIM).

Limitations and Future Work

The authors note that FoamSurf recovers visual appearance, not true physical oceanography. Its attenuation and backscatter values are wideband RGB approximations under a single-scattering model (ignoring complex multiple-scattering physics), and each Voronoi cell holds just one constant value rather than a smooth continuous gradient. While the paper does not lay out an explicit list of future work, the authors note that this hybrid ray-traced construction naturally extends beyond water to turn any scene captured through a murky medium into a reusable, editable 3D asset.

Summary updated

Abstract

Scenes inside a scattering medium contain solid surfaces, such as the seabed or rocks, and a semi-transparent medium, such as water, fog, or smoke. Recent Gaussian-based methods produce realistic images of scenes in scattering media, but traces of the medium can remain visible in surface-only renders. Neural fields separate surfaces and medium more accurately, but they are slow to train and difficult to edit. Both approaches evaluate the medium only along camera rays, so its effects along reflected and refracted rays are not modeled. These limitations prevent reliable surface recovery, independent editing of surfaces and the medium, and consistent rendering of inserted objects. We present FoamSurf, a hybrid representation that models surfaces with planar Gaussian surfels and the medium with space-filling Voronoi cells. A single differentiable ray tracer composites both along arbitrary rays, while training priors keep them separate without segmentation masks. Across real underwater scenes, synthetic scenes, and dense fog, FoamSurf achieves image quality on par with the state of the art and the most accurate surface-medium separation among the compared methods. The recovered components can be removed, edited, or stylized independently, and the same reconstruction supports inserted mesh objects with attenuation and scattering along both direct and reflected or refracted rays. Together, these capabilities enable scene restoration, editing, and composition within a single reconstructed model. Project page: https://grzegorzwilczynski.com/foamsurf/
BibTeX
@misc{wilczynski2026foamsurf,
  author = {Grzegorz Wilczyński and Julia Farganus and Krzysztof Byrski and Rafał Tobiasz and Mikołaj Zieliński and Dominik Belter and Przemysław Spurek},
  title = {{FoamSurf: A Voronoi-Surfel Representation for Differentiable Rendering}},
  year = {2026},
  eprint = {2611.33462},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.33462},
}
Figure