Model rendering method and device, computer equipment and computer readable storage medium

By using lighting model identification and geometric buffers in image rendering for lighting calculations, the problems of large amount of forward pipeline calculations and memory usage are solved, and the rendering speed and compatibility are improved.

CN119991920APending Publication Date: 2025-05-13NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411956823.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The forward pipeline has a large amount of calculation in image rendering, slow rendering speed, and data occupies a lot of memory, making it difficult to compatible with devices with different memory capacity.

Method used

By obtaining the scene model of the scene to be rendered, the lighting model identification of each pixel point is determined, and the target attribute data required for lighting calculation is written into the geometric buffer, and lighting calculation is performed based on the lighting model and buffer data to reduce the operation of vertex and fragment shading.

Benefits of technology

It improves rendering speed, reduces memory usage, is compatible with devices with different memory capacity, and achieves rendering effects close to the host platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991920A_ABST
    Figure CN119991920A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a model rendering method and device, computer equipment and a computer readable storage medium, and the method comprises the steps: obtaining at least one scene model of a to-be-rendered scene; according to the model data of the scene model, an illumination model identifier corresponding to each pixel point of the scene model is determined, and the illumination model identifier indicates an illumination model influencing the illumination effect of the pixel point; according to the illumination model identifier of the pixel point, writing a plurality of target attribute data required by illumination calculation in the attribute data corresponding to the pixel point into a geometric buffer area; performing illumination calculation based on illumination models indicated by illumination identifiers corresponding to the pixel points and the target attribute data in the geometric buffer area to obtain illumination data corresponding to the pixel points influenced by each illumination model; and rendering a scene model in the to-be-rendered scene based on the illumination data to obtain a rendering result. The rendering speed can be improved, and meanwhile, the occupation of attribute data on a memory is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image rendering technology, and in particular to a model rendering method, device, computer equipment and computer-readable storage medium. Background Art

[0002] In image rendering, the forward pipeline is a commonly used graphics rendering technology. For each light source, it will perform vertex shading, fragment shading and other operations on each pixel in sequence, and then output the results directly to the screen. Therefore, the forward pipeline has a large amount of calculation and a slow rendering speed. Summary of the invention

[0003] The embodiments of the present application provide a model rendering method, apparatus, computer device and computer-readable storage medium, which can improve the rendering speed and reduce the memory occupied by data, thereby being compatible with devices with different memory capacities.

[0004] A model rendering method provided in an embodiment of the present application includes:

[0005] Obtaining a scene model of a scene to be rendered, wherein there is at least one scene model;

[0006] Determine, according to the model data of the scene model, an illumination model identifier corresponding to each pixel point of the scene model, wherein the illumination model identifier indicates an illumination model that affects an illumination effect of the pixel point;

[0007] Writing a plurality of target attribute data required for illumination calculation in the attribute data corresponding to the pixel point into a geometry buffer according to the illumination model identifier of the pixel point;

[0008] Performing illumination calculation based on the illumination model indicated by the illumination identifier corresponding to the pixel point and the target attribute data in the geometric buffer, to obtain illumination data corresponding to each pixel point affected by the illumination model;

[0009] The scene model in the scene to be rendered is rendered based on the illumination data to obtain a rendering result.

[0010] Accordingly, an embodiment of the present application also provides a model rendering device, including:

[0011] An acquisition unit, used to acquire a scene model of a scene to be rendered, wherein the scene model has at least one; an identification determination unit, used to determine, based on model data of the scene model, an illumination model identification corresponding to each pixel point of the scene model, wherein the illumination model identification indicates an illumination model that affects an illumination effect of the pixel point;

[0012] A writing unit, configured to write a plurality of target attribute data required for illumination calculation in the attribute data corresponding to the pixel into a geometric buffer according to an illumination model identifier of the pixel;

[0013] A calculation unit, configured to perform illumination calculation based on an illumination model indicated by an illumination identifier corresponding to the pixel point and target attribute data in the geometric buffer, to obtain illumination data corresponding to each pixel point affected by the illumination model;

[0014] A rendering unit is used to render the scene model in the scene to be rendered based on the illumination data to obtain a rendering result.

[0015] Correspondingly, an embodiment of the present application also provides a computer device, including a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute any model rendering method provided in the embodiment of the present application.

[0016] Correspondingly, an embodiment of the present application also provides a computer-readable storage medium, which is used to store a computer program, and the computer program is loaded by a processor to execute any model rendering method provided in the embodiment of the present application.

[0017] The embodiment of the present application obtains a scene model of a scene to be rendered, where there is at least one scene model; determines an illumination model identifier corresponding to each pixel of the scene model based on model data of the scene model, where the illumination model identifier indicates an illumination model that affects the illumination effect of the pixel; writes multiple target attribute data required for illumination calculation in the attribute data corresponding to the pixel into a geometric buffer based on the illumination model identifier of the pixel; performs illumination calculation based on the illumination model indicated by the illumination identifier corresponding to the pixel and the target attribute data in the geometric buffer to obtain illumination data corresponding to each pixel affected by the illumination model; renders the scene model in the scene to be rendered based on the illumination data to obtain a rendering result of the scene model.

[0018] The embodiments of the present application can perform lighting calculations based on the attribute data in the geometry buffer. There is no need to perform vertex shading, fragment shading and other operations on the scene model every time lighting calculations are performed, which can improve the rendering speed of the scene model. The target attribute data required for lighting calculations for each pixel point can be written into the geometry buffer, and the attribute data not required for the lighting calculations will not be written into the geometry buffer. This achieves the goal of improving the rendering speed while reducing the memory occupied by the attribute data, thereby being compatible with devices with different memory capacities. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 is a flow chart of a model rendering method provided in an embodiment of the present application;

[0021] FIG2(1) is a schematic diagram of data distribution of a geometric buffer provided in an embodiment of the present application;

[0022] FIG2(2) is a schematic diagram of data distribution of a geometric buffer provided in an embodiment of the present application;

[0023] FIG2(3) is a schematic diagram of data distribution of a geometric buffer provided in an embodiment of the present application;

[0024] FIG2(4) is a schematic diagram of data distribution of a geometric buffer provided in an embodiment of the present application;

[0025] FIG2(5) is a schematic diagram of data distribution of a geometric buffer provided in an embodiment of the present application;

[0026] FIG2(6) is a schematic diagram of data distribution of a geometric buffer provided in an embodiment of the present application;

[0027] FIG2(7) is a schematic diagram of data distribution of a geometric buffer provided in an embodiment of the present application;

[0028] FIG2(8) is a schematic diagram of data distribution of a geometric buffer provided in an embodiment of the present application;

[0029] FIG2(9) is a schematic diagram of data distribution of a geometric buffer provided in an embodiment of the present application;

[0030] Figure 3 is a schematic diagram of a rendering pipeline provided in an embodiment of the present application;

[0031] Figure 4 is a schematic diagram of a model rendering device provided in an embodiment of the present application;

[0032] Figure 5 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0034] The embodiment of the present application provides a model rendering method, device, computer equipment and computer readable storage medium. The model rendering device can be integrated in a computer equipment, which can be a server or a terminal.

[0035] The terminal may include a mobile phone, a wearable smart device, a tablet computer, a laptop computer, a personal computer (PC), and a vehicle-mounted computer.

[0036] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.

[0037] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0038] This embodiment will be described from the perspective of a model rendering device, which may be integrated into a computer device, which may be a server or a terminal.

[0039] The present application provides a model rendering method, such as Figure 1 As shown, the specific process of the model rendering method can be as follows:

[0040] 101. Obtain a scene model of a scene to be rendered, where there is at least one scene model.

[0041] Among them, there is at least one scene model in the scene to be rendered, and the scene model can be a three-dimensional model. An image can be rendered based on the scene model. The scene to be rendered can also include a virtual camera, a light source, and a rendering state of each scene model, etc. The rendering state can include the texture, material, shader, etc. used by the scene model.

[0042] 102. Determine, according to the model data of the scene model, an illumination model identifier corresponding to each pixel point of the scene model, wherein the illumination model identifier indicates an illumination model that affects an illumination effect of the pixel point.

[0043] Among them, the model data may include vertex data of the scene model, and the vertex data may include geometric information and material information of the scene model. The geometric information may include the position, normal, texture coordinates, etc. of the model vertex, and the material information includes highlight, roughness, metallicity, thickness and other information. The model data may also include a lighting model identifier, and the lighting model identifier indicates which lighting model affects the lighting effect of the pixel. The lighting model (Shading Model) can be used to simulate the way light interacts with the surface of an object (including reflection, absorption, refraction, etc.). These models provide a method for the rendering algorithm to calculate the surface color of an object. Common lighting models include the Lambert model, the Phong model, the Blinn-Phong model, the Cook-Torrance model, etc. The lighting model can also be selected as needed, and the lighting model can be customized as needed.

[0044] According to the model data of the scene model, the illumination model identifier corresponding to each pixel of the scene model can be determined. Each pixel of the scene model may refer to a pixel displayed on the part of the scene model to be rendered on the screen.

[0045] In one embodiment, determining the illumination model identifier corresponding to each pixel of the scene model may be performed by performing a visibility test on the scene model to determine visible fragments of the scene model, and determining the illumination model identifier of each pixel corresponding to the scene model according to the visible fragments, that is, the step of “determining the illumination model identifier corresponding to each pixel of the scene model according to the model data of the scene model” may include:

[0046] Performing a visibility test on the scene model to determine the visible part of the scene model under the virtual camera of the scene to be rendered;

[0047] The illumination model identifier corresponding to each pixel point of the scene model is determined according to the model data corresponding to the visible part of the scene model.

[0048] The visibility test of the scene model may include a depth test and a template test. If the fragment passes the depth test and the template test, it means that the fragment is visible, otherwise the fragment is invisible. According to the model data corresponding to the visible part of the scene model, the lighting model identifier corresponding to each pixel of the scene model can be determined.

[0049] Optionally, the illumination model identifier corresponding to the pixel point can also be determined according to the material corresponding to the pixel point. For example, the correspondence between the material and the illumination model identifier can be set originally, and then the illumination model identifier can be determined according to the material corresponding to the pixel point. The correspondence between the material and the illumination model identifier can be set during the model making process. For example, when making the model, the hair material is labeled with illumination model 1 and the skin material is labeled with illumination model 2.

[0050] 103. According to the illumination model identifier of the pixel point, a plurality of target attribute data required for illumination calculation in the attribute data corresponding to the pixel point is written into the geometry buffer.

[0051] The data required for lighting calculation based on different lighting models are different. For example, for lighting model A, the required target attribute data may include thickness and specularity. For lighting model B, the required target attribute data may include cloth degree, cloth fluff color, etc.

[0052] Therefore, according to the lighting model identifier corresponding to the pixel point, the target attribute data required for lighting calculation in the attribute data corresponding to the pixel point can be written into the geometry buffer (Geometry Buffer, G-Buffer). The geometry buffer only stores the target attribute data required for lighting calculation, and other attribute data are not stored in the geometry buffer. This can reduce memory occupancy and reduce restrictions on devices running the model rendering method provided in the embodiment of the present application. Even devices with less memory capacity can run the model rendering method provided in the embodiment of the present application without adopting the forward rendering method, thereby improving rendering efficiency. For games using the model rendering method provided in the embodiment of the present application, they can be run on host platforms with larger memory, as well as on mobile phone platforms with relatively smaller memory, and can achieve rendering effects close to those of the host platform.

[0053] In one embodiment, there are multiple geometry buffers, for example, the geometry buffers include G-Buffer0, G-Buffer1, G-Buffer2, etc., each geometry buffer has multiple channels, for example, four RGBA channels, and the step of "writing multiple target attribute data required for illumination calculation in the attribute data corresponding to the pixel into the geometry buffer according to the illumination model identifier of the pixel point" may include:

[0054] For each pixel, according to the illumination model identifier of the pixel, the target attribute data required for illumination calculation is determined from the attribute data of the pixel;

[0055] Write multiple target attribute data and illumination model identifiers corresponding to the pixel points into the channels of the geometry buffer respectively.

[0056] Since different target attribute data are required for illumination calculation based on different illumination models, the illumination model identifier corresponding to each pixel can be used to determine the target attribute data required for illumination calculation of the pixel in the attribute data corresponding to the pixel. Multiple target attribute data and illumination models corresponding to a pixel are written into the channels of the geometry buffer respectively.

[0057] For the same pixel, the types of target attribute data written in different geometry buffers can be different, for example, the color of the pixel is written in G-Buffer0, and the normal of the pixel is written in G-Buffer1. The types of target attribute data written in different channels of the same geometry buffer can be different, for example, the RGB color value of the pixel is written in the RGB channel of G-Buffer0, and the metallicness of the pixel is written in the A channel of G-Buffer0. For another example, the world normal of the pixel is written in the RG channel of G-Buffer1, the roughness of the pixel is written in the B channel of G-Buffer0, and the information of whether the scene model corresponding to the pixel is the protagonist is written in the A channel of G-Buffer0, etc.

[0058] For pixel points with different model identifiers, the target attribute data required for lighting calculations may be the same or different. If the target attribute data required for lighting calculations are different, then in the channels of the geometric buffer storing the corresponding target attribute data, the types of target attribute data stored in at least one channel are different. For example, for the pixel point with the lighting model identifier A, the metalness is written in the A channel of G-Buffer0, and for the pixel point with the lighting model identifier B, the iris mask is written in the A channel of G-Buffer0. That is, in one embodiment, for pixel points with different lighting model identifiers, the types of target attribute data stored in the same channel of at least one geometric buffer are different.

[0059] In one embodiment, the illumination model identifier corresponding to each pixel point may be stored in the same channel of the same geometry buffer.

[0060] For example, Figure 2(1)-Figure 2(9) The data distribution of pixels in the G-Buffer corresponding to the general lighting model, subsurface lighting model (Subsurface), preintegrated skin lighting model (PreintegratedSkin), two-sided foliage lighting model (TwoSidedFoliage), hair lighting model, cloth lighting model, eye lighting model, anisotropic lighting model (Anisotropy), and clearcoat lighting model is shown.

[0061] Depend on Figure 2(1)-Figure 2(9)The target attribute data required for lighting calculation based on different lighting models are not exactly the same, and in the same channel of the same geometry buffer, for pixels with different lighting model identifiers, the types of target attribute data written are different, and the lighting model identifier of the pixel is stored in the same channel of the same geometry buffer, the A channel of G-Buffer2.

[0062] Depend on Figure 2(1)-Figure 2(9) It can be seen that compared with the general lighting model, the subsurface lighting model writes the thickness in the R channel of Gubffer2, and writes the subsurface color SubsurfaceColor in the RGB channel of GBuffer3. The subsurface lighting model is used to express the effects of jade, gems, and monster skin.

[0063] The pre-integrated skin lighting model writes the race switch in the R channel of Gubffer2, writes the specular world normal SpecularWorldNormal in the RG channel of GBuffer3, and the curvature map Curvature in the B channel. The pre-integrated skin lighting model is used to express the effect of the character's skin.

[0064] The double-sided leaf lighting model writes the baked shadow BackedShadow needed for the rendered scene in the R channel of Gubffer2, and passes the subsurface color SubsurfaceColor in the RGB channel of GBuffer3 to show the effects of leaves and grass.

[0065] The hair lighting model writes the scattering Scatter in the A channel of Gubffer0, writes the environmental reflection in the R channel of Gubffer2, writes the world tangent WorldTangent in the RG channel of GBuffer3, and writes the backlight BackLit in the B channel. The hair lighting model is used to express the hair effect.

[0066] The cloth lighting model writes the cloth degree Cloth in the R channel of Gubffer2, and writes the cloth fuzz color FuzzColor in the RGB channel of GBuffer3. The cloth lighting model can be used to express wool cloth and fabric cloth effects.

[0067] The eye lighting model writes the iris mask IrisMask in the A channel of Gubffer0, writes the iris world normal IrisWorldNormal in the RG channel of GBuffer1, passes the sclera highlight StoredSpecular in the R channel of Gubffer2, writes the iris highlight Specular in the G channel, writes the sclera world normal ScleraWorldNormal in the RG channel of GBuffer3, and passes the distance IrisDistance from iris to sclera in the B channel. The eye lighting model is used to express the eyeball effect.

[0068] The anisotropic lighting model passes the world tangent WorldTangent in the RG channel of GBuffer2, the specular in the R channel of GBuffer3, the anisotropy in the B channel, and the anisotropy cross highlight AnisotropyCross in the B channel. The anisotropic lighting model can be used to express the silk and metal brushed effects of the model.

[0069] The varnish lighting model passes the bottom world normal BottomWorldNormal in the RG channel of GBuffer1, the bottom world tangent WorldTangent in the RG channel of GBuffer2, the anisotropy Anisotropy in the B channel, the varnish world normal ClearCoatWorldNormal in the RG channel of GBuffer3, the varnish roughness ClearCoaRoughness in the B channel, and the varnish ClearCoat in the A channel. The varnish lighting model can be used to express the model with double-layer highlight paint, car paint, and varnish effects.

[0070] Each Gbuffer can be equivalent to a texture. The precision of different channels of different textures can be the same or different. The target attribute data that meets the precision can be written according to the preset texture precision. For example, if a texture precision is R8G8B8A8, it means that the precision of each channel under the texture is 8 bits.

[0071] 104. Perform illumination calculation based on the illumination model indicated by the illumination identifier corresponding to the pixel point and the target attribute data in the geometric buffer to obtain illumination data corresponding to the pixel point affected by each illumination model.

[0072] For example, for each lighting model, lighting calculations can be performed based on the lighting model and the target attribute data of the pixel points to obtain the lighting data corresponding to the pixel points. Specifically, the lighting model can be split, and drawing can be performed for each lighting model at a time. The rendering results corresponding to all the lighting models can be combined to obtain the rendering results.

[0073] Optionally, one or more light sources may be configured in the scene to be rendered. For the light sources configured in the scene to be rendered, illumination calculation may be performed based on the light source data, the illumination model, and the target attribute data stored in the geometric buffer to obtain illumination data corresponding to each pixel under the light source. That is, in one embodiment, the step of "performing illumination calculation based on the illumination model indicated by the illumination identifier corresponding to the pixel and the target attribute data in the geometric buffer to obtain illumination data corresponding to each pixel affected by the illumination model" includes:

[0074] For the light source configured for the scene to be rendered, illumination calculation is performed on the pixels matched by the illumination model identifier according to each illumination model, light source and target attribute data, and illumination data corresponding to the pixels affected by each illumination model under the light source is obtained.

[0075] For the light source L1 configured for the scene to be rendered, each illumination model can be drawn one by one. Specifically, illumination calculation can be performed based on each illumination model, the light source data of the light source L1, and the target attribute data stored in the geometric buffer to obtain the illumination data of the pixel points affected by each illumination model under the illumination of the light source L1. The pixel points affected by each illumination model are the pixel points of the general illumination model indicated by the corresponding illumination model identifier.

[0076] If the scene to be rendered is configured with multiple light sources, the same processing as that of the light source L1 can be performed for each light source to obtain illumination data calculated for each pixel based on the corresponding illumination model under each light source.

[0077] 105. Render the scene model in the scene to be rendered based on the illumination data to obtain a rendering result.

[0078] The scene model in the scene to be rendered is rendered according to the illumination data corresponding to each illumination model to obtain a rendering result.

[0079] If multiple light sources are configured in the scene to be rendered, the multiple light sources can perform illumination calculations separately. After the illumination calculations based on the light sources are completed, the illumination data corresponding to the light sources can be stored in the accumulation buffer so as to subsequently accumulate the illumination effects of the multiple light sources. That is, in one embodiment, there are multiple light sources, and the step of "rendering the scene model in the scene to be rendered based on the illumination data to obtain a rendering result" includes:

[0080] For each light source, the illumination data corresponding to the pixel points affected by each illumination model under the light source are fused to obtain the illumination calculation result of the scene model under each light source and write it into the accumulation buffer;

[0081] The illumination calculation results corresponding to the multiple light sources stored in the accumulation buffer are fused to obtain the multi-light source illumination result of the scene model;

[0082] The illumination results of multiple light sources are rendered together with the target attribute data stored in the geometry buffer to obtain a rendering result.

[0083] There are multiple light sources configured in the scene to be rendered. For the light source L1, the lighting data corresponding to the pixel points affected by each lighting model under the light source L1 can be fused to obtain the lighting calculation result of the scene model under the light source L1 and write it into the accumulation buffer. The lighting calculation of the light source L1 can include the lighting data of each pixel point of the scene model under the light source L1.

[0084] After the illumination calculation is performed for multiple light sources in the scene to be rendered, the illumination calculation results corresponding to the multiple light sources in the accumulation buffer may be fused to obtain the illumination result of multiple light sources.

[0085] Combine the multi-light source lighting results with the basic rendering information (such as color data, etc.) in the G-Buffer to generate the final rendering result of the scene model.

[0086] Due to the accumulation of lighting calculation results, multiple light sources in the scene to be rendered can achieve efficient lighting calculation in the same rendering channel.

[0087] For each light source, illumination calculation is performed, and multiple illumination calculation results may be obtained, and each illumination calculation result corresponds to a preset illumination effect, such as self-illumination effect, protagonist virtual light effect, environment reflection light effect, baked illumination effect, etc., which can be flexibly set according to the application scenario needs, and are not limited here. The illumination calculation results corresponding to multiple light sources and the same preset illumination effect are fused to obtain the contribution of multiple light sources to the same preset illumination effect, that is, in one embodiment, there are multiple illumination calculation results for each light source of the scene to be rendered, and each illumination calculation result corresponds to a preset illumination effect; the step of "fusion processing of the illumination calculation results corresponding to the multiple light sources stored in the accumulation buffer to obtain the illumination results of multiple light sources of the scene model" includes:

[0088] For each preset lighting effect, multiple lighting calculation results corresponding to the preset lighting effect stored in the accumulation buffer are subjected to effect fusion processing to obtain a fused calculation result;

[0089] The fused calculation results corresponding to each preset lighting effect are accumulated to obtain the multi-light source lighting result.

[0090] Specifically, for each light source, illumination calculation can be performed based on the illumination model marked by the illumination model identifier corresponding to each pixel point of the scene model, the target attribute data of the pixel point, and the light source data of the light source, to obtain the illumination calculation results corresponding to the scene model and each preset lighting effect under the light source, and store them in the accumulation buffer.

[0091] For each preset lighting effect, the cumulative buffer and the lighting calculation result corresponding to the preset lighting effect can be fused to obtain a fused calculation result. Each lighting calculation result corresponding to the same preset lighting effect in the cumulative buffer is obtained by lighting calculation based on one light source. The fused calculation result can characterize the performance of the preset lighting effect under the action of multiple light sources.

[0092] The fused calculation results corresponding to each preset lighting effect are accumulated to obtain the multi-light source lighting results of the scene model.

[0093] The conventional deferred rendering pipeline and the deferred rendering pipeline used in the model rendering method provided in the embodiment of the present application can be as follows: Figure 3 As shown, the traditional delay pipeline includes two stages. The DeferredBase Pass includes a GBuffer calculation stage. In this stage, no lighting calculation is performed, and only the attribute data of the scene model is stored in the GBuffer. In the Deferred Lighting stage, lighting calculation is performed based on the attribute data in the GBuffer. In the delay pipeline provided in the embodiment of the present application, the Deferred Base Pass includes two stages, the GBuffer generation stage and the lighting accumulation (Lighting Accumulation) stage. In the GBuffer stage, the target attribute data can be written into the GBuffer according to the lighting model identification of the scene model pixel point. In the lighting accumulation stage, the lighting calculation results corresponding to multiple light sources can be accumulated. In the Deferred Stencil Lighting stage, the lighting model is split, and a lighting model is drawn in each stage. The specific processing process of each stage can refer to the relevant content in the specification, which will not be repeated here.

[0094] The forward rendering pipeline is a commonly used graphics rendering technology. It performs vertex shading, fragment shading and other operations on each pixel in sequence, and then outputs the result directly to the screen. When processing each pixel, it considers the influence of all light sources that the pixel may be affected by. The lighting calculation consumes a lot of resources and leads to a large computational burden.

[0095] The model rendering method provided in the embodiment of the present application is implemented based on a delay pipeline. Specifically, in the first stage, the target attribute data required for lighting calculation of the scene model is first stored in the geometry buffer, and the lighting calculation is not performed in this stage. In the second stage, the lighting calculation is performed based on the target attribute data in the geometry buffer. There is no need to repeatedly perform vertex shading, fragment shading and other operations on each pixel based on each light source, which can reduce the computational burden of the lighting calculation.

[0096] Since the model rendering method provided in the embodiment of the present application needs to store the target attribute data required for illumination calculation in the geometry buffer, if a device with a small memory may not be able to support rendering in this way, for such a device, a forward pipeline can be used for rendering, and the rendering method can be determined based on the device information. That is, in one embodiment, before the step of "determining the illumination model identifier corresponding to each pixel of the scene model according to the model data of the scene model", the model rendering method provided in the embodiment of the present application may also include:

[0097] Get device identification information of the device;

[0098] If the device identification information indicates that the device supports deferred rendering, a step of determining a lighting model identification corresponding to each pixel of the scene model according to the model data of the scene model is performed.

[0099] Among them, the device is a device for rendering a scene model of a scene to be rendered, and the device identification information can indicate the type, model and other information of the device. The device identification information of the device can be compared with a pre-stored device identification information list to determine whether the device supports delayed rendering. The pre-stored device identification information list may include the device identification information of a device that supports delayed rendering, or include the device identification information of a device that does not support delayed rendering.

[0100] If the device supports deferred rendering, step 102 of "determining the illumination model identifier corresponding to each pixel of the scene model according to the model data of the scene model" is executed.

[0101] If the device does not support deferred rendering, steps 102 to 105 are not performed, and the scene model of the scene to be rendered is rendered based on the forward pipeline. That is, in one embodiment, before the step of "determining the illumination model identifier corresponding to each pixel of the scene model according to the model data of the scene model", the model rendering method provided in the embodiment of the present application may also include:

[0102] If the device identification information indicates that the device does not support deferred rendering, the step of determining the illumination model identification corresponding to each pixel of the scene model according to the model data of the scene model is not performed;

[0103] For each light source configured for the scene to be rendered, perform pixel-by-pixel illumination calculation on each scene model according to each illumination model and attribute data to obtain the forward illumination result of the scene model under the light source;

[0104] The forward illumination result of each scene model under each light source is used to render each scene model to obtain a rendering result.

[0105] If the device does not support deferred rendering, steps 102 to 105 are not executed, and pixel-by-pixel lighting calculations are performed on each scene model according to each lighting model and attribute data for each light source configured for the scene to be rendered to obtain the forward lighting result of the scene model under the light source.

[0106] The main feature of forward rendering is that it combines lighting calculation with geometry processing, and performs pixel-by-pixel lighting calculation for each scene model according to each lighting model and attribute data. Specifically, it can include depth testing for each scene model according to the attribute data to determine whether the fragments of the scene model are visible. If visible, then perform lighting calculation. For each light source, the above-mentioned depth test and lighting calculation stages need to be performed. If there are multiple light sources and multiple scene models, it will lead to a heavy computational burden.

[0107] As can be seen from the above, the embodiment of the present application obtains a scene model of a scene to be rendered, where there is at least one scene model; determines an illumination model identifier corresponding to each pixel of the scene model based on the model data of the scene model, where the illumination model identifier indicates an illumination model that affects the illumination effect of the pixel; writes multiple target attribute data required for illumination calculation in the attribute data corresponding to the pixel into a geometric buffer based on the illumination model identifier of the pixel; performs illumination calculation based on the illumination model indicated by the illumination identifier corresponding to the pixel and the target attribute data in the geometric buffer to obtain illumination data corresponding to each pixel affected by the illumination model; renders the scene model in the scene to be rendered based on the illumination data to obtain a rendering result of the scene model.

[0108] The embodiments of the present application can perform lighting calculations based on the attribute data in the geometry buffer. There is no need to perform vertex shading, fragment shading and other operations on the scene model every time lighting calculations are performed, which can improve the rendering speed of the scene model. The target attribute data required for lighting calculations for each pixel point can be written into the geometry buffer, and the attribute data not required for the lighting calculations will not be written into the geometry buffer. This achieves the goal of improving the rendering speed while reducing the memory occupied by the attribute data, thereby being compatible with devices with different memory capacities.

[0109] In order to better implement the model rendering method provided in the embodiment of the present application, a model rendering device is also provided in one embodiment. The meanings of the terms are the same as those in the above-mentioned model rendering method, and the specific implementation details can refer to the description in the method embodiment.

[0110] The model rendering device can be integrated into a computer device, such as Figure 4 As shown, the model rendering device may include: an acquisition unit 301, an identification determination unit 302, a writing unit 303, a calculation unit 304 and a rendering unit 305, which are specifically as follows:

[0111] (1) An acquisition unit 301 is used to acquire a scene model of a scene to be rendered, and there is at least one such scene model.

[0112] (2) An identification determination unit 302 is used to determine the illumination model identification corresponding to each pixel point of the scene model according to the model data of the scene model, wherein the illumination model identification indicates the illumination model that affects the illumination effect of the pixel point.

[0113] In one embodiment, the model rendering device provided in the embodiment of the present application may also include:

[0114] A device identification acquisition unit, used to acquire device identification information of a device;

[0115] The identification determination unit 302 may also be used to, when the device identification information indicates that the device supports deferred rendering, execute the step of determining the illumination model identification corresponding to each pixel point of the scene model based on the model data of the scene model.

[0116] In one embodiment, the model rendering device provided in the embodiment of the present application may also include:

[0117] A forward rendering unit is used to, when the device identification information indicates that the device does not support deferred rendering, perform pixel-by-pixel illumination calculation on each of the scene models configured for the scene to be rendered according to each illumination model and the attribute data to obtain a forward illumination result of the scene model under the light source;

[0118] The forward illumination result of each of the scene models under each of the light sources is used to render the scene models to obtain a rendering result.

[0119] In one embodiment, the identification determination unit 302 may also be used to:

[0120] Performing a visibility test on the scene model to determine a visible portion of the scene model under the virtual camera of the scene to be rendered;

[0121] The illumination model identifier corresponding to each pixel point of the scene model is determined according to the model data corresponding to the visible part of the scene model.

[0122] (3) A writing unit 303 is used to write a plurality of target attribute data required for illumination calculation in the attribute data corresponding to the pixel point into a geometry buffer according to the illumination model identifier of the pixel point.

[0123] In one embodiment, there are multiple geometric buffers, each of which includes multiple channels. The writing unit 303 can also be used to:

[0124] For each pixel, according to the illumination model identifier of the pixel, target attribute data required for illumination calculation is determined from the attribute data of the pixel;

[0125] The multiple target attribute data and illumination model identifiers corresponding to the above pixel points are written into the channels of the above geometry buffer respectively.

[0126] In one embodiment, at least two pixel points with different illumination model identifiers have different types of target attribute data stored in the same channel of at least one geometric buffer, and the illumination model identifier corresponding to each of the above pixel points is written into the same channel of the same buffer.

[0127] (4) A calculation unit 304 is used to perform illumination calculation based on the illumination model indicated by the illumination identifier corresponding to the above pixel point and the target attribute data in the above geometric buffer, so as to obtain illumination data corresponding to each pixel point affected by the above illumination model.

[0128] In one embodiment, the calculation unit 304 may also be used to:

[0129] For the light source configured for the scene to be rendered, illumination calculation is performed on the pixel points matched by the illumination model identifier according to each illumination model, the above light source and the above target attribute data, so as to obtain illumination data corresponding to the pixel points affected by each illumination model under the above light source.

[0130] (5) A rendering unit 305, which is used to render the scene model in the scene to be rendered based on the illumination data to obtain a rendering result.

[0131] In one embodiment, the rendering unit 305 may also be used to:

[0132] For each of the above light sources, the illumination data corresponding to the pixel points affected by each of the above illumination models under the above light sources are fused to obtain the illumination calculation results of the above scene model under each of the above light sources, and write them into the accumulation buffer;

[0133] The illumination calculation results corresponding to the multiple light sources stored in the accumulation buffer are fused to obtain the multi-light source illumination result of the scene model;

[0134] The above-mentioned multi-light source illumination results and the target attribute data stored in the above-mentioned geometric buffer are rendered to obtain the above-mentioned rendering results.

[0135] In one embodiment, there are multiple illumination calculation results for the above-mentioned scene to be rendered under each of the above-mentioned light sources, and each illumination calculation result corresponds to a preset illumination effect; the rendering unit 305 can also be used to:

[0136] For each of the above-mentioned preset lighting effects, performing effect fusion processing on a plurality of lighting calculation results corresponding to the above-mentioned preset lighting effects stored in the above-mentioned accumulation buffer to obtain a fused calculation result;

[0137] The fused calculation results corresponding to each of the above-mentioned preset lighting effects are accumulated to obtain the above-mentioned multi-light source lighting result.

[0138] As can be seen from the above, the model rendering device of the embodiment of the present application obtains the scene model of the scene to be rendered through the acquisition unit 301, and there is at least one scene model; the identification determination unit 302 determines the illumination model identification corresponding to each pixel point of the scene model according to the model data of the scene model, and the illumination model identification indicates the illumination model that affects the illumination effect of the pixel point; the writing unit 303 writes multiple target attribute data required for illumination calculation in the attribute data corresponding to the pixel point into the geometric buffer according to the illumination model identification of the pixel point; the calculation unit 304 performs illumination calculation based on the illumination model indicated by the illumination identification corresponding to the pixel point and the target attribute data in the geometric buffer, and obtains the illumination data corresponding to the pixel point affected by each illumination model; the rendering unit 305 renders the scene model in the scene to be rendered based on the illumination data, and obtains the rendering result of the scene model.

[0139] The embodiments of the present application can perform lighting calculations based on the attribute data in the geometry buffer. There is no need to perform vertex shading, fragment shading and other operations on the scene model every time lighting calculations are performed, which can improve the rendering speed of the scene model. The target attribute data required for lighting calculations for each pixel point can be written into the geometry buffer, and the attribute data not required for the lighting calculations will not be written into the geometry buffer. This achieves the goal of improving the rendering speed while reducing the memory occupied by the attribute data, thereby being compatible with devices with different memory capacities.

[0140] Accordingly, the embodiment of the present application also provides a computer device, which may be a terminal. Figure 5 As shown, Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 500 includes a processor 501 having one or more processing cores, a memory 502 having one or more computer-readable storage media, and a computer program stored in the memory 502 and executable on the processor. The processor 501 is electrically connected to the memory 502. It will be understood by those skilled in the art that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0141] The processor 501 is the control center of the computer device 500. It uses various interfaces and lines to connect the various parts of the entire computer device 500, executes various functions of the computer device 500 and processes data by running or loading software programs and / or modules stored in the memory 502, and calling data stored in the memory 502, thereby monitoring the computer device 500 as a whole.

[0142] In the embodiment of the present application, the processor 501 in the computer device 500 will load instructions corresponding to the processes of one or more application programs into the memory 502 according to the following steps, and the processor 501 will run the application programs stored in the memory 502 to implement various functions:

[0143] Obtain a scene model of the scene to be rendered, there is at least one scene model;

[0144] Determine, according to the model data of the scene model, an illumination model identifier corresponding to each pixel point of the scene model, wherein the illumination model identifier indicates an illumination model that affects an illumination effect of the pixel point;

[0145] According to the illumination model identifier of the pixel point, multiple target attribute data required for illumination calculation in the attribute data corresponding to the pixel point are written into the geometry buffer;

[0146] Perform illumination calculation based on the illumination model indicated by the illumination identifier corresponding to the pixel point and the target attribute data in the geometric buffer to obtain illumination data corresponding to the pixel point affected by each illumination model;

[0147] The scene model in the scene to be rendered is rendered based on the lighting data to obtain a rendering result.

[0148] From the above, it can be seen that the embodiments of the present application can perform lighting calculations based on the attribute data in the geometry buffer. There is no need to perform vertex shading, fragment shading and other operations on the scene model every time lighting calculations are performed, which can improve the rendering speed of the scene model, and the target attribute data required for lighting calculations for each pixel point can be written into the geometry buffer. The attribute data not required for the lighting calculation is not written into the geometry buffer, thereby improving the rendering speed while reducing the memory occupied by the attribute data, thereby being compatible with devices with different memory capacities.

[0149] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0150] Optional, such as Figure 5 As shown, the computer device 500 further includes: a touch screen 503, a radio frequency circuit 504, an audio circuit 505, an input unit 506, and a power supply 507. The processor 501 is electrically connected to the touch screen 503, the radio frequency circuit 504, the audio circuit 505, the input unit 506, and the power supply 507, respectively. Those skilled in the art can understand that Figure 5 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0151] The touch display screen 503 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 503 may include a display panel and a touch panel. Among them, the display panel may be used to display information input by the user or information provided to the user and various graphical user interfaces of computer equipment, and these graphical user interfaces may be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel may be used to collect the user's touch operation on or near it (such as the user using any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 501, and can receive the command sent by the processor 501 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 501 to determine the type of touch event, and then the processor 501 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 503 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 503 can also be used as a part of the input unit 506 to realize the input function.

[0152] The radio frequency circuit 504 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other computer devices through wireless communication, and to send and receive signals between the network device or other computer devices.

[0153] The audio circuit 505 can be used to provide an audio interface between the user and the computer device through a speaker and a microphone. The audio circuit 505 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 505 and converted into audio data, and then the audio data is output to the processor 501 for processing, and then sent to another computer device through the radio frequency circuit 504, or the audio data is output to the memory 502 for further processing. The audio circuit 505 may also include an earphone jack to provide communication between an external headset and the computer device.

[0154] The input unit 506 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0155] The power supply 507 is used to supply power to various components of the computer device 500. Optionally, the power supply 507 can be logically connected to the processor 501 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 507 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0156] although Figure 5 Not shown, the computer device 500 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0157] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0158] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0159] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute the steps in any model rendering method provided in the embodiment of the present application. For example, the computer program can execute the following steps:

[0160] Obtain a scene model of the scene to be rendered, there is at least one scene model;

[0161] Determine, according to the model data of the scene model, an illumination model identifier corresponding to each pixel point of the scene model, wherein the illumination model identifier indicates an illumination model that affects an illumination effect of the pixel point;

[0162] According to the illumination model identifier of the pixel point, multiple target attribute data required for illumination calculation in the attribute data corresponding to the pixel point are written into the geometry buffer;

[0163] Perform illumination calculation based on the illumination model indicated by the illumination identifier corresponding to the pixel point and the target attribute data in the geometric buffer to obtain illumination data corresponding to the pixel point affected by each illumination model;

[0164] The scene model in the scene to be rendered is rendered based on the lighting data to obtain a rendering result.

[0165] From the above, it can be seen that the embodiments of the present application can perform lighting calculations based on the attribute data in the geometry buffer. There is no need to perform vertex shading, fragment shading and other operations on the scene model every time lighting calculations are performed, which can improve the rendering speed of the scene model, and the target attribute data required for lighting calculations for each pixel point can be written into the geometry buffer. The attribute data not required for the lighting calculation is not written into the geometry buffer, thereby improving the rendering speed while reducing the memory occupied by the attribute data, thereby being compatible with devices with different memory capacities.

[0166] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0167] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0168] The above is a detailed introduction to a model rendering method, device, computer equipment and computer storage medium provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A model rendering method, characterized in that: include: Obtaining a scene model of a scene to be rendered, wherein there is at least one scene model; Determine, according to the model data of the scene model, an illumination model identifier corresponding to each pixel point of the scene model, wherein the illumination model identifier indicates an illumination model that affects an illumination effect of the pixel point; Writing a plurality of target attribute data required for illumination calculation in the attribute data corresponding to the pixel point into a geometry buffer according to the illumination model identifier of the pixel point; Performing illumination calculation based on the illumination model indicated by the illumination identifier corresponding to the pixel point and the target attribute data in the geometric buffer, to obtain illumination data corresponding to each pixel point affected by the illumination model; The scene model in the scene to be rendered is rendered based on the illumination data to obtain a rendering result.

2. The method according to claim 1, characterized in that There are multiple geometric buffers, each of which includes multiple channels. The multiple target attribute data required for illumination calculation in the attribute data corresponding to the pixel point is written into the geometric buffer according to the illumination model identifier of the pixel point, including: For each pixel, according to the illumination model identifier of the pixel, determine the target attribute data required for illumination calculation from the attribute data of the pixel; The multiple target attribute data and illumination model identifiers corresponding to the pixel points are written into the channels of the geometry buffer respectively.

3. The method according to claim 2, characterized in that At least two pixels with different illumination model identifiers have different types of target attribute data stored in the same channel of at least one geometric buffer, and the illumination model identifier corresponding to each pixel is written into the same channel of the same buffer.

4. The method according to claim 1, characterized in that The step of performing illumination calculation based on the illumination model indicated by the illumination identifier corresponding to the pixel point and the target attribute data in the geometric buffer to obtain illumination data corresponding to each pixel point affected by the illumination model includes: For the light source configured for the scene to be rendered, illumination calculation is performed on the pixel points matched by the illumination model identifier according to each illumination model, the light source and the target attribute data, so as to obtain illumination data corresponding to the pixel points affected by each illumination model under the light source.

5. The method according to claim 4, characterized in that The light sources include a plurality of light sources, and the scene model in the scene to be rendered is rendered based on the illumination data to obtain a rendering result, including: For each of the light sources, the illumination data corresponding to the pixel points affected by each of the illumination models under the light source are merged to obtain the illumination calculation result of the scene model under each of the light sources, and the result is written into the accumulation buffer; Performing fusion processing on the illumination calculation results corresponding to the multiple light sources stored in the accumulation buffer to obtain a multi-light source illumination result of the scene model; The multi-light source illumination results and the target attribute data stored in the geometric buffer are rendered to obtain the rendering result.

6. The method according to claim 5, characterized in that There are multiple illumination calculation results of the scene to be rendered under each of the light sources, and each illumination calculation result corresponds to a preset illumination effect; The step of fusing the illumination calculation results corresponding to the multiple light sources stored in the accumulation buffer to obtain the illumination result of the multiple light sources of the scene model includes: For each of the preset lighting effects, performing effect fusion processing on a plurality of lighting calculation results corresponding to the preset lighting effect stored in the accumulation buffer to obtain a fused calculation result; The fused calculation results corresponding to each of the preset lighting effects are accumulated to obtain the multi-light source lighting result.

7. The method according to claim 1, characterized in that Before determining the illumination model identifier corresponding to each pixel point of the scene model according to the model data of the scene model, the method includes: Get device identification information of the device; If the device identification information indicates that the device supports deferred rendering, the step of determining the illumination model identification corresponding to each pixel point of the scene model according to the model data of the scene model is performed.

8. The method according to claim 7, characterized in that Before determining the illumination model identifier corresponding to each pixel point of the scene model according to the model data of the scene model, the method further includes: If the device identification information indicates that the device does not support deferred rendering, the step of determining the illumination model identification corresponding to each pixel of the scene model according to the model data of the scene model is not performed; For each light source configured for the scene to be rendered, perform pixel-by-pixel illumination calculation on each scene model according to each illumination model and the attribute data to obtain a forward illumination result of the scene model under the light source; The forward illumination result of each scene model under each light source is used to render each scene model to obtain a rendering result.

9. The method according to any one of claims 1 to 8, characterized in that: The step of determining the illumination model identifier corresponding to each pixel point of the scene model according to the model data of the scene model includes: Performing a visibility test on the scene model to determine a visible portion of the scene model under a virtual camera of the scene to be rendered; The illumination model identifier corresponding to each pixel point of the scene model is determined according to the model data corresponding to the visible part of the scene model.

10. A model rendering device, characterized in that: include: An acquisition unit, used to acquire a scene model of a scene to be rendered, wherein there is at least one scene model; an identification determination unit, configured to determine, based on the model data of the scene model, an illumination model identification corresponding to each pixel point of the scene model, wherein the illumination model identification indicates an illumination model that affects an illumination effect of the pixel point; A writing unit, configured to write a plurality of target attribute data required for illumination calculation in the attribute data corresponding to the pixel into a geometric buffer according to an illumination model identifier of the pixel; A calculation unit, configured to perform illumination calculation based on an illumination model indicated by an illumination identifier corresponding to the pixel point and target attribute data in the geometric buffer, to obtain illumination data corresponding to each pixel point affected by the illumination model; A rendering unit is used to render the scene model in the scene to be rendered based on the illumination data to obtain a rendering result.

11. A computer device, characterized in that: It comprises a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the model rendering method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is loaded by a processor to execute the model rendering method according to any one of claims 1 to 9.