Virtual model rendering method and device, storage medium and electronic device

By dividing and decoupling art resources, multiple material layers are generated, solving the problem of low material iteration efficiency in virtual models, enabling rapid material iteration and rendering, and improving model quality consistency and game engine performance.

CN115375813BActive Publication Date: 2026-07-21NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 3 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
2022-08-11
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing technologies, the materials of virtual models are coupled with the models themselves, resulting in low material iteration efficiency, and putting pressure on the performance of the game engine and the game package during the rendering process, as well as high material iteration costs.

Method used

By dividing art resources, model information, material information, and related information are obtained, and multiple material layers are generated based on the material information, decoupling the relationship between the model and the material, and realizing rapid iteration and rendering of materials.

Benefits of technology

It improves the efficiency of material iteration, reduces the impact on game engine performance, lowers the cost of material iteration, and avoids the problem of inconsistent model quality caused by differences in the skills of artists.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115375813B_ABST
    Figure CN115375813B_ABST
Patent Text Reader

Abstract

The application discloses a virtual model rendering method and device, a storage medium and an electronic device. The method comprises the following steps: obtaining an art resource of a model to be rendered; dividing the art resource to obtain model information, material information and association information, wherein the model information is used to represent attribute information of the model to be rendered, the material information is used to represent material performance of the model to be rendered, and the association information at least comprises a corresponding relationship between the model information and the material information; generating a plurality of material layers based on the material information, wherein each material layer corresponds to different types of materials; and rendering the model to be rendered based on the plurality of material layers, the model information and the association information to obtain a first target model. The application solves the technical problem that, in the prior art, due to the mutual coupling of materials and models, the material iteration efficiency is low when the virtual model is rendered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computers, and more specifically, to a method, apparatus, storage medium, and electronic device for rendering virtual models. Background Technology

[0002] Currently, as players demand higher quality game art, game development cycles are becoming increasingly longer to meet these demands. With the increasing emphasis on high-quality games, traditional model-texture art assets are finding it increasingly difficult to meet the required precision. Furthermore, due to the longer development cycles, high-quality models and textures from the early stages of a project may not meet the needs of later stages. Additionally, traditional methods of creating models and textures are costly to iterate on, resulting in low development efficiency.

[0003] In existing technologies, Substance Painter's DCC tool is typically used to create various material maps, such as albedo maps, metallic maps, normal maps, and ambient occlusion maps. In game engines, these material maps are directly attached to the corresponding materials to achieve the rendering of the virtual model.

[0004] Existing material creation methods primarily focus on material accuracy, ensuring material quality. However, the actual appearance of materials on virtual models is affected by the varying skill levels of different artists, especially in different environments, leading to inconsistent material quality. Furthermore, existing methods are also influenced by texture resolution; higher resolution textures are required for better visuals, necessitating a large number of textures for close-ups of virtual models, thus placing significant strain on game engine performance and file size. Additionally, if parameters of the virtual model change during material creation, artists must recreate the textures, a cumbersome process that reduces iteration efficiency. Moreover, in existing methods, replacing texture maps during iteration requires redrawing them, increasing production costs and further reducing iteration efficiency.

[0005] There is currently no effective solution to the above problems. Summary of the Invention

[0006] At least some embodiments of the present invention provide a rendering method, apparatus, storage medium and electronic device for virtual models, so as to at least solve the technical problem of low material iteration efficiency when rendering virtual models due to the coupling between materials and models in the prior art.

[0007] According to one embodiment of the present invention, a rendering method for a virtual model is provided, comprising: acquiring art resources of a model to be rendered; dividing the art resources to obtain model information, material information, and association information, wherein the model information is used to characterize the attribute information of the model to be rendered, the material information is used to characterize the material performance of the model to be rendered, and the association information includes at least the correspondence between the model information and the material information; generating multiple material layers based on the material information, wherein each material layer corresponds to a different type of material; and rendering the model to be rendered based on the multiple material layers, the model information, and the association information to obtain a first target model.

[0008] According to one embodiment of the present invention, a rendering apparatus for a virtual model is also provided, comprising: an acquisition module for acquiring art resources of a model to be rendered; a classification module for classifying the art resources to obtain model information, material information, and association information, wherein the model information is used to characterize the attribute information of the model to be rendered, the material information is used to characterize the material performance of the model to be rendered, and the association information includes at least the correspondence between the model information and the material information; a generation module for generating multiple material layers based on the material information, wherein each material layer corresponds to a different type of material; and a rendering module for rendering the model to be rendered based on the multiple material layers, the model information, and the association information to obtain a first target model.

[0009] According to one embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, wherein the computer program is configured to execute the above-described rendering method of the virtual model at runtime.

[0010] According to one embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to execute the above-described virtual model rendering method.

[0011] In at least some embodiments of this application, a method is adopted to decouple model information and material information in art resources. After obtaining the art resources of the model to be rendered, the art resources are divided to obtain model information, material information and related information. Multiple material layers are generated based on the material information. Finally, the model to be rendered is rendered based on the multiple material layers, model information and related information to obtain the first target model. The model information is used to characterize the attribute information of the model to be rendered, the material information is used to characterize the material performance of the model to be rendered, and the related information includes at least the correspondence between model information and material information. Each material layer corresponds to a different type of material.

[0012] In the aforementioned process, the art resources were divided into model information, material information, and associated information. Specifically, in this application, the model information and material information within the art resources are decoupled. Therefore, when adjusting the model information of the virtual model, there is no need to adjust the material information or redraw textures, thus improving the efficiency of material iteration. Furthermore, in this application, the material layer is generated based on the material information, and different material layers correspond to different types of materials. Therefore, during the rendering process, if it is necessary to change the material of the virtual model, it is only necessary to switch the current material layer to the corresponding material layer, without modifying the material information or redrawing textures, further improving the efficiency of material iteration.

[0013] As can be seen from the above, the solution provided in this application achieves the purpose of rendering virtual models, thereby improving the technical effect of material iteration efficiency, and thus solving the technical problem of low material iteration efficiency when rendering virtual models due to the coupling between materials and models in the prior art. Attached Figure Description

[0014] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0015] Figure 1 This is a hardware structure block diagram of a mobile terminal for a virtual model rendering method according to an embodiment of the present invention.

[0016] Figure 2 This is a flowchart of a virtual model rendering method according to one embodiment of the present invention;

[0017] Figure 3 This is a schematic diagram of third material information according to one optional embodiment of the present invention;

[0018] Figure 4 This is a schematic diagram of fourth material information according to one optional embodiment of the present invention;

[0019] Figure 5 This is a schematic diagram of a door lock model according to one optional embodiment of the present invention;

[0020] Figure 6 This is a material schematic diagram corresponding to a metal material according to one optional embodiment of the present invention;

[0021] Figure 7 This is a material diagram corresponding to the fabric material of one optional embodiment of the present invention;

[0022] Figure 8This is a material schematic diagram corresponding to the leather material according to one optional embodiment of the present invention;

[0023] Figure 9 This is a schematic diagram of a key model according to one optional embodiment of the present invention;

[0024] Figure 10 This is a schematic diagram of a normal map according to one optional embodiment of the present invention;

[0025] Figure 11 This is a schematic diagram of an environment occlusion map according to one optional embodiment of the present invention;

[0026] Figure 12 This is a schematic diagram of a hybrid texture according to one optional embodiment of the present invention;

[0027] Figure 13 This is a schematic diagram of a hybrid texture according to one optional embodiment of the present invention;

[0028] Figure 14 This is a schematic diagram of a key ring material texture according to one optional embodiment of the present invention;

[0029] Figure 15 This is a schematic diagram of a key body metal sticker according to one optional embodiment of the present invention;

[0030] Figure 16 This is a schematic diagram of a rubber material texture on a key handle according to one optional embodiment of the present invention;

[0031] Figure 17 This is a schematic diagram of a dirt texture according to one optional embodiment of the present invention;

[0032] Figure 18 This is a schematic diagram of a scratch mapping according to one optional embodiment of the present invention;

[0033] Figure 19 This is a schematic diagram of a brass key model according to one optional embodiment of the present invention;

[0034] Figure 20 This is a structural block diagram of a virtual model rendering apparatus according to one optional embodiment of the present invention;

[0035] Figure 21 This is a schematic diagram of an electronic device according to one optional embodiment of the present invention. Detailed Implementation

[0036] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0037] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0038] According to one embodiment of the present invention, an embodiment of a rendering method for a virtual model is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0039] This method embodiment can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smartphone (such as an Android phone, iOS phone, etc.), tablet computer, PDA, mobile Internet Device (MID), PAD, game console, and other terminal devices. Figure 1 This is a hardware structure block diagram of a mobile terminal for a virtual model rendering method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a central processing unit (CPU), graphics processing unit (GPU), digital signal processing (DSP) chip, microprocessor (MCU), programmable logic device (FPGA), neural network processor (NPU), tensor processor (TPU), artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data are also shown. Optionally, the mobile terminal may further include a transmission device 106 for communication functions, an input / output device 108, and a display device 110. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0040] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the virtual model rendering method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the aforementioned virtual model rendering method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0041] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0042] The inputs in input / output device 108 can come from multiple human interface devices (HIDs). Examples include keyboards and mice, gamepads, and other dedicated game controllers (such as steering wheels, fishing rods, dance mats, and remote controls). Some HIDs, in addition to providing input functions, can also provide output functions, such as force feedback and vibration from gamepads, and audio output from controllers.

[0043] Display device 110 may be, for example, a head-up display (HUD), a touchscreen liquid crystal display (LCD), and a touch display (also referred to as a "touchscreen" or "touch display"). The LCD allows a user to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), which allows the user to interact with the GUI by touching and / or gesturing on a touch-sensitive surface. Optional human-computer interaction functions include: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, a call interface, playing digital video, playing digital music, and / or web browsing, etc. Executable instructions for performing the above human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.

[0044] In one embodiment of this disclosure, the virtual model rendering method can run on a local terminal device or a server. When the virtual model rendering method runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0045] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separated. The storage and execution of the virtual model rendering method are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the information processing is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses the game screen and other data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.

[0046] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), i.e., conventionally by downloading, installing, and running the game program via an electronic device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling the display of the GUI on the display screen.

[0047] In one possible implementation, this invention provides a method for rendering a virtual model, which provides a graphical user interface through a terminal device. The terminal device can be either the aforementioned local terminal device or a client device in the aforementioned cloud interaction system. Figure 2 This is a flowchart of a virtual model rendering method according to one embodiment of the present invention, such as... Figure 2 As shown, the method includes the following steps:

[0048] Step S202: Obtain the art resources of the model to be rendered.

[0049] In step S202, the model to be rendered can be a virtual character model in a game scene or other scene, or it can be a non-human model (e.g., mountains, rocks, trees, rivers, clouds, etc.). The model to be rendered can be the entire virtual model or a part of the virtual model.

[0050] Furthermore, the aforementioned art resources are the resources required for rendering the model to be rendered. The terminal device can read the art resources corresponding to the model to be rendered from a resource library that stores various art resources. For example, the terminal device can read the corresponding art resources from the resource library based on the model identifier of the model to be rendered, where the model identifier can represent the model type of the model to be rendered.

[0051] In addition, the terminal device can also receive a user-defined resource library and read the art resources corresponding to the model to be rendered from the resource library.

[0052] Step S204: Divide the art resources to obtain model information, material information, and related information.

[0053] In step S204, model information is used to characterize the attribute information of the model to be rendered, material information is used to characterize the material performance of the model to be rendered, and associated information includes at least the correspondence between model information and material information. That is, material information is information related to material performance, such as the inherent color information of the material texture, the roughness information of the material, the metallicity information, the specular information, the ambient occlusion information, etc. Model information and associated information are resources in the art assets other than the information related to material performance. For example, model information may include, but is not limited to, the inherent color information of the model material, normal information containing only the bump information of the model, scratch information of the model surface (e.g., position, length, etc.), dirt information of the model surface, groove information of the model surface, ambient occlusion information of the model, roughness information based on the model, etc.; associated information may include, but is not limited to, the mask map (i.e., the mask map) used to distinguish different materials on the model and the correspondence between materials and mask maps.

[0054] It should be noted that in step S204, the art resources are divided into model information, material information, and associated information. In essence, this decouples the model information from the material information. Therefore, modifications to the model information will not affect the material information, and similarly, adjustments to the material information will not affect the model information. Thus, when the model information changes, there is no need to redraw the textures; and when the material needs to be adjusted, only the corresponding material information needs to be adjusted, without redrawing the textures, thereby improving the iteration efficiency of the material.

[0055] Furthermore, it should be noted that in this application, the model information and material information are not completely decoupled, but are decoupled to a certain extent, thereby ensuring the reusability of the virtual model.

[0056] Step S206: Generate multiple material layers based on the material information, wherein each material layer corresponds to a different type of material.

[0057] In step S206, artists can combine material information according to actual needs to obtain multiple different types of materials. For example, artists can obtain two materials with different roughness by modifying the roughness of the material texture.

[0058] Furthermore, after acquiring the combined material information from the artists, the terminal device generates a material layer for each combination. When the user needs to render the model, they can connect the corresponding material layer to the part of the model to be rendered, thus giving the rendered part the material appearance corresponding to that material layer. For example, if the user connects the brass material to the metal part of the key model, the metal part of the key model will then have the appearance effect corresponding to the brass material.

[0059] It should be noted that different types of materials correspond to different material layers. For example, the material layers corresponding to rusted steel, corroded wood, and grayed copper are different. Therefore, during the rendering process of the model to be rendered, users can switch between different material layers as needed to switch the material of the model to be rendered. This process does not require artists to redraw the material maps, thereby improving the iteration efficiency of material maps.

[0060] Step S208: Based on multiple material layers, model information, and related information, render the model to be rendered to obtain the first target model.

[0061] It should be noted that since the association information includes the correspondence between model information and material information, the material type corresponding to each part of the model to be rendered can be determined based on the above correspondence and model information. Then, the corresponding part of the model to be rendered is rendered according to the material layer corresponding to each material type, thereby realizing the rendering of the model to be rendered.

[0062] It should be noted that the same material library is used during the rendering process of the model to be rendered. The material library consists of multiple material layers. Therefore, when rendering different virtual models, the rendered models are basically consistent in terms of model quality. This avoids the problem of large differences in model quality caused by the influence of different artists' production skills on the performance of virtual models in existing technologies.

[0063] Based on the scheme defined in steps S202 to S208 above, it can be understood that in at least some embodiments of this application, a method of decoupling model information and material information in art resources is adopted. After obtaining the art resources of the model to be rendered, the art resources are divided to obtain model information, material information and related information. Multiple material layers are generated based on the material information. Finally, the model to be rendered is rendered based on the multiple material layers, model information and related information to obtain the first target model. The model information is used to characterize the attribute information of the model to be rendered, the material information is used to characterize the material performance of the model to be rendered, and the related information includes at least the correspondence between model information and material information. Each material layer corresponds to a different type of material.

[0064] It is noteworthy that the art resources described above were divided into model information, material information, and associated information. Specifically, in this application, the model information and material information within the art resources are decoupled. This means that when adjusting the model information of the virtual model, there is no need to adjust the material information or redraw textures, thus improving the efficiency of material iteration. Furthermore, in this application, the material layer is generated based on the material information, and different material layers correspond to different types of materials. Therefore, during the rendering process, if it is necessary to change the material of the virtual model, it is only necessary to switch the current material layer to the corresponding material layer, without modifying the material information or redrawing textures, further improving the efficiency of material iteration.

[0065] As can be seen from the above, the solution provided in this application achieves the purpose of rendering virtual models, thereby improving the technical effect of material iteration efficiency, and thus solving the technical problem of low material iteration efficiency when rendering virtual models due to the coupling between materials and models in the prior art.

[0066] In one optional embodiment, during the rendering process of the model to be rendered, after the terminal device obtains the art resources, it divides the art resources. After dividing the art resources and obtaining model information, material information and association information, the terminal device continues to further divide the material information obtained from the division.

[0067] Specifically, the terminal device first obtains sub-material information from the material information. Then, based on the degree of influence of the sub-material information on the material surface, it classifies the material information to obtain first material information and second material information. Furthermore, based on the type of influence of the sub-material information on the material surface, the second material information is classified to obtain third and fourth material information. The first material information indicates that the sub-material information has no impact on the material surface; the second material information indicates that the sub-material information has an impact on the material surface; and the third material information indicates the presence of newly added substances on the material surface, such as… Figure 3 The diagram shows the third material information, which consists of a base material and a surface material, with dust accumulation on the surface material; the fourth material information indicates damage on the material surface, such as... Figure 4 The diagram shown illustrates the fourth material information, which consists of a bottom layer material and a top layer material, with the top layer material being damaged.

[0068] Optionally, the above-mentioned first material information is based on basic information, such as the inherent color or fixed value of the material Tiling texture, the normal information of the material Tiling, the roughness or fixed value of the material Tiling, the metallicity or fixed value of the material Tiling, the specular value of the material Tiling, the ambient light occlusion or fixed value of the material Tiling, etc.

[0069] The aforementioned second material information is non-basic information. This second material information can be further divided into third material information (i.e., dirt type information) and fourth material information (i.e., scratch type information) based on whether it damages the material itself. Optionally, information such as rust, dust, and stains belongs to the third material information. Examples include the inherent color or fixed value of the dirt area's tile texture, the normal information of the dirt area's tile, the roughness or fixed value of the dirt area's tile, the metallicity or fixed value of the dirt area's tile, the highlight or fixed value of the dirt area's tile, and the ambient light occlusion or fixed value of the dirt area's tile. Optionally, information such as scratches, damage, and wear belongs to the fourth material information. Examples include the inherent color or fixed value of the scratch area's tile texture, the normal information of the scratch area's tile, the roughness or fixed value of the scratch area's tile, the metallicity or fixed value of the scratch area's tile, the highlight or fixed value of the scratch area's tile, and the ambient light occlusion or fixed value of the scratch area's tile.

[0070] Optional, with Figure 5 The schematic diagram of the door lock model shown is used as an example for illustration. Figure 5 The door lock model displays the following material information: handle wear, handle rust, door panel scratches, door frame damage, groove dust, and lock stains. Among these, for example... Figure 5 As shown in area 1, the door handle area shows significant wear and tear due to prolonged use, with the metal surface becoming shiny. Therefore, when generating the material for the door handle in the door lock model, wear information needs to be added. Figure 5 As shown in region 2, due to prolonged use, the sweat from human hands corrodes the metal parts of the door handle, resulting in noticeable rust. Therefore, when generating the material corresponding to the door handle in the door lock model, rust information needs to be added to the handle. Figure 5 As shown in area 3, due to usage issues, scratches have appeared on the top of the door panel, rubbing off the surface paint and revealing the original wood color underneath. Therefore, when generating the material corresponding to the door panel in the door lock model, scratch information needs to be added to the door panel. Figure 5As shown in region 4, the impact between the door and the door frame causes damage to the edge of the door, revealing the original color of the wood. Therefore, when generating the material corresponding to the door frame of the door lock model, it is necessary to add door frame damage information; such as Figure 5 As shown in area 5, the door lock groove is prone to dust accumulation. Over time, a significant amount of dust can accumulate in the groove, affecting the lock's appearance. Therefore, when generating the material corresponding to the door lock groove in the door lock model, dust information for the groove needs to be added. Figure 5 As shown in area 6, due to installation issues, some oil stains, water stains, and other dirt have appeared on the door lock. Therefore, when generating the door lock model, the dirt information of the door lock needs to be added.

[0071] It should be noted that the detailed information on the virtual model usually comes from the detailed classification mentioned above. During the process of creating a virtual model, detailed information can be added to the model, that is, the detailed information types mentioned above can be added to improve the performance of the virtual model.

[0072] In addition, the third material information (i.e. dirt type information) and the fourth material information (i.e. scratch type) mentioned above belong to the virtual model itself. The above classification of material information takes into account the performance and memory of the terminal device. While ensuring the rendering effect of the virtual model on the terminal device, it also improves the system performance of the terminal device.

[0073] In one optional embodiment, after dividing the art resources to obtain model information, material information and association information, the terminal device may not use textures, but directly perform mixed processing on the model information and material information based on the association information to render the model to be rendered, thereby obtaining the first target model.

[0074] It's important to note that during the rendering process of the model to be rendered, no textures can be used. Instead, during real-time rendering, information such as normals, ambient occlusion, and surface cavity is used to calculate and render the model. Because this method doesn't use any textures, it avoids the high cost of model rendering caused by creating textures and the performance issues resulting from texture memory consumption.

[0075] In another alternative embodiment, the terminal device can generate a material map based on the material information and render the model to be rendered based on the material map. Specifically, before generating the material map, the terminal device generates multiple material layers based on the material information.

[0076] Specifically, the terminal device combines the sub-material information to obtain multiple types of materials and generates material layers corresponding to these multiple types of materials.

[0077] It should be noted that the material layers mentioned above refer to the template information corresponding to each type of material. Each material corresponds to one material layer, which is composed of multiple sub-material information. For example, material layer 1 corresponds to material A, and the sub-material information contained in material layer 1 is that the inherent color of the material Tiling texture is A1, the roughness of the scratched area Tiling is A2, and the metallicity of the dirty area Tiling is A3. Material layer 2 corresponds to material B, and the sub-material information contained in material layer 2 is that the inherent color of the material Tiling texture is B1, the roughness of the scratched area Tiling is B2, the metallicity of the dirty area Tiling is B3, and the highlight of the dirty area Tilling is B4.

[0078] Optional, Figure 6 A material diagram corresponding to the metal material is shown. Figure 7 This shows a material diagram corresponding to the fabric material. Figure 8 A material diagram corresponding to the leather material is shown.

[0079] It should be noted that since each material layer corresponds to a type of material, when it is necessary to replace the material of a certain part of the model to be rendered, the material layer connected to that part of the model can be replaced directly without redrawing the texture, thereby improving the iteration efficiency of materials.

[0080] Furthermore, after generating multiple material layers based on the material information, the terminal device can generate material maps based on the material layers. Specifically, the terminal device generates material maps corresponding to the material layers and caches the material maps in a preset storage area. Each material map consists of multiple sub-maps, each corresponding to specific material details within the material map.

[0081] It should be noted that texture caching can be done offline or online. Offline caching allows the texture to be retrieved directly from a pre-defined storage area when rendering the model, avoiding the performance degradation caused by real-time texture generation.

[0082] In addition, since the material map is composed of multiple sub-maps, each of which corresponds to the material details in the material map, this application uses a Tiling map to display the material details. This ensures that the material display of the virtual model will not be distorted when the details of the virtual model are magnified, thus making the material performance of the virtual model no longer affected by the map resolution.

[0083] In one optional embodiment, after generating multiple material layers, the terminal device can render the model to be rendered based on the multiple material layers, model information, and associated information to obtain a first target model. Specifically, the terminal device generates a normal map and an environment occlusion map corresponding to the model to be rendered based on the model information, and generates a blend map based on the associated information. Then, it determines the target material layer from the multiple material layers and obtains the material map corresponding to the target material layer to obtain the target material map. Finally, it performs blending processing on the normal map, the environment occlusion map, and the target material map based on the blend map to render the model to be rendered and obtain the first target model.

[0084] Optional, to generate Figure 9 The rendering process described above will be explained using the key model shown as an example. First, the terminal device generates a model based on the key model's information (e.g., shape, size, lighting information, type of required materials, etc.). Figure 10 The normal map shown and Figure 11 The shown environment occlusion map (AO) is generated based on the model information and material information, as shown below. Figure 12 and 13 The image shows a mixed texture. Then, the terminal device obtains the required material layer from multiple material layers; for example, the key ring material is a metal material layer, the key body's metal material layer, and the rubber material layer corresponding to the key handle. Furthermore, the terminal device generates a material texture corresponding to the material based on the aforementioned multiple material layers, such as generating... Figure 14 The key ring texture shown is... Figure 15 The key body metal texture shown is shown. Figure 16 The image shown is a rubber texture map of the key handle.

[0085] Furthermore, to enhance the detail of the key model, the terminal device can also generate a dirt information layer based on the third material information, and generate [something] based on the dirt information layer. Figure 17 The dirt texture shown adds dirt details to the key model. Simultaneously, the terminal device can generate a scratch information layer based on the fourth material information, and generate [something] based on the scratch information layer. Figure 18The scratch texture map shown is used to add scratch details to the key model. Finally, the terminal device blends the key ring material map, the key body metal map, and the key handle rubber material map based on the blending map, and uses dirt maps and scratch maps to add material details, thus obtaining the following result. Figure 9 The rendered key model shown.

[0086] In one optional embodiment, after rendering the model to be rendered based on multiple material layers, model information, and associated information to obtain a first target model, the terminal device can respond to a model information adjustment instruction, adjust the model information to obtain adjusted model information, and then render the model to be rendered based on multiple material layers, adjusted model information, and associated information to obtain a second target model.

[0087] It should be noted that, since the model information and material information are decoupled to a certain extent in this application, when the user needs to modify the texture information of the model to be rendered, the user only needs to modify the texture information of the model to be rendered, without adjusting the texture map. This avoids the problem of low material iteration efficiency caused by redrawing the texture map after modifying the model information of the model to be rendered in the prior art, thereby improving the material iteration efficiency.

[0088] In another optional embodiment, after rendering the model to be rendered based on multiple material layers, model information, and association information to obtain a first target model, the terminal device determines the target model part from the multiple model parts of the model to be rendered, adjusts the material layer of the target model part from the first material layer to the second material layer, and then renders the target model part based on the second material layer, model information, and association information to obtain a third target model.

[0089] Optionally, when the user needs to... Figure 9 When changing the material of the key body in the key model shown, the user only needs to replace the material layer corresponding to the key body to change the material of the key body. For example, the user only needs to replace the material layer corresponding to the key body with the material layer corresponding to brass to change the material of the key body. Figure 9 The material of the key body was changed to brass, thus obtaining... Figure 19 The brass key model shown.

[0090] As described above, this application separates the model information and material information from the art resources, and further categorizes the material information into basic information, dirt information, and scratch information based on its attributes. This material information is then passed to the game engine's material layer, allowing the game engine to render the corresponding texture effect on the model to be rendered based on the material information in the material layer. Simultaneously, the game engine uses Tiling detail textures on the materials to express texture, and uses Mask mapping to assemble the model information and material information, thus obtaining the target rendering model after rendering the model to be rendered.

[0091] It should be noted that in this application, new materials can also be developed based on existing material layers. For example, new materials can be obtained by mixing existing material layers, thereby improving the efficiency of material development. Furthermore, when iterating on materials, only the material layer needs to be iterated. After changing a sub-material information within the material information, the material layer containing that sub-material information will automatically update, thus reducing the iteration cost of resources. In addition, since the material layer itself is based on continuous textures—that is, in this application, the material layer corresponds to the Tiling texture—the solution provided by this application can meet the needs of different resolutions. In this application, art resources do not need to be forcibly bound to art quality and art style, thus allowing for the effective use of accumulated resources when rendering virtual models, achieving the goal of cost reduction and efficiency improvement. Finally, in terms of pure material representation, art resources between projects with different art styles can be reused, and art styles can be modified during project development without incurring excessive costs.

[0092] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0093] This embodiment also provides a virtual model rendering apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0094] Figure 20 This is a structural block diagram of a virtual model rendering apparatus according to one embodiment of the present invention, such as... Figure 20 As shown, the device includes: an acquisition module 2001, a classification module 2003, a generation module 2005, and a rendering module 2007. The acquisition module 2001 acquires the art resources of the model to be rendered; the classification module 2003 categorizes the art resources to obtain model information, material information, and association information, where model information represents the attribute information of the model to be rendered, material information represents the material properties of the model to be rendered, and association information includes at least the correspondence between model information and material information; the generation module 2005 generates multiple material layers based on the material information, where each material layer corresponds to a different type of material; and the rendering module 2007 renders the model to be rendered based on the multiple material layers, model information, and association information to obtain a first target model.

[0095] Optionally, the rendering device for the virtual model further includes: a first acquisition module, a first classification module, and a second classification module. The first acquisition module is used to extract sub-material information from the material information after dividing the art resources and obtaining model information, material information, and related information. The first classification module is used to classify the material information according to the degree of influence of the sub-material information on the material surface, obtaining first material information and second material information, wherein the first material information indicates that the sub-material information has no impact on the material surface, and the second material information indicates that the sub-material information has an impact on the material surface. The second classification module is used to classify the second material information according to the type of influence of the sub-material information on the material surface, obtaining third material information and fourth material information, wherein the third material information indicates the presence of newly added material on the material surface, and the fourth material information indicates the presence of damage on the material surface.

[0096] Optionally, the generation module includes a combination module and a first generation module. The combination module is used to combine sub-material information to obtain multiple types of materials; the first generation module is used to generate material layers corresponding to the multiple material types.

[0097] Optionally, the rendering device for the virtual model also includes a second generation module and a caching module. The second generation module is used to generate material maps corresponding to the material layers after generating multiple material layers based on material information. Each material map consists of multiple sub-maps, each corresponding to material detail information within the material map. The caching module is used to cache the material maps within a preset storage area.

[0098] Optionally, the rendering module includes: a third generation module, a fourth generation module, a second acquisition module, and a first blending module. The third generation module generates the normal map and environment occlusion map corresponding to the model to be rendered based on the model information; the fourth generation module generates a blending map based on association information; the second acquisition module determines the target material layer from multiple material layers and acquires the material map corresponding to the target material layer to obtain the target material map; the first blending module performs blending processing on the normal map, environment occlusion map, and target material map based on the blending map to render the model to be rendered, obtaining the first target model.

[0099] Optionally, the rendering device for the virtual model further includes: a first adjustment module and a first rendering module. The first adjustment module is used to render the model to be rendered based on multiple material layers, model information, and associated information to obtain a first target model, and then, in response to a model information adjustment command, adjust the model information to obtain adjusted model information. The first rendering module is used to render the model to be rendered based on multiple material layers, the adjusted model information, and associated information to obtain a second target model.

[0100] Optionally, the rendering device for the virtual model further includes: a determining module, a second adjusting module, and a second rendering module. The determining module is used to render the model to be rendered based on multiple material layers, model information, and associated information to obtain a first target model, and then determine the target model part from the multiple model parts of the model to be rendered. The second adjusting module is used to adjust the material layer of the target model part from the first material layer to the second material layer. The second rendering module is used to render the target model part based on the second material layer, model information, and associated information to obtain a third target model.

[0101] Optionally, the rendering device for the virtual model also includes: a second mixing module, which, after dividing the art resources to obtain model information, material information and association information, performs mixing processing on the model information and material information based on the association information to render the model to be rendered, thereby obtaining the first target model.

[0102] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0103] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.

[0104] Optionally, in this embodiment, the aforementioned non-volatile storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0105] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0106] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the method according to the embodiments of the present invention.

[0107] In exemplary embodiments of this application, a computer-readable storage medium stores a program product capable of implementing the methods described above in this embodiment. In some possible implementations, various aspects of the embodiments of the present invention can also be implemented as a program product comprising program code, which, when run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this embodiment according to various exemplary embodiments of the present invention.

[0108] According to embodiments of the present invention, a program product for implementing the above-described method may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In the embodiments of the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0109] The aforementioned program product may take the form of any combination of one or more computer-readable media. Such computer-readable storage media may be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (not exhaustive) of computer-readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0110] It should be noted that the program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0111] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0112] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0113] Figure 21 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Figure 21 As shown, the electronic device 2100 is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0114] like Figure 21 As shown, the electronic device 2100 is presented in the form of a general-purpose computing device. The components of the electronic device 2100 may include, but are not limited to: at least one processor 2110, at least one memory 2120, a bus 2130 connecting different system components (including memory 2120 and processor 2110), and a display 2140.

[0115] The memory 2120 stores program code that can be executed by the processor 2110, causing the processor 2110 to perform the steps described in the method section of the embodiments of this application according to various exemplary implementations of the present invention.

[0116] The memory 2120 may include a readable medium in the form of volatile memory cells, such as random access memory (RAM) 21201 and / or cache memory 21202, and may further include read-only memory (ROM) 21203, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.

[0117] In some instances, memory 2120 may also include programs / utilities 21204 having a set (at least one) of program modules 21205, including but not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Memory 2120 may further include memory remotely located relative to processor 2110, which can be connected to electronic device 2100 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0118] Bus 2130 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, peripheral bus, graphics acceleration port, processor 2110, or a local bus using any of the various bus structures.

[0119] Display 2140 may be, for example, a touchscreen liquid crystal display (LCD) that allows a user to interact with the user interface of electronic device 2100.

[0120] Optionally, the electronic device 2100 can also communicate with one or more external devices 2200 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 2100, and / or any device that enables the electronic device 2100 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via the input / output (I / O) interface 2150. Furthermore, the electronic device 2100 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via the network adapter 2160. Figure 21As shown, network adapter 2160 communicates with other modules of electronic device 2100 via bus 2130. It should be understood that, although... Figure 21 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 2100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0121] The aforementioned electronic device 2100 may further include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply, and / or a camera.

[0122] Those skilled in the art will understand that Figure 21 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, electronic device 2100 may also include components that are more... Figure 21 The more or fewer components shown, or having the same Figure 1 Different configurations are shown. The memory 2120 can be used to store computer programs and corresponding data, such as the computer program and corresponding data corresponding to the virtual model rendering method in this embodiment of the invention. The processor 2110 executes various functional applications and data processing by running the computer program stored in the memory 2120, thereby implementing the aforementioned virtual model rendering method.

[0123] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0124] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0125] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0126] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0127] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0128] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0129] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for rendering a virtual model, characterized in that, include: Obtain the art assets of the model to be rendered; The art resources are divided to obtain model information, material information, and association information. The model information represents the attribute information of the model to be rendered, the material information represents the material properties of the model to be rendered, and the association information includes at least the correspondence between the model information and the material information. The material information includes sub-material information, which includes first material information and second material information. The second material information includes third material information and fourth material information. The first material information indicates that the sub-material information does not affect the material surface, the second material information indicates that the sub-material information affects the material surface, the third material information indicates the presence of new material on the material surface, and the fourth material information indicates damage on the material surface. Multiple material layers are generated based on the material information, wherein each material layer corresponds to a different type of material; The material type corresponding to the part of the model to be rendered is determined based on the model information and the association information. Determine the target material layer corresponding to the material type from the plurality of material layers; The target material layer is connected to the part to be rendered in order to render the model to be rendered and obtain the first target model.

2. The method according to claim 1, characterized in that, After dividing the art resources to obtain model information, material information, and association information, the method further includes: Obtain the sub-material information from the material information; Based on the degree of influence of the sub-material information on the material surface, the material information is classified to obtain the first material information and the second material information; Based on the type of influence of the sub-material information on the material surface, the second material information is classified to obtain the third material information and the fourth material information.

3. The method according to claim 2, characterized in that, Multiple material layers are generated based on the material information, including: The sub-material information is combined to obtain multiple types of materials; Generate material layers corresponding to the multiple material types.

4. The method according to claim 3, characterized in that, After generating multiple material layers based on the material information, the method further includes: Generate a material map corresponding to the material layer, wherein the material map is composed of multiple sub-maps, and the multiple sub-maps respectively correspond to the material detail information in the material map; The material texture is cached within a preset storage area.

5. The method according to claim 1, characterized in that, The method further includes: Generate the normal map and environment occlusion map corresponding to the model to be rendered based on the model information; Generate a hybrid texture based on the aforementioned association information; The target material layer is determined from the plurality of material layers, and the material texture corresponding to the target material layer is obtained to obtain the target material texture. The normal map, the environment occlusion map, and the target material map are blended based on the blended map to render the model to be rendered, thereby obtaining the first target model.

6. The method according to claim 1, characterized in that, After connecting the target material layer to the part to be rendered to render the model and obtain the first target model, the method further includes: In response to the model information adjustment command, the model information is adjusted to obtain the adjusted model information; Based on the multiple material layers, the adjusted model information, and the associated information, the model to be rendered is rendered to obtain the second target model.

7. The method according to claim 1, characterized in that, After connecting the target material layer to the part to be rendered to render the model and obtain the first target model, the method further includes: Determine the target model portion from the multiple model portions of the model to be rendered; The material layer of the target model part is changed from the first material layer to the second material layer; Based on the second material layer, the model information, and the associated information, the target model portion is rendered to obtain the third target model.

8. The method according to claim 1, characterized in that, After dividing the art resources to obtain model information, material information, and association information, the method further includes: The model information and material information are mixed based on the association information to render the model to be rendered, thereby obtaining the first target model.

9. A rendering device for a virtual model, characterized in that, include: The acquisition module is used to acquire the art resources of the model to be rendered; The classification module is used to divide the art resources to obtain model information, material information, and association information. The model information represents the attribute information of the model to be rendered, the material information represents the material properties of the model to be rendered, and the association information includes at least the correspondence between the model information and the material information. The material information includes sub-material information, which includes first material information and second material information. The second material information includes third material information and fourth material information. The first material information indicates that the sub-material information has no effect on the material surface, the second material information indicates that the sub-material information has an effect on the material surface, the third material information indicates the presence of new material on the material surface, and the fourth material information indicates damage on the material surface. The generation module is used to generate multiple material layers based on the material information, wherein each material layer corresponds to a different type of material; The rendering module is used to determine the material type corresponding to the part of the model to be rendered based on the model information and the association information; determine the target material layer corresponding to the material type from the plurality of material layers; and connect the target material layer to the part to be rendered to render the model to obtain a first target model.

10. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program, wherein the computer program is configured to execute, when run by a processor, the rendering method of the virtual model as described in any one of claims 1 to 8.

11. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the rendering method of the virtual model as described in any one of claims 1 to 8.