↑ Vocaro Guide to MPM

Rendering — turning particles into pixels

MPM computes a continuum sampled by particles. Nothing about that says what it should look like, and the gap between “the physics is right” and “the frame is right” is where much of the open work in real-time MPM sits. This document covers the rendering subject: which reconstruction methods exist and what each one structurally can and cannot deliver, the optical stack a liquid needs, the per-material look problems that remain unsolved, and the secondary particles — spray, splash, foam — that a splash needs.

1. The reconstruction method space

The choice is not a quality dial, it is a choice of what kind of error you accept. One rule binds every density-field method below: the splat kernel’s shape must match the solver’s particle-to-grid kernel. A Gaussian, a bilinear splat, or a differently-supported B-spline all look approximately right in a still frame and reintroduce grid-locked shimmer in motion, because the surface then samples the material on a different footprint from the one the solver moved it with. Matching the shape does not mean matching the width: the transfer kernel is tuned for transfer accuracy, and used unwidened as a reconstruction kernel it produces the lumpy surface §1.1 explains. Widening the same kernel is the standard move.

1.1 Why particle surfaces are lumpy — and what the literature does about it

A density field splatted from particles is a sum of narrow kernels over a finite random sample, and that makes its noise predictable. For a kernel WW with unit integral over a sample of nn particles per unit volume, the field’s relative standard deviation at the kernel scale is shot noise:

σρDW2n\frac{\sigma}{\rho} \approx \sqrt{\frac{D \int W^{2}}{n}}

(3D quadratic B-spline at solver width: W2=0.5530.166\int W^{2} = 0.55^{3} \approx 0.166)

where DD is the index of dispersion of the sample — variance over mean of particle counts per cell — which is 1 for uniform-random (Poisson) seeding and roughly 0.45 for a lattice jittered by 80 % of its spacing. At 8 particles per cell and solver width that is 7–14 %; at 25 it is still 8 %, and the noise lives at a correlation length of about one cell. An iso-surface of such a field is displaced by δρ/|ρ|\delta\rho / |\nabla\rho| — of order 0.05–0.15 cells — at a one-cell wavelength, which is a 5–12° wobble of the normal, and a sharp specular lobe renders a 5° wobble as orange peel. Everything else follows from that one relation.

What is not the lever. Field resolution: a finer field samples the same noisy function more finely (rms noise identical at 1×, 2×, 4× the solver grid). Raising the iso threshold: it fixes inflation (below) but increases roughness, because the kernel fringe a low threshold sits in averages more particles than the boundary at half density does. Render-side Laplacian smoothing of particle positions with the transfer kernel: with a kernel only three or four spacings wide the step is a mean-shift iteration and converges particles onto density modes — one pass nearly doubles the dispersion — so it manufactures exactly the clumps it was meant to hide. The pre-pass in the anisotropic-kernel paper works at SPH neighborhood scale with a mild blend; it is a surface smoother that also shrinks volume, not a denoiser.

What is. In order of cost:

  1. Kernel width relative to particle spacing. Doubling the smoothing length (the same B-spline, support scaled) halves the normal noise, since the noise falls as h1.5h^{-1.5} and the gradient only as h1h^{-1}. Every production particle surfacer does this: Houdini documents its plain spherical method as “a very lumpy surface that will usually require smoothing”, and splashsurf defaults the smoothing length to twice the particle radius before adding 25 Laplacian passes. A separable Gaussian blur of the composited field with σ1\sigma \approx 1 cell reaches the same noise for three cheap passes instead of h3h^{3} more scatter atomics per particle.
  2. Threshold normalization, physically. An absolute threshold on a field whose interior reads “particles per cell” sits in the kernel fringe — at a few percent of the interior — which pushes every face about a cell outside its particles and bridges any gap under ~1.5 cells: fat sheets, fat limbs, joined lobes, merged droplets. The SPH color field fixes the magnitude rather than the dial: weight each particle by its volume (m/ρm/\rho in SPH; V0det(𝑭)JpV_0 \det(\mathbf{F}) J_p in MPM, carried on every particle already) so the interior reads ≈ 1 regardless of particle count or compaction, and a threshold of 0.5 means “halfway”. Widen first, then normalize — in that order.
  3. Seeding. Uniform-random seeding is Poisson; a jittered lattice at the same count has a third of the surface noise, a blue-noise set less. A 25-particle-per-cell uniform-random ball reconstructs rougher than an 8-per-cell lattice-seeded one.
  4. Tricubic filtering. Trilinear sampling of the voxel field is C⁰, so once the shot noise is gone a texel-scale faceting remains; cubic B-spline filtering with eight trilinear fetches (Sigg & Hadwiger 2005) gives a C² field and analytic gradients from the same voxels.
  5. Anisotropic kernels (Yu & Turk 2013). A per-particle covariance of the neighborhood stretches each kernel along the local particle distribution, so flat pools and thin sheets reconstruct flat and thin; this is the default in Houdini’s “average position” surfacing and in splashsurf. In MPM the neighborhood moments are one extra grid transfer on the solver’s own lattice.
  6. Level-set post-smoothing. Dilate → smooth → erode (the morphological closing OpenVDB and Houdini ship as a filter chain), mean-curvature or Laplacian iterations, or the constrained thin-plate smoothing of Bhattacharya et al. 2015, which minimizes bending energy while staying inside the band between the union of particle spheres and its erosion — the form that does not round corners. The averaged-center distance of Zhu & Bridson 2005, with the Solenthaler et al. 2007 correction for concave regions, is the older route to the same end and needs a smooth, wide weight; on a compact B-spline at twice the grid’s resolution it staircases.
  7. Screen-space surfaces (van der Laan, Green & Sainz 2009; Truong & Yuksel 2018; Oliveira et al. 2022). Splat particle depth, smooth the depth image, shade from its normals; no volume texture, so no resolution ceiling and droplets at any size. The mainstream real-time route, and the one with a live patent — see the sources below.

What the particle set itself contributes. After the reconstruction noise is gone a residue can remain that no kernel width hides, because it is correlated over several cells: the density structure of plastically compacted material, or the cell-scale clumping that particle-in-cell transfers accumulate. Its signature is noise that does not fall as h1.5h^{-1.5} when the kernel widens. Volume weighting (item 2) reads real compaction correctly; clumping is a solver question — position correction, resampling, or a different transfer — and not a rendering one.

The reference frames are a different regime. The published MLS-MPM demos were simulated at one to five million particles on grids of 250–500 cells per unit at minutes per frame and visualized offline in Houdini (particles exported as bgeo, solids as obj); the sand in those frames is drawn as individual particles rather than a surface, with an offline renderer’s shadowing and occlusion — the exact renderer settings are not published — and the snow reference of the original MPM snow paper was rendered as a scattering volume straight from the rasterized grid (Henyey–Greenstein, g=0.5g = 0.5, σt=724m1\sigma_t = 724\ \mathrm{m}^{-1}, albedo 0.9–1.0), never as a surface. The paper that introduced MLS-MPM also concedes that “it is hard to reconstruct sharp cutting surfaces from particles.” A real-time frame at a tenth of the particle count on a grid four times coarser is not going to match their feature scale; it can match their smoothness, which is the part that is free.

Sources. Every paper behind this section — the anisotropic-kernel, level-set and screen-space reconstruction work, the filtering and VDB references, and the MPM papers the numbers come from — is listed with venue, year and DOI in References, under Surface reconstruction & rendering.

What may be read. Code that may be read for commercial work: splashsurf (MIT; anisotropic-kernel marching cubes with Laplacian and normal smoothing — its defaults are a calibrated recipe), fluid-engine-dev (MIT; spherical, SPH blobby, Zhu–Bridson and anisotropic points-to-implicit side by side), OpenVDB (Apache-2.0; ParticlesToLevelSet and the dilate/smooth/erode filters). Not to be read: the narrow-range filter’s reference implementation (repository) carries no license; the paper describes the filter completely. Patent: NVIDIA’s US8947430B1 (filed 2010, reported active to 2032-09-15) claims rendering particles as screen-oriented quads into a depth image, smoothing it, deriving positions and normals, and shading — in conjunction with a specific per-pixel thickness accumulation — so any screen-space design is a counsel question first (Patents).

Grains as grains stays on the table. Point rendering is a legitimate granular path, and a close view of actual grains is a legitimate target. Decide per scene which path ships — points, hybrid iso + texture, or both at different distances — rather than promoting one globally.

2. The optical stack

What separates a convincing liquid from a blue solid, roughly in order of how much each changes a frame.

  1. Accumulated thickness. Integrate the above-threshold interval along the ray. The alternative — using the domain’s far wall as a thickness proxy — makes a thin sheet absorb like a full tank and makes spray indistinguishable from depth. The cheap implementation linearly resolves and sums every disjoint above-threshold interval on the existing density raymarch.
  2. Scene-color refraction. A raymarch without it substitutes something like a two-color vertical gradient for the world behind the surface. The mechanism: copy the current scene color into one transient non-MSAA texture before the water pass, then sample it with a thickness-scaled view-normal offset, applied as a delta to the water color.
  3. Environment reflection, a GGX lobe, and a sun disc, replacing a fixed pow(dot(n,h), k) highlight. Most of what reads as water in a good reference frame is sky and sun glint sitting in the surface — not the water itself.
  4. Beer–Lambert absorption keyed to real thickness, which is what makes depth read as depth rather than as tint.
  5. Foam, spray, and bubbles. Usually the largest gap: breaking and splashing are what a height field structurally cannot do, and real splash reads white. The choice is between secondary diffuse particles on a trapped-air/curvature criterion (Ihmsen et al. 2012) and a cheaper shading term derived from surface curvature and speed; weigh both against any one-way tracer machinery the solver already has. See §4 below for the mechanism — and first: presentation particles are physics unless their coupling is explicitly one-way.
  6. Caustics. Optional, last; a lit floor sells depth cheaply once the rest is right.

Half the realism in a good reference frame is not the water. Those frames also carry global illumination, sky and atmosphere, aerial perspective, a tonemapped exposure, and surroundings that give the eye scale. Correct optics in a gray box will lose to mediocre water in a good environment, so budget sky, ground, lighting and tonemap as part of the work rather than as dressing after it.

3. The per-material look problems

Each material has a different kind of look problem, and conflating them wastes effort.

4. Secondary particles — spray, splash, foam

The published option with actual constants comes from real-time height-field water, where secondary particles exist because the 2.5D representation fails; MPM does not have that failure, so what transfers is the classification, the spawn rule, the lifetime treatment, and the rendering — not the detection criteria.

The binding rule: presentation particles are physics unless their coupling is explicitly one-way. If foam and spray are real MPM particles they change the simulation; if they are not, the reabsorption bookkeeping above is what keeps mass honest.