Abstract
This paper introduces a novel framework for scene-conditional 3D stylization, enabling the seamless integration of 3D objects into 2D images. By combining differentiable ray tracing with the generative power of diffusion models and Large Language Models (LLMs), the proposed method ensures that objects adopt the lighting and physical characteristics of their target environment—such as a clean sofa becoming "soggy and muddy" in a swamp—while maintaining their original geometric structure. The approach achieves photorealistic compositions that outperform existing 2D blending and manual painting techniques.
Introduction
While 3D generative models have advanced significantly in creating isolated assets, placing these objects into real-world 2D scenes often results in a "sticker-like" appearance. Discrepancies in lighting, shadow alignment, and material properties prevent the object from appearing as though it truly belongs in the scene. Existing solutions typically fall into two categories: 2D image blending, which often compromises the object's 3D structure, or labor-intensive manual texture painting. This research addresses the challenge of automated, context-aware stylization, ensuring 3D assets belong to a specific 2D scene both geometrically and aesthetically.
Methodology
The framework utilizes an optimization-based approach to bridge the gap between 3D assets and 2D generative priors through several key components:
- Differentiable Rendering: Using the Mitsuba3 physically-based ray tracer, the system renders 3D objects and backpropagates gradients to optimize texture and lighting parameters.
- Diffusion-Based Guidance: A pre-trained Stable Diffusion model acts as a "critic." Through Variational Score Distillation (VSD), it provides the gradient signals necessary to refine the object's realism within the scene.
- LLM-Guided Environmental Influence: GPT-4 is employed to analyze the relationship between the object and the scene, generating descriptive prompts (e.g., "marred by mud and moss") that guide the diffusion model's stylization.
- Lighting Estimation: The model estimates an environment map from the 2D image using a virtual white diffuse sphere as a light probe, allowing for the separation of lighting conditions from the object's intrinsic texture.
- Identity Preservation: Reference feature injection ensures the object maintains its structural identity by feeding "clean" reference renderings into the diffusion model's attention layers.
Results and Discussion
The framework was evaluated using a custom set of 34 composites featuring diverse objects and environments, including underwater scenes and snowy forests.
Qualitative Realism: The method produces highly realistic results, such as television sets adopting the weathered texture of surrounding debris and umbrellas casting shadows that align perfectly with environmental light sources.
Quantitative Performance: In a user study with 42 participants, this method was preferred over prior state-of-the-art techniques, such as CDC or InstructPix2Pix, in over 70% of cases. Furthermore, it outperformed baselines in LPIPS (identity preservation) and CLIP-based metrics (contextual fit).
Conclusion and Future Work
By decoupling texture and lighting, this framework creates "relightable" assets that can be moved or re-posed within a scene. While the current optimization-based process is slower than feed-forward networks and remains dependent on the accuracy of initial 2D depth estimation, it represents a significant step toward automated 3D scene composition. Future research will focus on accelerating the stylization process and improving the handling of complex materials like glass or translucent surfaces.
Summary updated