Multi-level parallel rendering method and system for light field image
Through the multi-level parallel rendering method, a parallel rendering model is constructed, which solves the problem of low rendering efficiency of light field images in traditional technology, achieves fast and efficient rendering of large data volumes and high-quality light field images, and improves rendering efficiency and realism. feel.
Patent Information
- Application Number
- CN202410506005.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-25
- Publication Date
- 2024-08-23
AI Technical Summary
Traditional model-based computer-generated light field image technology has a large number of redundant calculations, resulting in low rendering efficiency and difficulty in achieving rapid rendering of large data volumes and high-quality light field images.
Adopting a multi-level parallel rendering method, by constructing the first-level, second-level and third-level rendering models, parallel rendering is performed respectively to reduce redundant calculations, and make full use of the parallel computing capabilities of the GPU to reduce the communication between the CPU and the GPU. .
It effectively improves rendering efficiency, overcomes the bottleneck of parallel rendering of high-dimensional parallax images, achieves fast rendering of large data volumes and high-quality light field images, and improves the realism of light field images.
Smart Images

Figure CN118537468A
Abstract
Description
Technical Field
[0001] The invention relates to a multi-level parallel rendering method and system for light field images, belonging to the technical field of image rendering. Background Art
[0002] Light field display technology requires a large amount of light field images as display materials. How to quickly and effectively generate high-resolution dynamic light field image information to achieve high-quality three-dimensional display is still an important issue in the field. Among various light field information acquisition methods, the method of using computers to generate light field image information has the advantages of simple equipment, flexible parameter control, and the ability to record light field image data of virtual objects. Moreover, this method can be effectively compatible with various computer graphics technologies, so it has received more and more attention.
[0003] The technology of computer-generated light field images can be divided into image-based rendering technology and model-based rendering technology. Image-based rendering technology uses image data of known viewpoints to generate light field images of new viewpoints through reprojection, interpolation, deformation and other methods. Model-based rendering technology requires input of three-dimensional model data and then generates images of new viewpoints through a virtual camera array and a corresponding graphics rendering pipeline. This method can obtain higher quality light field images.
[0004] However, traditional model-based computer-generated light field image technology usually requires using a pinhole camera model to render each image taken by the camera one by one. Figure 1 As shown in the figure, the program first reads the 3D model data, and then enters the camera-by-camera loop rendering step. Each loop needs to perform model view transformation, perspective projection transformation, viewport transformation, and rasterization calculation on the 3D data according to the camera parameters. Until all cameras are rendered, this rendering method has a lot of redundant calculations and is inefficient.
[0005] Therefore, the current rendering technology, whether it is image-based or model-based, generally has low rendering efficiency, and there are still great challenges in achieving fast rendering of large amounts of data and high-quality light field images.
[0006] The information disclosed in this Background Art is only for understanding the background of the inventive concept and therefore it may include information that does not constitute the prior art. Summary of the invention
[0007] In view of the above problem or one of the above problems, an object of the present invention is to provide a multi-level parallel rendering method for light field images, by constructing a first-level rendering model, a second-level rendering model, and a third-level rendering model to obtain a light field image, which can realize three-level parallel rendering, thereby effectively reducing redundant calculations and improving rendering efficiency, thereby realizing rapid rendering of large data volume and high-quality light field images.
[0008] In view of the above problem or one of the above problems, the second object of the present invention is to provide a multi-level parallel rendering method and system for light field images, which can effectively overcome the rendering bottleneck of high-dimensional data and graphics encountered in the traditional method in the parallel rendering problem of high-dimensional parallax images, and greatly improve the rendering efficiency; and can give full play to the parallel computing capability of the GPU, and greatly reduce the communication between the CPU and the GPU required in the traditional light field rendering method, thereby improving the communication and computing efficiency.
[0009] In response to the above problem or one of the above problems, the third object of the present invention is to provide a multi-level parallel rendering method and system for light field images, which can quickly calculate light field images with complex lighting, shadows, textures and other effects, and greatly improve the realism of light field images.
[0010] To achieve one of the above purposes, the first technical solution of the present invention is:
[0011] A multi-level parallel rendering method for light field images, comprising the following contents:
[0012] Obtaining three-dimensional model data and camera array parameters of light field images;
[0013] Using the pre-built first-level rendering model, according to the camera array parameters, the 3D model data is copied, and the 3D model data is transformed according to the camera parameters of each row or each column to obtain the transformed 3D model data, thereby realizing the first-level parallel rendering;
[0014] Through the pre-built second-level rendering model, based on perspective correlation, the transformed three-dimensional model data is used to render the views at multiple viewpoints in parallel to obtain the polar plane image, thereby realizing the second-level parallel rendering;
[0015] Using a pre-built third-level rendering model, the polar plane image is parallelly calculated at the data processing level based on parallel pixel remapping to obtain a light field image, thereby realizing third-level parallel rendering and completing multi-level parallel rendering of the light field image.
[0016] After continuous exploration and experiments, the present invention obtains light field images by constructing a first-level rendering model, a second-level rendering model, and a third-level rendering model, and can realize three-level parallel rendering, thereby effectively reducing redundant calculations and improving rendering efficiency, thereby realizing rapid rendering of large data volumes and high-quality light field images.
[0017] Furthermore, the present invention utilizes a multi-level parallel rendering method to effectively overcome the high-dimensional data and graphics rendering bottlenecks encountered by traditional methods in the parallel rendering of high-dimensional parallax images, thereby greatly improving rendering efficiency. At the same time, the present invention utilizes a multi-level parallel rendering method to fully utilize the parallel computing capabilities of the GPU, greatly reducing the communication between the CPU and the GPU required in the traditional light field rendering method, thereby improving communication and computing efficiency.
[0018] As the preferred technical measures:
[0019] The method to obtain 3D model data and camera array parameters is as follows:
[0020] Using a pre-built rendering pipeline model, read the three-dimensional model data stored in a hard disk or a memory, wherein the three-dimensional model data includes position coordinates and / or index coordinates and / or texture coordinates and / or normal vectors of model vertices;
[0021] Using the rendering pipeline model, the viewpoint parameters of the camera array are set according to the light field acquisition requirements;
[0022] The viewpoint parameters include the number of viewpoints and / or the viewpoint interval and / or the viewpoint arrangement and / or the single viewpoint resolution and / or the camera row and column information and / or the zero parallax plane; and the models, view parameters and projection matrices of the cameras at the left and right ends of each row or the cameras at the top and bottom ends of each column are calculated according to the viewpoint parameters to obtain the camera array parameters.
[0023] As the preferred technical measures:
[0024] The method of implementing the first-level parallel rendering using the first-level rendering model is as follows:
[0025] Step 11, obtaining three-dimensional model data, which includes position coordinates and / or index coordinates and / or texture coordinates and / or normal vectors of model vertices;
[0026] Step 12, using a pre-built vertex shader to process the three-dimensional model data to obtain triangle primitive data;
[0027] Step 13, according to the triangle primitive data and the camera array parameters, using the pre-built instantiation model to copy a set of triangle primitive data for each row or column of cameras;
[0028] Step 14, based on the different vertical or horizontal parallaxes corresponding to cameras in different rows or columns, and according to the transformation matrices of the leftmost and rightmost cameras in each row of cameras or the topmost and bottommost cameras in each column of cameras, the triangle primitive data are transformed into the screen coordinate system to obtain the transformed three-dimensional model data, and the three-dimensional model data corresponding to multiple rows or multiple columns are sent to the second-level rendering in parallel to realize the parallel rendering of the first level.
[0029] As the preferred technical measures:
[0030] The method of implementing the second-level parallel rendering through the second-level rendering model is as follows:
[0031] Step 21, performing parallel triangle vertex sorting processing, parallel prefix sum calculation processing and parallel triangle slicing processing on the three-dimensional model data to obtain triangle slices; Step 22, based on the correlation, using a pre-built parallel processing unit to convert the triangle slices into polygonal primitives, and rendering each triangle slice in parallel at all viewpoint positions in the same row or / and column camera in a polar plane coordinate system to obtain polygonal primitives of the triangle slices; the correlation includes geometric correlation, perspective correlation, texture correlation and illumination correlation;
[0032] Step 23, rasterizing the views of the polygonal primitives of the triangle slice at all viewpoint positions in the same row or / and column of cameras through a pre-built parallel polygon rasterization unit to obtain an extreme plane image of the same row or column of cameras;
[0033] Alternatively or alternatively, the method for implementing the third-level parallel rendering using the third-level rendering model is as follows:
[0034] Step 31, obtaining an extreme plane image;
[0035] Step 32, according to the correlation between illumination and texture, using a pre-built fragment shader to shade the polar plane image to obtain a shaded image;
[0036] Step 33, outputting pixel data of the polar plane image according to the colored image;
[0037] Step 34 , performing parallel pixel reorganization on the pixel data to form a final light field image.
[0038] As the preferred technical measures:
[0039] The method of parallel triangle slicing processing includes the following:
[0040] Step 221, obtaining the coordinates of a triangle and its three vertices in the 3D model data, wherein the three vertices of the triangle are v1 (x0, y0), v2 (x1, y1), and v3 (x2, y2);
[0041] Step 222, slice the triangle along the direction of the screen scan line, and each intersection of the triangle and each screen scan line will obtain two intersection points v of a slice. a 、v b ;
[0042] Step 223, the two intersection points v of the screen scan line and the triangle a 、v b The coordinates v a (x a ,y a ),v b (x b ,y b ) is obtained by linear interpolation between the three known vertex coordinates, and the corresponding x-direction coordinates are as follows:
[0043]
[0044] x b =(1-b)*x0+b*x2 y0≤y≤y2
[0045] Among them, a and b are interpolation parameters, and different scan lines have different interpolation parameters:
[0046]
[0047] b=(y-y0) / (y2-y0) y0≤y≤y2
[0048] Step 224, interpolating the texture coordinates and normal vector data of the intersection point to obtain the vertex data of the slice, and storing it for subsequent data processing;
[0049] Or / and, a method for parallel triangle slicing processing includes two levels of parallel processing; the first level uses different thread blocks to parallelly process the slicing process of different triangles; the second level uses different threads in the thread block to parallelly process the slicing calculation in a triangle, and finally obtains all the slicing data of all the triangles;
[0050] Before executing the parallel scanning and slicing algorithm, the three vertex position data of the triangle meet the condition of y0≤y1≤y2;
[0051] The triangle vertex sorting processing method uses threads of a kernel function to arrange the vertex data of a triangle in parallel to satisfy the condition of y0≤y1≤y2.
[0052] As the preferred technical measures:
[0053] The method for parallel prefix sum calculation processing is as follows:
[0054] Get the slice data of each triangle;
[0055] Use the prefix sum algorithm to calculate the prefix sum of the slice data, obtain the memory space required to store the slice data and the position of each slice in the global memory, so as to save the storage space of the slice data;
[0056] The parallel prefix sum algorithm uses each thread to perform a sum operation on every two slice quantity elements, which includes the following: the first step is to perform a reduction sum to obtain the partial sum of the slice data; the second step is to use an inverted tree to distribute the partial sum to obtain the prefix sum of the slice quantity;
[0057] Alternatively, the parallel prefix sum algorithm is a parallel prefix sum algorithm with a multi-level scanning structure, and its implementation steps are as follows:
[0058] (1) First, the entire slice quantity data is divided into multiple data blocks and scanned in parallel. After scanning, only the results of scanning in each block are retained in the result array;
[0059] (2) The last number of each data block is saved in an auxiliary array S of length m, and the auxiliary array S is scanned;
[0060] (3) The first m-1 elements of the auxiliary array S are added to each element of the last m-1 scan blocks of the result array. This algorithm further reduces the time proportion of data processing in the rendering process, thereby improving the overall processing efficiency.
[0061] As the preferred technical measures:
[0062] Parallel processing units for converting triangle slices into polygon primitives, including the following:
[0063] Get the view of a triangle slice taken at the leftmost and rightmost viewpoints of a row of cameras;
[0064] For a triangle slice v0v1, the line segment S is recorded on the left viewpoint. L , the line segment S is recorded on the view of the right end viewpoint R ;
[0065] According to the correlation, all the images formed by the scan lines on this row of cameras can be expressed in the EPI coordinate system as a quadrilateral v consisting of two different slopes and two parallel lines. L0 v L1 v R1 v R0; The two parallel edge segments are line segments S L and line segment S R ; The slopes of the two straight line segments are determined by the depth of the object points v0 and v1 and the focal length of the camera respectively, and the two endpoints of the two straight line segments are determined by the coordinates of the images of the points recorded by the left and right endpoint cameras; This quadrilateral is a polygonal primitive of a triangular slice; Each triangular slice is generated by the corresponding thread block in parallel with multiple polygonal primitives of triangular slices;
[0066] or / and, the parallel polygon rasterization unit uses the rendering pipeline to perform rasterization operations on the sliced polygon primitives, thereby realizing parallel rendering of one-dimensional multi-viewpoint image information of scan lines v0 v1 in the EPI coordinate system;
[0067] Or / and, it also includes lighting processing for the sliced polygonal primitives, the specific contents are as follows:
[0068] Based on the pre-built fragment shader, the lighting effects of the sliced polygon primitives are rendered using the correlation of lighting; and the Phone lighting model is used to achieve isotropic and anisotropic lighting effects;
[0069] Taking specular light as an example, the specular light value of the four endpoints of the polygon primitive is S L0 , S L1 , S R0 , S R1 , which is obtained by the following formula:
[0070] specularResult=lightColor*specularMaterial*pow(max(0,V·R),shiness)
[0071] Where specularResult refers to the specular lighting value of the sliced polygonal primitive surface, lightColor refers to the color of the lighting, specularMaterial refers to the specular material of the sliced polygonal primitive surface, V refers to the view vector of the viewpoint, R refers to the reflection vector of the incident light vector, and shines refers to the specular reflectivity. The pow() function is used to calculate the power of a number. Its basic syntax is pow(base, exponent), where base refers to the base and exponent refers to the exponent.
[0072] Finally, the result of the specular lighting of the polygonal primitive is obtained by interpolating the barycentric coordinates of the fragment shader.
[0073] To achieve one of the above purposes, the second technical solution of the present invention is:
[0074] A multi-level parallel rendering system for light field images, comprising a rendering pipeline and rendering hardware;
[0075] The rendering pipeline is used to implement multi-level parallel rendering, which includes an application, an application program interface, a general parallel computing architecture and an operating system;
[0076] The rendering hardware is used to provide the hardware resources required to run the rendering pipeline, including memory, CPU, GPU and video memory;
[0077] The operating system is used to control applications, call application program interfaces and general parallel computing frameworks;
[0078] The application, application program interface and general parallel computing architecture drive the CPU, GPU, memory and video memory, and when executed, implement the multi-level parallel rendering method of a light field image as described above, completing the multi-level parallel rendering from three-dimensional model data to light field images.
[0079] By setting up a rendering pipeline and rendering hardware, the present invention can effectively overcome the rendering bottleneck of high-dimensional data and graphics encountered by traditional methods in the problem of parallel rendering of high-dimensional parallax images, and greatly improve the rendering efficiency. At the same time, the present invention can give full play to the parallel computing capability of the GPU, greatly reduce the communication between the CPU and the GPU required in the traditional light field rendering method, thereby improving the communication and computing efficiency. Furthermore, the present invention can quickly calculate light field images with complex lighting, shadows, textures and other effects, and greatly improve the realism of the light field images.
[0080] To achieve one of the above purposes, the third technical solution of the present invention is:
[0081] A multi-level parallel rendering method for light field images, using the above-mentioned multi-level parallel rendering system for light field images, comprises the following steps:
[0082] The first step is to set the world coordinates XYZ, where the camera array is located in the XY plane; the 3D model is located in front of the camera array; when all cameras complete shooting the 3D model, the light field image is recorded;
[0083] In the second step, the rendering pipeline reads the 3D model data from the memory through the CPU and transmits it to the vertex shader on the GPU side;
[0084] The third step is to use the vertex shader to assemble the vertex data in the 3D model data into triangle primitives and pass them to the geometry shader. At the same time, the parameters of the camera array are set from the CPU side and passed to the geometry shader on the GPU side.
[0085] The fourth step is to use the instantiation function to copy a set of triangle primitives for each column or row of cameras;
[0086] Step 5: transform the triangle primitives according to the transformation matrices of the top and bottom cameras in each column or the left and right cameras in each row to obtain transformed three-dimensional model data;
[0087] Step 6: Map the transformed image metadata to the CUDA space using the interoperability between the CUDA and OpenGL.
[0088] Step 7: Perform vertex parallel sorting calculation, parallel prefix sum calculation and parallel triangle slicing calculation in the general parallel computing framework CUDA space to obtain triangle slicing data;
[0089] Step 8: Map the triangle slice data to the vertex shader by using the interoperation between the general parallel computing framework CUDA and the application program interface OpenGL; assemble the vertex data in the triangle slice data into the polygonal primitives of the slice by using the vertex shader and correlation;
[0090] In the ninth step, the sliced polygonal primitives are rasterized and colored in the fragment shader according to the correlation of lighting and texture to obtain a polar plane image;
[0091] In the tenth step, a light field image is obtained based on the pixel data of the polar plane image through parallel pixel remapping.
[0092] The present invention utilizes a multi-level parallel rendering method to effectively overcome the high-dimensional data and graphics rendering bottlenecks encountered by traditional methods in the parallel rendering of high-dimensional parallax images, thereby greatly improving rendering efficiency. At the same time, the present invention utilizes a multi-level parallel rendering method to fully utilize the parallel computing capabilities of the GPU, greatly reducing the communication between the CPU and the GPU required in the traditional light field rendering method, thereby improving communication and computing efficiency. Furthermore, the present invention utilizes a multi-level parallel rendering method to quickly calculate light field images with complex lighting, shadows, textures and other effects, greatly improving the realism of the light field images.
[0093] To achieve one of the above purposes, the fourth technical solution of the present invention is:
[0094] A multi-level parallel rendering method for light field images comprises the following steps:
[0095] Using the pre-built first-level rendering model, parallax images of different dimensions are rendered in parallel;
[0096] Through the pre-built second-level rendering model, different viewpoint images of the same dimension are rendered in parallel;
[0097] A pre-built third-level rendering model is used to perform parallel computing at the data processing level.
[0098] To achieve one of the above purposes, the fifth technical solution of the present invention is:
[0099] An electronic device comprising:
[0100] one or more processors;
[0101] A storage device for storing one or more programs;
[0102] When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned multi-level parallel rendering method of light field images.
[0103] To achieve one of the above purposes, the sixth technical solution of the present invention is:
[0104] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned multi-level parallel rendering method for light field images.
[0105] Compared with the prior art solutions, the present invention has the following beneficial effects:
[0106] After continuous exploration and experiments, the present invention obtains light field images by constructing a first-level rendering model, a second-level rendering model, and a third-level rendering model, and can realize three-level parallel rendering, thereby effectively reducing redundant calculations and improving rendering efficiency, thereby realizing rapid rendering of large data volumes and high-quality light field images.
[0107] Furthermore, the present invention utilizes a multi-level parallel rendering method to effectively overcome the high-dimensional data and graphics rendering bottlenecks encountered by traditional methods in the parallel rendering of high-dimensional parallax images, thereby greatly improving rendering efficiency. At the same time, the present invention utilizes a multi-level parallel rendering method to fully utilize the parallel computing capabilities of the GPU, greatly reducing the communication between the CPU and the GPU required in the traditional light field rendering method, thereby improving communication and computing efficiency.
[0108] Furthermore, the present invention utilizes a multi-level parallel rendering method to quickly calculate light field images with complex lighting, shadow, texture and other effects, thereby greatly improving the realism of the light field images. BRIEF DESCRIPTION OF THE DRAWINGS
[0109] Figure 1 It is a flowchart of a single-view loop rendering method;
[0110] Figure 2 A flow chart of the multi-level parallel rendering method of the present invention;
[0111] Figure 3A schematic diagram of the light field image acquisition system of the present invention
[0112] Figure 4 A processing flow chart of the rendering pipeline of the present invention;
[0113] Figure 5 A structural diagram of a multi-level parallel rendering system of the present invention;
[0114] Figure 6 A flow chart of the parallel triangle slicing algorithm and the related vertex sorting algorithm of the present invention;
[0115] Figure 7 A flow chart of the parallel prefix sum algorithm of the present invention;
[0116] Figure 8 The present invention is a flow chart of the algorithm for generating sliced polygonal primitives. DETAILED DESCRIPTION
[0117] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0118] On the contrary, the present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention as defined by the claims. Further, in order to make the public have a better understanding of the present invention, some specific details are described in detail in the detailed description of the present invention below. Those skilled in the art can fully understand the present invention without the description of these details.
[0119] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention pertains. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "or / and" as used herein includes any and all combinations of one or more of the associated listed items.
[0120] A first specific embodiment of the multi-level parallel rendering method of light field images of the present invention:
[0121] A multi-level parallel rendering method for light field images, comprising the following contents:
[0122] Obtaining three-dimensional model data and camera array parameters of light field images;
[0123] Using the pre-built first-level rendering model, according to the camera array parameters, the 3D model data is copied, and the 3D model data is transformed according to the camera parameters of each row or each column to obtain the transformed 3D model data, thereby realizing the first-level parallel rendering;
[0124] Through the pre-built second-level rendering model, based on perspective correlation, the transformed three-dimensional model data is used to render the views at multiple viewpoints in parallel to obtain the polar plane image, thereby realizing the second-level parallel rendering;
[0125] Using a pre-built third-level rendering model, the polar plane image is parallelly calculated at the data processing level based on parallel pixel remapping to obtain a light field image, thereby realizing third-level parallel rendering and completing multi-level parallel rendering of the light field image.
[0126] A second specific embodiment of the multi-level parallel rendering method of light field images of the present invention:
[0127] A multi-level parallel rendering method for light field images includes the following levels of parallel rendering process:
[0128] First level: parallel rendering of parallax images of different dimensions;
[0129] Second level: parallel rendering of images from different viewpoints in the same dimension;
[0130] The third level: parallel computing at the data processing level.
[0131] The first level of parallel rendering includes parallel rendering in two dimensions: horizontal parallax and vertical parallax. The second level of parallel rendering includes parallel rendering of different viewpoint images in the horizontal parallax dimension or parallel rendering of different viewpoint images in the vertical parallax dimension. The third level of parallel rendering includes parallel processing of 3D model data and parallel processing of pixel data.
[0132] The first level of parallel rendering includes instantiation operations performed on the model row by row or column by column; and parallel rendering of instantiation data of different rows or columns.
[0133] The instantiation operation includes an instantiation operation performed by combining an observation matrix and a projection matrix corresponding to the vertical parallax of a row of cameras or the horizontal parallax of a column of cameras.
[0134] The second level of parallel rendering includes utilizing the correlation of the three-dimensional model to achieve multi-viewpoint parallel rendering including disparity information, illumination information and texture information in the same dimension.
[0135] The correlation includes perspective projection correlation or orthogonal projection correlation of information such as geometry, parallax, illumination and texture.
[0136] The parallel processing of the model data of the third level includes parallel triangle vertex sorting calculation, parallel prefix sum calculation, parallel triangle scan slicing calculation, rasterization, etc.
[0137] The parallel processing of the pixel data at the third level includes parallel pixel remapping. The parallel pixel remapping completes the conversion of the epipolar plane image (EPI) to the light field image.
[0138] Therefore, the present invention can achieve fast rendering of large amounts of data and high-quality light field images. The present invention uses a multi-level parallel rendering method to effectively overcome the rendering bottleneck of high-dimensional data and graphics encountered by traditional methods in the problem of parallel rendering of high-dimensional parallax images, thereby greatly improving the rendering efficiency. Furthermore, the present invention uses a multi-level parallel rendering method to give full play to the parallel computing capabilities of the GPU, greatly reducing the communication between the CPU and the GPU required in the traditional light field rendering method, thereby improving the communication and computing efficiency. At the same time, the present invention uses a multi-level parallel rendering method to quickly calculate light field images with complex lighting, shadows, textures and other effects, greatly improving the realism of the light field images.
[0139] like Figure 2 As shown, a third specific embodiment of the multi-level parallel rendering method of light field images of the present invention is as follows:
[0140] A multi-level parallel rendering method for light field images includes file reading, three-level parallel rendering and light field image output.
[0141] The method first reads the three-dimensional model data, and then sets the parameters of the camera array, which includes n rows and m columns of cameras.
[0142] Then use the instantiation technology to copy a set of model data for each row of cameras.
[0143] Then, the 3D model is transformed using the parameters corresponding to the cameras at the left and right ends of each row, and the 3D model is converted to the screen coordinate system.
[0144] Cameras in different rows correspond to different vertical parallaxes. The program inputs the transformed data into parallel horizontal parallax processing pipelines to achieve the first level of parallel rendering.
[0145] The horizontal disparity processing pipeline uses the perspective correlation of geometry, disparity, texture, lighting and other information to render the views of the model at all viewpoints in the same row of cameras in parallel, thereby achieving the second level of parallel rendering.
[0146] The parallel rendering of the model in the second level is achieved by parallel processing of each triangle in the model, wherein the model includes k triangles. The operations include parallel triangle vertex sorting, parallel prefix sum calculation, parallel triangle slicing, parallel slice polygon primitive generation, and parallel polygon rasterization. The parallel slicing polygon primitive generation process will render the views of each triangle slice at all viewpoints in the same row of cameras in parallel in the polar plane coordinate system. The parallel polygon rasterization will rasterize the views of all slices at all viewpoints in the same row of cameras.
[0147] Finally, the rasterized pixel data is subjected to parallel pixel reorganization to form a final light field image.
[0148] The above-mentioned parallel data processing constitutes the third level of parallel rendering, including parallel processing of model data and parallel processing of pixel data.
[0149] The first specific embodiment of the multi-level parallel rendering system of the light field image of the present invention:
[0150] A multi-level parallel rendering system for light field images includes a rendering pipeline and rendering hardware.
[0151] The rendering pipeline includes the following processes:
[0152] 1. Read 3D model data and assemble graphics elements.
[0153] 2. Set the parameters of the camera array.
[0154] 3. Instantiate 3D model data for each row or column of cameras according to camera parameters.
[0155] 4. Use the instantiated model data to render light field images of cameras in different rows or columns in parallel.
[0156] 5. Use correlation to render the polar plane images of the cameras in the same row or column of the model in parallel.
[0157] 6. Convert the epipolar plane image to a light field image using parallel pixel remapping.
[0158] The rendering pipeline also includes software such as applications, application programming interfaces, general parallel computing architectures, operating systems, etc. required to execute the above processes.
[0159] In the process 1, the rendering pipeline reads the 3D model data from the hard disk or memory and passes it to the vertex shader. The vertex shader assembles the vertex data into triangles and then passes them to the geometry shader. The 3D model data includes the position coordinates, index coordinates, texture coordinates, normal vectors and other data of the model vertices.
[0160] In the process 2, the rendering pipeline sets the number of viewpoints, viewpoint interval, viewpoint arrangement, single viewpoint resolution, zero parallax plane and other parameters of the camera array according to the light field acquisition requirements, and calculates the model, observation, and projection matrices of the cameras at the left and right ends of each row or the upper and lower ends of each column based on these parameters, and passes them into the geometry shader.
[0161] In the process 3, a set of 3D model data is copied for each row or column of cameras using the instantiation function, and the vertices are transformed using the model matrix, observation matrix, projection matrix and viewport matrix in process 2. The transformed vertex data is used for subsequent program calls.
[0162] The process 4 inputs the transformed instantiation data of different rows or columns into a plurality of sub-pipelines composed of the processes 5 and 6 in parallel.
[0163] The operation object of the process 5 includes the triangle data in the instantiation data, and the process 5 uses the correlation to render the images of the triangles in all viewpoints of a row or a column of cameras in parallel in the polar plane coordinate system.
[0164] The process 5 specifically includes sorting calculation of triangle vertices, parallel prefix sum calculation, parallel triangle scanning slice calculation, polygon primitive generation and rasterization calculation of triangle slices in the polar plane coordinate system.
[0165] The process 5 processes multiple triangle data in the model in parallel. The process 5 processes multiple scan slice data in a triangle in parallel. The process 5 generates and rasterizes multiple polygonal primitives in parallel in the polar plane coordinate system, and finally forms a polar plane image of the three-dimensional model.
[0166] The process 6 processes a plurality of polar plane images in parallel, and the process processes a plurality of pixels in one polar plane image in parallel.
[0167] The rendering hardware includes the hard disk, memory, CPU, GPU, video memory, etc. required to run the above rendering pipeline.
[0168] A second specific embodiment of the multi-level parallel rendering system of light field images of the present invention:
[0169] First, if Figure 3 The world coordinates XYZ are defined as shown, where the camera array is located in the XY plane. The 3D model is located in front of the camera array. When all cameras complete the shooting of the 3D model, the light field image is recorded.
[0170] Furthermore, Figure 4As shown, the rendering pipeline reads 3D model data from the hard disk through the CPU and passes it to the vertex shader on the GPU side, and then uses the vertex shader to assemble the vertex data into triangle primitives and pass them to the geometry shader. Then the parameters of the camera array are set from the CPU side and passed to the geometry shader on the GPU side.
[0171] Use instancing to replicate a set of primitives for each column of cameras.
[0172] The metadata is then transformed according to the transformation matrices of the top and bottom cameras in each column of cameras.
[0173] Then, the transformed image metadata is mapped to the CUDA space by using the interoperability between the general parallel computing framework CUDA and the application program interface OpenGL.
[0174] Parallel vertex sorting calculations, parallel prefix sum calculations, and parallel triangle slicing calculations are performed in CUDA space.
[0175] Then, the triangle slice data is mapped to the vertex shader by using the interoperation between the general parallel computing framework CUDA and the application program interface OpenGL. Then, the slice vertex data is assembled into slice polygon primitives by using the vertex shader and correlation.
[0176] The tile polygon primitives are then rasterized and shaded in the fragment shader based on lighting and texture dependencies.
[0177] The pixel data of the output epipolar plane image (EPI) is obtained by shading and then parallel pixel remapping.
[0178] The rendering pipeline also includes software such as applications, application programming interfaces, general parallel computing architectures, operating systems, etc. required to execute the above processes.
[0179] The rendering hardware in this embodiment includes a computer system composed of hardware such as a hard disk, a CPU, a memory, a GPU, a video memory, and a display.
[0180] like Figure 5 As shown, the rendering system of this embodiment is embedded in a computer system, and the computer system includes an operating system to provide a running environment for the rendering system. The rendering system includes an application program, and the application program calls the multi-level parallel rendering pipeline, and the rendering pipeline calls an application program interface and a general parallel computing framework. The application program, the application program interface and the general parallel computing framework drive the computing hardware such as the CPU, GPU, memory and video memory to complete the rendering from 3D model data to light field images.
[0181] like Figure 6As shown, a specific embodiment of the parallel triangle slicing algorithm and the related vertex sorting algorithm of the present invention is as follows:
[0182] The parallel triangle slicing algorithm and the related vertex sorting algorithm of the present invention include the following contents:
[0183] As Figure 6 Take the triangle on the left as an example. The three vertices of the triangle are v1, v2, and v3. In order to render the triangle, it needs to be sliced along the direction of the screen scan line. The coordinates of the three vertices are known, and the two intersection points v of the scan line and the triangle are a 、v b The coordinates can be obtained by linear interpolation between the known three vertex coordinates. Taking the x direction as an example, its coordinates are:
[0184]
[0185] x b =(1-b)*x0+b*x2 y0≤y≤y2
[0186] Among them, a and b are interpolation parameters, and different scan lines have different interpolation parameters:
[0187]
[0188] b=(y-y0) / (y2-y0) y0≤y≤y2
[0189] The intersection of a triangle with each scan line will result in two vertex coordinates v of a slice. a 、v b Similarly, the texture coordinates, normal vectors and other data of the vertices are also interpolated in the same way, and then the vertex data of these slices are stored for subsequent data processing.
[0190] like Figure 6 As shown on the right, the parallel triangle slicing algorithm includes two levels of parallel processing. The first level uses different CUDA thread blocks to parallelly process the slicing process of different triangles. The second level uses different threads in the thread block to parallelly process the slicing calculation in a triangle, and finally obtains all the slicing data of all triangles.
[0191] Before executing the parallel scan slicing algorithm, it is necessary to ensure that the three vertex position data of the triangle meet the condition y0≤y1≤y2. The parallel triangle vertex sorting algorithm uses the threads of the CUDA kernel function to arrange the vertex data of the triangle in parallel to meet the condition y0≤y1≤y2.
[0192] like Figure 7As shown, a specific embodiment of the parallel prefix sum algorithm of the present invention:
[0193] After obtaining the slice data of each triangle, the prefix sum algorithm is used to calculate the prefix sum of the number of slices, thereby obtaining the memory space required to store the slice data and the location of each slice in the global memory, which can save the storage space of the slice data. Figure 7 As shown on the left, the parallel prefix sum algorithm uses each thread to perform a sum operation on every two slice quantity elements. In the first step of the reduction sum phase, the partial sum of the slice data is obtained, and in the second step, the inverted tree is used to distribute the partial sum to obtain the prefix sum of the slice quantity.
[0194] like Figure 7 As shown on the right, this embodiment also provides a parallel prefix sum algorithm for a multi-level scanning structure, and its implementation steps are as follows: (1) First, the entire slice quantity data is divided into multiple data blocks, and parallel scanning processing is performed. After scanning, only the results of the scan within each block are retained in the result array. (2) The last number of each block is retained in an auxiliary array S of length m, and S is scanned. (3) The first m-1 elements of S are added to each element of the last m-1 scan blocks of the result array. This algorithm further reduces the time proportion of data processing in the rendering process, thereby improving the overall processing efficiency.
[0195] like Figure 8 As shown, a specific embodiment of the slice polygon primitive generation algorithm of the present invention is:
[0196] The slice polygon primitive generation algorithm of the present invention includes the following contents:
[0197] Figure 8 (a) shows the view of a triangle in the model taken from the leftmost and rightmost viewpoints of a row of cameras. For a scan line slice v0v1, the line segment S is recorded on the view of the left end viewpoint. L , the line segment S is recorded on the view of the right end viewpoint R .like Figure 8 In (b), according to the correlation, all the images formed by the scan lines on this row of cameras can be expressed in the EPI coordinate system as a quadrilateral v consisting of two different slopes and two parallel lines. L0 v L1 v R1 v R0 The two parallel edge segments are S L and S R. The slopes of the two straight line segments are determined by the depth of the object points v0 and v1 and the focal length of the camera, respectively. The two endpoints of the two straight line segments are determined by the coordinates of the images of the points recorded by the left and right endpoint cameras. This quadrilateral is the slice polygon primitive. Each slice is generated in parallel by the corresponding thread block. The rendering pipeline can realize the parallel rendering of the one-dimensional multi-view image information of the scan line v0 v1 in the EPI coordinate system by rasterizing the slice polygon primitive.
[0198] In order to improve the realism of the image, it is necessary to render the lighting effect of the model in the fragment shader by using the correlation of lighting. In this embodiment, the Phone lighting model is adopted, in which the anisotropic specular lighting is realized as follows: Figure 8 As shown in (c) in the figure. is the lighting direction of the two end points of the triangle slice, is the normal direction of the two end points, is the direction of the specular light reflection at the two end points, and the position information of the middle camera can be obtained through Figure 8 The rasterization interpolation of the slice polygon primitives is constructed in (b) and the sight directions of the camera viewpoints at the left and right ends relative to the two end points are obtained respectively. Figure 8 The specular illumination values of the four endpoints in (d) are S L0 , S L1 , S R0 , S R1 , can be obtained by the following formula:
[0199] specularResult=lightColor*specularMaterial*pow(max(0,V·R),shiness)
[0200] Among them, lightColor refers to the color of the light, specularMaterial refers to the specular material of the object surface, V refers to the vector observed by the viewpoint, and R refers to the reflection vector of the incident light vector. Finally, the specular lighting result of the polygon primitive is obtained by interpolating the barycentric coordinates of the fragment shader.
[0201] An embodiment of a device applying the method of the present invention:
[0202] An electronic device comprising:
[0203] one or more processors;
[0204] A storage device for storing one or more programs;
[0205] When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned multi-level parallel rendering method of light field images.
[0206] A computer medium embodiment using the method of the present invention:
[0207] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned multi-level parallel rendering method for light field images.
[0208] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, and computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0209] The present application is described by flowcharts or / and block diagrams of the methods, devices (systems), and computer program products of the embodiments of the present application. It should be understood that each process or / and block in the flowchart or / and block diagram and the combination of the processes or / and blocks in the flowchart or / and block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart or / and block diagram. Figure 1 Process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0210] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 Process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0211] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 Process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0212] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A multi-level parallel rendering method for light field images, characterized in that: Includes the following: Obtaining three-dimensional model data and camera array parameters of light field images; Using the pre-built first-level rendering model, according to the camera array parameters, the 3D model data is copied, and the 3D model data is transformed according to the camera parameters of each row or each column to obtain the transformed 3D model data, thereby realizing the first-level parallel rendering; Through the pre-built second-level rendering model, based on perspective correlation, the transformed three-dimensional model data is used to render the views at multiple viewpoints in parallel to obtain the polar plane image, thereby realizing the second-level parallel rendering; Using a pre-built third-level rendering model, the polar plane image is parallelly calculated at the data processing level based on parallel pixel remapping to obtain a light field image, thereby realizing third-level parallel rendering and completing multi-level parallel rendering of the light field image.
2. The multi-level parallel rendering method of a light field image according to claim 1, characterized in that: The method to obtain 3D model data and camera array parameters is as follows: Using a pre-built rendering pipeline model, read the three-dimensional model data stored in a hard disk or a memory, wherein the three-dimensional model data includes position coordinates and / or index coordinates and / or texture coordinates and / or normal vectors of model vertices; Using the rendering pipeline model, the viewpoint parameters of the camera array are set according to the light field acquisition requirements; The viewpoint parameters include the number of viewpoints and / or the viewpoint interval and / or the viewpoint arrangement and / or the single viewpoint resolution and / or the camera row and column information and / or the zero parallax plane; and the models, view parameters and projection matrices of the cameras at the left and right ends of each row or the cameras at the top and bottom ends of each column are calculated according to the viewpoint parameters to obtain the camera array parameters.
3. The multi-level parallel rendering method of a light field image according to claim 2, characterized in that: The method of implementing the first-level parallel rendering using the first-level rendering model is as follows: Step 11, obtaining three-dimensional model data, which includes position coordinates and / or index coordinates and / or texture coordinates and / or normal vectors of model vertices; Step 12, using a pre-built vertex shader to process the three-dimensional model data to obtain triangle primitive data; Step 13, according to the triangle primitive data and the camera array parameters, using the pre-built instantiation model to copy a set of triangle primitive data for each row or column of cameras; Step 14, based on the different vertical or horizontal parallaxes corresponding to cameras in different rows or columns, and according to the transformation matrices of the leftmost and rightmost cameras in each row of cameras or the topmost and bottommost cameras in each column of cameras, the triangle primitive data are transformed into the screen coordinate system to obtain the transformed three-dimensional model data, and the three-dimensional model data corresponding to multiple rows or multiple columns are sent to the second-level rendering in parallel to realize the parallel rendering of the first level.
4. The multi-level parallel rendering method of a light field image according to claim 1, characterized in that: The method of implementing the second-level parallel rendering through the second-level rendering model is as follows: Step 21, performing parallel triangle vertex sorting processing, parallel prefix sum calculation processing and parallel triangle slicing processing on the three-dimensional model data to obtain triangle slices; Step 22, based on the correlation, using a pre-built parallel processing unit to convert the triangle slices into polygonal primitives, and rendering each triangle slice in parallel at all viewpoint positions in the same row or / and column camera in a polar plane coordinate system to obtain polygonal primitives of the triangle slices; the correlation includes geometric correlation, perspective correlation, texture correlation and illumination correlation; Step 23, rasterizing the views of the polygonal primitives of the triangle slice at all viewpoint positions in the same row or / and column of cameras through a pre-built parallel polygon rasterization unit to obtain an extreme plane image of the same row or column of cameras; Alternatively or alternatively, the method for implementing the third-level parallel rendering using the third-level rendering model is as follows: Step 31, obtaining an extreme plane image; Step 32, according to the correlation between illumination and texture, using a pre-built fragment shader to shade the polar plane image to obtain a shaded image; Step 33, outputting pixel data of the polar plane image according to the colored image; Step 34 , performing parallel pixel reorganization on the pixel data to form a final light field image.
5. The multi-level parallel rendering method of light field images according to claim 4, characterized in that: The method of parallel triangle slicing processing includes the following: Step 221, obtaining the coordinates of a triangle and its three vertices in the 3D model data, wherein the three vertices of the triangle are v1 (x0, y0), v2 (x1, y1), and v3 (x2, y2); Step 222, slice the triangle along the direction of the screen scan line, and each intersection of the triangle and each screen scan line will obtain two intersection points v of a slice. a 、v b ; Step 223, the two intersection points v of the screen scan line and the triangle a 、v b The coordinates v a (x a ,y a ),v b (x b ,y b ) is obtained by linear interpolation between the three known vertex coordinates, and the corresponding x-direction coordinates are as follows: x b =(1-b)*x0+b*x2 y0≤y≤y2 Among them, a and b are interpolation parameters, and different scan lines have different interpolation parameters: b=(y-y0) / (y2-y0) y0≤y≤y2 Step 224, interpolating the texture coordinates and normal vector data of the intersection point to obtain the vertex data of the slice, and storing it for subsequent data processing; Or / and, a method for parallel triangle slicing processing includes two levels of parallel processing; the first level uses different thread blocks to parallelly process the slicing process of different triangles; The second level uses different threads in the thread block to parallelize the slice calculations in a triangle, and finally obtains all the slice data of all triangles; Before executing the parallel scanning and slicing algorithm, the three vertex position data of the triangle meet the condition of y0≤y1≤y2; The triangle vertex sorting processing method uses threads of a kernel function to arrange the vertex data of a triangle in parallel to satisfy the condition of y0≤y1≤y2.
6. The multi-level parallel rendering method of light field images according to claim 5, characterized in that: The method for parallel prefix sum calculation processing is as follows: Get the slice data of each triangle; Use the prefix sum algorithm to calculate the prefix sum of the slice data, and obtain the memory space required to store the slice data and the location of each slice in the global memory; The parallel prefix sum algorithm uses each thread to perform the sum operation on every two slice elements, which includes the following: the first step is to perform reduction summation to obtain the partial sum of the slice data; The second step is to use the inverted tree to distribute the partial sums and get the prefix sum of the number of slices; Alternatively, the parallel prefix sum algorithm is a parallel prefix sum algorithm with a multi-level scanning structure, and its implementation steps are as follows: (1) First, the entire slice quantity data is divided into multiple data blocks and scanned in parallel. After scanning, only the results of scanning in each block are retained in the result array; (2) The last number of each data block is saved in an auxiliary array S of length m, and the auxiliary array S is scanned; (3) Add the first m-1 elements of the auxiliary array S to each element of the last m-1 scan blocks of the result array.
7. The multi-level parallel rendering method of light field images according to claim 6, characterized in that: Parallel processing units for converting triangle slices into polygon primitives, including the following: Get the view of a triangle slice taken at the leftmost and rightmost viewpoints of a row of cameras; For a triangle slice v0 v1, the line segment S is recorded on the left viewpoint. L , the line segment S is recorded on the view of the right end viewpoint R ; According to the correlation, all the images formed by the scan lines on this row of cameras can be expressed in the EPI coordinate system as a quadrilateral v consisting of two different slopes and two parallel lines. L0 v L1 v R1 v R0 ; The two parallel edge segments are line segments S L and line segment S R ; The slopes of the two straight line segments are determined by the depths of the object points v0 and v1 and the focal length of the camera, respectively. The two endpoints of the two straight line segments are determined by the coordinates of the images of the points recorded by the left and right endpoint cameras. This quadrilateral is a polygonal primitive of a triangular slice. Each triangle slice is parallelized by a corresponding thread block to generate multiple polygon primitives of triangle slices; or / and, the parallel polygon rasterization unit uses the rendering pipeline to perform rasterization operations on the sliced polygon primitives, thereby realizing parallel rendering of one-dimensional multi-viewpoint image information of scan lines v0 v1 in the EPI coordinate system; Or / and, it also includes lighting processing for the sliced polygonal primitives, the specific contents are as follows: Based on the pre-built fragment shader, the lighting effects of the sliced polygon primitives are rendered using the correlation of lighting; and the Phone lighting model is used to achieve isotropic and anisotropic lighting effects; Taking specular light as an example, the specular light value of the four endpoints of the polygon primitive is S L0 , S L1 , S R0 , S R1 , which is obtained by the following formula: specularResult=lightColor*specularMaterial*pow(max(0,V·R),shiness) Where specularResult refers to the specular lighting value of the sliced polygonal primitive surface, lightColor refers to the color of the lighting, specularMaterial refers to the specular material of the sliced polygonal primitive surface, V refers to the view vector of the viewpoint, R refers to the reflection vector of the lighting incident vector, shines refers to the specular reflectivity, and the pow() function is used to calculate the power of a number; Finally, the result of the specular lighting of the polygonal primitive is obtained by interpolating the barycentric coordinates of the fragment shader.
8. A multi-level parallel rendering system for light field images, characterized in that: It has a rendering pipeline and rendering hardware; The rendering pipeline is used to implement multi-level parallel rendering, which includes an application, an application program interface, a general parallel computing architecture and an operating system; The rendering hardware is used to provide the hardware resources required to run the rendering pipeline, including memory, CPU, GPU and video memory; The operating system is used to control applications, call application program interfaces and general parallel computing frameworks; The application, application program interface and general parallel computing architecture drive the CPU, GPU, memory and video memory, and when executed, implement the multi-level parallel rendering method of a light field image as described in any one of claims 1 to 7, and complete the multi-level parallel rendering from three-dimensional model data to light field images.
9. A multi-level parallel rendering method for light field images, characterized in that: A multi-level parallel rendering system for light field images as claimed in claim 8 comprises the following steps: The first step is to set the world coordinates XYZ, where the camera array is located in the XY plane; the 3D model is located in front of the camera array; when all cameras complete shooting the 3D model, the light field image is recorded; In the second step, the rendering pipeline reads the 3D model data from the memory through the CPU and transmits it to the vertex shader on the GPU side; The third step is to use the vertex shader to assemble the vertex data in the 3D model data into triangle primitives and pass them to the geometry shader. At the same time, the parameters of the camera array are set from the CPU side and passed to the geometry shader on the GPU side. The fourth step is to use the instantiation function to copy a set of triangle primitives for each column or row of cameras; Step 5: transform the triangle primitives according to the transformation matrices of the top and bottom cameras in each column or the left and right cameras in each row to obtain transformed three-dimensional model data; Step 6: Map the transformed image metadata to the CUDA space using the interoperability between the CUDA and OpenGL. Step 7: Perform vertex parallel sorting calculation, parallel prefix sum calculation and parallel triangle slicing calculation in the general parallel computing framework CUDA space to obtain triangle slicing data; Step 8: Map the triangle slice data to the vertex shader by using the interoperation between the general parallel computing framework CUDA and the application program interface OpenGL; assemble the vertex data in the triangle slice data into the polygonal primitives of the slice by using the vertex shader and correlation; In the ninth step, the sliced polygonal primitives are rasterized and colored in the fragment shader according to the correlation of lighting and texture to obtain a polar plane image; In the tenth step, a light field image is obtained based on the pixel data of the polar plane image through parallel pixel remapping.
10. A multi-level parallel rendering method for light field images, characterized in that: The following steps are involved: Using the pre-built first-level rendering model, parallax images of different dimensions are rendered in parallel; Through the pre-built second-level rendering model, different viewpoint images of the same dimension are rendered in parallel; A pre-built third-level rendering model is used to perform parallel computing at the data processing level.
Citation Information
Cited By
Immersive head-mounted display-oriented real-time light field three-dimensional rendering method
CN119600239A
A Real-Time Light Field Stereo Rendering Method for Immersive Head-Mounted Displays
CN119600239B
Point cloud rendering method, device and equipment
CN120219597A
