Source-linked AI summary

DiffusionShadow: Diffusion-based Shadow Caching for Neural Volume Rendering

Kai-Chen Tung, Qi Wu, David Bauer, Mengjiao Han, Silvio Rizzi, Kwan-Liu Ma

arXiv:2609.30658v1cs.GRcs.LG

TL;DR

Rendering shadows for volumetric INRs is costly, and storing separate shadow representations for many lighting directions is prohibitive. DiffusionShadow predicts shadow INR weights conditioned on lighting direction, reporting at least a 20× rendering speedup over naïve INR-based shadow ray rendering while maintaining realistic shadows.

  • Problem

    Secondary shadow-ray evaluation is computationally costly for volumetric INRs, while storing separate shadow INRs for many lighting conditions requires prohibitive memory and storage.

    Source: §1 · p. 1, §3.1 · p. 3
  • Method

    The method trains shadow coefficient INRs and a lighting-conditioned diffusion model that predicts corresponding shadow INR weights for co-rendering with the data INR.

    Source: §1 · p. 2
  • Results

    At least 20× rendering speedup across all test datasets over naïve INR-based shadow ray rendering while maintaining realistic shadows.

    Source: §1 · p. 2
  • Takeaways & Limitations

    The diffusion model serves as a compressed cache for lighting-dependent shadow fields, avoiding the storage bloat of independent INRs while supporting integrated rendering.

    Source: §1 · p. 2, §7 · p. 11

    Directly predicting raw shadow INR weights can over-smooth high-frequency shadow details and suppress sharp structural boundaries.

    Source: §6 · p. 11

Abstract

from arXiv · show

Implicit neural representations (INRs) have gained momentum in scientific visualization due to their compactness and scalability to large datasets, making them well suited for integration with direct volume rendering (DVR). However, real-time volume rendering of INR with advanced illumination effects, such as shadows, remains computationally expensive, as evaluating shadow terms via ray marching is costly. Alternatively, precomputing and storing shadows for many lighting directions is prohibitive in both memory and storage. To address this, we introduce a diffusion-based shadow caching framework that compresses a vast set of pre-calculated shadow INRs into a single diffusion model. Rather than focusing on generalizing to unseen directions, our method effectively memorizes and reconstructs a dense set of pre-trained lighting conditions on the fly. We first encode a collection of shadow coefficient volumes as shadow INRs, and then train a diffusion model conditioned on lighting direction to predict the corresponding shadow INR weights at inference time. This design integrates directly with standard INR renderers without additional runtime sampling. Experiments show that our approach achieves faster rendering than traditional methods while bypassing the massive storage bloat of independent INRs, producing shadows that closely match most of the reference results.

1. Introduction

Directly rendering shadows for volumetric INRs is costly, while caching separate shadow INRs for many lighting conditions creates prohibitive storage demands. DiffusionShadow predicts shadow INR weights conditioned on lighting direction, enabling integrated rendering that avoids costly secondary-ray evaluation and reports at least a 20× speedup over naïve INR-based shadow ray rendering.

1. Introduction

  • Secondary shadow rays impose O(N^2) work and disrupt efficient batched network queries, making interactive INR shadow rendering difficult.Each neural-network query is more expensive than a direct voxel lookup, further increasing the overhead.Source: §1 · p. 1
  • Storing a separate illumination INR for every lighting condition makes dense precomputation prohibitively expensive in memory and storage.The paper also identifies diffusion models as suitable for this problem because they can be conditioned on external signals.Source: §1 · p. 1
  • A conditional diffusion model memorizes and reconstructs shadow INR weights for pre-trained lighting directions, avoiding storage of a separate INR for each direction.The framework predicts shadow INR weights from lighting direction and integrates the reconstructed shadow field with the data INR.Source: §1 · pp. 1–2
  • At least 20× rendering speedup across all test datasets over naïve INR-based shadow ray rendering while maintaining realistic shadows.The method is integrated into interactive volume rendering and evaluated for reconstruction quality, visual fidelity, and performance.Source: §1 · p. 2

2. Related Work

Related work spans compact INR representations, generation of INR weights, machine-learning approaches to global illumination, and diffusion models for image and 3D synthesis. The paper draws on these lines to represent and predict lighting-dependent shadow fields.

2. Related Work

  • INRs support compact volumetric data representation and continuous point queries for direct volume rendering, while prior work also uses them for interactive visualization.The section surveys volumetric compression, super-resolution, and interactive rendering applications.Source: §2.1 · p. 2, §2 · p. 2

2.1. Implicit Neural Representations (INRs)

  • Triplane encodings represent 3D scenes with three orthogonal 2D feature planes that can serve as inputs to image-based generative models.The paper uses triplane encoding for shadow coefficients to exploit 2D diffusion models.Source: §2.1 · p. 2

2.2. INR Parameterization

  • Prior work generates INR parameters with hypernetworks and diffusion models, including synthesis of shapes and animations in INR weight space.The paper focuses on diffusion-based synthesis of triplane encoding weights for shadow coefficient volumes.Source: §2.2 · pp. 2–3

2.3. Machine Learning-Based Global Illumination

  • Machine-learning approaches approximate global illumination in screen space and volumetric domains; the paper predicts volumetric shadows for direct volume rendering without postprocessing.Prior volumetric examples include ambient-occlusion volumes and neural photon fields.Source: §2.3 · p. 3

2.4. Denoising Diffusion Models

  • Diffusion research covers image synthesis, latent-space efficiency, illumination effects, and 3D generation using fields, NeRFs, triplanes, and meshes.BlockFusion uses an autoencoder to compress triplanes into a latent space for diffusion-based 3D generation.Source: §2.4 · p. 3

3. Methodology

The methodology first fits shadow-coefficient INRs and then trains a diffusion model to reconstruct lighting-conditioned INR weights. Co-rendering the reconstructed shadow field with the data INR reduces secondary-ray work while preserving wavefront execution.

3.1. INR of Shadow Coefficients

  • The single-scattering model augments emission–absorption volume rendering with a reflection term for external illumination.The reflection term includes shadow-coefficient transmittance along the path toward the light source.Source: §3.1 · p. 3
  • Secondary-ray marching for each primary sample costs O(N^2) and disrupts wavefront execution, while dense precomputed coefficient grids increase memory use.The method instead represents shadow coefficients as a spatially queried conditional INR modeled with SIREN networks.Source: §3.1 · pp. 3–4

3. Methodology

  • The training pipeline has two stages: fitting SIREN networks to shadow coefficient volumes, then training diffusion to synthesize their weights conditioned on lighting direction.The SIREN overfitting stage fits a network to a single signal in the INR sense.Source: §3 · p. 3, Figure 1 · p. 4

3.1. INR of Shadow Coefficients

  • A single diffusion model reconstructs pre-trained shadow INR weights on the fly, caching many lighting conditions without storing an independent INR for each.The model is intended to reproduce pre-trained lighting directions rather than generalize to unseen conditions.Source: §3.1 · p. 4
  • Co-rendering the reconstructed shadow INR with the data INR reduces runtime complexity to O(2N) and maintains wavefront execution.SIREN sine activations are described as suitable for complex high-frequency signals and fast convergence with proper initialization.Source: §3.1 · p. 4

Why not use a 5D INR?

A 5D INR that adds lighting direction to spatial coordinates is feasible, but the paper investigates diffusion as a way to model shadow fields across lighting conditions. Its pipeline fits shadow INRs, then trains a conditioned diffusion model to reconstruct their weights.

Why not use a 5D INR?

  • A 5D INR adds lighting direction to spatial coordinates, but DiffusionShadow investigates diffusion as an alternative for modeling these lighting-conditioned shadow fields.The paper notes that direct 5D INR parameterizations can struggle to disentangle spatial and conditional features as condition complexity grows.Source: Why not use a 5D INR? · p. 4

3.2. Stage 1 Training - SIREN Network Overfitting

  • Randomly initialized SIRENs yield inconsistent weights and unstable diffusion training, so the method uses shared initialization and fits networks in memory-bounded subsets.A single optimized SIREN initializes the others; subsets are jointly optimized because hundreds or thousands of networks exceed device memory.Source: §3.2 · pp. 4–5

3.3. Stage 2 Training - Diffusion Model Training

  • The diffusion model learns to reverse noise added to shadow-INR weights and uses lighting direction to reconstruct the corresponding pretrained INR weights.It operates directly on compact SIREN parameters, treating layer weights and biases as tokens with bidirectional cross-layer attention.Source: §3.3 · p. 5
  • Geometry loss supervises decoded shadow coefficients, while rendering loss addresses image artifacts by optimizing pixel discrepancies across rendered views.The rendering-loss stage samples a small subset of pixels and follows geometry-loss training.Source: §3.3 · p. 6

3.4. Network Design

  • The transformer uses 12 blocks, 720-dimensional token embeddings, and 16 attention heads; input shadow-INR weights are standardized for stable diffusion training.The SIREN uses four fully connected layers with 128 neurons, or 64 for smaller datasets.Source: §3.4 · p. 6

4. Evaluation

The evaluation covers five anatomical, biomedical, and fluid-simulation datasets and examines reconstruction quality and rendering performance. Shadow coefficients are prepared for sampled lighting directions, and training is conducted on A100-based supercomputers.

4. Evaluation

  • The evaluation measures visual reconstruction quality and rendering performance across multiple datasets and compares qualitative and quantitative results.The reconstruction evaluation includes PSNR, MS-SSIM, and LPIPS.Source: §4 · p. 6

4.1. Datasets

  • Chameleon, Zebrafish, Mechhand, Vortex, and Argon Bubble cover anatomical, biomedical, and fluid structures, with some volumes reaching 1024^3 voxels.The paper notes that shadow coefficients become prohibitively expensive to compute in real time for some datasets at these resolutions.Source: §4.1 · pp. 6–7
  • Each dataset uses 2,000 shadow-coefficient volumes from uniformly distributed lighting directions, selected from a 2,000-point subset of 8,000 sphere samples focused on typical viewing regions.The selected region depends on dataset orientation and common viewing perspective.Source: §4.1 · p. 7

4.2. System setup

  • Experiments ran on the Sophia and Polaris supercomputers; rendering-loss fine-tuning used one four-GPU Polaris node per dataset.SIREN overfitting and diffusion training with geometry loss each used a single GPU per dataset.Source: §4.2 · p. 8

4.3. Implementation Details

The final diffusion outputs largely preserve shadow structure, with some fine-detail smoothing and color shifts. The section also reports training costs and visual comparisons against ground-truth shadows and Blinn–Phong shading.

4.3. Implementation Details

  • The implementation accelerates SIREN queries with Tiny CUDA Neural Networks and reduces primary-ray evaluations through macro-cell adaptive sampling.The system uses PyTorch and PyTorch Lightning, with distributed diffusion training via DDP.Source: §4.3 · p. 8
  • SIREN overfitting takes about 1.5 hours for Chameleon, while geometry-loss diffusion training and rendering-loss fine-tuning each take about 6.5 hours.Peak memory is 14.50 GB for SIREN overfitting, 19.62 GB for geometry-loss training, and 29.60 GB per GPU for rendering-loss fine-tuning.Source: §4.3 · p. 8

4.4. Reconstruction Quality

  • Reconstruction evaluation compares diffusion-generated shadow-INR renderings with ground-truth shadow-coefficient renderings using PSNR, MS-SSIM, and LPIPS.Results include both visual comparisons and metrics.Source: §4.4 · p. 8

4.4.1. Visual Comparison

  • SIREN overfitting produces sharp boundaries and preserved local detail across datasets, though Mechhand has slight grainy artifacts and exceeds 34 dB PSNR.These SIRENs provide training targets for the diffusion model.Source: §4.4.1 · p. 8
  • Final diffusion outputs preserve large shadow regions, but some show minor color shifts and smoothed details, including blur in fine Vortex structures.Zebrafish has the closest visual match to ground truth and SIREN overfitting results, with 31.14 dB PSNR.Source: §4.4.1 · p. 8
  • Compared with Blinn–Phong shading without shadows, shadow effects make Chameleon’s concave eye and cheek regions more apparent.The paper describes the shadow-enhanced renderings as more realistic.Source: §4.4.1 · p. 8

4.5. Rendering Performance and Runtime Memory Usage

The rendering-performance comparison reports faster rendering and lower runtime memory usage across all datasets than a secondary-ray-sampling baseline. Both approaches use CUDA optimization and macrocell-based adaptive primary-ray sampling.

4.5. Rendering Performance and Runtime Memory Usage

  • Across all datasets, DiffusionShadow achieves faster rendering and lower runtime memory usage than the naive secondary-ray-sampling baseline.Performance is evaluated in frames per second under a deployment setting where rendering operates directly on INR representations.Source: §4.5 · p. 8
  • The comparison uses CUDA-optimized network inference and macrocell-based adaptive sampling along primary rays for both methods.The baseline computes shadows with secondary-ray sampling of the data INR.Source: §4.5 · p. 8
  • The paper attributes the performance benefit to directly querying precomputed shadow coefficients from the SIREN network.This avoids computing shadows through secondary-ray sampling in the baseline.Source: §4.5 · p. 8

4.6. Baseline Comparison

The comparison tests diffusion shadow prediction against triplane-based BlockFusion and volume-to-volume DVAO, revealing different reconstruction and conditioning limitations.

4.6.1. BlockFusion

  • BlockFusion reconstructs some datasets well but misses intricate Vortex shadows, where VAE compression loses high-frequency structure that degrades the final result.Figure 4 shows the loss of high-frequency triplane detail between overfitting targets and VAE reconstructions.Source: §4.6.1 · p. 9, Figure 4 · p. 9
  • Our full pipeline finishes in less than one day on at most 4 GPUs, while BlockFusion's VAE stage alone takes 60–75 hours on 8 GPUs.BlockFusion's triplane overfitting and diffusion stages take roughly 5 and 14 hours, respectively, on a single GPU.Source: §4.6.1 · p. 9

4.6.2. Deep Volumetric Ambient Occlusion

  • DVAO uses a 3D U-Net to predict ambient-occlusion volumes; adapted to shadow volumes, it produces nearly identical outputs across lighting directions for each dataset.The adaptation uses the same input volume and injects light direction as a conditioning variable; the authors report that latent-space conditioning has limited influence in this setting.Source: §4.6.2 · p. 9
  • Adding geometry and rendering losses progressively reduces spotty artifacts in Mechhand shadow reconstructions.Figure 5 compares no auxiliary losses, geometry loss alone, geometry plus rendering losses, and ground truth.Source: Figure 5 · p. 10
  • With the same input volume but different light directions, deterministic 3D CNNs face a one-to-many mapping, while diffusion models generate from a conditional distribution.The authors suggest the CNN may converge to an average solution that ignores conditioning; diffusion generates outputs from Gaussian noise given conditioning inputs.Source: §4.6.2 · p. 10
  • INR encoding reduces memory demands relative to training a 3D CNN, enabling higher-resolution volumes while maintaining reconstruction quality.The authors note that GPU memory constraints often require downsampling CNN input volumes, sacrificing reconstruction quality and fine details.Source: §4.6.2 · p. 10

5. Ablation Study

The ablations examine geometry and rendering losses and lighting-direction sampling density, finding that the losses improve visual quality while unseen directions remain more challenging.

5.1. Di

  • Without geometry loss, reconstructed shadows show significant artifacts and color shifts, supporting the role of volume-domain supervision in diffusion training.The comparison evaluates results with and without geometry loss.Source: §5.1 · p. 10

5.2. Di

  • Including rendering loss reduces spotty artifacts in Mechhand shadows and improves the visual quality of rendered images.The comparison is between geometry loss alone and geometry plus rendering losses.Source: §5.2 · p. 10

5.3. Effect of Lighting Direction Sampling Density

  • 29.57 dB with 2,000 directions versus 29.32 dB with 6,300 directions on training-set PSNR; unseen-direction quality is lower and declines with distance from training directions.The evaluation also tests 500 unseen directions sampled from the same lighting region.Source: §5.3 · p. 10, Table 3 · p. 11
  • Spider shadows retain plausible overall illumination, but fine structures are over-smoothed, reflecting difficulty representing high-frequency shadow discontinuities.The limitation is visible in the high-frequency shadow reconstruction example.Source: Figure 6 · p. 11

6. Discussion

Diffusion-reconstructed shadows can lose high-frequency detail because learning a vast, continuous weight space smooths the parameter distribution. The discussion identifies model capacity and geometry-aware losses as possible improvements, while noting their costs and broader caching directions.

6. Discussion

  • Learning a vast, continuous weight space can over-smooth high-frequency shadow details and suppress sharp boundaries captured by individually overfitted SIRENs.The authors identify this smoothing as the primary factor limiting reconstructed-shadow fidelity.Source: §6 · p. 11
  • Increasing SIREN and diffusion-model capacity is proposed to better memorize high-frequency variations.The authors also propose more expressive, multi-scale geometry-aware losses, whose computational cost remains a challenge; efficient sampling may balance fidelity and training efficiency.Source: §6 · p. 11
  • A unified diffusion cache across varied volumetric datasets without per-dataset training is described as a broader possibility.The authors also envision applying the framework to precomputed illumination fields such as ambient occlusion.Source: §6 · p. 11

7. Conclusion

DiffusionShadow caches thousands of lighting-dependent shadow fields in a unified weight space and reconstructs shadow INR weights on demand. The reconstructed shadows co-render with the data INR, replacing secondary-ray evaluation and accelerating INR rendering with realistic shadows.

7. Conclusion

  • DiffusionShadow caches thousands of lighting-dependent shadow fields in a unified weight space, reconstructing the required shadow INR weights by querying the diffusion model.The framework targets shadow coefficient volumes in direct volume rendering and is described as a highly compressed memory cache.Source: §7 · p. 11
  • The reconstructed shadow INR co-renders with the data INR, replacing secondary-ray evaluation and substantially accelerating INR rendering with realistic shadows.Source: §7 · p. 11
  • The findings highlight diffusion models as a dense shadow cache and suggest future directions for scalable, memory-efficient illumination modeling in volume rendering.Source: §7 · p. 11

Appendix A. Rendering Pipeline and Baseline Shadow Implementation

The renderer batches ray samples through coordinate collection, network inference, and shading kernels, then repeats batches until rays terminate. Shadow INR coefficients are inferred alongside the primary network, whereas the baseline uses nested batched secondary-ray marching.

Appendix A. Rendering Pipeline and Baseline Shadow Implementation

  • The wavefront-style ray marcher batches sample coordinates through coordinate, network-inference, and shading kernels until each ray meets its termination criterion.Batching avoids out-of-memory issues that would arise from inferring all sample points along all rays at once.Source: Appendix A · p. 13
  • Shadow coefficients from an additional shadow INR are combined with scalar-field values to modulate shading during composition.Source: Appendix A · p. 13
  • The baseline pauses primary-ray marching to batch secondary rays for each primary sample; this nested loop and added network inference make its rendering performance substantially lower.Primary marching resumes only after shadow coefficients are obtained for every sample in the current primary batch.Source: Appendix A · p. 13
Loading 2609.30658v1…