Reading Ion Diffusion from Pictures: Lighting-Free Concentration Maps of Intercalating Disordered Films

Many materials change color as ions move into them. Amorphous tungsten oxide darkens to blue as lithium or protons enter, and graphite shifts color as it fills with lithium. In principle, a camera watching an electrode during charging records a movie of where the ions are and how fast they spread. In practice, that movie is corrupted by lighting. Highlights, shadows in surface crevices, and light bouncing between rough grains are recorded as if they were color changes, so a bright glint looks like an empty region and a shadowed pore looks full. Computer graphics calls this problem "baked-in lighting." It is the same failure that makes 3D reconstructions unusable when the scene is relit.

We propose to treat the operando movie as an inverse-rendering problem. Inverse rendering means recovering surface shape, intrinsic color, and illumination from images by fitting a physically based image-formation model. Here the lighting and geometry stay fixed across the whole movie, and only the intrinsic color changes. That change is constrained twice: by a diffusion equation for the ion concentration, and by the total charge passed, which is measured independently as current over time. In two sentences: we fit one shared light-and-shape model to every frame and let only a physically constrained concentration field vary. That turns a badly underdetermined de-lighting problem into a well-posed estimate of the local diffusion tensor. The scientific payoff is a direct spatial test of a central claim in disordered-materials research, namely that amorphous frameworks conduct ions isotropically through 3D percolating networks while ordered ones channel them.

Core Claim

Standard inverse rendering is hardest when a scene is seen under a single, static illumination. With one lighting condition, a dark material in bright light cannot be told apart from a bright material in shadow. The usual cure is to vary the lighting. Intercalation imaging inverts the situation: lighting is fixed, but intrinsic color varies over time in a lawful way. We claim that this temporal variation, tied to a transport model and anchored by charge counting, makes the decomposition identifiable. We also claim it yields, as a direct output, an effective diffusivity tensor $D(x)$ whose anisotropy can be compared between amorphous and crystalline versions of the same compound.

The image model for frame $t$ at pixel $p$ is

$$I_t(p) = \mathcal{R}\big(n, \rho, L;\ a(c(x,t))\big),$$

where $n$ is surface geometry, $\rho$ is roughness and specular reflectance, and $L$ is illumination, all shared across frames. The function $a(\cdot)$ is a learned monotone curve mapping local ion concentration $c$ to diffuse color. $\mathcal{R}$ is a differentiable renderer that includes inter-reflection. The concentration field obeys

$$\partial_t c = \nabla \cdot (D(x)\nabla c), \qquad \int_A c(x,t)\, dA = Q(t)/(zF),$$

where $D(x)$ is a spatially varying 2×2 diffusion tensor on the film surface, $Q(t)$ is the measured cumulative charge, $z$ is ion charge, and $F$ is Faraday's constant. The charge constraint is what makes this setting unusual for inverse rendering. It supplies a free, independent ground truth on the integral of the quantity being de-baked.

Why These Two Directions Belong Together

The materials literature motivates the measurement. Cation disorder in Li₂ZrCl₆ lowers the activation energy from 0.97 eV to 0.28 eV, and equilibrium annealing that restores order costs nearly two orders of magnitude in conductivity (Effect of Cation Disorder on Lithium Transport in Halide Superionic Conductors). Simulations of glassy Li₃PS₄ show disordered regions acting as fast transport paths, with activation energy dropping from about 0.66 to 0.47 eV (Disorder-induced enhancement of lithium-ion transport in solid-state electrolytes). Mixed-anion disorder in Li₄.₃AlS₃.₃Cl₀.₇ is credited with replacing blocked 1D/2D channels by isotropic 3D percolation (Li 4.3 AlS 3.3 Cl 0.7). Supercell ordering in argyrodites locks cations into rigid sublattices and collapses conductivity (Cation Disorder and Large Tetragonal Supercell Ordering in the Li-Rich Argyrodite Li7Zn0.5SiS6).

Almost all of this evidence is either bulk averages (conductivity, activation energy) or simulation. The "softness" descriptor is explicitly local and cannot say whether compliant pockets connect at larger scales. Gap 4 of the research file names this missing link between local structure and long-range percolation. A spatially resolved, lighting-corrected map of the diffusion tensor would test isotropy and percolation directly. We are borrowing claims from these papers to test them, not borrowing their methods.

The rendering literature supplies the method and its constraints. ExMesh++ shows that optimizing geometry and appearance jointly lets each absorb the other's errors. It solves this by freezing geometry before fitting materials and adding one-bounce indirect light (ExMesh++). We adopt that staging. Geometry and lighting are fit on the pristine film, then frozen while the concentration field is fit. TensoIR models self-shadowing and indirect bounces with fast tensor queries (TensoIR). NVDiffRec extracts meshes and physically based textures with a split-sum environment model (Extracting Triangular 3D Models, Materials, and Lighting From Images). These provide candidate renderer back ends. DPIR's sparsity penalty on specular coefficients (Differentiable Point-Based Inverse Rendering) is reused to stop color changes from leaking into the specular term.

These works also constrain the design. Every one of them assumes a static scene and a fixed Fresnel or dielectric model, and most stop at one bounce. That last assumption matters because inter-reflection inside pores scales nonlinearly with the very albedo we are tracking. DiffTrans (DiffTrans) is the closest attempt at non-opaque media. It handles refraction in static transparent objects but has no notion of a time-varying, physically governed material. No paper in the file couples inverse rendering to a transport equation or to an electrochemical measurement.

Research Program

The work has three stages.

The first stage builds the model. Geometry and lighting come from a short multi-view capture of the pristine film (a camera on a small gantry), checked against profilometry. A ring or dome light is then fixed in place. During cycling a single view is recorded at video rate. The renderer is an NVDiffRec- or TensoIR-style differentiable rasterizer with two-bounce indirect diffuse light, so that darkening inside crevices is modeled rather than absorbed. The color curve $a(c)$ is learned jointly, but it is pinned at the endpoints by fully bleached and fully colored reference states. The diffusion tensor field $D(x)$ sits on a coarse grid with a smoothness prior. Gradients pass through a differentiable finite-volume diffusion solver.

The second stage measures accuracy on synthetic data where every quantity is known. We render diffusion movies in Blender Cycles over rough, porous, and glossy surfaces. The concentration fields come from prescribed tensors: isotropic, strongly channeled, and channeled with blocking defects. The blocking-defect case imitates the 1D-channel blocking that disorder is claimed to remove.

The third stage is the scientific study on real films. We use sputtered WO₃ films intercalated with lithium in a sealed optical cell. WO₃ is chosen because it is a well-known electrochromic material whose amorphous and crystalline forms can be made from one composition by annealing. An annealing series moves the film from amorphous to crystalline. A long-cycling series looks for the slow relaxation toward order that Zhong et al. warn metastable disordered phases may undergo. If the method holds up, the same analysis extends to colored cathodes such as the doped α-MnO₂ studied in Co-Doping Inducing d-Electron Delocalization in α-MnO2 for High-Performance Zinc-Ion Batteries.

Baselines

The naive reference is the raw-color method used in most operando optical work. A calibration curve maps pixel color straight to concentration with no lighting model. Its expected failure is that glints, shadows, and pore darkening appear as fake concentration structure.

The first strong simple baseline is the ratio-plus-offset model. Each pixel is modeled as $I_t = S\,a(c_t) + K$, with a per-pixel shading factor $S$ and an additive specular offset $K$. This baseline gets the same diffusion prior and the same charge constraint as our method, but no rendering model. It is the single-view limit of our approach with inter-reflection and specular color shifts removed. On flat, matte films we expect it to match our method, and we will report that outcome honestly. Our method must beat it on rough, porous, or glossy films.

The strongest existing inverse-rendering competitor is a per-frame ExMesh++-style staged reconstruction followed by the same color-to-concentration curve. It is run on identical captures, at matched GPU hours and with matched hyperparameter search, with lighting re-estimated in every frame. On static benchmarks ExMesh++ reports a relighting PSNR of 34.19 on Synthetic4Relight, against 31.00 for RelightGS and 24.22 for NVDiffRecMC (ExMesh++). On Stanford-ORB, NVDiffRecMC reports a relighting PSNR-H of 24.43 (Stanford-ORB). For the actual task, recovering a time-varying concentration field under fixed lighting, no reported result was found on Lacuna. We therefore build the comparison ourselves.

Two ablations isolate the key ingredients. One removes the diffusion prior: lighting is still shared, but $c$ is free in each frame. The other removes the charge constraint. A third check, isotropic versus full-tensor $D$, tests whether the anisotropy we report is driven by the data or imposed by the parameterization.

A method counts as beating a baseline if it does three things. It must lower concentration-map error against a cross-polarized, integrating-sphere reference capture. It must close the gap between integrated recovered concentration and coulometric charge. It must recover the prescribed diffusion-tensor anisotropy on synthetic data more accurately, at matched compute.

Why not just…?

Why not just divide each frame by the pristine frame? A ratio image cancels multiplicative diffuse shading. It cannot cancel additive specular highlights, and it misreads pores where light bounces several times off the darkening material, because there the signal falls off faster than the albedo. The ratio-plus-offset baseline above is the strengthened form of this idea. It is a real threat on smooth films. The synthetic roughness sweep will show where, if anywhere, it breaks down, and we will report the regime where it suffices.

Why not just remove highlights optically with cross-polarized, diffuse illumination? On an open bench this works well, which is why we use it as the reference capture. Sealed electrochemical cells add windows and electrolyte that partly depolarize light, and integrating-sphere lighting is hard to fit around a cell. The real-film experiments include an open-cell configuration where both methods can run. If optical suppression alone matches our recovered maps inside the sealed cell, our contribution narrows to the roughness and inter-reflection correction.

Why not just simulate transport with machine-learned interatomic potentials? DeePMD and CHGNet simulations (Disorder-induced enhancement of lithium-ion transport in solid-state electrolytes, Effect of Cation Disorder on Lithium Transport in Halide Superionic Conductors) reach nanometer cells and nanosecond times. Grain-scale percolation and aging over many cycles lie outside that window. Our maps are complementary: they measure the micrometer-to-millimeter tensor that simulations predict but cannot reach.

Why not just run an off-the-shelf inverse renderer per frame? With one fixed illumination, each frame is individually ambiguous, so independent decompositions flicker and trade shading for color from frame to frame. The no-diffusion-prior ablation and the per-frame ExMesh++ baseline measure exactly this effect.

Decisive Checks

The first check is charge closure on real films. Integrated recovered concentration should track $Q(t)$ within the uncertainty of the coulometry. This holds only on the held-out half of the charge curve, since the other half is used in fitting. The raw-color and per-frame baselines should fail visibly on rough samples.

The second check is synthetic recovery. Across the roughness sweep, the recovered tensor's anisotropy ratio and principal direction should match the prescribed values. In particular, the method must locate the blocking defects in channeled fields.

The third check is the scientific test. If disorder produces isotropic 3D percolation as claimed for Li₄.₃AlS₃.₃Cl₀.₇, amorphous WO₃ films should show near-unit anisotropy and spatially uniform $D$. The annealing series should show anisotropy and blocked domains emerging as order develops. If amorphous films instead show patchy, poorly connected high-$D$ regions, that supports the concern that local softness does not guarantee long-range percolation.

The last check guards against the renderer itself being weak. The static back end is run once on Stanford-ORB and Synthetic4Relight, and must land near the published numbers above.