arXiv:2610.37036cs.CVOct 2026

Manuscript Offprint

arXiv:2610.37036

GraftRay: Physically Based Mesh Insertion into Gaussian Splatting Scenes via Path Tracing

Jinxin Ai, Matthias Niessner

Abstract

Inserting virtual objects into scenes reconstructed via 2D or 3D Gaussian Splatting (2DGS/3DGS) is a key capability for content creation, AR, and synthetic data generation. However, realistic insertion requires the object to be seamlessly lit by the scene and, conversely, to cast physically plausible shadows onto it. Existing approaches either harmonize appearance in image space, sacrificing multi-view consistency, or approximate scene illumination with an environment map at the insertion point, which cannot represent near-field area lights such as windows and lamps that dominate indoor lighting. To address this, we present GraftRay, a unified method for physically consistent insertion of mesh objects into indoor scenes represented by either 2D or 3D Gaussians. We recover scene materials and surface normals with diffusion-based priors, and explicitly model spatially-extended emitters, solving their radiance in closed form. A hybrid renderer then jointly path-traces the scene Gaussians and inserted meshes, producing view-consistent shading, interreflections, and soft shadows. On FIPT, GraftRay sets a new state of the art, outperforming recent baselines such as ComGS and EAG-PT in rendering fidelity and shadow accuracy, while maintaining highly competitive rendering efficiency.

1. Introduction

3D Gaussian Splatting (3DGS) [21] and its 2D counterpart [15] enable high-quality, real-time rendering of reconstructed scenes. However, inserting a virtual object into such scenes remains challenging. Beyond matching its appearance to the background, the inserted object must respond to the scene's illumination, cast geometrically consistent shadows, and contribute indirect light to surrounding surfaces. Achieving these effects requires explicit light transport while preserving the visual fidelity of the original reconstruction.

Existing approaches address this problem from three main directions. Environment-map-based methods estimate local illumination from HDR environment maps [2, 16, 26]. Although effective for approximating incident illumination, environment maps do not explicitly represent the spatial positions of local emitters or their interactions with scene geometry, limiting their ability to reproduce spatially varying illumination and geometrically consistent shadows. Inverse-rendering methods jointly recover scene materials and illumination [3, 8, 13, 28, 29, 37, 47]. While physically grounded, these methods introduce additional unknowns beyond those strictly required for object insertion. Moreover, low-dynamic-range (LDR) observations weaken the photometric constraints needed to distinguish emissive sources from highly reflective surfaces. Finally, image-space harmonization methods use generative models to refine the appearance of composited objects [24, 36, 38, 42]. Despite producing visually plausible results, they do not explicitly model scene-level light transport and therefore cannot guarantee consistent relighting when the object or illumination changes.

We propose GraftRay, a unified framework for physically consistent object insertion into 2D and 3D Gaussian scenes (Fig. 1). Because our pipeline extracts material priors directly from rendered views rather than relying on original capture data, it uniquely supports physically-based insertion even for synthetically generated Gaussian scenes where original training images are unavailable. We first render multi-view images from the Gaussian scene and estimate material properties, including albedo, roughness, metallicity, and normals, using robust 2D estimators such as RGB-X or diffusion-based models. These predictions are then unprojected onto individual 2D/3D Gaussians to provide scene-level material attributes, bypassing the complex joint optimization of traditional inverse rendering. Building on these attributes, we extend an OptiX-accelerated path tracer to support Gaussian primitives with stochastic transparency [9] and 3σ3\sigma axis-aligned bounding boxes, traced jointly with inserted meshes. The extended path tracer incorporates a Mitsuba-style path integration scheme [17], analytic area emitters, multiple importance sampling (MIS), and explicit shadow rays to enable light transport directly on Gaussian scenes. We further recover scene illumination from LDR observations by treating saturated pixels as lower-bound constraints and using unsaturated surfaces to constrain emitter intensities. Since light transport is linear in emitter intensities with fixed geometry and materials, we precompute unit-radiance basis images and formulate light estimation as a nonnegative least-squares (NNLS) problem. Finally, we use differential rendering [7] to introduce the inserted object's shadows and indirect illumination while preserving the original background reconstruction.

Our contributions are summarized as follows:

• From LDR images alone, we unproject multi-view 2D material and normal predictions onto individual 2D/3D Gaussians, providing scene-level material attributes for physically based insertion without joint inverse rendering.

• We extend an OptiX path tracer to trace stochastic-transparency Gaussians jointly with meshes, computing illumination, shadows, and indirect light between Gaussian scenes and mesh objects, while differential rendering preserves the reconstruction.

• We formulate light-intensity estimation using censored observations and path-traced radiance bases, exploiting unsaturated illumination cues to distinguish true emitters from bright reflectors and efficiently estimate nonnegative emitter intensities.

References (45)