Hybrid Shadow Rendering for Real-Time Ray Traced Contact Shadows
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional ray tracing techniques are computationally expensive and unsuitable for real-time rendering in video games, while shadow mapping often results in jagged and blurry shadow edges due to aliasing issues, failing to accurately represent shadows.
Innovation Solution
A hybrid method combining shadow mapping and ray tracing, where a shadow map is generated and neighboring pixels are sampled to compute average brightness, with pixels near occluding objects within a threshold distance being ray traced for accurate shadow values, blending ray traced and mapped results for improved edge quality.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If shadow mapping is used for real-time rendering, then rendering speed is improved, but shadow edge quality deteriorates with jagged and blurry edges
Solution Approach 1:
The patent applies different processing methods to different regions of the shadow map. Shadow edge pixels are identified and processed with ray tracing to achieve high precision, while non-edge pixels use standard shadow mapping. This local differentiation resolves the contradiction by applying high computational cost only where shadow quality matters most, maintaining rendering speed while improving edge quality.
Solution Approach 2:
The shadow rendering process is segmented into two distinct paths: shadow edge pixel processing and non-edge pixel processing. By segmenting the problem, the patent applies ray tracing selectively only to edge pixels identified through gradient analysis, rather than processing all pixels uniformly. This segmentation enables real-time performance while achieving accurate shadow edges.
2Measurement precision
If ray tracing is used for all shadow pixels, then shadow accuracy is improved, but computational complexity increases making it unsuitable for real-time applications
Solution Approach 1:
Instead of applying ray tracing to all shadow pixels (excessive action), the patent applies it only to shadow edge pixels where accuracy is critical (partial action). The gradient-based detection identifies exactly which pixels need ray tracing, performing the computationally expensive operation only where necessary to achieve accurate shadow boundaries without the full computational burden of universal ray tracing.
Solution Approach 2:
The patent applies different levels of processing quality to different regions: ray tracing (high accuracy) for shadow edges and standard shadow mapping (lower accuracy) for non-edge regions. This local quality differentiation resolves the contradiction by achieving high shadow accuracy only where visually critical, while maintaining low computational complexity overall through selective application of the expensive ray tracing algorithm.
Data Source
AI summary
A method, device, and computer-readable storage medium for generating shadows in an image of a scene. The method includes: generating a shadow map to determine pixels in shadow; for each pixel in shadow, performing a sampling of neighboring pixels; for each pixel in shadow, computing an average brightness of the sampling to generate a shadow mapped shadow value; determining a set of close shadow edge pixels, which are shadow edge pixels that correspond to locations on an object that are below a threshold distance to an occluding object; for each pixel in the set of close shadow edge pixels, performing ray tracing to determine a ray traced shadow value; and outputting shadow values for pixels in shadow, wherein the output is based on the ray traced shadow value for the close shadow edge pixels, and the output is based on the shadow mapped shadow value for other shadow pixels.


