XGBoost-based real-time rendering automatic parameter optimization method
Through the XGBoost-based rendering automatic parameter optimization method, the rendering time and quality prediction model is built, and the rendering parameters are dynamically adjusted, which solves the problem of difficult to take into account both rendering quality and speed in the existing technology, and realizes efficient rendering quality and in commercial rendering engines Speed increases.
Patent Information
- Application Number
- CN202410947558.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-12
AI Technical Summary
The prior art is difficult to automatically adjust rendering parameters to improve rendering quality while ensuring rendering speed. Especially in commercial rendering and game engines, the model accuracy of the existing methods is not high and difficult to apply to product-level game engines.
Using the XGBoost-based real-time rendering automatic parameter optimization method, the rendering time prediction model and the rendering quality prediction model are built, combined with the rendering parameters, rendering view information and hardware information, the rendering parameters are dynamically adjusted to achieve high frame rate and high-quality rendering.
Effectively predict the rendering time and quality in the rendering engine, dynamically adjust the rendering parameters, significantly improve the rendering quality, and reduce rendering time. It is suitable for a variety of rendering effects and rendering engines.
Smart Images

Figure CN118941660A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer graphics rendering, and in particular relates to a real-time rendering automatic parameter optimization method based on XGBoost. Background Art
[0002] With the popularization of technologies such as digital twins and virtual reality, people's demand for image quality and fluency continues to increase. However, due to the constraints of key performance hardware, personal computers or mobile devices often need to adjust various parameters in games and rendering engines to increase the frame rate, which will inevitably cause rendering quality loss. How to set reasonable rendering parameters to achieve higher rendering quality while reducing time overhead has become a widely concerned issue in the field of graphics applications. Modern games and rendering engines integrate a wide variety of rendering technologies and provide corresponding rendering parameters. Users can manually adjust these parameters to balance frame rate and rendering quality. However, manual parameter adjustment is time-consuming and laborious, and requires users to have certain experience and theoretical knowledge of graphics. Taking Unreal Engine UE as an example, there are as many as 12 related parameters for subsurface scattering rendering alone. Therefore, it is very necessary to propose an effective and automatic rendering parameter optimization method for modern product-level games and rendering engines to achieve high frame rate and high-quality real-time rendering.
[0003] In terms of rendering parameter optimization, existing methods mainly focus on how to reduce hardware power consumption during rendering by adjusting rendering parameters. One existing method A proposes an energy-aware rendering framework, which predicts the Pareto frontier of rendering power consumption and error in the entire camera space to obtain the optimal parameter settings for rendering quality under rated power consumption, but it requires pre-calculation for each scene for several days. Subsequently, the introduction of machine learning methods has greatly improved rendering performance, computational efficiency, and accuracy of power consumption prediction. Another existing method B applies neural network models to power-aware rendering, and trains models under different types of scenes and lenses, effectively solving the problem of applicability in different scenes. However, due to the low accuracy of the model, the selected rendering settings may be worse or even exceed the power consumption budget. More importantly, these methods are all experimented with their self-developed rendering engines, and the rendering technologies they support and the adjustable rendering parameters are very limited, making them difficult to apply to product-level games and rendering engines.
[0004] In summary, with the development of rendering technology, rendering engines support more and more rendering effects, and there are also many parameters that need to be adjusted. These parameters are closely related to rendering quality and rendering speed. However, there is currently no method to automatically adjust rendering parameters to improve rendering quality and rendering speed, especially for commercial rendering and game engines.
[0005] This is a shortcoming of the prior art. Therefore, in view of the above defects in the prior art, it is very necessary to provide a real-time rendering automatic parameter optimization method based on XGBoost. Summary of the invention
[0006] As rendering engines support more and more rendering effects, more and more parameters need to be adjusted, and these parameters are closely related to rendering quality and rendering speed. Currently, there is no method for automatically adjusting rendering parameters to improve rendering quality and rendering speed. The present invention provides a real-time rendering automatic parameter optimization method based on XGBoost to solve the above technical problems.
[0007] The present invention provides a real-time rendering automatic parameter optimization method based on XGBoost, comprising the following steps: S1. constructing a rendering time prediction model and a rendering quality prediction model based on XGBoost for a target engine, with rendering parameters, rendering view information and hardware information as input;
[0008] S2. Collect rendering parameters, rendering view information, hardware information, rendering time, and rendering quality in the target rendering engine to construct a data set, and use the data set to train a rendering time prediction model and a rendering quality prediction model;
[0009] S3. Collect real-time rendering view information and hardware information in the target rendering engine, use the rendering time prediction model to predict the rendering time corresponding to each rendering parameter, and use the rendering quality prediction model to predict the rendering quality corresponding to each rendering parameter, so as to obtain the rendering time and rendering quality corresponding to each rendering parameter; S4. Take the given rendering time limit as the constraint condition, filter out the rendering parameters corresponding to the optimal rendering quality under the constraint condition, and use the filtered rendering parameters to render in the target rendering engine.
[0010] Furthermore, the specific steps of step S1 are as follows:
[0011] S11. quantify the rendering view information using the model projection area, and characterize the hardware information using the operating frequencies of the computer's CPU and GPU;
[0012] S12. taking the structural similarity SSIM between the rendering result and the optimal rendering image as a quantitative result of the rendering quality;
[0013] S13. Based on XGBoost as the target engine, a rendering time prediction model is constructed with rendering parameters, model projection area, and the operating frequency of the CPU and GPU of the current computer as inputs and rendering time as output;
[0014] S14. Based on XGBoost as the target engine, a rendering quality prediction model is constructed with rendering parameters, model projection area, and the operating frequencies of the CPU and GPU of the current computer as inputs, and the structural similarity SSIM between the rendering result and the optimal rendering image as output.
[0015] Furthermore, the specific steps of step S2 are as follows:
[0016] S21. construct a data set by combining the rendering parameters of the target rendering engine, the model projection area, the CPU and GPU operating frequencies of the computer, the rendering time, and the structural similarity SSIM between the rendering result and the optimal rendering image;
[0017] S22. Divide the data set into a training set and a validation set according to a set ratio;
[0018] S23. Setting the number of estimators and the depth range in the XGBoost parameters as the rendering time prediction model and the rendering quality model;
[0019] S24. Using the training set to train the rendering time prediction model according to the number of estimators and the depth range, and using the validation set to verify;
[0020] S25. Use the training set to train the rendering quality prediction model according to the number of estimators and the depth range, and use the validation set for verification.
[0021] Furthermore, the specific steps of step S3 are as follows:
[0022] S31. Obtain the latest set of data corresponding to the frame in the training set, recorded as the first frame;
[0023] S32. Obtain the current frame to be rendered in the target rendering engine, and determine whether the distance between the current frame and the first frame exceeds a set length;
[0024] If yes, return to step S2;
[0025] If not, proceed to step S33;
[0026] S33. Obtaining real-time rendering view information and hardware information in the target rendering engine;
[0027] S34. Input the real-time rendering view information, hardware information and various rendering parameter combinations of the target rendering engine into the rendering time prediction model to obtain a predicted rendering time series;
[0028] S35. Inputting the real-time rendering view information, hardware information and various rendering parameter combinations of the target rendering engine into the rendering quality prediction model to obtain a predicted rendering quality sequence;
[0029] S36. Integrate the rendering time sequence and the rendering quality sequence to obtain the rendering time-quality sequence corresponding to each rendering parameter combination, and select the rendering configuration with the highest rendering quality according to the rendering time constraint to render the current frame.
[0030] Furthermore, the specific steps of step S4 are as follows:
[0031] S41. Obtaining a rendering time limit condition as a constraint condition;
[0032] S42. Filtering out rendering configuration elements that meet the rendering time constraint from the rendering time-quality sequence;
[0033] S43. Filter out the rendering configuration element with the best rendering quality from the filtered rendering configuration elements, and use the rendering parameter combination of the filtered rendering configuration element as the optimal rendering parameter;
[0034] S44. In the target rendering engine, the current frame is rendered using the optimal rendering parameters, and it is determined whether there is a next frame to be rendered;
[0035] If yes, take the next frame to be rendered as the current frame and return to step S31;
[0036] If not, it is determined that rendering is finished.
[0037] Furthermore, in step S41, the rendering time restriction condition is to take a set ratio according to the rendering time.
[0038] Further, when the application scenario of the target rendering engine is subsurface scattering rendering in a UE game engine, the rendering parameters in step S13 and step S14 are a combination of scattering radius, number of samples, resolution, and channel quality;
[0039] The model projection area is obtained as follows:
[0040] Using Lee Perry-Smith's scanned head model, we built a virtual scene.
[0041] Select N typical setting ratios;
[0042] Randomly select N viewing angles with N set proportions of the projection area to the original model as the target;
[0043] Place cameras at the selected N viewing angles;
[0044] The optimal rendered image in step S14 is the rendered image quality corresponding to the highest setting recommended by the UE;
[0045] The rendering time of the subsurface parameters and the structural similarity SSIM between the rendering result and the optimal rendering image are calculated as the output of the rendering quality prediction model.
[0046] Furthermore, when the application scenario of the target rendering engine is subsurface scattering rendering in a UE game engine, in step S32, when the distance between the current frame and the first frame exceeds a set length, the asynchronous thread returns to step S2 to re-collect rendering view information and hardware information to train the rendering time prediction model and the rendering quality prediction model;
[0047] In step S44, the subsurface scattering rendering parameters are changed to the optimal rendering parameters by accessing the console command. Further, when the application scenario of the target rendering engine is the ambient occlusion based on the hybrid pipeline in the UE game engine, the rendering parameters in steps S13 and S14 are SSAO intensity, SSAO bias, SSAO quality, RTAO intensity, and RTAO pixel-by-pixel sampling.
[0048] Furthermore, in step S22, the data set is divided into a training set and a validation set in a ratio of 7:3;
[0049] In step S32, the length is set to 120 frames;
[0050] In step S41, the ratio is set to 20%.
[0051] The beneficial effects of the present invention are:
[0052] The XGBoost-based real-time rendering automatic parameter optimization method provided by the present invention can effectively predict the rendering time and rendering quality of the rendering parameters of various rendering effects in the rendering engine, thereby dynamically adjusting the rendering parameters during the rendering process and improving the rendering quality while ensuring the rendering speed.
[0053] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect.
[0054] It can be seen that compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0056] Figure 1 It is a flow chart of an embodiment of a method for automatic parameter optimization of real-time rendering based on XGBoost of the present invention.
[0057] Figure 2It is a flow chart of another embodiment of the method for automatic parameter optimization of real-time rendering based on XGBoost of the present invention.
[0058] Figure 3 It is a schematic diagram comparing the difference in single-frame rendered images and rendering time of the subsurface scattering effect in the UE of the present invention.
[0059] Figure 4 It is a schematic diagram comparing image differences and rendering time when rendering consecutive frames of subsurface scattering effect in the UE of the present invention.
[0060] Figure 5 It is a schematic diagram comparing the difference in single-frame rendered images and rendering time of the ambient light occlusion effect based on the hybrid pipeline in the UE of the present invention.
[0061] Figure 6 It is a schematic diagram comparing image differences and rendering time when rendering consecutive frames of ambient light occlusion effect based on a hybrid pipeline in the UE of the present invention. DETAILED DESCRIPTION
[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention. Please refer to Figure 1 The figure shows a specific implementation of a real-time rendering automatic parameter optimization method based on XGBoost, which includes the following steps:
[0063] S1. Based on XGBoost, a rendering time prediction model and a rendering quality prediction model are constructed for the target engine with rendering parameters, rendering view information and hardware information as inputs;
[0064] S2. Collect rendering parameters, rendering view information, hardware information, rendering time, and rendering quality in the target rendering engine to construct a data set, and use the data set to train a rendering time prediction model and a rendering quality prediction model;
[0065] S3. Collect real-time rendering view information and hardware information in the target rendering engine, use the rendering time prediction model to predict the rendering time corresponding to each rendering parameter, and use the rendering quality prediction model to predict the rendering quality corresponding to each rendering parameter, so as to obtain the rendering time and rendering quality corresponding to each rendering parameter; S4. Take the given rendering time limit as the constraint condition, filter out the rendering parameters corresponding to the optimal rendering quality under the constraint condition, and use the filtered rendering parameters to render in the target rendering engine.
[0066] In this embodiment, Figure 2 As shown, the specific steps of step S1 are as follows:
[0067] S11. quantify the rendering view information using the model projection area, and characterize the hardware information using the operating frequencies of the computer's CPU and GPU;
[0068] It should be noted that for the view information v, scene complexity and different rendering technologies will cause the computational complexity to change. In order to eliminate the dependence on a specific scene, the present disclosure uses the model projection area Projcur to quantify the view information v; the CPU and GPU operating frequencies of the current computer are used to represent the hardware information h;
[0069] S12. taking the structural similarity SSIM between the rendering result and the optimal rendering image as a quantitative result of the rendering quality;
[0070] S13. Based on XGBoost as the target engine, a rendering time prediction model is constructed with rendering parameters, model projection area, and the operating frequency of the CPU and GPU of the current computer as inputs and rendering time as output;
[0071] S14. Based on XGBoost as the target engine, a rendering quality prediction model is constructed with rendering parameters, model projection area, and the operating frequencies of the CPU and GPU of the current computer as inputs, and with the structural similarity SSIM between the rendering result and the optimal rendering image as output;
[0072] The specific steps of step S2 are as follows:
[0073] S21. construct a data set by combining the rendering parameters of the target rendering engine, the model projection area, the CPU and GPU operating frequencies of the computer, the rendering time, and the structural similarity SSIM between the rendering result and the optimal rendering image;
[0074] It should be noted that, for a certain rendering effect that needs to be dynamically adjusted, this application renders its different rendering parameter configurations and records its rendering time and image quality;
[0075] S22. Divide the data set into a training set and a validation set according to a set ratio; for example, the ratio of the training set to the validation set is 7:3;
[0076] S23. Set the number of estimators and the depth range in the XGBoost parameters as the rendering time prediction model and the rendering quality model; for example, the number of estimators as the rendering time prediction model and the rendering quality prediction model of the XGBoost model is 100, and the depth value range is 1 to 30;
[0077] S24. Using the training set to train the rendering time prediction model according to the number of estimators and the depth range, and using the validation set to verify;
[0078] S25. Using the training set to train the rendering quality prediction model according to the number of estimators and the depth range, and using the validation set to verify;
[0079] The specific steps of step S3 are as follows:
[0080] S31. Obtain the latest set of data corresponding to the frame in the training set, recorded as the first frame;
[0081] S32. Obtain the current frame to be rendered in the target rendering engine, and determine whether the distance between the current frame and the first frame exceeds a set length;
[0082] If yes, return to step S2;
[0083] If not, proceed to step S33;
[0084] S33. Obtaining real-time rendering view information and hardware information in the target rendering engine;
[0085] S34. Input the real-time rendering view information, hardware information and various rendering parameter combinations of the target rendering engine into the rendering time prediction model to obtain a predicted rendering time series;
[0086] S35. Inputting the real-time rendering view information, hardware information and various rendering parameter combinations of the target rendering engine into the rendering quality prediction model to obtain a predicted rendering quality sequence;
[0087] S36. Integrate the rendering time sequence and the rendering quality sequence to obtain the rendering time-quality sequence corresponding to each rendering parameter combination, and select the rendering configuration with the highest rendering quality according to the rendering time constraint to render the current frame;
[0088] The rendering quality prediction model and the time prediction model are used to select the optimal rendering parameter setting p*; since all the combinations of rendering parameters have been obtained in the dataset collection stage, it is only necessary to obtain the CPU operating frequency cf of the current frame in real time cur and GPU operating frequency gf cur And the model projection area Proj cur , and then input it into the rendering quality prediction model and rendering time prediction model to predict the image quality and rendering time of all rendering parameter combinations of the current frame;
[0089] The specific steps of step S4 are as follows:
[0090] S41. Obtaining a rendering time limit condition as a constraint condition;
[0091] S42. Filtering out rendering configuration elements that meet the rendering time constraint from the rendering time-quality sequence;
[0092] S43. Filter out the rendering configuration element with the best rendering quality from the filtered rendering configuration elements, and use the rendering parameter combination of the filtered rendering configuration element as the optimal rendering parameter;
[0093] S44. In the target rendering engine, the current frame is rendered using the optimal rendering parameters, and it is determined whether there is a next frame to be rendered;
[0094] If yes, take the next frame to be rendered as the current frame and return to step S31;
[0095] If not, it is determined that rendering is finished;
[0096] It should be noted that, in order to reduce the extra time overhead caused by parameter selection, step S3 and step S4 can be periodically repeated every 120 frames until the rendering is completed, that is, when the distance between the first frame and the current frame is 120 frames, the rendering time prediction model and the rendering quality model need to be retrained to ensure that the model adapts to the latest rendering scene conditions;
[0097] In some embodiments, the rendering time restriction condition in step S41 is to take a set ratio according to the rendering time;
[0098] It should be noted that these rendering configurations are sorted according to the rendering time, and the rendering configurations that are less than the time constraint T are found. limited For all rendering parameter combinations, the constraint condition set in this embodiment is to select the first 20% of the shortest rendering time among all rendering parameter combinations, and then select the rendering parameter setting p* with the best quality from these rendering configurations for current frame rendering.
[0099] It should be understood that the order of execution of the steps in the above embodiment does not mean that the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0100] The following takes the subsurface scattering rendering effect in the UE game engine as an example to verify the effect of the present invention;
[0101] In the training stage, the key rendering parameters of UE subsurface scattering are selected, including scattering radius, sampling number, resolution mode, and channel quality. The specific rendering setting parameters are shown in Table 1.
[0102] Table 1
[0103] Rendering parameters Parameter Value Best quality value Scattering radius (cm) 0,0.1,...,1.9,2 1 Number of samples 13,19,27 27 Resolution Mode half,full Full Channel Quality low,high High
[0104] The highest setting recommended by UE is used as the optimal parameter value for quality. Considering that UE's subsurface scattering is implemented based on the screen space projection area, this implementation divides the projection area into three levels, uses Lee Perry-Smith's scanning head model to build a virtual scene, and selects random viewing angles of 100%, 50%, and 30% for each projection area to place the camera; considering that the real-time rendering part of the subsurface scattering algorithm is performed in the GPU, only the GPU clock frequency is selected as the quantitative indicator of hardware information here; through the above scene-independent inputs, a virtual training scene containing subsurface scattering is constructed, and 228 rendering parameter combinations, 3 model projection area Proj cur More than 20,000 sets of data are sampled from 3 random viewing angles and 32 GPU clock frequencies as input, and the rendering time of subsurface scattering and the SSIM of the rendering results and the rendering results with the optimal quality parameter value are obtained as output to construct a dataset;
[0105] According to the training data set, the time prediction model and quality prediction model based on XGBoost are trained respectively;
[0106] In the adaptive real-time rendering stage, the rendering parameters in Table 1 are also used to create an asynchronous thread to periodically obtain the GPU clock frequency and model projection area Proj every 120 frames. cur The model is passed in for prediction, the optimal rendering parameter p* is found through the automatic optimal rendering parameter algorithm, and the subsurface scattering rendering parameter settings are changed by accessing the console command to complete the optimization process of the current frame;
[0107] In order to verify the effect of this implementation, Figure 3 The quality and time comparison of the present disclosure with the best quality configuration and method B are shown in Figure 4 The rendering time and quality comparison of the three methods when rendering consecutive frames is shown; it can be seen that in terms of rendering time, the rendering time of this implementation is significantly less than the optimal setting in all camera sequence frames. On average, this implementation reduces the rendering time by 32.55% compared with the optimal setting, and reduces the rendering time by an average of 29.22% in the Stanford Dragon scene compared with the optimal setting; in terms of image quality, the rendering results of this implementation have only slight differences from the results of the highest quality reference value except for image noise, while the results of method B have more obvious errors in local details.
[0108] Next, the effect of the present invention is verified by taking the ambient light occlusion effect based on the hybrid pipeline in the UE game engine as an example.
[0109] During the training phase, under the condition of turning on ray tracing, five parameters in the post-processing volume that have a greater impact on ambient occlusion are selected as variables in the data collection phase and inputs of the prediction model, as shown in Table 2;
[0110] Table 2
[0111] Rendering parameters Parameter Value Best quality value SSAO Strength 0.6,0.8,1.0 1.0 SSAO bias 0,5,10 0 SSAO Quality 60,80,100 100 RTAO intensity 0.6,0.8,1.0 1.0 RTAO per-pixel sampling 1,2,4 4
[0112] In the ArchVizInterior scene, a fixed lens with a resolution of 1920*1080 was set, and rendering parameter combinations were randomly generated within the parameter range to render a single frame of an image. The rendering quality SSIM, rendering time, and GPU frequency of each set of rendering parameters were recorded, and a total of 4096 sets of data were collected.
[0113] According to the training data set, the time prediction model and quality prediction model based on XGBoost are trained respectively.
[0114] In the adaptive real-time rendering stage, the rendering parameters in Table 2 are also used to create an asynchronous thread to periodically obtain the GPU clock frequency and model projection area Proj every 120 frames. cur The model is passed in for prediction, the optimal rendering parameter p* is found through the automatic optimal rendering parameter algorithm, and the subsurface scattering rendering parameter settings are changed by accessing the console command to complete the current frame optimization process;
[0115] In order to verify the implementation effect, Figure 5 The quality and time comparison of the present disclosure with the best quality configuration and method B are shown in Figure 6 The rendering time and quality comparison of the three methods when rendering consecutive frames is shown; it can be seen that in terms of rendering time, the present implementation reduces the rendering time by 72.23% in the ArchVizInterior scene roaming lens compared with the optimal setting, and reduces the rendering time by 73.20% and 76.15% in the two ArchVizInterior scene fixed lenses compared with the optimal setting; in terms of image quality, the rendering results of the present implementation have only slight differences from the results of the highest quality reference value except for image noise, while the results of method B have more obvious errors in local details.
[0116] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.
Claims
1. A real-time rendering automatic parameter optimization method based on XGBoost, characterized in that: The steps include: S1. Based on XGBoost, a rendering time prediction model and a rendering quality prediction model are constructed for the target engine with rendering parameters, rendering view information and hardware information as inputs; S2. Collect rendering parameters, rendering view information, hardware information, rendering time, and rendering quality in the target rendering engine to construct a data set, and use the data set to train a rendering time prediction model and a rendering quality prediction model; S3. Collect real-time rendering view information and hardware information in the target rendering engine, use the rendering time prediction model to predict the rendering time corresponding to each rendering parameter, and use the rendering quality prediction model to predict the rendering quality corresponding to each rendering parameter, and obtain the rendering time and rendering quality corresponding to each rendering parameter; S4. Taking a given rendering time limit as a constraint condition, filter out rendering parameters corresponding to the optimal rendering quality under the constraint condition, and use the filtered rendering parameters to perform rendering in a target rendering engine.
2. The XGBoost-based real-time rendering automatic parameter optimization method according to claim 1, characterized in that: The specific steps of step S1 are as follows: S11. quantify the rendering view information using the model projection area, and characterize the hardware information using the operating frequencies of the computer's CPU and GPU; S12. taking the structural similarity SSIM between the rendering result and the optimal rendering image as a quantitative result of the rendering quality; S13. Based on XGBoost as the target engine, a rendering time prediction model is constructed with rendering parameters, model projection area, and the operating frequency of the CPU and GPU of the current computer as inputs and rendering time as output; S14. Based on XGBoost as the target engine, a rendering quality prediction model is constructed with rendering parameters, model projection area, and the operating frequencies of the CPU and GPU of the current computer as inputs, and the structural similarity SSIM between the rendering result and the optimal rendering image as output.
3. The XGBoost-based real-time rendering automatic parameter optimization method according to claim 2, characterized in that: The specific steps of step S2 are as follows: S21. construct a data set by combining the rendering parameters of the target rendering engine, the model projection area, the CPU and GPU operating frequencies of the computer, the rendering time, and the structural similarity SSIM between the rendering result and the optimal rendering image; S22. Divide the data set into a training set and a validation set according to a set ratio; S23. Setting the number of estimators and the depth range in the XGBoost parameters as the rendering time prediction model and the rendering quality model; S24. Using the training set to train the rendering time prediction model according to the number of estimators and the depth range, and using the validation set to verify; S25. Use the training set to train the rendering quality prediction model according to the number of estimators and the depth range, and use the validation set for verification.
4. The XGBoost-based real-time rendering automatic parameter optimization method according to claim 3, characterized in that: The specific steps of step S3 are as follows: S31. Obtain the latest set of data corresponding to the frame in the training set, recorded as the first frame; S32. Obtain the current frame to be rendered in the target rendering engine, and determine whether the distance between the current frame and the first frame exceeds a set length; If yes, return to step S2; If not, proceed to step S33; S33. Obtaining real-time rendering view information and hardware information in the target rendering engine; S34. Input the real-time rendering view information, hardware information and various rendering parameter combinations of the target rendering engine into the rendering time prediction model to obtain a predicted rendering time series; S35. Inputting the real-time rendering view information, hardware information and various rendering parameter combinations of the target rendering engine into the rendering quality prediction model to obtain a predicted rendering quality sequence; S36. Integrate the rendering time sequence and the rendering quality sequence to obtain the rendering time-quality sequence corresponding to each rendering parameter combination, and select the rendering configuration with the highest rendering quality according to the rendering time constraint to render the current frame.
5. The XGBoost-based real-time rendering automatic parameter optimization method according to claim 4, characterized in that: The specific steps of step S4 are as follows: S41. Obtaining a rendering time limit condition as a constraint condition; S42. Filtering out rendering configuration elements that meet the rendering time constraint from the rendering time-quality sequence; S43. Filter out the rendering configuration element with the best rendering quality from the filtered rendering configuration elements, and use the rendering parameter combination of the filtered rendering configuration element as the optimal rendering parameter; S44. In the target rendering engine, the current frame is rendered using the optimal rendering parameters, and it is determined whether there is a next frame to be rendered; If yes, take the next frame to be rendered as the current frame and return to step S31; If not, it is determined that rendering is finished.
6. The XGBoost-based real-time rendering automatic parameter optimization method according to claim 5, characterized in that: In step S41, the rendering time restriction condition is to take a set ratio according to the rendering time.
7. The XGBoost-based real-time rendering automatic parameter optimization method according to claim 5, characterized in that: When the application scenario of the target rendering engine is subsurface scattering rendering in a UE game engine, the rendering parameters in step S13 and step S14 are a combination of scattering radius, number of samples, resolution, and channel quality; the model projection area is obtained in the following manner: Using Lee Perry-Smith's scanned head model, we built a virtual scene. Select N typical setting ratios; Randomly select N viewing angles with N set proportions of the projection area to the original model as the target; Place cameras at the selected N viewing angles; The optimal rendered image in step S14 is the rendered image quality corresponding to the highest setting recommended by the UE; The rendering time of the subsurface parameters and the structural similarity SSIM between the rendering result and the optimal rendering image are calculated as the output of the rendering quality prediction model.
8. The XGBoost-based real-time rendering automatic parameter optimization method according to claim 7, characterized in that: When the application scenario of the target rendering engine is subsurface scattering rendering in a UE game engine, in step S32, when the distance between the current frame and the first frame exceeds the set length, the asynchronous thread returns to step S2 to re-collect rendering view information and hardware information to train the rendering time prediction model and the rendering quality prediction model; In step S44, the subsurface scattering rendering parameters are changed to optimal rendering parameters by accessing the console command.
9. The XGBoost-based real-time rendering automatic parameter optimization method according to claim 5, characterized in that: When the application scenario of the target rendering engine is hybrid pipeline-based ambient occlusion in a UE game engine, the rendering parameters in step S13 and step S14 are SSAO intensity, SSAO bias, SSAO quality, RTAO intensity, and RTAO pixel-by-pixel sampling.
10. The XGBoost-based real-time rendering automatic parameter optimization method according to claim 6, characterized in that: In step S22, the data set is divided into a training set and a validation set in a ratio of 7:3; In step S32, the length is set to 120 frames; In step S41, the ratio is set to 20%.
Citation Information
Cited By
Three-dimensional model rendering duration prediction method and system
CN119206015A
Game scene optimization method and system based on dynamic rendering
CN120586387A
Component rendering method, electronic equipment and storage medium
CN120723239A
Component rendering method, electronic device, and storage medium
CN120723239B
Video processing method, video processor, storage medium and program product
CN121194031A
