Real-time three-dimensional graph rendering method and rendering system
The method and system address the challenge of real-time 3D graphics rendering with multiple light sources by performing graphic processing, space adjustment, and illumination calculations, achieving interactive and high-performance rendering.
Patent Information
- Application Number
- CN202411187186.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing three-dimensional graphics rendering technologies struggle to achieve real-time performance and high interactivity when dealing with complex lighting conditions involving multiple light sources and ambient light.
A method and system that imports 3D graphics into a rendering environment, performs graphic point processing, adjusts space, constructs a coordinate system, calculates illumination intensities, and renders in real-time either directly or optimized based on threshold comparisons.
Enables real-time, interactive 3D graphics rendering by effectively handling multiple light sources and ambient light, ensuring high performance and accuracy in complex lighting scenarios.
Smart Images

Figure CN119206010A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of three-dimensional graphics rendering, and in particular to a real-time three-dimensional graphics rendering method and a rendering system. Background Art
[0002] Three-dimensional graphics rendering is the process of using computer software to generate two-dimensional images or animations from models in three-dimensional scenes based on the environment, lighting, materials and rendering parameters. It is widely used in many fields, including architecture and landscape design, product design, advertising and game development, film and animation production, etc.
[0003] In the prior art, for three-dimensional graphics rendering under lighting conditions, simple lighting rendering of one light source is usually performed. However, in the complex situation where multiple light sources are combined with ambient light, it is difficult to achieve real-time three-dimensional graphics rendering with high interactivity and real-time performance. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a real-time three-dimensional graphics rendering method and a rendering system, aiming to solve the technical problems existing in the prior art mentioned in the background technology.
[0005] The embodiment of the present invention is implemented as follows:
[0006] A real-time three-dimensional graphics rendering method, the method comprising the following steps:
[0007] Importing a target three-dimensional graphic into a three-dimensional rendering environment, receiving a rendering refinement requirement, performing graphic point processing on the target three-dimensional graphic, and obtaining a plurality of three-dimensional graphic structure points;
[0008] Receiving a graphics space operation for the target three-dimensional graphics, performing graphics space adjustment, acquiring a three-dimensional image rendering frame in real time, and selecting a plurality of three-dimensional graphics rendering points from a plurality of the three-dimensional graphics structure points;
[0009] Constructing a rendering coordinate system, determining a plurality of ambient direct light sources, and calculating the rendering illumination intensities of a plurality of the three-dimensional graphics rendering points under the plurality of the ambient direct light sources;
[0010] Comparing a plurality of said rendering illumination intensities with a preset rendering illumination threshold;
[0011] When the multiple rendering illumination intensities are all less than the rendering illumination threshold, performing real-time direct rendering on the three-dimensional image rendering frame in a three-dimensional rendering environment;
[0012] When at least one rendering light intensity is not less than a rendering light threshold, in a three-dimensional rendering environment, real-time optimized rendering is performed on the three-dimensional image rendering frame.
[0013] As a further limitation of the technical solution of the embodiment of the present invention, the step of importing a target three-dimensional graphic into a three-dimensional rendering environment, receiving a rendering refinement requirement, performing a graphic point processing on the target three-dimensional graphic, and obtaining a plurality of three-dimensional graphic structure points specifically includes the following steps:
[0014] Importing target 3D graphics into a 3D rendering environment;
[0015] Receive detailed rendering requirements;
[0016] Acquire the size data and material information of the target three-dimensional figure;
[0017] According to the rendering refinement requirement, the size data and the material information, the target three-dimensional graphic is subjected to graphic point processing to obtain a plurality of three-dimensional graphic structure points.
[0018] As a further limitation of the technical solution of the embodiment of the present invention, the receiving of the graphics space operation on the target three-dimensional graphics, performing graphics space adjustment, acquiring the three-dimensional image rendering frame in real time, and selecting a plurality of three-dimensional graphics rendering points from the plurality of three-dimensional graphics structure points specifically include the following steps:
[0019] receiving a graphics space operation for the target three-dimensional graphic;
[0020] According to the graphic space operation, performing corresponding graphic space adjustments on the target three-dimensional graphic;
[0021] According to the preset adjustment display frame rate, the three-dimensional image rendering frame is obtained in real time;
[0022] Determining an adjusted display surface of the target three-dimensional graphic according to the three-dimensional image rendering frame;
[0023] According to the adjusted display surface, a plurality of three-dimensional graphic rendering points are selected from the plurality of three-dimensional graphic structure points.
[0024] As a further limitation of the technical solution of the embodiment of the present invention, the construction of the rendering coordinate system, the determination of multiple ambient direct light sources, and the calculation of the rendering illumination intensity of multiple 3D graphics rendering points under the multiple ambient direct light sources specifically include the following steps:
[0025] In the three-dimensional rendering environment, constructing a rendering coordinate system;
[0026] Determining a plurality of ambient direct light sources in the three-dimensional rendering environment;
[0027] Analyzing the incident angles and display angles between the plurality of direct ambient light sources and the plurality of three-dimensional graphics rendering points, and recording rendering angle data;
[0028] In the rendering coordinate system, the rendering illumination intensities of the plurality of the three-dimensional graphics rendering points under the plurality of the environmental direct light sources are calculated according to the rendering angle data.
[0029] As a further limitation of the technical solution of the embodiment of the present invention, the calculation formulas of the multiple rendering light intensities are:
[0030]
[0031] Among them, (x, y) represents the coordinates of the rendering point of the three-dimensional graphics rendering point in the rendering coordinate system, i represents different ambient direct light sources, and there are n ambient direct light sources in total. i is the direct illumination intensity of the ith ambient direct light source, k a is the preset diffuse reflection coefficient, Sr(x, y) is the rendering illumination intensity of the (x, y) 3D graphics rendering point, θ i (x, y) is the diffuse reflection incident angle of the ith ambient direct light source to the (x, y) 3D graphics rendering point, k b is the preset specular reflection coefficient, is the display angle between the ith ambient direct light source and the (x, y) 3D graphics rendering point, p is the preset specular reflection parameter, k c is the preset ambient light reflection coefficient, and Sc is the ambient light intensity.
[0032] As a further limitation of the technical solution of the embodiment of the present invention, when the multiple rendering light intensities are all less than the rendering light threshold, in the three-dimensional rendering environment, performing real-time direct rendering on the three-dimensional image rendering frame specifically includes the following steps:
[0033] When the multiple rendering illumination intensities are all less than the rendering illumination threshold, generating a direct rendering instruction;
[0034] In a three-dimensional rendering environment, according to the direct rendering instruction, direct point rendering is performed on a plurality of corresponding three-dimensional graphics rendering points with a plurality of the rendering light intensities, and direct point rendering data is recorded;
[0035] According to the direct point rendering data, the three-dimensional image rendering frame is directly rendered in real time.
[0036] As a further limitation of the technical solution of the embodiment of the present invention, when at least one rendering illumination intensity is not less than a rendering illumination threshold, in a three-dimensional rendering environment, performing real-time optimized rendering on the three-dimensional image rendering frame specifically comprises the following steps:
[0037] When at least one rendering light intensity is not less than a rendering light threshold, generating an optimized rendering instruction;
[0038] According to the optimized rendering instruction, the plurality of rendering illumination intensities are arranged in intensity, and the target rendering intensity with the largest intensity is selected;
[0039] According to the target rendering intensity, optimize the ambient light intensity and determine the optimized ambient intensity;
[0040] According to the optimized environment intensity, collectively optimizing the plurality of rendering illumination intensities to generate an optimized rendering intensity;
[0041] In a three-dimensional rendering environment, performing optimized point rendering on a plurality of corresponding three-dimensional graphics rendering points with a plurality of the optimized rendering intensities, and recording optimized point rendering data;
[0042] According to the optimization point rendering data, the three-dimensional image rendering frame is optimized and rendered in real time.
[0043] A real-time three-dimensional graphics rendering system, the system includes a graphics point processing module, a graphics space adjustment module, a rendering illumination calculation module, a rendering illumination comparison module, a real-time direct rendering module and a real-time optimization rendering module, wherein:
[0044] A graphics point processing module is used to import a target three-dimensional graphic into a three-dimensional rendering environment, receive a rendering refinement requirement, perform graphics point processing on the target three-dimensional graphic, and obtain a plurality of three-dimensional graphic structure points;
[0045] A graphics space adjustment module, used for receiving a graphics space operation for the target three-dimensional graphics, performing graphics space adjustment, acquiring a three-dimensional image rendering frame in real time, and selecting a plurality of three-dimensional graphics rendering points from a plurality of the three-dimensional graphics structure points;
[0046] A rendering illumination calculation module, used to construct a rendering coordinate system, determine a plurality of environmental direct light sources, and calculate the rendering illumination intensity of a plurality of said three-dimensional graphics rendering points under the plurality of said environmental direct light sources;
[0047] A rendering illumination comparison module, used for comparing the plurality of rendering illumination intensities with a preset rendering illumination threshold;
[0048] A real-time direct rendering module, used for performing real-time direct rendering on the three-dimensional image rendering frame in a three-dimensional rendering environment when the multiple rendering illumination intensities are all less than the rendering illumination threshold;
[0049] The real-time optimized rendering module is used to perform real-time optimized rendering on the three-dimensional image rendering frame in a three-dimensional rendering environment when at least one rendering illumination intensity is not less than a rendering illumination threshold.
[0050] As a further limitation of the technical solution of the embodiment of the present invention, the graphic space adjustment module specifically includes:
[0051] An operation receiving unit, used for receiving a graphic space operation on the target three-dimensional graphic;
[0052] A space adjustment unit, configured to perform corresponding graphic space adjustment on the target three-dimensional graphic according to the graphic space operation;
[0053] A rendering frame acquisition unit, used to acquire a three-dimensional image rendering frame in real time according to a preset adjusted display frame rate;
[0054] A display surface determination unit, configured to determine an adjusted display surface of the target three-dimensional graphic according to the three-dimensional image rendering frame;
[0055] A rendering point selection unit is used to select a plurality of three-dimensional graphics rendering points from a plurality of the three-dimensional graphics structure points according to the adjusted display surface.
[0056] As a further limitation of the technical solution of the embodiment of the present invention, the rendering lighting calculation module specifically includes:
[0057] A coordinate system construction unit, used for constructing a rendering coordinate system in the three-dimensional rendering environment;
[0058] A light source determination unit, used to determine a plurality of ambient direct light sources in the three-dimensional rendering environment;
[0059] An angle analysis unit, used to analyze the incident angle and display angle between the multiple direct light sources of the environment and the multiple three-dimensional graphics rendering points, and record rendering angle data;
[0060] The lighting calculation unit is used to calculate the rendering lighting intensity of multiple three-dimensional graphics rendering points under multiple environmental direct light sources in the rendering coordinate system according to the rendering angle data.
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] The embodiment of the present invention performs graphic point processing on the target three-dimensional graphics; receives graphic space operations, obtains three-dimensional image rendering frames in real time, selects multiple three-dimensional graphic rendering points; calculates the rendering illumination intensity of multiple three-dimensional graphic rendering points under multiple environmental direct light sources; performs real-time direct rendering when all are less than the rendering illumination threshold; performs real-time optimized rendering when not less than the rendering illumination threshold. It can perform graphic space adjustment according to the graphic space operation, obtain three-dimensional image rendering frames in real time, select multiple three-dimensional graphic rendering points, calculate the rendering illumination intensity under multiple environmental direct light sources, and perform real-time direct rendering or real-time optimized rendering under different intensity comparison conditions, and can effectively realize highly interactive and real-time real-time three-dimensional graphics rendering in complex situations where multiple light sources are combined with ambient light. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 A flow chart of a real-time three-dimensional graphics rendering method provided by an embodiment of the present invention is shown;
[0064] Figure 2 A flowchart of the target three-dimensional graphic point processing in the method provided by the embodiment of the present invention is shown;
[0065] Figure 3 A flowchart of a graphic space adjustment process in a method provided by an embodiment of the present invention is shown;
[0066] Figure 4 A flowchart of rendering illumination intensity calculation in the method provided by an embodiment of the present invention is shown;
[0067] Figure 5 A flowchart of real-time direct rendering in the method provided by an embodiment of the present invention is shown;
[0068] Figure 6 A flowchart of performing real-time optimized rendering in a method provided by an embodiment of the present invention is shown;
[0069] Figure 7 An application architecture diagram of a real-time three-dimensional graphics rendering system provided by an embodiment of the present invention is shown;
[0070] Figure 8 A structural block diagram of a graphics space adjustment module in a system provided by an embodiment of the present invention is shown;
[0071] Fig. 9 A structural block diagram of a rendering illumination calculation module in a system provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0072] 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 intended to limit the present invention.
[0073] It is understandable that in the prior art, for three-dimensional graphics rendering under lighting conditions, simple lighting rendering of one light source is usually performed. In the complex situation where multiple light sources are combined with ambient light, it is difficult to achieve real-time three-dimensional graphics rendering with high interactivity and real-time performance.
[0074] To solve the above problems, an embodiment of the present invention discloses a real-time 3D graphics rendering method and rendering system, which imports a target 3D graphics into a 3D rendering environment, receives rendering refinement requirements, performs graphics point processing on the target 3D graphics, and obtains multiple 3D graphics structure points; receives graphics space operations on the target 3D graphics, performs graphics space adjustments, obtains 3D image rendering frames in real time, and selects multiple 3D graphics rendering points from the multiple 3D graphics structure points; constructs a rendering coordinate system, determines multiple environmental direct light sources, and calculates rendering illumination intensities of multiple 3D graphics rendering points under multiple environmental direct light sources; compares multiple rendering illumination intensities with a preset rendering illumination threshold; when multiple rendering illumination intensities are all less than the rendering illumination threshold, performs real-time direct rendering on the 3D image rendering frame in the 3D rendering environment; when at least one rendering illumination intensity is not less than the rendering illumination threshold, performs real-time optimized rendering on the 3D image rendering frame in the 3D rendering environment. It can perform graphic space adjustments according to graphic space operations, obtain three-dimensional image rendering frames in real time, select multiple three-dimensional graphic rendering points, calculate the rendering light intensity under multiple environmental direct light sources, and perform real-time direct rendering or real-time optimized rendering under different intensity comparison conditions. It can effectively realize real-time three-dimensional graphics rendering with high interactivity and real-time performance in complex situations where multiple light sources are combined with ambient light.
[0075] Specifically, Figure 1 A flow chart of a real-time three-dimensional graphics rendering method provided by an embodiment of the present invention is shown.
[0076] In a preferred embodiment of the present invention, a real-time three-dimensional graphics rendering method comprises the following steps:
[0077] Step S101: import a target three-dimensional graphic into a three-dimensional rendering environment, receive a rendering refinement requirement, perform graphic point processing on the target three-dimensional graphic, and obtain a plurality of three-dimensional graphic structure points.
[0078] In an embodiment of the present invention, by importing a target three-dimensional graphic into a three-dimensional rendering environment, receiving a user's detailed rendering requirements, and performing basic analysis on the target three-dimensional graphic, the size data and material information of the target three-dimensional graphic are obtained, and then the detailed rendering requirements, size data and material information are combined to perform graphic point processing on the target three-dimensional graphic, and multiple three-dimensional graphic structure points are obtained, so that the visual appearance of the target three-dimensional graphic is composed of multiple three-dimensional graphic structure points.
[0079] Specifically, Figure 2 The flowchart of the target three-dimensional graphic point processing in the method provided by the embodiment of the present invention is shown.
[0080] Among them, in the preferred embodiment provided by the present invention, the step of importing the target three-dimensional graphics into the three-dimensional rendering environment, receiving the rendering refinement requirements, performing graphic point processing on the target three-dimensional graphics, and obtaining multiple three-dimensional graphic structure points specifically includes the following steps:
[0081] Step S1011: importing a target three-dimensional graphic into a three-dimensional rendering environment.
[0082] Step S1012: receiving detailed rendering requirements.
[0083] Step S1013: Acquire the size data and material information of the target three-dimensional graphic.
[0084] Step S1014: performing graphic point processing on the target three-dimensional graphic according to the rendering refinement requirement, the size data and the material information to obtain a plurality of three-dimensional graphic structure points.
[0085] Furthermore, the real-time three-dimensional graphics rendering method further comprises the following steps:
[0086] Step S102: receiving a graphics space operation for the target three-dimensional graphics, performing graphics space adjustment, acquiring a three-dimensional image rendering frame in real time, and selecting a plurality of three-dimensional graphics rendering points from a plurality of the three-dimensional graphics structure points.
[0087] In an embodiment of the present invention, a graphic space operation of a user on a target three-dimensional graphic is received, and a corresponding graphic space adjustment is performed on the target three-dimensional graphic based on the graphic space operation, and a three-dimensional image rendering frame in the adjustment process is acquired in real time according to a preset adjustment display frame rate, and an adjustment display surface of the target three-dimensional graphic is determined based on the three-dimensional image rendering frame, and then based on the adjustment display surface, a plurality of three-dimensional graphic rendering points on the adjustment display surface are selected from a plurality of three-dimensional graphic structure points.
[0088] It can be understood that the graphic space operation is an operation such as moving, rotating, enlarging and / or reducing the target three-dimensional graphic as a whole.
[0089] It is understandable that the three-dimensional image rendering frame is generated in real time by adjusting the display frame rate in response to the graphic space operation.
[0090] Specifically, Figure 3 A flowchart of the graphic space adjustment process in the method provided by an embodiment of the present invention is shown.
[0091] Among them, in the preferred embodiment provided by the present invention, the receiving of the graphics space operation on the target three-dimensional graphics, performing graphics space adjustment, acquiring the three-dimensional image rendering frame in real time, and selecting a plurality of three-dimensional graphics rendering points from a plurality of the three-dimensional graphics structure points specifically include the following steps:
[0092] Step S1021: Receive a graphics space operation for the target three-dimensional graphics.
[0093] Step S1022: According to the graphic space operation, perform corresponding graphic space adjustments on the target three-dimensional graphic.
[0094] Step S1023: Acquire a three-dimensional image rendering frame in real time according to a preset adjusted display frame rate.
[0095] Step S1024: Determine an adjusted display surface of the target three-dimensional graphic according to the three-dimensional image rendering frame.
[0096] Step S1025: Select multiple three-dimensional graphic rendering points from the multiple three-dimensional graphic structure points according to the adjusted display surface.
[0097] Furthermore, the real-time three-dimensional graphics rendering method further comprises the following steps:
[0098] Step S103: construct a rendering coordinate system, determine a plurality of ambient direct light sources, and calculate the rendering illumination intensities of a plurality of the three-dimensional graphics rendering points under the plurality of the ambient direct light sources.
[0099] In an embodiment of the present invention, in a 3D rendering environment, a plane rendering coordinate system is constructed with the lower left corner of a 3D image rendering frame as the origin, and the 3D rendering environment is identified with a light source, and multiple ambient direct light sources in the 3D rendering environment are determined. Then, according to the spatial relative positions between the multiple ambient direct light sources and the multiple 3D graphics rendering points in the 3D rendering environment, incident angles and display angles are analyzed between the multiple ambient direct light sources and the multiple 3D graphics rendering points, and rendering angle data including multiple diffuse reflection incident angles and multiple display angles are recorded. In the rendering coordinate system, based on the rendering angle data, the rendering illumination intensities of the multiple 3D graphics rendering points under the multiple ambient direct light sources are calculated. Specifically, the calculation formulas for the multiple rendering illumination intensities are as follows:
[0100]
[0101] Among them, (x, y) represents the coordinates of the rendering point of the three-dimensional graphics rendering point in the rendering coordinate system, i represents different ambient direct light sources, and there are n ambient direct light sources in total. i is the direct illumination intensity of the ith ambient direct light source, k a is the preset diffuse reflection coefficient, Sr(x, y) is the rendering illumination intensity of the (x, y) 3D graphics rendering point, θ i (x, y) is the diffuse reflection incident angle of the ith ambient direct light source to the (x, y) 3D graphics rendering point, k b is the preset specular reflection coefficient, is the display angle between the ith ambient direct light source and the (x, y) 3D graphics rendering point, p is the preset specular reflection parameter, k c is the preset ambient light reflection coefficient, and Sc is the ambient light intensity.
[0102] It can be understood that in a three-dimensional rendering environment, the lighting impact on the target three-dimensional graphics includes both the impact of the direct lighting intensity of multiple ambient direct light sources and the impact of the ambient lighting intensity of the basic ambient lighting, among which the ambient lighting intensity of the basic ambient lighting has the same impact on the lighting rendering of all three-dimensional graphics rendering points.
[0103] It can be understood that the diffuse reflection incident angle is the angle between the illumination light of the direct light source in the environment and the plane normal vector of the three-dimensional graphics rendering point; the display angle is the angle between the observation direction corresponding to the three-dimensional image rendering frame and the reflection direction of the direct light source in the environment at the three-dimensional graphics rendering point.
[0104] Specifically, Figure 4 A flowchart of rendering illumination intensity calculation in the method provided by an embodiment of the present invention is shown.
[0105] Among them, in the preferred embodiment provided by the present invention, the construction of the rendering coordinate system, the determination of multiple ambient direct light sources, and the calculation of the rendering illumination intensity of multiple 3D graphics rendering points under the multiple ambient direct light sources specifically include the following steps:
[0106] Step S1031: construct a rendering coordinate system in the three-dimensional rendering environment.
[0107] Step S1032: Determine a plurality of ambient direct light sources in the three-dimensional rendering environment.
[0108] Step S1033: analyzing the incident angles and display angles between the plurality of direct ambient light sources and the plurality of three-dimensional graphics rendering points, and recording rendering angle data.
[0109] Step S1034 : calculating, in the rendering coordinate system, according to the rendering angle data, the rendering illumination intensities of the plurality of three-dimensional graphics rendering points under the plurality of the ambient direct light sources.
[0110] Furthermore, the real-time three-dimensional graphics rendering method further comprises the following steps:
[0111] Step S104: compare the plurality of rendering illumination intensities with a preset rendering illumination threshold.
[0112] Step S105 : When the multiple rendering illumination intensities are all less than the rendering illumination threshold, performing real-time direct rendering on the three-dimensional image rendering frame in a three-dimensional rendering environment.
[0113] In an embodiment of the present invention, when multiple rendering light intensities are all less than the rendering light threshold, a direct rendering instruction is generated. At this time, in a three-dimensional rendering environment, according to the direct rendering instruction, direct point rendering is performed on multiple corresponding three-dimensional graphics rendering points with multiple rendering light intensities, and direct point rendering data is recorded. Then, according to the direct point rendering data, the direct influence of multiple environmental direct light sources and basic environmental lighting on the target three-dimensional graphics under graphics space operations is simulated, and real-time direct rendering lighting rendering and shading processing is performed on the three-dimensional image rendering frame.
[0114] Specifically, Figure 5 A flow chart of real-time direct rendering in the method provided by an embodiment of the present invention is shown.
[0115] Among them, in the preferred embodiment provided by the present invention, when the multiple rendering illumination intensities are all less than the rendering illumination threshold, in the three-dimensional rendering environment, performing real-time direct rendering on the three-dimensional image rendering frame specifically comprises the following steps:
[0116] Step S1051: When the multiple rendering light intensities are all less than the rendering light threshold, a direct rendering instruction is generated.
[0117] Step S1052: In a three-dimensional rendering environment, according to the direct rendering instruction, direct point rendering is performed on a plurality of corresponding three-dimensional graphic rendering points with a plurality of the rendering light intensities, and direct point rendering data is recorded.
[0118] Step S1053: performing real-time direct rendering on the three-dimensional image rendering frame according to the direct point rendering data.
[0119] Furthermore, the real-time three-dimensional graphics rendering method further comprises the following steps:
[0120] Step S106: When at least one rendering illumination intensity is not less than a rendering illumination threshold, in a three-dimensional rendering environment, performing real-time optimized rendering on the three-dimensional image rendering frame.
[0121] In an embodiment of the present invention, when at least one rendering light intensity is not less than a rendering light threshold, an optimized rendering instruction is generated, and according to the optimized rendering instruction, multiple rendering light intensities are arranged in intensity, and the rendering light intensity with the largest intensity is selected from the multiple rendering light intensities and marked as the target rendering intensity. According to the intensity value of the target rendering intensity, the ambient light intensity is correspondingly weakened and planned so that the influence of the basic ambient light is reduced, and the optimized ambient intensity is determined. Then, according to the optimized ambient intensity, the multiple rendering light intensities are collectively optimized so that the multiple rendering light intensities are all subjected to the same weakening optimization processing of the basic ambient light, and multiple corresponding optimized ambient intensities are determined. In a three-dimensional rendering environment, according to the multiple optimized ambient intensities, optimized point rendering is performed on multiple corresponding three-dimensional graphics rendering points, and optimized point rendering data is recorded. Then, according to the optimized point rendering data, the optimization influence of multiple ambient direct light sources and basic ambient light on the target three-dimensional graphics under the graphics space operation is simulated, and the three-dimensional image rendering frame is subjected to real-time optimized rendering lighting rendering and shading processing.
[0122] Specifically, Figure 6 A flow chart of real-time optimized rendering in the method provided by an embodiment of the present invention is shown.
[0123] Among them, in the preferred embodiment provided by the present invention, when at least one rendering illumination intensity is not less than the rendering illumination threshold, in the three-dimensional rendering environment, performing real-time optimized rendering on the three-dimensional image rendering frame specifically comprises the following steps:
[0124] Step S1061: When at least one rendering light intensity is not less than a rendering light threshold, generate an optimized rendering instruction.
[0125] Step S1062: Arrange the multiple rendering illumination intensities according to the rendering optimization instruction, and select the target rendering intensity with the largest intensity.
[0126] Step S1063: Optimize and plan the ambient light intensity according to the target rendering intensity to determine the optimized ambient intensity.
[0127] Step S1064: collectively optimize the plurality of rendering illumination intensities according to the optimized environment intensity to generate an optimized rendering intensity.
[0128] Step S1065 : In a three-dimensional rendering environment, performing optimized point rendering on a plurality of corresponding three-dimensional graphics rendering points with a plurality of the optimized rendering intensities, and recording optimized point rendering data.
[0129] Step S1066: performing real-time optimization rendering on the three-dimensional image rendering frame according to the optimization point rendering data.
[0130] Furthermore, Figure 7The application architecture diagram of the real-time three-dimensional graphics rendering system provided by an embodiment of the present invention is shown.
[0131] In another preferred embodiment of the present invention, a real-time three-dimensional graphics rendering system includes:
[0132] The graphic point processing module 101 is used to import a target three-dimensional graphic into a three-dimensional rendering environment, receive a rendering refinement requirement, perform graphic point processing on the target three-dimensional graphic, and obtain a plurality of three-dimensional graphic structure points.
[0133] In an embodiment of the present invention, the graphics dot processing module 101 imports the target three-dimensional graphics into the three-dimensional rendering environment, receives the user's detailed rendering requirements, performs basic analysis on the target three-dimensional graphics, obtains the size data and material information of the target three-dimensional graphics, and then comprehensively integrates the detailed rendering requirements, size data and material information, performs graphics dot processing on the target three-dimensional graphics, obtains multiple three-dimensional graphics structure points, so that the visual appearance of the target three-dimensional graphics is composed of multiple three-dimensional graphics structure points.
[0134] The graphic space adjustment module 102 is used to receive the graphic space operation for the target three-dimensional graphic, perform graphic space adjustment, obtain a three-dimensional image rendering frame in real time, and select multiple three-dimensional graphic rendering points from multiple three-dimensional graphic structure points.
[0135] In an embodiment of the present invention, the graphic space adjustment module 102 receives a graphic space operation of a user on a target three-dimensional graphic, performs corresponding graphic space adjustments on the target three-dimensional graphic according to the graphic space operation, and obtains a three-dimensional image rendering frame in the adjustment process in real time according to a preset adjustment display frame rate, and determines an adjustment display surface of the target three-dimensional graphic based on the three-dimensional image rendering frame, and then selects multiple three-dimensional graphic rendering points on the adjustment display surface from multiple three-dimensional graphic structure points based on the adjustment display surface.
[0136] Specifically, Figure 8 It shows a structural block diagram of the graphic space adjustment module 102 in the system provided by an embodiment of the present invention.
[0137] Among them, in the preferred embodiment provided by the present invention, the graphic space adjustment module 102 specifically includes:
[0138] The operation receiving unit 1021 is used to receive a graphic space operation on the target three-dimensional graphic.
[0139] The space adjustment unit 1022 is used to perform corresponding graphic space adjustment on the target three-dimensional graphic according to the graphic space operation.
[0140] The rendering frame acquisition unit 1023 is used to acquire the 3D image rendering frame in real time according to the preset adjusted display frame rate.
[0141] The display surface determination unit 1024 is used to determine the adjusted display surface of the target three-dimensional graphic according to the three-dimensional image rendering frame.
[0142] The rendering point selection unit 1025 is used to select a plurality of three-dimensional graphics rendering points from the plurality of three-dimensional graphics structure points according to the adjusted display surface.
[0143] Furthermore, the real-time three-dimensional graphics rendering system also includes:
[0144] The rendering illumination calculation module 103 is used to construct a rendering coordinate system, determine a plurality of ambient direct light sources, and calculate the rendering illumination intensity of a plurality of the three-dimensional graphics rendering points under the plurality of the ambient direct light sources.
[0145] In an embodiment of the present invention, in a three-dimensional rendering environment, the rendering illumination calculation module 103 takes the lower left corner of the three-dimensional image rendering frame as the origin, constructs a plane rendering coordinate system, and performs light source identification on the three-dimensional rendering environment, determines multiple ambient direct light sources in the three-dimensional rendering environment, and then analyzes the incident angles and display angles between the multiple ambient direct light sources and the multiple three-dimensional graphics rendering points according to the spatial relative positions between the multiple ambient direct light sources and the multiple three-dimensional graphics rendering points in the three-dimensional rendering environment, records rendering angle data including multiple diffuse reflection incident angles and multiple display angles, and calculates the rendering illumination intensities of the multiple three-dimensional graphics rendering points under the multiple ambient direct light sources in the rendering coordinate system according to the rendering angle data. Specifically, the calculation formulas for the multiple rendering illumination intensities are as follows:
[0146]
[0147] Among them, (x, y) represents the coordinates of the rendering point of the three-dimensional graphics rendering point in the rendering coordinate system, i represents different ambient direct light sources, and there are n ambient direct light sources in total. i is the direct illumination intensity of the ith ambient direct light source, k a is the preset diffuse reflection coefficient, Sr(x, y) is the rendering illumination intensity of the (x, y) 3D graphics rendering point, θ i (x, y) is the diffuse reflection incident angle of the ith ambient direct light source to the (x, y) 3D graphics rendering point, k b is the preset specular reflection coefficient, is the display angle between the fth ambient direct light source and the (x, y) 3D graphics rendering point, p is the preset specular reflection parameter, k c is the preset ambient light reflection coefficient, and Sc is the ambient light intensity.
[0148] Specifically, Fig. 9 It shows a structural block diagram of the rendering illumination calculation module 103 in the system provided by an embodiment of the present invention.
[0149] Among them, in the preferred implementation manner provided by the present invention, the rendering illumination calculation module 103 specifically includes:
[0150] The coordinate system construction unit 1031 is used to construct a rendering coordinate system in the three-dimensional rendering environment.
[0151] The light source determination unit 1032 is used to determine a plurality of ambient direct light sources in the three-dimensional rendering environment.
[0152] The angle analysis unit 1033 is used to analyze the incident angle and display angle between the multiple environmental direct light sources and the multiple three-dimensional graphics rendering points, and record rendering angle data.
[0153] The illumination calculation unit 1034 is used to calculate, in the rendering coordinate system, the rendering illumination intensity of the plurality of the three-dimensional graphics rendering points under the plurality of the environmental direct light sources according to the rendering angle data.
[0154] Furthermore, the real-time three-dimensional graphics rendering system also includes:
[0155] The rendering illumination comparison module 104 is used to compare the plurality of rendering illumination intensities with a preset rendering illumination threshold.
[0156] The real-time direct rendering module 105 is used to perform real-time direct rendering on the three-dimensional image rendering frame in a three-dimensional rendering environment when the multiple rendering illumination intensities are all less than the rendering illumination threshold.
[0157] In an embodiment of the present invention, when multiple rendering light intensities are all less than the rendering light threshold, the real-time direct rendering module 105 generates a direct rendering instruction. At this time, in the three-dimensional rendering environment, according to the direct rendering instruction, multiple corresponding three-dimensional graphics rendering points are directly rendered with multiple rendering light intensities, and the direct point rendering data is recorded. Then, according to the direct point rendering data, the direct influence of multiple environmental direct light sources and basic environmental lighting on the target three-dimensional graphics under the graphic space operation is simulated, and real-time direct rendering lighting rendering and shading processing is performed on the three-dimensional image rendering frame.
[0158] The real-time optimized rendering module 106 is used to perform real-time optimized rendering on the three-dimensional image rendering frame in a three-dimensional rendering environment when at least one rendering illumination intensity is not less than a rendering illumination threshold.
[0159] In an embodiment of the present invention, when at least one rendering light intensity is not less than the rendering light threshold, the real-time optimization rendering module 106 generates an optimization rendering instruction, arranges the intensity of multiple rendering light intensities according to the optimization rendering instruction, selects the rendering light intensity with the largest intensity from the multiple rendering light intensities, marks it as the target rendering intensity, and performs corresponding attenuation planning on the ambient light intensity according to the intensity value of the target rendering intensity, so that the influence of the basic ambient light is reduced, determines the optimized ambient intensity, and then collectively optimizes the multiple rendering light intensities according to the optimized ambient intensity, so that the multiple rendering light intensities are all subjected to the same attenuation optimization processing of the basic ambient light, determines multiple corresponding optimized ambient intensities, and performs optimization point rendering on multiple corresponding three-dimensional graphics rendering points according to the multiple optimized ambient intensities in a three-dimensional rendering environment, records the optimization point rendering data, and then simulates the optimization influence of multiple ambient direct light sources and basic ambient light on the target three-dimensional graphics under the graphics space operation according to the optimized point rendering data, and performs real-time optimized rendering lighting rendering and shading processing on the three-dimensional image rendering frame.
[0160] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0161] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0162] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A real-time three-dimensional graphics rendering method, characterized in that: The method comprises the following steps: Importing a target three-dimensional graphic into a three-dimensional rendering environment, receiving a rendering refinement requirement, performing graphic point processing on the target three-dimensional graphic, and obtaining a plurality of three-dimensional graphic structure points; Receiving a graphics space operation for the target three-dimensional graphics, performing graphics space adjustment, acquiring a three-dimensional image rendering frame in real time, and selecting a plurality of three-dimensional graphics rendering points from a plurality of the three-dimensional graphics structure points; Constructing a rendering coordinate system, determining a plurality of ambient direct light sources, and calculating the rendering illumination intensities of a plurality of the three-dimensional graphics rendering points under the plurality of the ambient direct light sources; Comparing a plurality of said rendering illumination intensities with a preset rendering illumination threshold; When the multiple rendering illumination intensities are all less than the rendering illumination threshold, performing real-time direct rendering on the three-dimensional image rendering frame in a three-dimensional rendering environment; When at least one rendering light intensity is not less than a rendering light threshold, in a three-dimensional rendering environment, real-time optimized rendering is performed on the three-dimensional image rendering frame.
2. The real-time three-dimensional graphics rendering method according to claim 1, characterized in that: The method of importing a target three-dimensional graphic into a three-dimensional rendering environment, receiving a rendering refinement requirement, performing a graphic point processing on the target three-dimensional graphic, and obtaining a plurality of three-dimensional graphic structure points specifically comprises the following steps: Importing target 3D graphics into a 3D rendering environment; Receive detailed rendering requirements; Acquire the size data and material information of the target three-dimensional figure; According to the rendering refinement requirement, the size data and the material information, the target three-dimensional graphic is subjected to graphic point processing to obtain a plurality of three-dimensional graphic structure points.
3. The real-time three-dimensional graphics rendering method according to claim 1, characterized in that: The receiving of the graphic space operation for the target three-dimensional graphic, performing graphic space adjustment, acquiring a three-dimensional image rendering frame in real time, and selecting a plurality of three-dimensional graphic rendering points from a plurality of the three-dimensional graphic structure points specifically comprises the following steps: receiving a graphics space operation for the target three-dimensional graphic; According to the graphic space operation, performing corresponding graphic space adjustments on the target three-dimensional graphic; According to the preset adjustment display frame rate, the three-dimensional image rendering frame is obtained in real time; Determining an adjusted display surface of the target three-dimensional graphic according to the three-dimensional image rendering frame; According to the adjusted display surface, a plurality of three-dimensional graphic rendering points are selected from the plurality of three-dimensional graphic structure points.
4. The real-time three-dimensional graphics rendering method according to claim 1, characterized in that: The steps of constructing a rendering coordinate system, determining a plurality of ambient direct light sources, and calculating the rendering illumination intensities of a plurality of the three-dimensional graphics rendering points under the plurality of the ambient direct light sources specifically include the following steps: In the three-dimensional rendering environment, constructing a rendering coordinate system; Determining a plurality of ambient direct light sources in the three-dimensional rendering environment; Analyzing the incident angles and display angles between the plurality of direct ambient light sources and the plurality of three-dimensional graphics rendering points, and recording rendering angle data; In the rendering coordinate system, the rendering illumination intensities of the plurality of the three-dimensional graphics rendering points under the plurality of the environmental direct light sources are calculated according to the rendering angle data.
5. The real-time three-dimensional graphics rendering method according to claim 4, characterized in that: The calculation formulas for the multiple rendering light intensities are: Among them, (x, y) represents the coordinates of the rendering point of the three-dimensional graphics rendering point in the rendering coordinate system, i represents different ambient direct light sources, and there are n ambient direct light sources in total. i is the direct illumination intensity of the ith ambient direct light source, k a is the preset diffuse reflection coefficient, Sr(x,y) is the rendering illumination intensity of the (x,y) 3D graphics rendering point, θ i (x, y) is the diffuse reflection incident angle of the ith ambient direct light source to the (x, y) 3D graphics rendering point, k b is the preset specular reflection coefficient, is the display angle between the ith ambient direct light source and the (x, y) 3D graphics rendering point, p is the preset specular reflection parameter, k c is the preset ambient light reflection coefficient, and Sc is the ambient light intensity.
6. The real-time three-dimensional graphics rendering method according to claim 1, characterized in that: When the multiple rendering illumination intensities are all less than the rendering illumination threshold, in the three-dimensional rendering environment, performing real-time direct rendering on the three-dimensional image rendering frame specifically comprises the following steps: When the multiple rendering illumination intensities are all less than the rendering illumination threshold, generating a direct rendering instruction; In a three-dimensional rendering environment, according to the direct rendering instruction, direct point rendering is performed on a plurality of corresponding three-dimensional graphics rendering points with a plurality of the rendering light intensities, and direct point rendering data is recorded; According to the direct point rendering data, the three-dimensional image rendering frame is directly rendered in real time.
7. The real-time three-dimensional graphics rendering method according to claim 5, characterized in that: When at least one rendering illumination intensity is not less than a rendering illumination threshold, in a three-dimensional rendering environment, performing real-time optimized rendering on the three-dimensional image rendering frame specifically comprises the following steps: When at least one rendering light intensity is not less than a rendering light threshold, generating an optimized rendering instruction; According to the optimized rendering instruction, the plurality of rendering illumination intensities are arranged in intensity, and the target rendering intensity with the largest intensity is selected; According to the target rendering intensity, optimize the ambient light intensity and determine the optimized ambient intensity; According to the optimized environment intensity, collectively optimizing the plurality of rendering illumination intensities to generate an optimized rendering intensity; In a three-dimensional rendering environment, performing optimized point rendering on a plurality of corresponding three-dimensional graphics rendering points with a plurality of the optimized rendering intensities, and recording optimized point rendering data; According to the optimization point rendering data, the three-dimensional image rendering frame is optimized and rendered in real time.
8. A real-time three-dimensional graphics rendering system, characterized in that: The system includes a graphics point processing module, a graphics space adjustment module, a rendering illumination calculation module, a rendering illumination comparison module, a real-time direct rendering module and a real-time optimization rendering module, wherein: A graphics point processing module is used to import a target three-dimensional graphic into a three-dimensional rendering environment, receive a rendering refinement requirement, perform graphics point processing on the target three-dimensional graphic, and obtain a plurality of three-dimensional graphic structure points; A graphics space adjustment module, used for receiving a graphics space operation for the target three-dimensional graphics, performing graphics space adjustment, acquiring a three-dimensional image rendering frame in real time, and selecting a plurality of three-dimensional graphics rendering points from a plurality of the three-dimensional graphics structure points; A rendering illumination calculation module, used to construct a rendering coordinate system, determine a plurality of environmental direct light sources, and calculate the rendering illumination intensity of a plurality of said three-dimensional graphics rendering points under the plurality of said environmental direct light sources; A rendering illumination comparison module, used for comparing the plurality of rendering illumination intensities with a preset rendering illumination threshold; A real-time direct rendering module, used for performing real-time direct rendering on the three-dimensional image rendering frame in a three-dimensional rendering environment when the multiple rendering illumination intensities are all less than the rendering illumination threshold; The real-time optimized rendering module is used to perform real-time optimized rendering on the three-dimensional image rendering frame in a three-dimensional rendering environment when at least one rendering illumination intensity is not less than a rendering illumination threshold.
9. The visual color correction system for agricultural UAV in natural light environment according to claim 8, characterized in that: The graphic space adjustment module specifically includes: An operation receiving unit, used for receiving a graphic space operation on the target three-dimensional graphic; A space adjustment unit, configured to perform corresponding graphic space adjustment on the target three-dimensional graphic according to the graphic space operation; A rendering frame acquisition unit, used to acquire a three-dimensional image rendering frame in real time according to a preset adjusted display frame rate; A display surface determination unit, configured to determine an adjusted display surface of the target three-dimensional graphic according to the three-dimensional image rendering frame; A rendering point selection unit is used to select a plurality of three-dimensional graphics rendering points from a plurality of the three-dimensional graphics structure points according to the adjusted display surface.
10. The visual color correction system for agricultural UAV in natural light environment according to claim 8, characterized in that: The rendering lighting calculation module specifically includes: A coordinate system construction unit, used for constructing a rendering coordinate system in the three-dimensional rendering environment; A light source determination unit, used to determine a plurality of ambient direct light sources in the three-dimensional rendering environment; An angle analysis unit, used to analyze the incident angle and display angle between the multiple direct light sources of the environment and the multiple three-dimensional graphics rendering points, and record rendering angle data; The lighting calculation unit is used to calculate the rendering lighting intensity of multiple three-dimensional graphics rendering points under multiple environmental direct light sources in the rendering coordinate system according to the rendering angle data.
