Non-planar real-time mirroring by raster graphics
View Patent ↗A method and system of mirroring in non-planar surfaces, based on a GPU raster hardware. A non-planar reflective surface is rasterized into receiving pixels, each having a normal value and position. The surrounding target objects are built into acceleration structure. A receiving pixel, utilizing pixel-shot-triangle search algorithm, traverse the acceleration structure along its normal direction. Upon identification of the target triangle, an exact emitting-pixel is found, and its data (depth, color, lighting, texture, material) is collected to reflection buffer. The exploiting of GPU's massively parallel processing capabilities allows a real-time performance, while utilizing a standard raster graphics.
1 . A raster-based method for generating a mirrored image of target objects, in a non-planar reflective surface, the method comprising the steps of:
rasterizing the non-planar reflective surface into receiving-pixels;
constructing the target objects into an acceleration structure;
handling the receiving-pixels for an acceleration structure search according to their normal direction, for seeking corresponding emitting-pixels, wherein data of the emitting pixels is stored in a reflection buffer;
transforming the reflection buffer to a camera view; and
storing the transformed reflection buffer in a frame buffer as an image bitmap for a display;
wherein all steps are implemented by a vertex, computing or pixel shaders of a raster-based graphics processing unit.
2 . The method of claim 1 , wherein the reflective surface is rasterized by a pixel shader into multiple receiving-pixels, each having a normal value and position.
3 . The method of claim 1 , wherein the construction and update of the acceleration structure is done by a compute shader.
4 . The method of claim 1 , wherein the data of emitting-pixels consists of a depth, color, lighting, texture and material.
5 . The method of claim 1 , wherein after the data of emitting-pixels is stored in the reflection buffer, its coordinates are transformed to a-camera coordinates by a vertex shader.
6 . The method of claim 1 , wherein upon a target triangle is identified, an exact emitting-pixel and its data are found by interpolating the triangle vertices according to the position and normal value of the matching receiving-pixel, out of the receiving-pixels.
7 . A raster-based system for generating a mirrored image of target objects in a non-planar reflective surface, the raster graphics system comprises:
a conventional raster graphics rendering pipeline;
a frame buffer;
at least one screen;
at least one general purpose processor;
at least one model of a non-planar reflective surface; and
at least one model of target object;
wherein in runtime:
the non-planar reflective surface model is rasterized into receiving-pixels;
the target object model is constructed into an acceleration structure;
the receiving-pixels are handled for an acceleration structure search according to their normal direction, for seeking corresponding emitting-pixels, wherein data of the emitting-pixels is stored in a reflection buffer;
the reflection buffer is transformed to a camera view; and
the transformed reflection buffer is stored in the frame buffer as an image bitmap for display.
8 . The system of claim 7 , wherein the reflective surface is rasterized by pixel shader into multiple receiving-pixels, each having a normal value and position.
9 . The system of claim 7 , wherein the construction and update of the acceleration structure is done by a compute shader.
10 . The system of claim 7 , wherein the data of emitting-pixels consists of a depth, color, lighting, texture and material.
11 . The system of claim 7 , wherein after the data of emitting-pixels is stored in the reflection buffer, its coordinates are transformed into camera coordinates by a vertex shader.
12 . The system of claim 7 , wherein after a target triangle is identified, an exact emitting-pixel and its data are found by interpolating the triangle vertices according to the position and normal value of the matching receiving-pixel, out of the receiving pixels.