Research
Refracting Reality: Generating Images with Realistic Transparent Objects
Refracting Reality: Generating Images with Realistic Transparent Objects Overview Research area: Generative computer vision — text-to-image synthesis combined with physically based light transport (re
- arXiv
- 2511.17340
- Published
- 2025-11-21
- Authors
- Yue Yin, Enze Tao, Dylan Campbell
AI summary
Refracting Reality: Generating Images with Realistic Transparent ObjectsOverview
Research area: Generative computer vision — text-to-image synthesis combined with physically based light transport (refraction and reflection) via ray tracing.
Technical level: Advanced. The paper assumes familiarity with flow-matching diffusion models, classifier-free guidance, ray tracing, Snell's Law, Fresnel equations, and latent-space synchronization techniques.
Scope: A training-free method, named Snellcaster, that enforces the optics of refraction and reflection at every denoising step so that text-to-image generators produce physically plausible transparent objects rather than hallucinated ones.
What This Paper Is About
Generative image models produce convincing textures, shapes, layouts and lighting, but they fail badly at transparent objects such as glass spheres: the pixels inside a glass object should show the surrounding scene warped by refraction, and because those same surfaces are often visible directly elsewhere in the image, the color is constrained rather than free to hallucinate. The authors address the problem of generating an image from a text prompt in which a transparent, refractive object obeys the actual laws of optics, given a 3D model of the object, its material properties and its pose.
Key Contributions
- A method for generating images containing a single transparent, refractive object with optically plausible refraction and reflection (Snellcaster), requiring no training.
- A synchronization approach that constrains corresponding pixels within a single image, used here to tie refracted pixel rays inside the object to the surfaces they observe elsewhere in the frame.
- A synchronization approach that constrains unconstrained, unseen pixels by generating an auxiliary 360-degree panorama centered at the transparent object and warping it into the perspective view, supplying plausible color for occluded or out-of-frame refracted and reflected rays.
- A quantitative evaluation protocol for refraction fidelity: comparing refracted rays against Blender renders of the same RGBD image using masked PSNR and masked LPIPS, alongside CLIP and ImageReward for image quality and text alignment.
Main Findings
- Large gains in refraction fidelity. On 300 scene–object combinations (10 prompts × 5 variations × 6 objects), Snellcaster reaches masked PSNR 16.51 and masked LPIPS 0.24, versus the best baseline values of PSNR 12.68 (FLUX-dev) and LPIPS 0.47 (FLUX inpainting). FLUX.2-dev, Qwen-Image and Stable Diffusion 3.5 (L) scored PSNR 12.15, 12.55 and 12.25, and LPIPS 0.48, 0.48 and 0.53 respectively.
- Text alignment and aesthetics are not the winning metric. Stable Diffusion 3.5 (L) has the highest CLIP score (34.56) compared with Snellcaster's 32.85, and FLUX.2-dev has the highest ImageReward (0.18) compared with Snellcaster's -0.32; the paper states its method does not sacrifice these measures, but the reported numbers show the baselines leading on them.
- Qualitative failures of baselines are structural, not stylistic. FLUX inpainting fails to render a sofa behind the sphere in the living room scene; in the karaoke scene both FLUX inpainting and FLUX-dev omit the TV and speakers inside the sphere; in the landscape scene FLUX-dev leaves the background mountains unrefracted in the sphere.
- Panorama synchronization matters more than reflection modeling. In an ablation over six scenes (artroom, cafe, dining room, kitchen, living room, office) with sphere geometry, removing panorama synchronization drops PSNR to 17.98 and worsens MAE to 0.0983, a larger degradation than removing reflections (PSNR 18.11, MAE 0.0964), against 18.21 PSNR / 0.0953 MAE for the full method.
- Relighting trades per-pixel accuracy for realism. Adding the relighting post-process lowers PSNR to 17.10, raises MAE to 0.1137 and raises LPIPS to 0.28, but raises CLIP to 34.61 and ImageReward to 0.59, and the paper argues shadows and caustics are important for visual plausibility.
- Real-world transfer works. The authors collect image pairs (one without, one with a transparent sphere, fixed camera, phone camera) and use the sphere-free image as the object-free input, generating plausible insertions for an indoor kitchen scene and an outdoor night park scene.
- Blender renders are approximate ground truth. The reference images used for PSNR/LPIPS have incorrect lighting, which is why histogram matching on grayscale images is applied, and missing data where refracted surfaces are not directly observable.
Methodology in Plain English
The pipeline has three phases and runs once per image, with no training.
-
Build the geometry. Starting from a text prompt, the authors strip out any mention of the transparent object and generate a clean reference image with FLUX. A depth estimator (MoGe-2) converts that image into a 3D mesh, and the transparent object's mesh — supplied by a 3D model, with its refractive index, absorption properties and pose — is placed on a horizontal surface near the optical axis. Ray tracing from the camera through each pixel then yields precomputed pixel-to-pixel maps: which background pixel appears where inside the object, according to Snell's Law, including total internal reflection, plus a reflection map for the dominant first reflection.
-
Generate two views at once. The perspective image (with the transparent object) and a 360-degree equirectangular panorama centered on the object are denoised concurrently from their respective prompts. At every denoising step, each branch's clean-image estimate is decoded to pixels, warped by the precomputed maps, and blended with the warped object-free reference image using an occlusion-masked, value-weighted averaging scheme with detail-preserving coefficient λ = 0.5. This is what forces the pixels inside the object to agree with the scene around it, and lets the panorama supply plausible color where the perspective camera cannot see.
-
Combine physically and continue. Refracted and reflected colors are mixed using the Fresnel equations in linear color space, converted to sRGB, and encoded back into latent space to guide the next denoising step. Warps use a five-level Laplacian pyramid to reduce boundary artifacts, and time travel is applied three times over timesteps in [0.2, 0.8]T for multi-view consistency. After generation, a foreground relighting/harmonization model adds shadows and caustics; it is run 20 times and the result that minimally changes the transparent region by PSNR is selected.
Implementation: FLUX-dev flow-matching backbone, T = 20 denoising steps, guidance scale 3.5, 720 × 1280 perspective and 1024 × 2048 panorama resolution, on an NVIDIA A100 80GB GPU. Assumptions: a single refractive object, no scattering, uniform index of refraction.
Why This Matters
Impact on research. The paper reframes a generative-model weakness as a missing physical constraint rather than a data or capacity problem, showing that geometric correspondence computed by ray tracing can be injected into a diffusion/flow-matching trajectory. It connects the synchronized-generation literature (SyncTweedies, Visual Anagrams, SyncDiffusion, SyncSDE, SaFa, LookingGlass) to light-transport correctness, and it introduces a refraction-specific evaluation using Blender as an approximate reference. It also highlights a measurement tension: perceptual and text-alignment metrics do not reward physical correctness, and the paper is explicit that CLIP and ImageReward "are not trained to prefer realistic refractions."
Real-world applications (implied by the capability; the paper does not enumerate specific products or deployments):
- Product and e-commerce imagery, where bottles, glassware, lenses, and jewelry must refract their surroundings believably.
- AR/VR and virtual try-on, where a virtual transparent object must be composited into a captured scene consistently.
- Visual effects and advertising, where inserting a glass or crystal element without a renderer saves artist time.
- Synthetic training data for robotics and perception, where a model that respects refraction could generate labeled imagery of transparent objects — a known weak spot for depth and segmentation systems.
Industry relevance. Because the method is training-free and built on an existing flow-matching model, it can be layered onto current image-generation stacks as a geometric-consistency stage plus a relighting pass, rather than requiring a newly trained model.
Future Directions
- Material extensions: modeling absorption and tinting, multiple material types at once (the paper's example is a glass of water with a straw), and birefringent materials such as Iceland spar.
- Control and placement: making object placement text-controllable rather than determined by a heuristic that drops the object on a horizontal surface near the optical axis.
- Native lighting and shadow handling: estimating light sources and ray tracing them, rather than relying on a post-hoc relighting model that degrades per-pixel metrics.
- Better seen–unseen boundaries: improving the accuracy and consistency of the boundary between observed and unobserved surfaces by synchronizing RGBD images and panoramas together.
- Video: extending the approach to video generation with optically accurate refraction and reflection, which the paper identifies as a major current failure case of video models.
Target Audience
Researchers and practitioners in generative computer vision, differentiable rendering, and physically based graphics who work on image synthesis, compositing, or inverse rendering; engineers building AR/VR or e-commerce pipelines that must insert transparent objects into photographs; and readers interested in the intersection of ray tracing and diffusion/flow-matching models. The paper is not introductory — it presumes comfort with flow matching, Snell's Law, Fresnel equations, and latent-space synchronization, though the supplementary material and figures make the geometric argument accessible to a graphics-literate reader.
Authors’ abstract
Generative image models can produce convincingly real images, with plausible shapes, textures, layouts and lighting. However, one domain in which they perform notably poorly is in the synthesis of transparent objects, which exhibit refraction, reflection, absorption and scattering. Refraction is a particular challenge, because refracted pixel rays often intersect with surfaces observed in other parts of the image, providing a constraint on the color. It is clear from inspection that generative models have not distilled the laws of optics sufficiently well to accurately render refractive objects. In this work, we consider the problem of generating images with accurate refraction, given a text prompt. We synchronize the pixels within the object's boundary with those outside by warping and merging the pixels using Snell's Law of Refraction, at each step of the generation trajectory. For those surfaces that are not directly observed in the image, but are visible via refraction or reflection, we recover their appearance by synchronizing the image with a second generated image -- a panorama centered at the object -- using the same warping and merging procedure. We demonstrate that our approach generates much more optically-plausible images that respect the physical constraints.