Model processing method and apparatus, computer device, and storage medium

By splicing modules of the same model element in the game scene and obtaining normal maps, the problem of low efficiency in creating models across multiple layers is solved, achieving efficient rendering and resource-saving model processing.

CN116212374BActive Publication Date: 2026-04-10NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2023-02-10
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Models spanning multiple levels in game scenes need to be manually created and rendered one by one, resulting in low production efficiency and high resource consumption.

Method used

By acquiring multiple modules to be stitched together, stitching them together according to the hierarchical information, obtaining the normal map of the target model, and rendering it in combination with the hierarchical information, the rendered target model is generated.

Benefits of technology

It improves the efficiency of model creation and rendering, reduces resource consumption, and achieves efficient and high-quality rendering of model processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116212374B_ABST
    Figure CN116212374B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a model processing method and device, computer equipment and a storage medium. The method comprises: obtaining a plurality of to-be-spliced modules, the plurality of to-be-spliced modules belonging to the same model element; splicing the plurality of to-be-spliced modules according to hierarchical information to obtain a target model, wherein the hierarchical information comprises the height and coordinates of the corresponding level of the to-be-spliced module; obtaining a normal map of the target model from a texture map; and rendering the target model according to the normal map and the hierarchical information to obtain a rendered target model texture map. The technical solution of the present application can significantly improve the efficiency of model production and rendering processing, and reduce the consumption of model processing resources.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer graphics, in particular to a model processing method and device, a computer device and a storage medium. BACKGROUND

[0002] A game scene is composed of a plurality of virtual models, and usually, a model needs to be made in advance and corresponding art resources are configured for the model for processing, so that a well-processed model is presented in the game scene, such as a mountain model, a grassland model, etc.

[0003] However, a game scene is huge and complex, and the same model can be at different hierarchical levels, such as the foot part and the peak part of a mountain model. For such a model spanning multiple levels in a game scene, each part of the model needs to be manually made one by one, such as superimposing and rendering each part of the model in different levels, so that the efficiency of model making and processing is low and resource consumption is large. SUMMARY

[0004] The embodiments of the present application provide a model processing method and device, a computer device and a storage medium, which can significantly improve the efficiency of model making and rendering processing and reduce the consumption of model processing resources.

[0005] The embodiments of the present application provide a model processing method, which comprises:

[0006] obtaining a plurality of to-be-spliced modules, the plurality of to-be-spliced modules belonging to the same model element;

[0007] splicing the plurality of to-be-spliced modules according to level information to obtain a target model, wherein the level information comprises the height and coordinates of the level corresponding to the to-be-spliced modules;

[0008] obtaining a normal map of the target model by a texture map;

[0009] texturing the normal map by the texture map;

[0010] rendering the target model according to the level information and the texture map to obtain a rendered target model.

[0011] The embodiments of the present application also provide a model processing device, which comprises:

[0012] a to-be-spliced module obtaining unit configured to obtain a plurality of to-be-spliced modules, the plurality of to-be-spliced modules belonging to the same model element;

[0013] a target model splicing unit configured to splice the plurality of to-be-spliced modules according to height information to obtain a target model, wherein the height information comprises a level number and a height value corresponding to the level number;

[0014] a normal map obtaining unit, configured to obtain a normal map of the target model by using a texture map;

[0015] a loading information obtaining unit, configured to obtain the normal map by using the texture map;

[0016] a model rendering unit, configured to render the target model according to the hierarchical information, to obtain a rendered target model.

[0017] Optionally, the target model comprises a plurality of regions, the to-be-spliced modules are embedded in the regions, and the target model splicing unit is further configured to:

[0018] adjust a height value of each to-be-spliced module to a height of the hierarchical information;

[0019] place the adjusted to-be-spliced module in the region according to a coordinate of the hierarchical information, to splice the plurality of to-be-spliced modules to obtain the target model.

[0020] Optionally, the normal map obtaining unit further comprises:

[0021] a high-face model obtaining subunit, configured to perform face subdivision processing on the target model to obtain a high-face model corresponding to the target model;

[0022] a first normal information obtaining subunit, configured to calculate first normal information of the high-face model according to a relative position of the texture map and the high-face model;

[0023] a second normal information obtaining subunit, configured to convert the first normal information into second normal information of the target model, to generate the normal map storing the second normal information.

[0024] Optionally, the high-face model obtaining subunit is further configured to:

[0025] generate a subdivision point on each edge corresponding to a triangular face of the target model;

[0026] obtain a subdivision triangular face formed by a line connecting a plurality of the subdivision points;

[0027] iteratively repeat the above steps until an iteration number reaches a preset number of the face subdivision processing, to obtain the high-face model composed of a plurality of the subdivision triangular faces.

[0028] Optionally, the first normal information obtaining subunit is further configured to:

[0029] obtain a position mapping relationship between a first pixel point on the texture map and a second pixel point on the high-face model;

[0030] According to the position mapping relationship, a rendering coefficient of each second pixel point is obtained;

[0031] According to the rendering coefficient and the position mapping relationship, a normal coordinate of each second pixel point is calculated to obtain the first normal information.

[0032] Optionally, the second normal information obtaining subunit is further configured to:

[0033] A third pixel point of the target model and a tangent space corresponding to the third pixel point are obtained.

[0034] A first coordinate value of a vector corresponding to the third pixel point and a target second pixel point is obtained, wherein the target second pixel point is a point in the high-face model closest to the third pixel point.

[0035] Each first coordinate value is converted into a second coordinate value to obtain the second normal information containing the second coordinate value.

[0036] Optionally, the model rendering unit is further configured to:

[0037] The target model is rendered according to the normal map and the level information to obtain a rendered target model, including:

[0038] The second normal information is subjected to Fourier transform processing to obtain a waveform graph corresponding to the second normal information.

[0039] A frequency of the waveform graph is determined as the scaling times, and a phase of the waveform graph is determined as the displacement, to obtain loading information of the texture graph.

[0040] The loading information is read to restore the texture graph.

[0041] Based on the texture graph and the level information, the normal information of the target model is subjected to transition processing to obtain the rendered target model.

[0042] Optionally, the model rendering unit is further configured to:

[0043] A height coordinate of a fourth pixel point of the target model in a corresponding level is obtained.

[0044] The height coordinate is converted into a normal transition ratio of the fourth pixel point.

[0045] According to the normal transition ratio, the normal information of the level and the adjacent level where the fourth pixel point is located, the normal information of each fourth pixel point is calculated.

[0046] The embodiment of the present application also provides a computer device, comprising a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads the instructions from the memory to execute the steps in the model processing method according to any one of the above embodiments.

[0047] The embodiment of the present application also provides a computer readable storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the model processing method according to any one of the above embodiments.

[0048] A plurality of to-be-spliced modules are acquired, and the plurality of to-be-spliced modules belong to the same model element;

[0049] According to the hierarchical information, the plurality of to-be-spliced modules are spliced to obtain a target model, wherein the hierarchical information comprises a height and a coordinate of a corresponding level of the to-be-spliced module.

[0050] A normal map of the target model is acquired by a texture map;

[0051] The normal map texture map is acquired according to the normal map;

[0052] According to the hierarchical information, the target model is rendered to obtain a rendered target model.

[0053] As can be seen from the above, the embodiment of the present application can effectively realize the reuse of the same element module in the model by splicing a plurality of to-be-spliced modules belonging to the same model element in different levels, thereby improving the efficiency of model production and reducing the resource consumption of model production. On the other hand, the present application can also calculate and store the loading information of the texture map required for rendering the model by using the normal information of the model, so that the application program of the model can quickly load the texture map to render the model, thereby improving the efficiency of model rendering processing and reducing the consumption resources of model production.

[0054] Therefore, based on the above two aspects, the technical solution of the present application is not limited by the level of the module during model processing, and different modules in different levels do not need to be produced and rendered separately, and the model can be produced and rendered with small resource consumption and fast efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0056] Figure 1 The system schematic diagram of the model processing device provided by the embodiment of the present application is shown in the figure.

[0057] Figure 2 A flowchart of a model processing method provided by an embodiment of the present application is shown in FIG. 1;

[0058] Figure 3 Another flowchart of a model processing method provided by an embodiment of the present application is shown in FIG. 2;

[0059] Figure 4 A schematic diagram of a correspondence between a to-be-spliced module and a level provided by an embodiment of the present application is shown in FIG. 3;

[0060] Figure 5 A schematic diagram of splicing a to-be-spliced module in a region provided by an embodiment of the present application is shown in FIG. 4;

[0061] Figure 6 A schematic diagram of performing a subdivision surface processing on a target model provided by an embodiment of the present application is shown in FIG. 5;

[0062] Figure 7 A schematic diagram of generating first normal information provided by an embodiment of the present application is shown in FIG. 6;

[0063] Figure 8 A structural schematic diagram of a model processing apparatus provided by an embodiment of the present application is shown in FIG. 7;

[0064] Figure 9 A structural schematic diagram of a computer device provided by an embodiment of the present application is shown in FIG. 8;

[0065] Figure 10 A program product applying the model processing method provided by an embodiment of the present application is shown in FIG. 9. DETAILED DESCRIPTION

[0066] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0067] The terms "first", "second", "third", etc. in the present application are only for descriptive purpose, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second", "third" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present application are only used to explain the relative position relationship, movement condition, etc. between components in a certain posture (as shown in the drawings), and if the certain posture changes, the directional indications also change accordingly. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product or device.

[0068] The embodiments of the present application provide a model processing method and device, a storage medium and a computer device. Specifically, the model processing method of the embodiments of the present application can be executed by a computer device, which can be a terminal or a server. The terminal can be a smart phone, a tablet computer, a notebook computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (PDA), and the like. The terminal device can also include a client, which can be a game application client, a browser client carrying a game program, or an instant messaging client, etc. The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms.

[0069] For example, when the model processing method is run on a terminal, the terminal device stores a game application and presents part of the game scene in the game through a display component. The terminal device is used to interact with the user through a graphical user interface, for example, by downloading and installing the game application on the terminal device and running it. The terminal device can provide the graphical user interface to the user in various ways, for example, it can render the graphical user interface to be displayed on the display screen of the terminal device, or it can present the graphical user interface through holographic projection. For example, the terminal device can include a touch display screen for presenting a graphical user interface and receiving operation instructions generated by the user acting on the graphical user interface, and a processor for running the game, generating the graphical user interface, responding to the operation instructions, and controlling the display of the graphical user interface on the touch display screen.

[0070] For example, when the model processing method is run on a server, it can be cloud gaming. Cloud gaming refers to a game mode based on cloud computing. In the running mode of cloud gaming, the running subject of the game application and the game picture presentation subject are separated, and the storage and running of the model processing method are completed on the cloud gaming server. The game picture is presented on the client side of the cloud gaming, and the cloud gaming client is mainly used for receiving and sending game data and presenting game pictures. For example, the cloud gaming client can be a display device close to the user side with data transmission function, such as a mobile terminal, a television, a computer, a palm computer, a personal digital assistant, etc., but the terminal device executing the model processing method is the cloud server of the cloud. When playing the game, the user operates the cloud gaming client to send operation instructions to the cloud gaming server, the cloud gaming server runs the game according to the operation instructions, encodes and compresses the game picture and other data, returns them to the cloud gaming client through the network, and finally decodes and outputs the game picture through the cloud gaming client.

[0071] Please refer to Figure 1 , Figure 1A system schematic diagram of the display control device in a game provided by the embodiments of the present application. The system can include at least one terminal 1000, at least one server 2000, at least one database 3000, and a network 4000. The terminal 1000 held by a user can be connected to the server of different games through the network 4000. The terminal 1000 is any device with computing hardware capable of supporting and executing software products corresponding to the game. In addition, the terminal 1000 has one or more multi-touch screens for sensing and obtaining the input of the user through the touch or sliding operation performed at one or more points of the touch display screen. In addition, when the system includes multiple terminals 1000, multiple servers 2000, and multiple networks 4000, different terminals 1000 can be connected to each other through different networks 4000, through different servers 2000. The network 4000 can be a wireless network or a wired network, such as a wireless network being a wireless local area network (WLAN), a local area network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc. In addition, different terminals 1000 can also use their own Bluetooth network or hotspot network to connect to other terminals or servers, etc. For example, multiple users can be online through different terminals 1000 to support multi-player games by connecting through appropriate networks and synchronizing with each other. In addition, the system can include multiple databases 3000, and the multiple databases 3000 are coupled to different servers 2000, and information related to the game environment can be continuously stored in the database 3000 when different users are online for multi-player games.

[0072] Embodiments of the present application provide a model processing method, which can be executed by a terminal or a server. Embodiments of the present application take the model processing method executed by a terminal as an example to illustrate. The terminal includes a display component and a processor. The display component is configured to present a graphical user interface and receive an operation instruction generated by a user acting on the display component. When the user operates the graphical user interface through the display component, the graphical user interface can control the content of the terminal locally in response to the received operation instruction, or control the content of the server at the other end in response to the received operation instruction. For example, the operation instruction generated by the user acting on the graphical user interface includes an instruction for starting a game application. The processor is configured to start the game application after receiving the instruction for starting the game application provided by the user. In addition, the processor is configured to render and draw a graphical user interface associated with the game on a touch display screen. The touch display screen is a multi-touch screen capable of sensing the touch or sliding operation of multiple points on the screen at the same time. When the user uses a finger to perform a touch operation on the graphical user interface, the graphical user interface controls different game characters in the graphical user interface of the game to perform actions corresponding to the touch operation when the touch operation is detected. For example, the game can be any one of a casual game, an action game, a role-playing game, a strategy game, a sports game, a puzzle game, a first person shooting game (FPS), etc. The game can include a game scene drawn on the graphical user interface. In addition, the game scene of the game can include one or more game characters controlled by the user (or player), such as a game character. In addition, the game scene of the game can also include one or more obstacles, such as a railing, a ditch, a wall, etc., to limit the movement of the game character, for example, to limit the movement of one or more objects to a specific area within the game scene. Optionally, the game scene of the game also includes one or more elements, such as skills, scores, character health status, energy, etc., to provide assistance to the player, provide virtual services, increase scores related to the performance of the player, etc. In addition, the graphical user interface can also present one or more indicators to provide indication information to the player. For example, the game can include a game character controlled by the player and one or more other game characters (such as enemy characters). In an embodiment, the one or more other game characters are controlled by other players of the game. For example, the one or more other game characters can be controlled by a computer, such as a robot using an artificial intelligence (AI) algorithm, to implement a man-machine combat mode. For example, the game character has various skills or abilities used by the game player to achieve the goal. For example, the game character has one or more weapons, props, tools, etc. that can be used to eliminate other objects from the game. Such skills or abilities can be activated by the player of the game using one of the plurality of preset touch operations of the touch display screen of the terminal.The processor can be configured to present a corresponding game picture in response to an operation instruction generated by a touch operation of a user.

[0073] It should be noted that, Figure 1 The system schematic diagram of the model processing apparatus shown is only an example, and the model processing apparatus and the scenario described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. It can be known by those skilled in the art that, as the model processing apparatus evolves and new business scenarios appear, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0074] In the embodiment, the display control apparatus in the game will be described from the perspective of the display control apparatus in the game, which can be integrated in a computer device with a storage unit and a microprocessor installed and having computing power.

[0075] Please refer to Figure 2 , Figure 2 The flowchart of the model processing method provided by the embodiments of the present application includes the following steps:

[0076] Step 201, obtaining a plurality of to-be-spliced modules.

[0077] The to-be-spliced module refers to a single virtual block element constituting a model, and each to-be-spliced module is a part of the model. A complete model can be obtained by splicing a plurality of to-be-spliced modules.

[0078] In some embodiments, the plurality of to-be-spliced modules can belong to the same model element. The model element refers to different categories of models in the scene where the model is located, such as a mountain model, an ocean model, a land model, a character model, etc.

[0079] In some scenarios, taking the mountain model as an example, the above plurality of to-be-spliced modules can be obtained from the foot area, the waist area and the peak area of the mountain model, or any mountain model in the scene. It can be understood that even if the plurality of to-be-spliced modules can be obtained from different models, or different areas, different positions of the same model, as long as the above plurality of to-be-spliced modules belong to the same model element, the splicing of the plurality of to-be-spliced modules will not be affected, for example, a new mountain model can be obtained by splicing the plurality of to-be-spliced modules.

[0080] In some embodiments, the plurality of to-be-spliced modules of the corresponding model element can be obtained from the model material library as needed, or a to-be-spliced module can be first made, and then the to-be-spliced module is copied to obtain a plurality of to-be-spliced modules. It can be known that the above two acquisition methods can ensure that the plurality of to-be-spliced modules belong to the same model element.

[0081] Step 202, according to the hierarchical information, the plurality of modules to be spliced is spliced to obtain a target model.

[0082] The hierarchical information can include the height and coordinates of the level corresponding to the module to be spliced. The level refers to a coordinate space in a scene where the model is located, which is distinguished by height.

[0083] The height of the level refers to the height value of the coordinate space formed by the level, for example, the height value can be 100, 200, etc. The coordinates of the level refer to the coordinate value of the boundary vertex or any reference point in the coordinate space formed by the level, for example, the coordinate value can be (0, 0, 100), (0, 0, 200), etc.

[0084] Please refer to Figure 4 , Figure 4 The schematic diagram of the correspondence between the module to be spliced and the level provided by the embodiments of the present application. As Figure 4 shown, in the scene where the model is located, a plurality of levels can be set along the height direction of the level, for example, the first level, the second level, …, the nth level, etc. In some embodiments, any model in the scene can be in different levels, for example, the mountain model in the game scene. Since the mountain model usually has a certain height effect in the game, it is necessary to make mountain modules located in different levels.

[0085] As Figure 4 shown, assuming that the height of each level is 100, the starting height of the first level is 0 and the maximum height is 100, and the starting height of the second level is 100 and the maximum height is 200. Accordingly, assuming that the point of the z-axis in the three-dimensional coordinate system is the reference point of the level coordinates, and the position of the starting height of the level is the reference datum of the coordinate value, the coordinates of the first level can be (0, 0, 0), and the coordinates of the second level can be (0, 0, 100), or the position of the maximum height of the level is the reference datum of the coordinate value, the coordinates of the first level can be (0, 0, 100), and the coordinates of the second level can be (0, 0, 200). This embodiment does not limit this.

[0086] It can be understood that after determining the level information in the scene, the modules to be spliced can be spliced according to the production requirements of the model. Still as Figure 4 shown, assuming that a mountain model with a height of 200 is desired, the modules to be spliced can be spliced in the first level and the second level, for example, a part of the modules to be spliced can be spliced in the first level to obtain the foot and the waist of the mountain model, and then the modules to be spliced in the second level can be superimposed above the modules to be spliced in the first level to obtain the peak of the mountain model.

[0087] The target model can include a plurality of regions, and the module to be spliced can be fitted with the region.

[0088] Please refer to Figure 5 , Figure 5 The schematic diagram provided by the embodiment of the present application for splicing the to-be-spliced modules in the region. As shown in Figure 5 , for a model or a piece of scene space in the scene, it can be divided into four regions, for example, the first region, the second region, the third region and the fourth region divided by two perpendicular intersecting straight lines in Figure 5 . It can be understood that since the to-be-spliced module is a block element, it can be further made into a cubic block for the convenience of splicing, so that the to-be-spliced module can be fitted in the corresponding region and spliced with other to-be-spliced modules.

[0089] Optionally, step 202 can further include the following steps:

[0090] Adjust the height value of each to-be-spliced module to the height of the level;

[0091] According to the coordinates of the level, place the adjusted to-be-spliced module in the region to splice the plurality of to-be-spliced modules to obtain the target model.

[0092] In some embodiments, in order to improve the efficiency and accuracy of module splicing, the height value of each to-be-spliced module can be unified with the height of the level. For example, the height of the level is 100, and the height value of each to-be-spliced module is 100, so that the shape and size of each to-be-spliced module are the same, which facilitates subsequent rapid splicing.

[0093] In some embodiments, the to-be-spliced module with the unified height value can be spliced according to the coordinates of the level. For example, two to-be-spliced modules a and b belong to the first level and the second level respectively, then the to-be-spliced module b is to be spliced on top of the to-be-spliced module a, so that the starting height of the to-be-spliced module b corresponds to the starting height of the second level, and the accuracy of the starting height and coordinates of each to-be-spliced module needs to be determined during splicing. In some embodiments, the starting height of the to-be-spliced module can be expressed as:

[0094] Height = Layer * MeshBound.z (1)

[0095] Wherein, Height in formula (1) represents the starting height of the to-be-spliced module, Layer is a hierarchical parameter, the hierarchical parameter of the first level is 0 by default, and the hierarchical parameters of the second level, …, and the n th level are 1, …, and n-1 respectively. MeshBound represents a mesh boundary vertex, z represents a z-axis of a three-dimensional coordinate system, MeshBound.z represents a maximum span value of the corresponding level in the z-axis direction, and MeshBound.z is equivalent to the height value of the level in this application, such as 100, 200, etc.

[0096] Taking the to-be-spliced module b as an example, when the model is made, it is desired to splice the to-be-spliced module b in the second level, and the height of each level is 100. The starting height of the to-be-spliced module b can be calculated by formula (1), that is, Height = 1 x 100 = 100.

[0097] Compared with Figure 4 In the middle, the to-be-spliced module is spliced in different levels in the side view direction, Figure 5 The to-be-spliced module is spliced in different regions in the top view direction. As shown in Figure 5 As shown, the to-be-spliced module a can be placed in the second region, and the to-be-spliced module b can be placed in the fourth region, so that the to-be-spliced module a and the to-be-spliced module b form an intersection to realize splicing. It can be understood that after all the to-be-spliced modules in the corresponding region are spliced, the target model can be obtained.

[0098] It can be understood that, taking a mountain model as an example, in order to restore the real and huge display effect of the mountain, to-be-spliced modules can be placed in the corresponding four regions at different positions in the scene, and each to-be-spliced module itself can also be further divided into four regions to be spliced with other to-be-spliced modules. The position, number of regions, and whether each region is placed with a to-be-spliced module are not limited in this embodiment.

[0099] Step 203, obtaining the normal map of the target model.

[0100] Wherein, the texture map refers to an effect map used when rendering the target model, such as an erosion effect map, a lighting effect map, etc. Taking erosion rendering as an example, whether the rendering effect of rain erosion or sand erosion is performed on the target model, different erosion intensities should be set for different faces and different vertices of the target model to restore the real effect of the target model in the scene.

[0101] Taking a game scene as an example, the mountain model of the scene can span multiple levels, and the angles, positions and concave-convex degrees of each face of different levels in the mountain model are different, so that the degrees of different faces and different vertices in the mountain model subjected to erosion rendering are different.

[0102] Wherein, step 203 can further include the following steps:

[0103] performing face subdivision processing on the target model to obtain a high face model corresponding to the target model;

[0104] calculating first normal information of the high face model according to the relative position of the texture map and the high face model;

[0105] converting the first normal information into second normal information of the target model to generate the normal map storing the second normal information.

[0106] In some embodiments, the target model can be subjected to face subdivision processing on the basis of the original plane, so that the number of faces of the target model is increased, and a high face model with more faces is obtained. That is, the low face and the high face refer to the number of model planes. The original plane of the target model corresponds to a small number of planes, which can be regarded as a low face model. The plane number of the target model after subdivision processing is larger, which can be regarded as a high face model. It can be understood that, since the number of faces of the high face model is larger, the relative positions, angles and concave-convex degrees of each face in the high face model are more complex than those of the target model with a smaller number of faces. Therefore, rendering the high face model can better reflect the real display effect. The normal direction of the high face model can be stored in the form of pixels on the surface of the target model, and the target model with the normal map will have the rendering effects such as light and shadow changes and erosion degree of the high face model, so as to look like the high face model.

[0107] The normal map refers to a normal line at each point on the concave-convex surface of the model, and the direction of the normal line is marked by an RGB color channel. It can be understood as another different surface parallel to the original concave-convex surface, but in fact it is only a smooth plane. For visual effects, it is more efficient than the original concave-convex surface. If rendering is performed at a specific position, a surface with a lower degree of detail can generate a high degree of rendering effect.

[0108] Optionally, the step of performing face subdivision processing on the target model to obtain a high face model corresponding to the target model comprises:

[0109] generating a subdivision point on each edge corresponding to a triangular face of the target model;

[0110] obtaining a subdivision triangular face formed by connecting lines between a plurality of the subdivision points;

[0111] iteratively repeating the above steps until the number of iterations reaches a preset number of times of the face subdivision processing, and obtaining the high face model composed of a plurality of the subdivision triangular faces.

[0112] Please refer to Figure 6 , Figure 6This is a schematic diagram illustrating the subdivision surface processing of a target model as provided in an embodiment of this application. Figure 6 As shown, assuming that surface ABCD is any surface of the target model, we now perform surface subdivision processing on surface ABCD.

[0113] Specifically, first Figure 6 The face ABCD in the model is divided into two triangular faces, namely face ABC and face BCD. Face subdivision essentially involves subdividing each triangular face's edges to create new vertices. For example, three new vertices can be created at the midpoints of edges AB, AC, and BC, namely subdivision points E, G, and F. After generating these new vertices, they are connected to the existing vertices in the model to obtain the subdivided surfaces, namely the subdivided triangular faces AEG, EFG, CGF, and BEF. Accordingly, this process completes one subdivision face processing step. In the second subdivision face processing step, the same process of obtaining subdivision points is performed on each edge of the subdivided triangular face. In some embodiments, a preset number of iterations of the face subdivision process can be set according to the model creation and processing requirements. The processing terminates when the preset number of iterations is reached.

[0114] In some embodiments, the system can perform surface subdivision processing on the target model by executing the following components:

[0115]

[0116] In some embodiments, whenever the subdivision surface processing generates new subdivision points and subdivision surfaces, the data of the subdivision points can be stored in the vertex list of the target data, and the data of the subdivision surfaces can be stored in the face list of the target data, so as to ensure that the target model does not have vertex offset errors when converting between two-dimensional and three-dimensional.

[0117] Optionally, the step "calculating the first normal information of the high surface model based on the relative position of the texture map and the high surface model" includes:

[0118] Obtain the positional mapping relationship between the first pixel on the texture map and the second pixel on the elevation model;

[0119] Based on the position mapping relationship, the rendering coefficient of each second pixel is obtained;

[0120] Based on the rendering coefficients and the position mapping relationship, the normal coordinates of each second pixel are calculated to obtain the first normal information.

[0121] In some embodiments, a texture map can be input first, which has an initial position and angle. It can be understood that, taking erosion rendering as an example, in reality, wind and rain erosion will erode mountains and ground in the scene environment to varying degrees. For example, the surface closer to the wind and sand will be more heavily eroded, while the surface farther away from the wind and sand will be less heavily eroded. Therefore, the rendering coefficients and normal information of each face can be calculated by the relative position of the texture map and the high-polygon model.

[0122] Based on the above description, let's further explain the principle of rendering the color parameters of the texture map onto the model surface. For any second pixel on the model surface, there is a corresponding first pixel in the texture map. Under ideal rendering conditions, the color value of the first pixel is equal to the color value of the second pixel. For example, rendering effects such as sunlight and erosion on the first pixel can be completely mapped onto the second pixel under ideal angles and unobstructed conditions. To ensure the realism of the model rendering effect in the scene, the rendering intensity will decrease due to the angle and position of different faces of the model. Therefore, the rendering coefficient of each pixel can be calculated first.

[0123] Please see Figure 7 , Figure 7 This is a schematic diagram illustrating the generation of first normal information provided in an embodiment of this application. For example... Figure 7 As shown, taking the rendering of one surface of a high-poly model using a texture map as an example, when the texture map is in its current position, first pixel A corresponds to second pixel B. When the texture map is in a position that achieves the best rendering effect for second pixel B, first pixel C corresponds to second pixel B. The positional mapping relationship between the first and second pixels includes both the positional mapping between first pixel A and second pixel B, and the positional mapping between first pixel C and second pixel B. In some embodiments, first pixel C can be obtained by projecting second pixel B onto the texture map when the texture map is orthogonally projected onto the high-poly model.

[0124] Still as Figure 7 As shown, when the texture map is orthogonal to the surface where the second pixel B is located, it needs to be rotated by θ°. According to the calculation rules of rendering coefficients, if the texture map has a certain angle relative to the ideal position of a certain pixel, the product of the color value of the R channel (referred to as R value) and the cosine of the rotation angle θ can be used as the rendering coefficient of that pixel, i.e., R·cosθ. When calculating the rendering coefficients, the offset direction between the first pixel C and the first pixel A must also be considered. The specific rule is to invert the direction of the original pixel position mapping, and then take the difference between this and the normal direction of the second pixel to obtain the direction of the vector as the offset direction. Figure 7 For example, the vector is Make the calculation The direction of the first pixel point C offset to the first pixel point A can accurately reflect the offset direction of the x-axis. In the rendering process, the R value corresponds to the x-axis of the three-dimensional space, and thus the R-cosθ is finally converted to -(R-cosθ) as the actual rendering coefficient of the second pixel point B in the texture map.

[0125] In some embodiments, the normal coordinates of each second pixel point can be calculated according to the rendering coefficient and the position mapping relationship to obtain the first normal information. Specifically, after the rendering coefficient of each second pixel point in the high surface model is calculated, the product of the rendering coefficient and the color value of the corresponding first pixel point C can be taken as the normal coordinate of the second pixel point, for example, the color value of the C point is (0.5, 0.5, 0.5) and the rendering coefficient is -0.5, and thus the normal coordinate of the second pixel point is (-0.25, -0.25, -0.25). Further, the normal coordinates of all second pixel points can be obtained to obtain the first normal information containing the normal coordinates of all pixel points of the high surface model.

[0126] Optionally, the step of "converting the first normal information into the second normal information of the target model" comprises:

[0127] obtaining a third pixel point of the target model and a tangent space corresponding to the third pixel point;

[0128] obtaining a first coordinate value of a vector corresponding to the third pixel point and a target second pixel point, wherein the target second pixel point is the closest point to the third pixel point in the high surface model;

[0129] converting each first coordinate value into a second coordinate value to obtain the second normal information containing the second coordinate value.

[0130] The tangent space refers to a space surrounded by a tangent, an auxiliary tangent and a normal of a vertex on a model. In the process of normal map conversion, the normal coordinate and other data need to be converted to the tangent space to facilitate subsequent production of the model.

[0131] In some embodiments, the high surface model and the target model can be placed in the same space, the number of surfaces of the high surface model is greater than that of the target model, and thus there are multiple different pixel points between the two models. In some embodiments, for any third pixel point on the target model, the closest second pixel point can be obtained, a first coordinate value of a vector connected by the two pixel points is obtained, for example, the first coordinate value is (0, 0, 1), and then the first coordinate value is converted into a second coordinate value through the following formula:

[0132] pixel = (normal + 1) / 2 (2)

[0133] Wherein, pixel in formula (2) is the second coordinate value, and normal is the first coordinate value. The first coordinate value (0, 0, 1) can be substituted into the formula (2) to obtain the first coordinate value (0.5, 0.5, 1).

[0134] After the first coordinate value is processed into the second coordinate value by the formula (2), the coordinate value with the size of-1 to 1 in the first coordinate value can be converted into 0 to 1, and the second coordinate value with the size of 0 to 1 can be corresponded to the color value of the R, G, B three channels of the target model and the uv coordinate of the target model, so that the first normal information of the high surface model can be stored in the form of color value to the uv space of the target model in this way to obtain the normal map of the target model.

[0135] Wherein, the uv coordinate is a short name of the u, v texture map coordinate, which is similar to the x, y, z axis in the three-dimensional coordinate system. The uv coordinate defines the position information of each point on the picture, and these points are related to the model in the three-dimensional space. Each pixel point on the model in the three-dimensional space can be accurately corresponded through the two-dimensional uv coordinate.

[0136] Step 204, according to the normal map and the hierarchical information, rendering the target model to obtain the rendered target model.

[0137] In the rendering scene of the target model, the operation process of the above steps 201 to 203 is the rendering process performed on the target model in the model making stage to obtain the normal map of the target model, so that the application program of the target model can load the normal map to display the target model in the application interface. In this step 204, the loading information of the texture map can be calculated and stored. Since the technical solution of the present application can splice the to-be-spliced modules with the same shape from different levels, in order to ensure that the model has a high rendering effect, different texture maps can be used for to-be-spliced modules of different levels, so that the texture map used for rendering the to-be-spliced modules of different levels can be obtained by scaling and moving the original texture map. The original texture map can be the first texture map used for rendering.

[0138] Wherein, the loading information can include the scaling times and the displacement of the texture map in different levels. For example, the scaling times of the texture map of a level relative to the original texture map is 1, and the displacement is 2. Wherein, the scaling ratio of each texture map can be fixed, or can be adjusted according to the hierarchical information and the model rendering requirement, which is not limited in the embodiment.

[0139] Optionally, step 204 can include the following steps:

[0140] The second normal information is subjected to Fourier transform processing to obtain a waveform graph corresponding to the second normal information.

[0141] The frequency of the waveform graph is determined as the scaling times, and the phase of the waveform graph is determined as the displacement, to obtain the loading information.

[0142] In some embodiments, the waveform graph of the second normal information can be obtained by the following formula:

[0143]

[0144] In some embodiments, for all pixel points of the target model in the same level, the uv coordinates and the xy coordinates of each pixel point can be substituted into formula (3), and the waveform graph of the second normal information in the level is obtained through Fourier transform. Further, the frequency of the waveform graph is the scaling times of the texture graph of the level, and the phase of the waveform graph is the displacement of the texture graph of the level. Then, the corresponding level texture graph is obtained by combining the initial texture graph with the loading information.

[0145] Therefore, after calculating and storing the loading information, the target application in which the target model is located can accurately restore the texture graph of each level by reading the loading information and only using one texture graph, so as to realize subsequent rendering processing of the target model, thereby significantly improving the efficiency of rendering processing of the target model and reducing the required computing resources for rendering processing.

[0146] In some embodiments, after the target application restores the texture graphs of different levels by reading the loading information, the target model can be rendered in combination with the level information of the target model, so as to improve the rendering processing effect of the target model.

[0147] Optionally, step 205 can include:

[0148] restoring the texture graph in the target application by reading the loading information by the target application;

[0149] rendering the target model based on the texture graph to obtain a target model;

[0150] transition processing the normal information of the target model according to the level information, and loading the rendered target model in the target application.

[0151] In some embodiments, the target model can be obtained by rendering the target model through the texture graph. In order to further optimize the effect of the target model, the normal coordinates of all pixel points of the target model can be transition processed in combination with the level information, so that the transition processed normal coordinates can be fully optimized with the level height factor.

[0152] Optionally, the step "perform transition processing on the normal information of the target model according to the hierarchical information" includes:

[0153] Obtain the height coordinates of the fourth pixel of the target model at the corresponding level;

[0154] Convert the height coordinates into the normal transition ratio of the fourth pixel;

[0155] Based on the normal transition ratio, the normal information of the layer where the fourth pixel is located, and the normal information of the adjacent layers, the normal information of each fourth pixel is calculated.

[0156] In some embodiments, the normal information of the fourth pixel can be calculated using the following formula:

[0157] f = a(xy) + x (4)

[0158] Where a is the normal transition ratio, x is the normal information of the current layer, and y is the normal information of the adjacent layer.

[0159] The parameters in formula (4) are explained in detail below. The normal transition ratio is the ratio of the height value of the fourth pixel to the height of its layer. As an example, assuming the height of each layer is 100, and the fourth pixel is located at a height of 70 in the first layer, the normal transition ratio is 0.7.

[0160] The normal information of the current layer refers to the normal coordinates of the pixel closest to the fourth pixel in the surface corresponding to the initial height of the current layer; the normal information of the adjacent layer refers to the normal coordinates of the pixel closest to the fourth pixel in the layer closest to the fourth pixel.

[0161] Taking the fourth pixel with a height of 70 in the first level as an example, assuming the value of x is (0.1, 0.1, 0.1) and the value of y is (0.2, 0.2, 0.2), substituting the above information into formula (4) can calculate the value of the normal information of the fourth pixel after normal transition processing: 0.7×[(0.1, 0.1, 0.1)-(0.2, 0.2, 0.2)]+(0.1, 0.1, 0.1)=(-0.03, -0.03, -0.03), and the normal information of all fourth pixels after normal transition processing can be obtained through this calculation process.

[0162] It should be noted that the above calculation of the normal information of the fourth pixel can also be used to perform normal transition processing on the first normal information of the high surface model and the second normal information of the target model. This embodiment does not limit this.

[0163] From the above, the embodiment of the present application can effectively realize the reuse of the same element module in the model by splicing a plurality of to-be-spliced modules belonging to the same model element in different levels, thereby improving the efficiency of model production and reducing the resource consumption of model production. On the other hand, the present application can also calculate and store the loading information of the texture map required for rendering the model by using the normal information of the model, so that the application program of the model can quickly load the texture map to render the model, thereby improving the efficiency of model rendering processing and reducing the resource consumption of model production.

[0164] Therefore, based on the above two aspects, the technical scheme of the present application is not limited by the level of the module during model processing, and different modules in different levels do not need to be produced and rendered separately, thereby producing and rendering the model with smaller resource consumption and faster efficiency.

[0165] Please refer to Figure 3 , Figure 3 Another flowchart of the model processing method provided by the embodiment of the present application is shown. The specific process of the method can be as follows:

[0166] Step 301, obtaining a plurality of to-be-spliced modules;

[0167] Step 302, adjusting the height values of the plurality of to-be-spliced modules to the height of the level;

[0168] Step 303, splicing the plurality of to-be-spliced modules in the region of the target scene to obtain a target model;

[0169] Step 304, performing face subdivision processing on the target model to obtain a high-face model;

[0170] Step 305, rendering the high-face model based on the texture map to obtain the normal information of the high-face model;

[0171] Step 306, converting the normal information of the high-face model into a normal map of the target model;

[0172] Step 307, calculating the loading information of the texture map according to the normal map of the target model;

[0173] Step 308, loading the loading information, restoring the rendering texture map, and rendering the target model to obtain a rendered target model;

[0174] In order to better implement the above method, the embodiment of the present application also provides a model processing device, please refer to Figure 8 , Figure 8 The structure diagram of the model processing device provided by the embodiment of the present application is shown. The device comprises:

[0175] The to-be-spliced module acquisition unit 401 is configured to acquire a plurality of to-be-spliced modules, and the plurality of to-be-spliced modules belong to a same model element;

[0176] The target model splicing unit 402 is configured to splice the plurality of to-be-spliced modules according to height information to obtain a target model, wherein the height information comprises a hierarchical number and a height value corresponding to the hierarchical number;

[0177] The normal map acquisition unit 403 is configured to acquire a normal map of the target model by using a texture map;

[0178] The model rendering unit 404 is configured to render the target model according to the normal map and the hierarchical information to obtain a rendered target model.

[0179] Optionally, the target model comprises a plurality of regions, the to-be-spliced modules are embedded in the regions, and the target model splicing unit 402 is further configured to:

[0180] adjust a height value of each to-be-spliced module to a height of the hierarchical number;

[0181] place the to-be-spliced module after adjustment in the region according to a coordinate of the hierarchical number to splice the plurality of to-be-spliced modules to obtain the target model.

[0182] Optionally, the normal map acquisition unit 403 further comprises:

[0183] a high-face model acquisition subunit configured to perform face subdivision processing on the target model to obtain a high-face model corresponding to the target model;

[0184] a first normal information acquisition subunit configured to calculate first normal information of the high-face model according to a relative position of the texture map and the high-face model;

[0185] a second normal information acquisition subunit configured to convert the first normal information into second normal information of the target model to generate the normal map storing the second normal information.

[0186] Optionally, the high-face model acquisition subunit is further configured to:

[0187] generate a subdivision point on each edge corresponding to a triangular face of the target model;

[0188] acquire a plurality of subdivision triangular faces formed by lines between the plurality of subdivision points;

[0189] iteratively repeat the above steps until an iteration number reaches a preset number of the face subdivision processing, and acquire the high-face model composed of the plurality of subdivision triangular faces.

[0190] Optionally, the first normal information obtaining sub-unit is further configured to:

[0191] obtain a position mapping relationship between the first pixel point on the texture map and a second pixel point on the high face model;

[0192] obtain a rendering coefficient of each second pixel point according to the position mapping relationship;

[0193] calculate a normal coordinate of each second pixel point according to the rendering coefficient and the position mapping relationship, to obtain the first normal information.

[0194] Optionally, the second normal information obtaining sub-unit is further configured to:

[0195] obtain a third pixel point of the target model and a tangent space corresponding to the third pixel point;

[0196] obtain a first coordinate value of a corresponding vector between the third pixel point and a target second pixel point, wherein the target second pixel point is a point in the high face model closest to the third pixel point;

[0197] convert each first coordinate value into a second coordinate value, to obtain the second normal information containing the second coordinate value.

[0198] Optionally, the model rendering unit 404 is further configured to:

[0199] render the target model according to the normal map and the level information, to obtain a rendered target model, including:

[0200] perform Fourier transform processing on the second normal information, to obtain a waveform graph corresponding to the second normal information;

[0201] determine a frequency of the waveform graph as the scaling times and determine a phase of the waveform graph as the displacement, to obtain loading information of the texture map;

[0202] read the loading information to restore the texture map;

[0203] perform transition processing on normal information of the target model based on the texture map and the level information, to obtain the rendered target model.

[0204] Optionally, the model rendering unit 404 is further configured to:

[0205] obtain a height coordinate of a fourth pixel point of the target model in a corresponding level;

[0206] convert the height coordinate into a normal transition ratio of the fourth pixel point;

[0207] According to the normal transition ratio, the level and the normal information of adjacent levels where the fourth pixel point is located, the normal information of each fourth pixel point is calculated.

[0208] The embodiment of the application further provides a computer device comprising a processor and a memory, wherein the memory stores a plurality of instructions; and the processor loads the instructions from the memory to perform the steps in the model processing method according to any one of the above embodiments.

[0209] The embodiment of the application further provides a computer readable storage medium storing a plurality of instructions, wherein the instructions are adapted to be loaded by a processor to perform the steps in the model processing method according to any one of the above embodiments.

[0210] A plurality of modules to be spliced are acquired, wherein the plurality of modules to be spliced belong to the same model element;

[0211] The plurality of modules to be spliced are spliced according to level information to obtain a target model, wherein the level information comprises a height and a coordinate of a level corresponding to the module to be spliced.

[0212] A normal map of the target model is acquired by a texture map;

[0213] The target model is rendered according to the normal map and the level information to obtain a rendered target model.

[0214] The target model is rendered according to the normal map and the level information to obtain a rendered target model.

[0215] In specific implementation, each unit above can be implemented as an independent entity, or can be combined as the same or several entities, and the specific implementation of each unit above can be referred to the method embodiments above, which will not be described herein.

[0216] The model processing device provided by the embodiment of the application acquires a plurality of modules to be spliced by the module to be spliced acquisition unit 401, wherein the plurality of modules to be spliced belong to the same model element; splices the plurality of modules to be spliced according to height information by the target model splicing unit 402 to obtain a target model, wherein the height information comprises a level number and a height value corresponding to the level number; acquires a normal map of the target model by the normal map acquisition unit 403; and renders the target model according to the normal map and the level information by the model rendering unit 404 to obtain a rendered target model.

[0217] As can be seen from the above, the embodiments of this application, on the one hand, effectively realize the reuse of the same element modules in the model by splicing multiple modules belonging to the same model element in different levels, thereby improving the efficiency of model making and reducing the resource consumption of model making; on the other hand, this application can also calculate and store the loading information of the texture map required for rendering the model through the normal information of the model, so that the model application can quickly load the texture map to render the model, thereby improving the efficiency of model rendering and reducing the resource consumption of model making.

[0218] Therefore, based on the above two aspects, the technical solution of this application is not limited by the level of the module when processing the model, and there is no need to make and render different modules at different levels separately. It can make and render models with less resource consumption and faster efficiency.

[0219] Accordingly, this application also provides a computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer, personal digital assistant (PDA) and other terminal devices.

[0220] like Figure 9 As shown, Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device 500 includes a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, and a computer program stored on the memory 502 and executable on the processor. The processor 501 and the memory 502 are electrically connected. Those skilled in the art will understand 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, or combine certain components, or have different component arrangements.

[0221] The processor 501 is the control center of the computer device 500. It connects various parts of the computer device 500 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 502, and calling data stored in the memory 502, it performs various functions of the computer device 500 and processes data, thereby monitoring the computer device 500 as a whole.

[0222] In this embodiment, the processor 501 in the computer device 500 loads the instructions corresponding to the processes of one or more applications into the memory 502 according to the following steps, and the processor 501 runs the applications stored in the memory 502 to achieve various functions:

[0223] obtain a plurality of to-be-spliced modules, the plurality of to-be-spliced modules belonging to a same model element;

[0224] splice the plurality of to-be-spliced modules according to hierarchical information to obtain a target model, wherein the hierarchical information includes a height and a coordinate of a level corresponding to the to-be-spliced modules;

[0225] obtain a normal map of the target model;

[0226] texture according to the normal map;

[0227] and the hierarchical information, render the target model to obtain a rendered target model.

[0228] It can be seen that, on one hand, the embodiment of the application effectively realizes reuse of the same element modules in the model by splicing a plurality of to-be-spliced modules belonging to the same model element in different levels, thereby improving the efficiency of model production and reducing resource consumption of model production; on the other hand, the application can also calculate and store loading information of a texture map required for rendering a model through normal information of the model, so that the application program of the model can quickly load the texture map to render the model, thereby improving the efficiency of model rendering processing and reducing the consumed resources of model production.

[0229] Therefore, based on the above two aspects, the technical scheme of the application is not limited by the level of the module when processing the model, and different modules in different levels do not need to be produced and rendered separately, and the model can be produced and rendered with small resource consumption and fast efficiency.

[0230] The specific implementation of each operation can be referred to the foregoing embodiments, which will not be described here.

[0231] Optionally, as shown in Figure 9 The computer device 500 further includes a touch display 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 with the touch display 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 the computer device structure shown in the Figure 9 The computer device structure shown in the

[0232] The touch display screen 503 can be used to display a graphical user interface and receive operation instructions generated by user acting on the graphical user interface. The touch display screen 503 can include a display panel and a touch panel. 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 computer device, which 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), an organic light-emitting diode (OLED), etc. The touch panel can be used to collect touch operations (such as user operations on or near the touch panel using a finger, a stylus or any suitable object or accessory) of the user thereon or therearound, and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel can include two parts of a touch detection device and a touch controller. The touch detection device detects the touch position of the user and detects signals generated by the touch operation, and transmits the signals to the touch controller; the touch controller receives the touch information from the touch detection device, and converts it into touch coordinates, and then sends it to the processor 501, and can receive commands from the processor 501 and execute them. The touch panel can cover the display panel, and when the touch panel detects a touch operation thereon or therearound, it transmits to the processor 501 to determine the type of touch event, and then the processor 501 provides corresponding visual output on the display panel according to the type of touch event. In the embodiments 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 realize the input and output functions as two independent components. That is, the touch display screen 503 can also realize the input function as part of the input unit 506.

[0233] In the embodiments of the present application, the processor 501 executes the game application to generate a graphical user interface on the touch display screen 503, and the game scene on the graphical user interface includes at least one skill control area, and the skill control area includes at least one skill control. The touch display screen 503 is used to present the graphical user interface and receive operation instructions generated by user acting on the graphical user interface.

[0234] The radio frequency circuit 504 can be used to transceive radio frequency signals, so as to establish wireless communication with a network device or other computer device, and transceive signals between the network device or other computer device.

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

[0236] The input unit 506 can be used to receive inputted numbers, character information or user feature information (e.g., fingerprint, iris, face information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0237] 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 be used to manage charging, discharging and power consumption management, etc. The power supply 507 can also include one or more direct current or alternating current power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, etc.

[0238] Although Figure 9 The computer device 500 can also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which are not shown in the figure.

[0239] In the above embodiments, the description of each embodiment focuses on different aspects, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0240] As can be seen from the above, the embodiments of the present application can effectively realize the reuse of the same element modules in the model by splicing a plurality of to-be-spliced modules belonging to the same model element in different levels, thereby improving the efficiency of model production and reducing the resource consumption of model production. On the other hand, the present application can also calculate and store the loading information of the texture map required for rendering the model through the normal information of the model, so that the application program of the model can quickly load the texture map to render the model, thereby improving the efficiency of model rendering processing and reducing the consumption resources of model production.

[0241] Therefore, based on the above two aspects, the technical scheme of the present application is not limited by the level of the module during model processing, and different modules in different levels do not need to be produced and rendered separately, so that the model can be produced and rendered with smaller resource consumption and faster efficiency.

[0242] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling relevant hardware by the instructions, which can be stored in a computer readable storage medium and loaded and executed by a processor.

[0243] To this end, an embodiment of the present application provides a computer readable storage medium, which stores a plurality of computer programs capable of being loaded by a processor to execute steps in any model processing method provided by the embodiments of the present application. For example, the computer program can execute the following steps:

[0244] obtaining a plurality of to-be-spliced modules, the plurality of to-be-spliced modules belonging to a same model element;

[0245] splicing the plurality of to-be-spliced modules according to hierarchical information to obtain a target model, wherein the hierarchical information includes a height and a coordinate of a corresponding level of the to-be-spliced module;

[0246] obtaining a normal map of the target model by a texture map;

[0247] texturing the normal map by the texture map;

[0248] and the hierarchical information, rendering the target model to obtain a rendered target model.

[0249] The specific implementation of each operation can refer to the foregoing embodiments, which will not be described here.

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

[0251] Since the computer program stored in the storage medium can execute steps in any model processing method provided by the embodiments of the present application, the beneficial effects that can be achieved by any model processing method provided by the embodiments of the present application can be achieved. Details can be found in the foregoing embodiments, which will not be described here.

[0252] Reference Figure 10As shown, a program product 61 for implementing the above-described method according to an embodiment of the present application is described, which can take the form of a portable compact disc read-only memory (CD-ROM) and include a program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present application is not limited thereto, and in the present document, the readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0253] The program product can take any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium, for example, can be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0254] The computer readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave, in which the readable program code is carried. Such propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable signal medium can also be any readable medium that is not a readable storage medium and that can transmit, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or device.

[0255] The program code contained on the readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, and the like, or any suitable combination of the above.

[0256] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0257] The foregoing has provided a detailed description of a model processing method, apparatus, storage medium, and computer device provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A model processing method characterized by comprising: The method comprises: obtaining a plurality of to-be-spliced modules, the plurality of to-be-spliced modules belonging to the same model element; splicing the plurality of to-be-spliced modules according to hierarchical information to obtain a target model, wherein the hierarchical information comprises a height and a coordinate of a corresponding level of the to-be-spliced module; obtaining a normal map of the target model; rendering the target model according to the normal map and the hierarchical information to obtain a rendered target model; the target model comprises a plurality of regions of a virtual scene, the to-be-spliced modules are embedded in the regions, and the splicing the plurality of to-be-spliced modules according to the hierarchical information to obtain the target model comprises: adjusting a height value of each to-be-spliced module to a height of the level; placing the adjusted to-be-spliced module in the region according to a coordinate of the level to splice the plurality of to-be-spliced modules to obtain the target model; the obtaining the normal map of the target model comprises: performing face subdivision processing on the target model to obtain a high-face model corresponding to the target model; calculating first normal information of the high-face model according to a relative position of a texture map and the high-face model; converting the first normal information into second normal information of the target model to generate the normal map storing the second normal information; the rendering the target model according to the normal map and the hierarchical information to obtain the rendered target model comprises: performing Fourier transform processing on the second normal information to obtain a waveform graph corresponding to the second normal information; determining a frequency of the waveform graph as a scaling number and determining a phase of the waveform graph as a displacement to obtain loading information of the texture map; reading the loading information to restore the texture map; performing transition processing on normal information of the target model based on the texture map and the hierarchical information to obtain the rendered target model.

2. The model processing method of claim 1, wherein, the performing face subdivision processing on the target model to obtain the high-face model corresponding to the target model comprises: generating a subdivision point on each edge corresponding to a triangular face of the target model; obtaining a subdivision triangular face formed by a line connecting a plurality of subdivision points; iteratively repeating the above steps until an iteration number reaches a preset number of the face subdivision processing, and obtaining the high-face model composed of a plurality of subdivision triangular faces.

3. The model processing method of claim 1, wherein, the calculating the first normal information of the high-face model according to the relative position of the texture map and the high-face model comprises: obtaining a position mapping relationship between a first pixel point on the texture map and a second pixel point on the high-face model; obtaining a rendering coefficient of each second pixel point according to the position mapping relationship; calculating a normal coordinate of each second pixel point according to the rendering coefficient and the position mapping relationship to obtain the first normal information.

4. The model processing method according to claim 3, characterized by, the converting the first normal information into the second normal information of the target model comprises: obtaining a third pixel point of the target model and a tangent space corresponding to the third pixel point; obtain a first coordinate value of a vector corresponding to the third pixel point and a target second pixel point, wherein the target second pixel point is a point in the high-face model closest to the third pixel point; convert each first coordinate value into a second coordinate value to obtain the second normal information including the second coordinate value.

5. The model processing method of claim 1, wherein The transition processing of the normal information of the target model according to the level information includes: obtaining a height coordinate of a fourth pixel point of the target model in a corresponding level; converting the height coordinate into a normal transition ratio of the fourth pixel point; calculating the normal information of each fourth pixel point according to the normal transition ratio, the level and the normal information of adjacent levels in which the fourth pixel point is located.

6. A model processing apparatus characterized by comprising: The device includes: a to-be-spliced module obtaining unit configured to obtain a plurality of to-be-spliced modules, the plurality of to-be-spliced modules belonging to a same model element; a target model splicing unit configured to splice the plurality of to-be-spliced modules according to level information to obtain a target model, wherein the level information includes a height and a coordinate of a corresponding level of the to-be-spliced module; a normal map obtaining unit configured to obtain a normal map of the target model; a model rendering unit configured to render the target model according to the normal map and the level information to obtain a rendered target model; The target model includes a plurality of regions of a virtual scene, the to-be-spliced modules are embedded in the regions, and the target model splicing unit is further configured to: adjust a height value of each to-be-spliced module to a height of the level; place the adjusted to-be-spliced module in the region according to a coordinate of the level to splice the plurality of to-be-spliced modules to obtain the target model; The normal map obtaining unit is further configured to: perform face subdivision processing on the target model to obtain a high-face model corresponding to the target model; calculate first normal information of the high-face model according to a relative position of a texture map and the high-face model; convert the first normal information into second normal information of the target model to generate the normal map storing the second normal information; The model rendering unit is further configured to: perform Fourier transform processing on the second normal information to obtain a waveform graph corresponding to the second normal information; determine a frequency of the waveform graph as a scaling number and determine a phase of the waveform graph as a displacement to obtain loading information of the texture map; read the loading information to restore the texture map; perform transition processing on the normal information of the target model based on the texture map and the level information to obtain the rendered target model.

7. A computer device, characterized by The device includes a processor and a memory, the memory storing a plurality of instructions; the processor loads the instructions from the memory to perform the steps in the model processing method of any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions, the instructions being adapted to be loaded by a processor to perform the steps in the model processing method of any one of claims 1-5.

Citation Information

Patent Citations

  • Image processing method and device, storage medium and electronic device

    CN108176048A

  • Topographic image rendering method, device and equipment and computer readable storage medium

    CN114677467A