Model rendering method and device, electronic equipment and storage medium

By determining the details of the virtual model, the normal map sharing sampled UV information is solved, and the flickering problem of the virtual model when switching multi-texture maps in texture maps is improved, improving user experience and improving performance.

CN119850816APending Publication Date: 2025-04-18NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411940791.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

In game animation production, when multiple texture maps are configured in the same model area of ​​the virtual model for switching, if the detail normal map is configured, the model rendering will flash.

Method used

By determining the shared sampling UV information of the detailed normal map, normal sampling of the virtual model is performed based on the shared sampling UV information when multiple texture maps are arranged in the texture map of the virtual model.

Benefits of technology

Solve the flickering problem when rendering the model, improve user experience, reduce the number of material balls, and improve performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850816A_ABST
    Figure CN119850816A_ABST
Patent Text Reader

Abstract

The invention discloses a model rendering method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a detail normal map for a virtual model, the virtual model is configured with a texture map comprising a plurality of target texture regions, and each target texture region is used for storing a texture map which needs to be rendered to a same model region on a virtual object; based on the position association information of the target texture area, shared sampling UV information is determined, and the shared sampling UV information is used for normal sampling of the virtual model when the virtual model switches different texture images; and rendering the virtual model according to the shared sampling UV information and the detail normal map. Therefore, by determining the shared sampling UV information, normal sampling of the virtual model is carried out based on the shared sampling UV information when the virtual model switches different texture images, so that the problem of flicker occurring when an existing sampling method is adopted to render the model is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of game technology, and in particular to a model rendering method, device, electronic device and storage medium. Background Art

[0002] When animating games, you can use detail normal related techniques to add textures of various materials to the virtual models.

[0003] For the case where the same model area of ​​a virtual model is configured with multiple texture maps in the texture map for switching, if the virtual model is also configured with a detail normal map, when the texture map of the model area of ​​the virtual model is switched, the detail normal map will also be sampled for model rendering, but the existing sampling scheme will cause flickering when rendering the model. Summary of the invention

[0004] The embodiments of the present application provide a model rendering method, device, electronic device and storage medium. By determining the shared sampling UV information of the detail normal map, for the same model area of ​​the virtual model, multiple texture maps are configured in the texture map for switching, and the virtual model is also configured with a detail normal map. Based on the shared sampling UV information, the virtual model is sampled for normal when switching different texture maps, thereby solving the flickering problem that occurs when rendering the model and improving the user experience.

[0005] In a first aspect, an embodiment of the present application provides a model rendering method, the method comprising:

[0006] Acquire a detail normal map for a virtual model, wherein the virtual model is configured with a texture map, wherein the texture map includes a plurality of target texture regions, each of the target texture regions being used to store a texture map that needs to be rendered to a same model region on the virtual object;

[0007] Determining shared sampling UV information of the detail normal map based on the position association information corresponding to the target texture area, wherein the shared sampling UV information is used for normal sampling of the virtual model when the virtual model switches between different texture maps;

[0008] The virtual model is rendered according to the shared sampling UV information and the detail normal map.

[0009] Further, the position association information includes a UV determination parameter corresponding to a first target texture area in the target texture area; and determining the shared sampling UV information of the detail normal map based on the position association information corresponding to the target texture area includes:

[0010] Determine a mask map based on the UV determination parameter and standard UV information of a standard UV coordinate system, wherein the mask map includes a mask area, and a position of the mask area in the mask map corresponds to a position of other target texture areas other than the first target texture area in the texture map;

[0011] Based on the mask map and the standard UV information, the shared sampling UV information of the detail normal map is determined.

[0012] Further, the UV determination parameters include a maximum U coordinate value and a maximum V coordinate value of the first target texture area; and determining the mask map based on the UV determination parameters and standard UV information of a standard UV coordinate system includes:

[0013] For each UV position in the standard UV information, the U coordinate value of the UV position is subtracted from the maximum U coordinate value, and the result is rounded up to obtain a first mask parameter of the UV position; and the V coordinate value of the UV position is subtracted from the maximum V coordinate value, and the result is rounded up to obtain a second mask parameter of the UV position;

[0014] Based on the first mask parameter and the second mask parameter of each UV position, the mask parameter of each UV position is determined to obtain a mask map.

[0015] Furthermore, the determining the shared sampling UV information of the detail normal map based on the mask map and the standard UV information includes:

[0016] Amplifying the standard UV information based on the number of target texture areas to obtain amplified UV information;

[0017] Taking decimals of coordinate values ​​of each UV coordinate in the amplified UV information, respectively, to obtain first sampling UV information;

[0018] Based on the standard UV information, obtain second sampling UV information;

[0019] Based on the mask map, the first sampling UV information and the second sampling UV information, the shared sampling UV information of the detail normal map is determined.

[0020] Furthermore, the determining the shared sampling UV information of the detail normal map based on the mask map, the first sampling UV information and the second sampling UV information includes:

[0021] Input the first sampling UV information and the second sampling UV information into the A-end node and the B-end node of the lerp function respectively;

[0022] Input the mask map into the alpha terminal node of the lerp function;

[0023] The shared sampling UV information of the detail normal map is determined through the lerp function based on the first sampling UV information, the second sampling UV information, and the mask map.

[0024] Furthermore, the method further comprises:

[0025] Based on the UV offset, the standard UV information is offset to obtain offset standard UV information;

[0026] The step of amplifying the standard UV information based on the number of the target texture areas to obtain amplified UV information includes:

[0027] Amplifying the offset standard UV information based on the number of target texture areas to obtain amplified UV information;

[0028] The obtaining of second sampling UV information based on the standard UV information includes:

[0029] Based on the offset standard UV information, second sampling UV information is obtained.

[0030] Furthermore, the method further comprises:

[0031] In response to the texture map switching instruction, determining a target texture map to be rendered;

[0032] The rendering of the virtual model according to the shared sampling UV information and the detail normal map includes:

[0033] The virtual model is rendered based on the target texture map in the texture map, the shared sampling UV information and the detail normal map.

[0034] In a second aspect, an embodiment of the present application provides a model rendering device, comprising:

[0035] A detail normal map acquisition module is used to acquire a detail normal map for a virtual model, wherein the virtual model is configured with a texture map, wherein the texture map includes a plurality of target texture regions, each of which is used to store a texture map that needs to be rendered to the same model region on the virtual object;

[0036] A shared sampling UV information determination module, used to determine the shared sampling UV information of the detail normal map based on the position association information corresponding to the target texture area, wherein the shared sampling UV information is used for normal sampling of the virtual model when the virtual model switches to different texture maps;

[0037] A rendering module is used to render the virtual model according to the shared sampling UV information and the detail normal map.

[0038] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any model rendering method.

[0039] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any model rendering method.

[0040] In the fifth aspect, an embodiment of the present application also provides a computer program product, including a computer program, which is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device performs any step of the model rendering method provided in the embodiment of the present application.

[0041] By adopting the scheme of the embodiment of the present application, a detail normal map for a virtual model can be obtained. The virtual model is configured with a texture map, and the texture map includes multiple target texture areas, each of which is used to store a texture map that needs to be rendered to the same model area on the virtual object; based on the position association information corresponding to the target texture area, the shared sampling UV information of the detail normal map is determined, wherein the shared sampling UV information is used for normal sampling of the virtual model when the virtual model switches between different texture maps; the virtual model is rendered according to the shared sampling UV information and the detail normal map. In this way, by determining the shared sampling UV information of the detail normal map, when multiple texture maps are configured in the texture map for switching for the same model area of ​​the virtual model, and the virtual model is also configured with a detail normal map, the normal sampling of the virtual model is performed based on the shared sampling UV information when the virtual model switches between different texture maps, thereby solving the flickering problem that occurs when rendering the model and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] 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.

[0043] Figure 1 This is a schematic diagram of an implementation environment scene of the model rendering method provided in an embodiment of the present application;

[0044] Figure 2 This is a schematic diagram of an embodiment of the model rendering method provided in the embodiments of the present application;

[0045] Figure 3a The texture map and normal map provided in the embodiment of this application Figure 1 Mapping diagram;

[0046] Figure 3b is a map diagram of a basic normal map and a detail normal map provided in an embodiment of the present application;

[0047] Figure 3c It is a schematic diagram of a process of constructing a mask map in the model rendering method provided in an embodiment of the present application;

[0048] Figure 3d is a map diagram of a mask map in the model rendering method provided in an embodiment of the present application;

[0049] Figure 3e It is a schematic diagram of a process of sampling the first sampling UV information in the model rendering method provided in an embodiment of the present application;

[0050] Figure 3f is a schematic diagram of the first sampling UV information in the model rendering method provided in an embodiment of the present application;

[0051] Figure 3g It is a schematic diagram of a process of determining shared sampling UV information of a model rendering method provided in an embodiment of the present application;

[0052] Figure 3h It is a schematic diagram of sharing sampling UV information in the model rendering method provided in an embodiment of the present application;

[0053] Figure 3i is a schematic diagram of sampling texture information of an existing model rendering method provided in an embodiment of the present application;

[0054] Figure 3j is a schematic diagram of sampling texture information of the model rendering method provided in an embodiment of the present application;

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

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

[0057] 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, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

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

[0059] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms. Terminals may include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. Terminals and servers can be directly or indirectly connected via wired or wireless communications, and this application does not limit this.

[0060] See also Figure 1 , taking the integration of the model rendering device into an electronic device as an example, Figure 1 A schematic diagram of an implementation scenario of the model rendering method provided in an embodiment of the present application, wherein the electronic device may be a terminal device, and a detail normal map for a virtual model is obtained, wherein the virtual model is configured with a texture map, wherein the texture map includes multiple target texture areas, and each target texture area is used to store a texture map that needs to be rendered to the same model area on the virtual object; based on position association information corresponding to the target texture area, shared sampling UV information of the detail normal map is determined, wherein the shared sampling UV information is used for normal sampling of the virtual model when the virtual model switches between different texture maps; and the virtual model is rendered according to the shared sampling UV information and the detail normal map.

[0061] It should be noted that Figure 1The implementation environment scenario diagram of the model rendering method shown is only an example. The implementation environment scenario of the model rendering method described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application. It is known to those skilled in the art that with the evolution of data processing and the emergence of new business scenarios, the technical solution provided by the present application is also applicable to similar technical problems.

[0062] The solutions provided by the embodiments of the present application are specifically described by the following embodiments. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0063] This embodiment will be described from the perspective of a model rendering device, which may be integrated into an electronic device, which may be a terminal and / or a server, and this application does not limit this.

[0064] See also Figure 2 , Figure 2 The model rendering method provided by the embodiment of the present application, the specific process of the model rendering method can be as follows: Step 101 to Step 103, wherein:

[0065] Step 101: Obtain a detail normal map for a virtual model. The virtual model is configured with a texture map. The texture map includes a plurality of target texture areas. Each target texture area is used to store a texture map that needs to be rendered to the same model area on the virtual object.

[0066] The virtual model refers to a model having a model area with multiple texture maps configured in the texture map for switching, and a model with a detail normal map. The virtual model can be a model for a virtual object or an object contained in a virtual scene. The virtual object can be a virtual person, a virtual animal, etc. The objects contained in the virtual scene can be trees, pillars, houses, stones, etc., which can be adjusted according to actual conditions.

[0067] The model area refers to the model area on the virtual model where the texture map can be switched, and the specific area can be adjusted according to the actual situation. For example, when the virtual model is a human face model, the model area can be the expression area on the human face model. For another example, when the virtual model is an animal model, the model area can be the tongue area on the animal model.

[0068] Detail normal mapping is a technique used in computer graphics to simulate surface details and bumps on a 3D model to increase realism and visual effects.

[0069] Texture mapping is a technique that maps image information onto a triangular mesh to increase the details of an object's surface and make the object more realistic.

[0070] The target texture area refers to an area in the texture map where a texture image that needs to be rendered to the same model area on the virtual object is stored. The texture image is related to the model area. For example, when the virtual model is a human face model, the model area can be the expression area on the human face model, and the texture image can be the expression texture image. For another example, when the virtual model is an animal model, the model area can be the tongue area on the animal model, and the texture image can be the tongue texture image.

[0071] For example, Figure 3a As shown, Figure 3a The left side shows the texture map configured for the face model, which includes target texture area No. 1, target texture area No. 2, target texture area No. 3, and target texture area No. 4. Each target texture area is used to store the texture map of the expression area (i.e., the same model area) of the face model. That is, target texture area No. 1 is used to store the expression texture map No. 1 of the expression area, target texture area No. 2 is used to store the expression texture map No. 2 of the expression area, and so on.

[0072] Combination Figure 3a and Figure 3b The prior art is described below. In the prior art, it is assumed that the virtual model is a human face model and the model area is an expression area. UV offset sampling is used to achieve switching between different expressions. Figure 3a As shown, by offset Figure 3a In the red frame on the left, which is the quarter area, the UV position of expression No. 1 is the actual expression displayed, and expressions No. 2, No. 3, and No. 4 are offset to the position of expression No. 1 through the preset logic for display sampling. That is, when sampling the texture map, the texture coordinates of the position of expression No. 1 are always sampled. If other expressions need to be sampled, such as sampling expression No. 2, expression No. 2 is moved to the mapping area of ​​expression No. 1 for sampling. At this time, the arrangement order of expressions No. 1-4 in the texture map becomes (2,3,4,1).

[0073] In order to enhance the rich artistic effect, detail normals will be used to add detail textures to the later materials. That is, the material of the expression area is added based on the original material of the virtual model, the UV of the expression area is separated into patches and pasted on the face of the virtual model, the expression is deducted in the form of a mask map, and rendered with translucency. However, since the detail texture is also calculated and determined based on the UV information, this will affect the coverage of the expression area, resulting in the shifting of the detail normal of the corresponding expression area when the expression UV is offset, which will cause the detail normal of the first expression area to be different. For example, the way the model UV is unfolded puts the expression area in the following way: Figure 3aThe top column shown on the left, however, the detail normals are not aligned according to the UV position after the above unfolding method, which will affect the area covering the expression. When switching expressions, the detail normals of the position of expression 1 are different from the detail textures of the positions of expression 2, expression 3, and expression 4, such as Figure 3b As shown in the figure on the right, area 1 of the detail normal map is the position of the detail normal of expression position 1, area 2 of the detail normal map is the position of the detail normal of expression position 2, and so on. Due to the different sampled normals, flickering problems occur when the virtual model is rendered.

[0074] Step 102: Determine shared sampling UV information of the detail normal map based on the corresponding position association information of the target texture area, wherein the shared sampling UV information is used for normal sampling of the virtual model when the virtual model switches between different texture maps.

[0075] The position association information is used to indicate information associated with the position of the target texture region. For example, the texture UV coordinate system is (0,1), and there are 4 target texture regions of the same size, wherein the corresponding position association information of a target texture region can be represented by (0.25,0.25).

[0076] The shared sampling UV information is used to instruct the virtual model to use the same sampling UV information to perform normal sampling of the virtual model when switching different texture maps.

[0077] In some embodiments, the position association information includes a UV determination parameter corresponding to a first target texture area among the target texture areas.

[0078] The UV determination parameter is used to indicate the UV information of the first target texture area in the texture map.

[0079] Based on this, the process of determining the shared sampling UV information of the detail normal map based on the position association information corresponding to the target texture area includes: determining a mask map based on UV judgment parameters and standard UV information of the standard UV coordinate system, wherein the mask map includes a mask area, and the position of the mask area in the mask map corresponds to the position of other target texture areas other than the first target texture area in the texture map; based on the mask map and the standard UV information, determining the shared sampling UV information of the detail normal map.

[0080] The standard UV coordinate system refers to the UV coordinate system where the detail normal map is located. The standard UV information is used to indicate the UV information of each detail normal on the section normal map. For more information, please refer to Figure 3c , Figure 3e , Figure 3gThe texture coordinates Texcoord in the texture coordinates. For example, the input of Texcoord is the UV coordinates with U and V values ​​between 0 and 1 respectively.

[0081] In some embodiments, the UV determination parameters include the maximum U coordinate value and the maximum V coordinate value of the first target texture area. For example, the UV range of the first target texture area is (0.25, 0.25), wherein the maximum U coordinate value of the first target texture area is 0.25, and the maximum V coordinate value of the first target texture area is 0.25.

[0082] Based on this, the process of determining the mask map based on the UV judgment parameters and the standard UV information of the standard UV coordinate system includes: for each UV position in the standard UV information, subtract the U coordinate value of the UV position from the maximum U coordinate value, and then round up to obtain the first mask parameter of the UV position, and subtract the maximum V coordinate value from the V coordinate value of the UV position, and then round up to obtain the second mask parameter of the UV position; based on the first mask parameter and the second mask parameter of each UV position, determine the mask parameter of each UV position to obtain a mask map.

[0083] The first mask parameter is used to indicate the mask information at the U position, and the second mask parameter is used to indicate the mask information at the V position.

[0084] For example, see Figure 3c , you can generate a mask map according to the following code. The generated mask map is as follows Figure 3d shown.

[0085] float2 TestUVa.xy=saturate(ceil(frag.uv.y-0.25)+ceil(1-frag.uv.x-0.75)).

[0086] Among them, TestUVa.xy indicates the mask map, frag.uv indicates the standard UV information, and in the three-dimensional model, the u axis of the uv coordinate system corresponds to the x axis of the xy coordinate system, and the v axis corresponds to the y axis. This means that the horizontal and vertical directions in the uv coordinate system are consistent with the horizontal and vertical directions in the xy coordinate system, that is, frag.uv.y is used to indicate the V coordinate value of each UV position in the standard UV information, that is, frag.uv.y is used to indicate the V coordinate value of each UV position in the standard UV information, frag.uv.x is used to indicate the U coordinate value of each UV position in the standard UV information, ceil() indicates the rounding up function, and saturate is used to limit the data to a certain range, that is, the range of 0-1.

[0087] The above code rounds up the two channels of frag.uv RG to get the mask map.

[0088] In some embodiments, the process of determining the shared sampling UV information of the detail normal map based on the mask map and the standard UV information includes: amplifying the standard UV information based on the number of target texture areas to obtain the amplified UV information; taking decimals of the coordinate values ​​of each UV coordinate in the amplified UV information to obtain the first sampling UV information; obtaining the second sampling UV information based on the standard UV information; and determining the shared sampling UV information of the detail normal map based on the mask map, the first sampling UV information and the second sampling UV information.

[0089] The first sampling UV information indicates sampling UV information of a position of a mask area in the mask map corresponding to a position of other target texture areas other than the first target texture area in the texture map.

[0090] The second sampling UV information indicates sampling UV information of a position of a non-mask area in the mask map corresponding to a position of the first target texture area in the texture map.

[0091] For example, see Figure 3e , the first sampling UV information and the second sampling UV information can be determined according to the following code, and the first sampling UV information is generated as follows Figure 3f shown.

[0092] float2 TestUvb=lerp(frac(frag.uv*4),frag.uv,Testuva.xy).

[0093] Among them, frac(frag.uv*4) indicates the first sampling UV information, and 4 indicates that the number of target texture areas is 4. If the number of target texture areas becomes 5, frac(frag.uv*5) is used to indicate the first sampling UV information. The following is obtained by the frac function: Figure 3d The UV information shown is repeated 0-1. frag.uv indicates the second sampling UV information, Testuva.xy indicates the mask map, and the lerp function is used to output frac(frag.uv*4) when the input is 0, and output frag.uv when the input is 1.

[0094] In some embodiments, the process of determining the shared sampling UV information of the detail normal map based on the mask map, and the first sampling UV information and the second sampling UV information includes: inputting the first sampling UV information and the second sampling UV information into the A end node and the B end node of the lerp function respectively; inputting the mask map into the alpha end node of the lerp function; and determining the shared sampling UV information of the detail normal map based on the first sampling UV information, the second sampling UV information, and the mask map through the lerp function.

[0095] Specifically, see Figure 3g , input the mask map as the mask into the alpha end node of the lerp function, input the first sampled UV information into the A end node of the lerp function, and input the second sampled UV information into the B end node of the lerp function. The output is as follows Figure 3h Shared sampling UV information shown.

[0096] In some embodiments, the above method further includes: based on the UV offset, offsetting the standard UV information to obtain the offset standard UV information.

[0097] For example, the offset standard UV information is obtained according to the following code:

[0098] float2 TestuVz=(frag.uv+float2(Detailx,DetailY)).

[0099] Among them, float2(Detailx, DetailY) indicates UV offset, Detailx indicates U offset, DetailY indicates V offset. TestuVz indicates the standard UV information after offset.

[0100] Based on this, the process of amplifying the standard UV information based on the number of target texture areas to obtain the amplified UV information includes: amplifying the offset standard UV information based on the number of target texture areas to obtain the amplified UV information.

[0101] Specifically, the offset standard UV information is amplified based on the number of target texture areas to obtain amplified UV information; decimals are taken for coordinate values ​​of each UV coordinate in the amplified UV information to obtain first sampling UV information.

[0102] Based on this, the process of obtaining the second sampling UV information based on the standard UV information includes: obtaining the second sampling UV information based on the offset standard UV information.

[0103] Exemplarily, the first sampling UV information and the second sampling UV information are determined based on the offset standard UV information according to the following code:

[0104] float2 TestUvb=lerp(frac(TestUVz*4), TestUVz, Testuva.xy).

[0105] Wherein, frac(TestUVz*4) indicates the first sampled UV information determined based on the offset standard UV information, and TestUVz indicates the second sampled UV information determined based on the offset standard UV information.

[0106] In some embodiments, other parameters may also be input into the B-end node of the lerp function.

[0107] Exemplarily, other parameters input to the B-end node of the lerp function include a custom detail normal repetition multiple DetailNormalUvTiling.

[0108] DetailNormalUvTiling is used to repeatedly scale the UV information of the processed detail normal.

[0109] Based on this, the above code can be adjusted to:

[0110] float2 TestUvb=lerp(frac(TestUVz*4)*DetailNormaluvriling, TestUVz*DetailNormaluvTiling, Testuva.xy).

[0111] Exemplarily, other parameters input to the B-end node of the lerp function include a custom multiple of the detail normal repetition DetailNormalUvTiling and a correction factor (eg, 4.0).

[0112] Based on this, the above code can be adjusted to:

[0113] float2 TestUvb=lerp(frac(TestUVz*4)*DetailNormaluvriling / 4.0, TestUVz*DetailNormaluvTiling, Testuva.xy).

[0114] Through the above-mentioned embodiments, when multiple texture maps are configured in the texture map for switching for the same model area of ​​the virtual model, and the virtual model is also configured with a detail normal map, the shared sampling UV information of the detail normal map can be determined, and the normal sampling of the virtual model can be performed based on the shared sampling UV information when the virtual model switches between different texture maps, thereby solving the flickering problem that occurs when rendering the model.

[0115] It should be noted that the existing sampling scheme has the problem that the model uses a large number of translucent images, and the switched texture map and the virtual model itself (such as expressions and the face itself) will have an obvious sense of separation and cannot be integrated. When the camera zooms in on the character, it will be processed into a translucent state. The additional patches made for the expression and the virtual model belong to two materials and two DPs. Due to the translucent state, problems will arise between rendering. In addition, since materials with detailed textures need to be used, the number of materials for each character must be increased, resulting in a large performance overhead.

[0116] By configuring multiple texture maps for switching in the texture map for the same model area of ​​the virtual model, and when the virtual model is also configured with a detail normal map, determining the shared sampling UV information of the detail normal map can effectively solve the flickering problem caused by the conflict in the switching logic between the detail texture and the texture map. At the same time, it can also reduce the number of material balls, greatly improve performance, and ensure the integration between the virtual model and the model area, making it more convenient for later processing of art effects and avoiding unnecessary model production processes.

[0117] Among them, the reason for reducing the number of material balls is: since the target texture area is integrated into the ordinary conventional material for calculation, when the detail texture normal is used, there will be obvious edges when the texture map is switched, resulting in flickering when the texture map is switched on the model. The existing means to solve the above problem is to extract the target texture area separately and use a single material ball for calculation. However, since a separate material ball needs to be separated for the model area, the number of models produced is increased, thereby increasing additional consumption. The method adopted in this application does not need to extract the target texture area separately and use a single material ball for calculation, thereby reducing unnecessary consumption.

[0118] Combine the following Figure 3a , Figure 3i and Figure 3j See Figure 3a , Figure 3i and Figure 3j The first column where the expression area is located. Figure 3i and Figure 3jThe numbers used in the figure represent the repetition rate of the detail texture. They are only used for illustration. For better understanding, you can understand that the number 1 is a sample with no uv repetition, and 234 is a sample with one repetition. 1234 means that the texture is repeated once, and there are 4 groups of 1234, which means it is repeated 4 times.

[0119] When the current sampling is for expression area No. 2, the detail normals of the expression area will have a problem of different detail texture repetition rates through the existing sampling scheme. However, through the scheme of the present application, it can ensure that the repetition rates of the detail normals corresponding to the expression area are consistent.

[0120] Step 103: Render the virtual model according to the shared sampling UV information and the detail normal map.

[0121] It should be noted that, except for the differences between the shared sampling UV information and the detail normal map and the existing sampling scheme, the other rendering processes of the virtual model are similar and will not be repeated here.

[0122] In some embodiments, the method further includes: determining a target texture map to be rendered in response to a texture map switching instruction.

[0123] There are multiple ways to trigger the texture map switching instruction, which can be adjusted according to actual conditions. For example, the texture map switching instruction can be triggered based on time, such as triggering a texture map switching instruction every 0.05 seconds. For example, the texture map switching instruction can also be pre-set.

[0124] Based on this, the above process of rendering the virtual model based on the shared sampled UV information and the detail normal map includes: rendering the virtual model based on the target texture map in the texture map, the shared sampled UV information and the detail normal map.

[0125] It should be noted that, except for the differences between the shared sampling UV information and the detail normal map and the existing sampling scheme, the other rendering processes of the virtual model are similar and will not be repeated here.

[0126] Exemplarily, when the texture map is an expression texture map, in response to a texture map switching instruction, the target expression texture map to be rendered is determined, and the virtual model is rendered based on the target expression texture map in the texture map, shared sampling UV information and detail normal map.

[0127] By adopting the scheme of the embodiment of the present application, a detail normal map for a virtual model can be obtained. The virtual model is configured with a texture map, and the texture map includes multiple target texture areas, each of which is used to store a texture map that needs to be rendered to the same model area on the virtual object; based on the position association information corresponding to the target texture area, the shared sampling UV information of the detail normal map is determined, wherein the shared sampling UV information is used for normal sampling of the virtual model when the virtual model switches between different texture maps; the virtual model is rendered according to the shared sampling UV information and the detail normal map. In this way, by determining the shared sampling UV information of the detail normal map, when multiple texture maps are configured in the texture map for switching for the same model area of ​​the virtual model, and the virtual model is also configured with a detail normal map, the normal sampling of the virtual model is performed based on the shared sampling UV information when the virtual model switches between different texture maps, thereby solving the flickering problem that occurs when rendering the model and improving the user experience.

[0128] The present application also provides a model rendering device, which can be integrated into a terminal device. Figure 4 As shown, the model rendering device may include:

[0129] A detail normal map acquisition module 201 is used to acquire a detail normal map for a virtual model, the virtual model is configured with a texture map, the texture map includes a plurality of target texture areas, each target texture area is used to store a texture map that needs to be rendered to the same model area on the virtual object;

[0130] A shared sampling UV information determination module 202 is used to determine the shared sampling UV information of the detail normal map based on the position association information corresponding to the target texture area, wherein the shared sampling UV information is used for normal sampling of the virtual model when the virtual model switches between different texture maps;

[0131] The rendering module 203 is used to render the virtual model according to the shared sampling UV information and the detail normal map.

[0132] Optionally, in the device of the embodiment of the present application, the above-mentioned position association information includes a UV determination parameter corresponding to the first target texture area in the target texture area.

[0133] Based on this, the above-mentioned shared sampling UV information determination module 202 includes:

[0134] A mask map determination submodule, used to determine the mask map based on the UV determination parameter and the standard UV information of the standard UV coordinate system, wherein the mask map includes a mask area, and the position of the mask area in the mask map corresponds to the position of other target texture areas other than the first target texture area in the texture map;

[0135] The shared sampling UV information determination submodule is used to determine the shared sampling UV information of the detail normal map based on the mask map and the standard UV information.

[0136] Optionally, in the device of the embodiment of the present application, the above-mentioned UV determination parameters include the maximum U coordinate value and the maximum V coordinate value of the first target texture area.

[0137] Based on this, the above-mentioned mask map determination submodule includes:

[0138] a mask parameter determination unit, for each UV position in the standard UV information, using the maximum U coordinate value to subtract the U coordinate value of the UV position, and then rounding up to obtain a first mask parameter of the UV position, and using the V coordinate value of the UV position to subtract the maximum V coordinate value, and then rounding up to obtain a second mask parameter of the UV position;

[0139] The mask map determining unit is used to determine the mask parameters of each UV position based on the first mask parameter and the second mask parameter of each UV position to obtain the mask map.

[0140] Optionally, in the device of the embodiment of the present application, the shared sampling UV information determination submodule includes:

[0141] The amplified UV information determining unit is used to amplify the standard UV information based on the number of target texture areas to obtain the amplified UV information;

[0142] A first sampling UV information acquisition unit is used to take decimals of coordinate values ​​of each UV coordinate in the amplified UV information to obtain first sampling UV information;

[0143] A second sampling UV information acquisition unit, used for obtaining second sampling UV information based on the standard UV information;

[0144] The shared sampling UV information determining unit is used to determine the shared sampling UV information of the detail normal map based on the mask map, the first sampling UV information and the second sampling UV information.

[0145] Optionally, in the device of the embodiment of the present application, the shared sampling UV information determining unit includes:

[0146] A first input subunit is used to input the first sampling UV information and the second sampling UV information into the A end node and the B end node of the lerp function respectively;

[0147] The second input subunit is used to input the mask map into the alpha terminal node of the lerp function;

[0148] The shared sampling UV information determining subunit is used to determine the shared sampling UV information of the detail normal map based on the first sampling UV information, the second sampling UV information, and the mask map through a lerp function.

[0149] Optionally, in the device of the embodiment of the present application, the model rendering device further includes:

[0150] An offset module is used to offset the standard UV information based on the UV offset to obtain the offset standard UV information;

[0151] Based on the above offset module, the above amplified UV information determination unit includes:

[0152] The amplified UV information determination subunit is used to amplify the offset standard UV information based on the number of target texture areas to obtain the amplified UV information;

[0153] Based on the above offset module, the above second sampling UV information acquisition unit includes:

[0154] The second sampling UV information acquisition subunit is used to obtain the second sampling UV information based on the offset standard UV information.

[0155] Optionally, in the device of the embodiment of the present application, the model rendering device further includes:

[0156] A target texture map module, for determining a target texture map to be rendered in response to a texture map switching instruction;

[0157] Based on the target texture map module, the rendering module 203 includes:

[0158] The rendering submodule is used to render the virtual model based on the target texture map in the texture map, shared sampling UV information and detail normal map.

[0159] According to the scheme of the embodiment of the present application, a detail normal map acquisition module 201 can be used to acquire a detail normal map for a virtual model. The virtual model is configured with a texture map, which includes multiple target texture areas, each of which is used to store a texture map that needs to be rendered to the same model area on the virtual object; the shared sampling UV information determination module 202 determines the shared sampling UV information of the detail normal map based on the position association information corresponding to the target texture area, wherein the shared sampling UV information is used to perform normal sampling of the virtual model when the virtual model switches between different texture maps; the rendering module 203 renders the virtual model according to the shared sampling UV information and the detail normal map. In this way, by determining the shared sampling UV information of the detail normal map, when multiple texture maps are configured in the texture map for switching for the same model area of ​​the virtual model, and the virtual model is also configured with a detail normal map, the shared sampling UV information is used to perform normal sampling of the virtual model when the virtual model switches between different texture maps, thereby solving the flickering problem that occurs when rendering the model and improving the user experience.

[0160] Accordingly, an embodiment of the present application further provides an electronic device, which may be a terminal, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and other terminal devices. Alternatively, the electronic device may be a server.

[0161] like Figure 5 As shown, Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.

[0162] The processor 301 is the control center of the electronic device 300. It uses various interfaces and lines to connect various parts of the entire electronic device 300, and executes various functions and processes data of the electronic device 300 by running or loading software programs and / or units stored in the memory 302, and calling data stored in the memory 302, so as to monitor the electronic device 300 as a whole. The processor 301 can be a central processing unit CPU, a graphics processing unit GPU, a network processor (Network Processor, NP), etc., and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application.

[0163] In the embodiment of the present application, the processor 301 in the electronic device 300 will load instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 will run the application programs stored in the memory 302 to implement various functions, such as:

[0164] Obtaining a detail normal map for a virtual model, the virtual model being configured with a texture map, the texture map including a plurality of target texture regions, each target texture region being used to store a texture map that needs to be rendered to the same model region on the virtual object;

[0165] Determine shared sampling UV information of the detail normal map based on the position association information corresponding to the target texture area, wherein the shared sampling UV information is used for normal sampling of the virtual model when the virtual model switches between different texture maps;

[0166] The virtual model is rendered based on the shared sampled UV information and the detail normal map.

[0167] The electronic device provided by the embodiment of the present application can obtain a detail normal map for a virtual model, wherein the virtual model is configured with a texture map, wherein the texture map includes multiple target texture areas, each target texture area being used to store a texture map that needs to be rendered to the same model area on the virtual object; based on the position association information corresponding to the target texture area, the shared sampling UV information of the detail normal map is determined, wherein the shared sampling UV information is used to perform normal sampling of the virtual model when the virtual model switches between different texture maps; and the virtual model is rendered according to the shared sampling UV information and the detail normal map. In this way, by determining the shared sampling UV information of the detail normal map, when multiple texture maps are configured in the texture map for switching for the same model area of ​​the virtual model, and the virtual model is also configured with a detail normal map, the normal sampling of the virtual model is performed based on the shared sampling UV information when the virtual model switches between different texture maps, thereby solving the flickering problem that occurs when rendering the model and improving the user experience.

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

[0169] Optional, such as Figure 5 As shown, the electronic device 300 further includes: a touch screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the touch screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307, respectively. Those skilled in the art can understand that Figure 5 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0170] The touch display screen 303 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 303 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can 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 can be used to collect the user's touch operation on or near it (such as the user uses 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 direction, 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 301, and can receive the command sent by the processor 301 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 301 to determine the type of touch event, and then the processor 301 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 303 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 303 can also be used as a part of the input unit 306 to realize the input function.

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

[0172] The audio circuit 305 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 305 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 305 and converted into audio data, and then the audio data is output to the processor 301 for processing, and then sent to another electronic device through the radio frequency circuit 304, or the audio data is output to the memory 302 for further processing. The audio circuit 305 may also include an earplug jack to provide communication between an external headset and the electronic device.

[0173] The input unit 306 may be configured to receive standard UV information of a standard UV coordinate system, or an offset, or other input information.

[0174] The power supply 307 is used to supply power to various components of the electronic device 300. Optionally, the power supply 307 can be logically connected to the processor 301 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 307 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.

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

[0176] 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.

[0177] 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.

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

[0179] Obtaining a detail normal map for a virtual model, the virtual model being configured with a texture map, the texture map including a plurality of target texture regions, each target texture region being used to store a texture map that needs to be rendered to the same model region on the virtual object;

[0180] Determine shared sampling UV information of the detail normal map based on the position association information corresponding to the target texture area, wherein the shared sampling UV information is used for normal sampling of the virtual model when the virtual model switches between different texture maps;

[0181] The virtual model is rendered based on the shared sampled UV information and the detail normal map.

[0182] By using the computer-readable storage medium provided in the embodiment of the present application, a detail normal map for a virtual model can be obtained, the virtual model is configured with a texture map, the texture map includes multiple target texture areas, each target texture area is used to store the texture map that needs to be rendered to the same model area on the virtual object; based on the position association information corresponding to the target texture area, the shared sampling UV information of the detail normal map is determined, wherein the shared sampling UV information is used for normal sampling of the virtual model when the virtual model switches between different texture maps; the virtual model is rendered according to the shared sampling UV information and the detail normal map. In this way, by determining the shared sampling UV information of the detail normal map, when multiple texture maps are configured in the texture map for switching for the same model area of ​​the virtual model, and the virtual model is also configured with a detail normal map, the virtual model is sampled based on the shared sampling UV information when the virtual model switches between different texture maps, thereby solving the flickering problem that occurs when rendering the model and improving the user experience.

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

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

[0185] Since the computer program stored in the computer-readable storage medium can execute any one of the model rendering methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the model rendering methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0186] According to one aspect of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in various optional implementations of the above embodiments.

[0187] In the above-mentioned model rendering device, computer-readable storage medium, electronic device, and computer program product embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process and beneficial effects of the above-described model rendering device, computer-readable storage medium, computer program product, electronic device, and its corresponding units can refer to the description of the model rendering method in the above embodiment, and will not be repeated here.

[0188] The above is a detailed introduction to a model rendering method, device, electronic device, computer-readable storage medium and computer program product provided in the embodiments 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 ideas of the present application, there will be changes in the specific implementation methods 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: The method comprises: Acquire a detail normal map for a virtual model, wherein the virtual model is configured with a texture map, wherein the texture map includes a plurality of target texture regions, each of the target texture regions being used to store a texture map that needs to be rendered to a same model region on the virtual object; Determining shared sampling UV information of the detail normal map based on the position association information corresponding to the target texture area, wherein the shared sampling UV information is used for normal sampling of the virtual model when the virtual model switches between different texture maps; The virtual model is rendered according to the shared sampling UV information and the detail normal map.

2. The model rendering method according to claim 1, characterized in that: The position association information includes a UV determination parameter corresponding to a first target texture area among the target texture areas; The determining, based on the position association information corresponding to the target texture area, the shared sampling UV information of the detail normal map includes: Determine a mask map based on the UV determination parameter and standard UV information of a standard UV coordinate system, wherein the mask map includes a mask area, and a position of the mask area in the mask map corresponds to a position of other target texture areas other than the first target texture area in the texture map; Based on the mask map and the standard UV information, the shared sampling UV information of the detail normal map is determined.

3. The model rendering method according to claim 2, characterized in that: The UV determination parameters include the maximum U coordinate value and the maximum V coordinate value of the first target texture area; The determining of the mask map based on the UV determination parameter and the standard UV information of the standard UV coordinate system includes: For each UV position in the standard UV information, the U coordinate value of the UV position is subtracted from the maximum U coordinate value, and the result is rounded up to obtain a first mask parameter of the UV position; and the V coordinate value of the UV position is subtracted from the maximum V coordinate value, and the result is rounded up to obtain a second mask parameter of the UV position; Based on the first mask parameter and the second mask parameter of each UV position, the mask parameter of each UV position is determined to obtain a mask map.

4. The model rendering method according to claim 3, characterized in that: The determining, based on the mask map and the standard UV information, the shared sampling UV information of the detail normal map comprises: Amplifying the standard UV information based on the number of target texture areas to obtain amplified UV information; Taking decimals of coordinate values ​​of each UV coordinate in the amplified UV information, respectively, to obtain first sampling UV information; Based on the standard UV information, obtaining second sampling UV information; Based on the mask map, the first sampling UV information and the second sampling UV information, the shared sampling UV information of the detail normal map is determined.

5. The model rendering method according to claim 4, characterized in that: The determining, based on the mask map, the first sampling UV information and the second sampling UV information, the shared sampling UV information of the detail normal map comprises: Input the first sampling UV information and the second sampling UV information into the A-end node and the B-end node of the lerp function respectively; Input the mask map into the alpha terminal node of the lerp function; The shared sampling UV information of the detail normal map is determined through the lerp function based on the first sampling UV information, the second sampling UV information, and the mask map.

6. The model rendering method according to claim 4, characterized in that: The method further comprises: Based on the UV offset, the standard UV information is offset to obtain the offset standard UV information; The step of amplifying the standard UV information based on the number of the target texture areas to obtain amplified UV information includes: Amplifying the offset standard UV information based on the number of target texture areas to obtain amplified UV information; The obtaining of second sampling UV information based on the standard UV information includes: Based on the offset standard UV information, second sampling UV information is obtained.

7. The model rendering method according to any one of claims 1 to 6, characterized in that: The method further comprises: In response to a texture map switching instruction, determining a target texture map to be rendered; The rendering of the virtual model according to the shared sampling UV information and the detail normal map includes: The virtual model is rendered based on the target texture map in the texture map, the shared sampling UV information and the detail normal map.

8. A model rendering device, characterized in that: The device comprises: A detail normal map acquisition module is used to acquire a detail normal map for a virtual model, wherein the virtual model is configured with a texture map, wherein the texture map includes a plurality of target texture regions, each of which is used to store a texture map that needs to be rendered to the same model region on the virtual object; A shared sampling UV information determination module, used to determine the shared sampling UV information of the detail normal map based on the position association information corresponding to the target texture area, wherein the shared sampling UV information is used for normal sampling of the virtual model when the virtual model switches to different texture maps; A rendering module is used to render the virtual model according to the shared sampling UV information and the detail normal map.

9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the model rendering method described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: It includes a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of the model rendering method described in any one of claims 1 to 7.