Spectral rendering accurately reproduces wavelength-dependent appearance but is computationally expensive, as shading must be evaluated at many wavelength samples and scales roughly linearly with the number of samples. It also requires spectral textures and lights throughout the rendering pipeline. We propose Hadamard spectral codes, a compact latent representation that enables spectral rendering using standard RGB rendering operations. Spectral images are approximated with a small number of RGB rendering passes, followed by a decoding step. Our key requirement is latent linearity: scaling and addition in spectral space correspond to scaling and addition of codes, and the element-wise product of spectra (for example reflectance times illumination) is approximated by the element-wise product of their latent codes. We show that an exact low-dimensional algebra-preserving representation cannot exist for arbitrary spectra when the latent dimension k is smaller than the number of spectral samples n. We therefore introduce a learned non-negative linear encoder and decoder architecture that preserves scaling and addition exactly while encouraging approximate multiplicativity under the Hadamard product. With k = 6, we render k/3 = 2 RGB images per frame using an unmodified RGB renderer, reconstruct the latent image, and decode to high-resolution spectra or XYZ or RGB. Experiments on 3D scenes demonstrate that k = 6 significantly reduces color error compared to RGB baselines while being substantially faster than naive n-sample spectral rendering. Using k = 9 provides higher-quality reference results. We further introduce a lightweight neural upsampling network that maps RGB assets directly to latent codes, enabling integration of legacy RGB content into the spectral pipeline while maintaining perceptually accurate colors in rendered images.
翻译:光谱渲染能够精确复现波长相关的视觉外观,但计算成本高昂,因为着色需要在大量波长采样点上进行评估,且计算开销大致随采样数线性增长。该方法还要求在整个渲染管线中使用光谱纹理与光源。本文提出哈达玛光谱编码——一种紧凑的潜在表示方法,能够利用标准RGB渲染操作实现光谱渲染。光谱图像通过少量RGB渲染通道配合解码步骤进行近似重建。我们的核心要求是潜在线性:光谱空间的缩放与加法运算需对应编码的缩放与加法运算,同时光谱的逐元素乘积(如反射率乘以光照)需由其潜在编码的逐元素乘积近似表示。我们证明当潜在维度k小于光谱采样数n时,对于任意光谱不可能存在精确保持代数运算的低维表示。为此,我们提出一种可学习的非负线性编码器-解码器架构,该架构在严格保持缩放与加法运算的同时,通过哈达玛乘积促进近似乘性保持。当k=6时,我们使用未经修改的RGB渲染器每帧渲染k/3=2幅RGB图像,重建潜在图像后解码为高分辨率光谱、XYZ或RGB数据。在三维场景上的实验表明,k=6配置在显著优于朴素n采样光谱渲染速度的同时,相比RGB基线方法能大幅降低色彩误差。使用k=9可获得更高质量的参考结果。我们进一步提出轻量级神经上采样网络,可将RGB资源直接映射为潜在编码,使得传统RGB内容能够融入光谱渲染管线,同时在渲染图像中保持感知准确的色彩表现。