Model material construction method and device, electronic device, and storage medium
By obtaining and applying material area identifiers in the game to build layered materials, the problem that vertex color mixing materials cannot effectively mix multiple texture maps is solved, and the display effect and rendering efficiency of layered materials are improved.
Patent Information
- Application Number
- CN202010577380.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-22
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2040-06-22
AI Technical Summary
The existing vertex color blending materials cannot effectively mix more than three texture maps in the game scene, resulting in poor display effects of layered materials and cannot meet the needs of most game scenes.
The original model to be edited is obtained through the model import operation, and the material area identification is determined, the target material is determined based on the material area identification, and layered materials are applied to the original model to realize the reuse of the material library and the optimization of memory resources.
It improves the clarity and sense of hierarchy of layered materials, improves the reuse rate of materials and the creation efficiency of layered materials, reduces the consumption of memory resources, and improves the rendering efficiency and system performance of the model.
Smart Images

Figure CN111724480B_ABST
Abstract
Description
Background Art
[0002] With the rapid development of Internet technology, 3D modeling has become an area of increasing concern. Model texture materials, as the basis of 3D models, play a very important role in the display effect of models. In VR game environments, large objects are very close to the player's perspective, so the resolution of the material needs to be very clear, but the resolution of a single-channel texture map cannot achieve a very high pixel ratio. If a very high resolution map is used, it will lead to a huge consumption of memory.
[0003] At present, vertex color blending material is the most common way to blend textures in game scenes. This solution uses the three RGB channels as a blending technology, which means that at most three texture maps can be blended. If more than three texture maps are required to be blended, it cannot be satisfied, resulting in poor display effects of the created layered materials, which cannot meet the needs of most game scenes.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the embodiments of the present disclosure is to provide a model material construction method, a model material construction device, an electronic device and a computer-readable storage medium, thereby overcoming the problem of poor display effect of layered materials in related schemes at least to a certain extent.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] According to a first aspect of an embodiment of the present disclosure, a model material construction method is provided, comprising: in response to a model import operation, obtaining an original model to be edited, and determining a material area identifier corresponding to the original model; in response to a layered material construction operation, determining a target material required for a layered material corresponding to the original model according to the material area identifier; and applying the target material to the original model through the material area identifier to construct the layered material corresponding to the original model.
[0008] In some example embodiments of the present disclosure, based on the aforementioned scheme, before determining the corresponding material area identifier on the original model, the method also includes: in response to a model editing operation, performing material area division processing on the original model according to a preset material ball to determine the material area corresponding to the material layer of the original model; and performing identification processing on the material area to generate the corresponding material area identifier on the original model.
[0009] In some example embodiments of the present disclosure, based on the aforementioned scheme, before determining the corresponding material area identifier on the original model, the method also includes: in response to a model editing operation, constructing a mask map corresponding to the original model to determine the material area corresponding to the material layer of the original model based on the mask map; and performing identification processing on the material area to generate a corresponding material area identifier on the original model.
[0010] In some example embodiments of the present disclosure, based on the aforementioned scheme, before determining the target material required for the layered material corresponding to the original model according to the material area identifier, the method also includes: creating a material library in response to a material creation operation; wherein the material library includes material data and a material ball; determining the target material required for the layered material corresponding to the original model according to the material area identifier includes: determining the target material required for the layered material corresponding to the original model from the pre-created material library according to the material area identifier.
[0011] In some example embodiments of the present disclosure, based on the aforementioned scheme, in response to the model import operation, obtaining the original model to be edited also includes: obtaining a normal map corresponding to the original model and the mask map of each material layer of the original model.
[0012] In some example embodiments of the present disclosure, based on the aforementioned solution, the method further includes: creating unique identification information for all materials in the material library.
[0013] In some example embodiments of the present disclosure, based on the aforementioned scheme, after applying the target material to the original model through the material area identification to construct the layered material corresponding to the original model, the method further includes: based on the unique identification information, replacing the target material of the original model with a replacement material selected from the material library to generate the original model of different layered materials.
[0014] According to a second aspect of an embodiment of the present disclosure, a model material construction device is provided, comprising: a model import module, for responding to a model import operation, obtaining an original model to be edited, and determining a corresponding material area identifier on the original model; a target material determination module, for responding to a layered material construction operation, determining a target material required for a layered material corresponding to the original model according to the material area identifier; and a layered material construction module, for applying the target material to the original model through the material area identifier to construct the layered material corresponding to the original model.
[0015] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the model material construction device also includes a material area identification generation unit, and the material area identification generation unit is configured to: in response to a model editing operation, perform material area division processing on the original model according to a preset material ball, and determine the material area corresponding to the material layer of the original model; perform identification processing on the material area, and generate a corresponding material area identification on the original model.
[0016] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the material area identification generation unit is also configured to: in response to a model editing operation, construct a mask map corresponding to the original model to determine the material area corresponding to the material layer of the original model based on the mask map; perform identification processing on the material area to generate a corresponding material area identification on the original model.
[0017] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the model material construction device also includes a material library creation unit, and the material library creation unit is configured to: create a material library in response to a material creation operation; wherein the material library includes material data and a material ball; and determining the target material required for the layered material corresponding to the original model according to the material area identifier includes: determining the target material required for the layered material corresponding to the original model from the pre-created material library according to the material area identifier.
[0018] In an exemplary embodiment of the present disclosure, based on the aforementioned solution, the model import module further includes a texture import unit, and the texture import unit is configured to: obtain the normal map corresponding to the original model and the mask map of each material layer of the original model.
[0019] In an exemplary embodiment of the present disclosure, based on the above-mentioned solution, the model material construction device further includes a material identification creation unit, and the material identification creation unit is configured to: create unique identification information for all materials in the material library.
[0020] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the model material construction device also includes a layered material replacement unit, and the layered material replacement unit is configured to: based on the unique identification information, replace the target material of the original model with a replacement material selected from the material library to generate the original model of different layered materials.
[0021] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the model material construction method described in any one of the above is implemented.
[0022] According to a fourth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the model material construction method according to any one of the above items is implemented.
[0023] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0024] The model material construction method in the example embodiment of the present disclosure, in response to the model import operation, obtains the original model to be edited, and determines the material area identification on the original model; in response to the layered material construction operation, determines the target material required for the layered material corresponding to the original model according to the material area identification, and then applies the target material to the original model through the material area identification to construct the layered material corresponding to the original model. On the one hand, the target material used in each area of the layered material is determined through the material area identification, and the target material is applied to the corresponding area to improve the clarity and layering of the layered material; on the other hand, by setting the material area identification, the target material of the material area identification can be replaced to achieve the reuse of materials in the material library, improve the reuse rate of materials, and improve the efficiency of creating layered materials; on the other hand, compared with the traditional solution of realizing high-definition layered materials through high-resolution maps, the layered materials generated by applying ordinary materials to the model through material area identification occupy less memory resources, improve the rendering efficiency of the model, and improve the system performance.
[0025] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0027] Figure 1 A schematic diagram schematically shows a flow chart of a model material construction method according to some embodiments of the present disclosure;
[0028] Figure 2 A schematic diagram of a process for generating a material region identifier according to some embodiments of the present disclosure is schematically shown;
[0029] Figure 3 The flowchart of generating material area identification according to other embodiments of the present disclosure is schematically shown;
[0030] Figure 4 Schematically showing a channel diagram of generating layered materials through traditional layered rendering according to some embodiments of the present disclosure;
[0031] Figure 5 A schematic diagram of a model for generating layered materials through material region identification according to some embodiments of the present disclosure is schematically shown;
[0032] Figure 6 A schematic diagram of a process for generating layered materials according to some embodiments of the present disclosure is schematically shown;
[0033] Figure 7 A block diagram of a model material construction device according to some embodiments of the present disclosure is schematically shown;
[0034] Figure 8 A schematic diagram schematically shows a structure of a computer system of an electronic device according to some embodiments of the present disclosure;
[0035] Fig. 9 A schematic diagram of a computer-readable storage medium according to some embodiments of the present disclosure is schematically shown.
[0036] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0037] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more comprehensive and complete and will fully convey the concept of the example embodiments to those skilled in the art.
[0038] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0039] Furthermore, the drawings are only schematic illustrations and are not necessarily drawn to scale. The block diagrams shown in the drawings are only functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0040] In this example embodiment, a model material construction method is first provided, and the model material construction method can be applied to a terminal device. Figure 1 The following is a schematic diagram of the model material construction method process according to some embodiments of the present disclosure. Figure 1 As shown, the model material construction method may include the following steps:
[0041] Step S110, in response to the model import operation, obtaining the original model to be edited, and determining the corresponding material area identifier on the original model;
[0042] Step S120, in response to the layered material construction operation, determining the target material required by the original model corresponding to the layered material according to the material region identifier;
[0043] Step S130: applying the target material to the original model through the material region identifier to construct the layered material corresponding to the original model.
[0044] According to the model material construction method in this example embodiment, on the one hand, the target material used in each area of the layered material is determined by the material area identifier, and the target material is applied to the corresponding area to improve the clarity and layering of the layered material; on the other hand, by setting the material area identifier, the target material of the material area identifier can be replaced to achieve the reuse of materials in the material library, improve the reuse rate of materials, and improve the efficiency of creating layered materials; on the other hand, compared with the traditional solution of achieving high-definition layered materials through high-resolution maps, the layered materials generated by applying ordinary materials to the model through material area identifiers occupy less memory resources, improve the rendering efficiency of the model, and improve system performance.
[0045] Next, the model material construction method in this example embodiment will be further described.
[0046] In step S110 , in response to the model import operation, the original model to be edited is obtained, and the corresponding material area identifier on the original model is determined.
[0047] In an example embodiment of the present disclosure, the model import operation may refer to an operation of importing a model that needs to edit layered materials. For example, the model import operation may be an operation of a relevant person calling a model file, or an operation of a script obtaining model data through a preset interface. Of course, it may also be an operation of importing a model in other ways, which is not specifically limited in this example embodiment. The original model may refer to a preliminary model to which no materials are applied.
[0048] The material area identifier may refer to identification information used to distinguish different areas where materials are applied in the material layer of the model. For example, the material area identifier may be a color identifier, and different colors (or color IDs) may be used to distinguish different areas where materials are applied in the material layer of the model. For example, the areas identified by red color may all be metal materials, and the areas identified by blue color may all be wood materials. By distinguishing the materials of different areas by color, it is convenient for relevant personnel to view and design different layered material schemes. The material area identifier may also be a digital identifier, and different digital codes (digital IDs) may be used to distinguish different areas where materials are applied in the material layer of the model. For example, the areas identified by number 001 may all be metal materials, and the areas identified by number 002 may all be wood materials. By distinguishing the materials of different areas by digital IDs, it is convenient for the automatic editing script to identify and apply different layered material schemes. Of course, this is only a schematic example, and the material area identifier may also be other identification information that can facilitate the distinction between different areas, and this example embodiment does not make any special limitation on this.
[0049] In an exemplary embodiment of the present disclosure, before determining the corresponding material area identifier on the original model, Figure 2 Create the material area identifier corresponding to the original model according to the steps in:
[0050] refer to Figure 2 As shown, step S210, in response to the model editing operation, the original model is divided into material regions according to a preset material ball to determine the material region corresponding to the material layer of the original model;
[0051] Step S220, marking the material area to generate a material area mark corresponding to the original model.
[0052] Among them, the model editing operation may refer to the operation of determining different material areas on the original model. For example, the model editing operation may be an operation in which relevant personnel apply a preset material ball (the material ball includes pre-drawn areas of different shapes corresponding to the original model) to the original model, or it may be an operation in which an automatic editing script determines different material areas on the original model by detecting areas on a preset material ball. This example embodiment does not specifically limit this. Material area division processing may refer to the process of determining material areas on the original model to which different materials need to be applied through a preset material ball. A material layer may refer to a layer created on the original model for editing layered materials, and the material layer corresponding to the original model may be edited through a rendering shader.
[0053] Identification processing may refer to the process of dividing material areas that require the application of different materials to generate material area identifications. For example, material areas that require the application of metal materials are divided into the same type of areas and identified as the first material area identification (such as red areas or areas with a digital identification of 001), and material areas that require the application of wood materials are divided into the same type of areas and identified as the second material area identification (such as blue areas or areas with a digital identification of 002). This example embodiment does not specifically limit this.
[0054] Specifically, the material area division process can be performed on the original model through a preset material ball in 3DS Max (a 3D animation rendering and production software) or Maya (a 3D modeling and animation software), and the material area corresponding to the material layer of the original model can be determined. Of course, it can also be implemented by other software that can perform material area division process on the original model through a material ball, and this exemplary embodiment does not make special limitations on this.
[0055] Optionally, before determining the corresponding material area identifier on the original model, you can also use Figure 3 Create the material area identifier corresponding to the original model according to the steps in:
[0056] refer to Figure 3 As shown, step S310, in response to the model editing operation, construct a mask map corresponding to the original model to determine the material area corresponding to the material layer of the original model based on the mask map;
[0057] Step S320, marking the material area to generate a material area mark corresponding to the original model.
[0058] Among them, a mask map can refer to a map used to mask the area in a material layer that does not need to be modified to generate different areas on the model. The mask map can be used to determine the different material areas corresponding to the material layer of the original model, and effectively distinguish the application scope of different materials in the layered material of the model.
[0059] The specific identification processing process is the same as the above embodiment and will not be repeated here.
[0060] In an exemplary embodiment of the present disclosure, after the original model is imported, the normal map mask map generated when editing the original model can also be imported to better render the model. Therefore, the normal map corresponding to the original model and the mask maps of each material layer of the original model can be obtained.
[0061] Among them, the normal map can refer to a map used on the surface of a three-dimensional model to present the bumpiness of the model surface, which can generate high-detailed accurate lighting direction and reflection effects for a surface with low detail. Combining the normal map with the mask map can make the layered material of the original model clearer, with a lighting effect closer to the real world, effectively improving the performance of the layered material of the original model. At the same time, the bumpiness of the model surface presented by the normal map can also reduce the difficulty of building the original model and improve the efficiency of the system rendering model.
[0062] Specifically, a mask map corresponding to the original model can be constructed in Substance Painter (a texture mapping software) to determine the material area corresponding to the material layer of the original model based on the mask map. Of course, other software that can divide the material area of the original model by constructing a mask map corresponding to the original model can also be used, and this exemplary embodiment does not specifically limit this.
[0063] In step S120, in response to the layered material construction operation, the target material required by the original model corresponding to the layered material is determined according to the material region identifier.
[0064] In an example embodiment of the present disclosure, a layered material construction operation may refer to an operation of initiating layered material creation. For example, it may be an operation in which a relevant person initiates layered material creation by triggering a layered material construction button, or it may be an operation in which an automatic editing script initiates layered material creation through a preset interface. This example embodiment does not specifically limit this.
[0065] The target material can refer to the pre-set basic material used to form the layered material (such as the material corresponding to the basic material such as metal material, wood material, sand material, plastic material, etc.) or the synthetic material (the material corresponding to the synthetic material constructed by the basic material, such as the synthetic material such as 32# Alpha steel material and acid material in a certain game world view)
[0066] In an exemplary embodiment of the present disclosure, a material library may be created in response to a material creation operation before determining a target material required for a layered material corresponding to an original model according to a material region identifier.
[0067] The material creation operation may refer to an operation of constructing a material by setting material data and material ball parameters. The material library may refer to a file for storing a set of created materials. The material library may include material data and material balls. The material data may be data representing the color of the material, and the material ball may be data representing the texture of the material (such as metalness, roughness, etc.).
[0068] Referring to Table 1, Table 1 schematically shows the data corresponding to different materials in the material library. Before editing the layered materials of the original model, the material parameters corresponding to the materials needed by the original model are summarized to facilitate the creation of the material library:
[0069] Table 1
[0070]
[0071] Of course, the material parameters in Table 1 are merely illustrative examples and should not impose any special limitations on this exemplary embodiment.
[0072] Specifically, the target material required for the layered material corresponding to the original model can be determined from the pre-created material library according to the material area identifier. Newly created materials that are not included in the material library can also be stored in the material library to continuously expand the material library, which can improve the reuse rate of materials, and the next time the same material needs to be created, it does not need to be recreated, but can be directly obtained from the material library, effectively improving the efficiency of creating layered materials.
[0073] Furthermore, unique identification information can be created for all materials in the material library. The unique identification information can refer to the unique identification corresponding to each material in the material library. For example, the unique identification information can be the unique name corresponding to each material in the material library (relevant personnel can quickly identify and select the appropriate material by the name), such as "glass fiber reinforced nylon" and "glass fiber reinforced nylon_oxidized" in Table 1, as long as the material name is unique. Of course, it can also be the unique code corresponding to each material in the material library (the automatic editing script can quickly screen the appropriate material by digital coding), such as the unique code corresponding to "glass fiber reinforced nylon" in Table 1 is 017000709 and the unique code corresponding to "glass fiber reinforced nylon_oxidized" is 017000709_1. Of course, this is only a schematic example, and this exemplary embodiment is not limited to this.
[0074] In step S130, the target material is applied to the original model through the material region identifier to construct the layered material corresponding to the original model.
[0075] In an example embodiment of the present disclosure, based on a pre-designed layered material scheme (which can be understood as the correspondence between material area identifiers and different types of target materials), different target materials are applied to the original model through material area identifiers to generate layered materials corresponding to the layered material scheme on the original model.
[0076] Specifically, relevant personnel may select a material ball corresponding to the target material in the material library according to the layered material scheme, and apply the target material to the material area corresponding to the material area identifier associated with the target material on the original model through the material ball; or an automatic editing script may select the corresponding target material through the unique code of the target material in the material library according to the correspondence between the material area identifier in the layered material scheme and different types of target materials, and apply the selected target material to the material area corresponding to the material area identifier associated with the target material on the original model. This example embodiment does not make any special limitation to this.
[0077] In addition, since a large number of models in related projects can reuse the same set of material libraries, it is possible to write automatic editing scripts to automatically generate material layers and layered materials in batches based on the material's unique ID or the material's unique name, automatically specify specific Mask maps, and batch replace all material IDs with the same name, thereby giving full play to the procedural advantages of layered materials.
[0078] In an example embodiment of the present disclosure, based on the unique identification information, the target material of the original model is replaced by a replacement material selected from a material library to generate an original model of a different layered material. The replacement material may refer to a material different from the target material in the original layered material scheme, which is used to replace the target material corresponding to the material region identifier in the original layered material scheme to generate a new layered material different from the original layered material scheme.
[0079] Refer to Table 2, which compares the traditional PBR (Physically Based Rendering) process and the layered PBR process from multiple aspects:
[0080] Table 2
[0081]
[0082]
[0083]
[0084] Through the technical solution disclosed in this disclosure, it is possible to make the relationship between materials and specific models no longer tightly coupled based on physical thinking, but a relationship that can be summarized, organized, and applied completely according to the laws of the physical world. Through the maximum degree of abstraction and induction, the commonalities in the traditional art process are extracted, and the uncontrollability that depends on human subjective judgment is minimized, thereby improving communication efficiency, reducing construction costs, and improving the overall development efficiency of the project, so as to effectively combine processes and tools as much as possible and make full use of existing resources.
[0085] Figure 4A schematic diagram of a channel for generating a layered material through traditional layered rendering according to some embodiments of the present disclosure is schematically shown.
[0086] refer to Figure 4 As shown in the figure, traditional layered rendering is based on the RGBA channels of each texture map, but the layered sense of the generated layered map is very limited, because a map can only use four channels at most. Although multiple maps can be repeated, it consumes a lot of system performance and can only be used in the deferred rendering pipeline.
[0087] Figure 5 A schematic diagram of a model for generating layered materials through material region identification according to some embodiments of the present disclosure is schematically shown.
[0088] refer to Figure 5 As shown, layered rendering based on material area identifiers can perform arbitrary layering settings according to different material area identifiers on the model (for example, color identifiers, digital identifiers, or area shape identifiers), and supports forward rendering and deferred rendering pipelines, effectively improving the display effect and clarity of layered materials.
[0089] Figure 6 A schematic diagram of a process for generating layered materials according to some embodiments of the present disclosure is schematically shown.
[0090] refer to Figure 6 As shown, the following takes the case in Unity3D (HDRP rendering pipeline) as an example to analyze the specific steps:
[0091] Step S610, building a model editing environment: based on Unity2018HDRP rendering pipeline, using the same HDR (High-Dynamic Range) map to create and add an HDRI SKY environment, and adding a BakingSky script to enable HDRI lighting, to obtain an environment similar to UE4 (Unreal Engine 4);
[0092] Step S620, creating a material layer on the original model: creating a material layer based on HDRP / Lit shader according to similar parameters;
[0093] Step S630, selecting a target material corresponding to the original model from the material library, and applying it to the original model based on the material region identifier: creating a layered material for the original model based on HDRP / LayeredLitShader, and assigning it to the original model;
[0094] Step S640, generating a model including layered materials: finally obtaining a result very similar to the effect in UE4.
[0095] It should be noted that, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0096] In addition, in this exemplary embodiment, a model material construction device is also provided. Figure 7 As shown, the model material construction device 700 includes: a model import module 710, a target material determination module 720 and a layered material construction module 730. Among them: the model import module 710 is used to respond to the model import operation, obtain the original model to be edited, and determine the corresponding material area mark on the original model; the target material determination module 720 is used to respond to the layered material construction operation, and determine the target material required for the layered material corresponding to the original model according to the material area mark; the layered material construction module 730 is used to apply the target material to the original model through the material area mark to construct the layered material corresponding to the original model.
[0097] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the model material construction device 700 also includes a material area identification generation unit, and the material area identification generation unit is configured to: in response to a model editing operation, perform material area division processing on the original model according to a preset material ball, and determine the material area corresponding to the material layer of the original model; perform identification processing on the material area, and generate a corresponding material area identification on the original model.
[0098] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the material area identification generation unit is also configured to: in response to a model editing operation, construct a mask map corresponding to the original model to determine the material area corresponding to the material layer of the original model based on the mask map; perform identification processing on the material area to generate a corresponding material area identification on the original model.
[0099] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the model material construction device 700 also includes a material library creation unit, and the material library creation unit is configured to: create a material library in response to a material creation operation; wherein the material library includes material data and a material ball; and determining the target material required for the layered material corresponding to the original model according to the material area identifier includes: determining the target material required for the layered material corresponding to the original model from the pre-created material library according to the material area identifier.
[0100] In an exemplary embodiment of the present disclosure, based on the aforementioned solution, the model import module 710 further includes a texture import unit, which is configured to: obtain the normal map corresponding to the original model and the mask map of each material layer of the original model.
[0101] In an exemplary embodiment of the present disclosure, based on the above-mentioned solution, the model material construction device 700 further includes a material identification creation unit, and the material identification creation unit is configured to: create unique identification information for all materials in the material library.
[0102] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the model material construction device 700 also includes a layered material replacement unit, and the layered material replacement unit is configured to: based on the unique identification information, replace the target material of the original model with a replacement material selected from the material library to generate the original model of different layered materials.
[0103] The specific details of each module of the above-mentioned model material construction device have been described in detail in the corresponding model material construction method, so they will not be repeated here.
[0104] It should be noted that although several modules or units of the model material construction device are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0105] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above-mentioned model material construction method is also provided.
[0106] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0107] Refer to the following Figure 8 800 according to this embodiment of the present disclosure is described. Figure 8 The electronic device 800 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0108] like Figure 8As shown, the electronic device 800 is in the form of a general computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one storage unit 820, a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.
[0109] The storage unit stores a program code, which can be executed by the processing unit 810, so that the processing unit 810 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 810 can perform the following steps: Figure 1 In step S110 shown in the figure, in response to the model import operation, the original model to be edited is obtained, and the corresponding material area identifier on the original model is determined; in step S120, in response to the layered material construction operation, the target material required for the layered material corresponding to the original model is determined according to the material area identifier; in step S130, the target material is applied to the original model through the material area identifier to construct the layered material corresponding to the original model.
[0110] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 821 and / or a cache memory unit 822 , and may further include a read-only memory unit (ROM) 823 .
[0111] The storage unit 820 may also include a program / utility 824 having a set (at least one) of program modules 825, such program modules 825 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0112] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0113] The electronic device 800 may also communicate with one or more external devices 870 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 800, and / or communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 860. As shown, the network adapter 860 communicates with other modules of the electronic device 800 via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0114] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0115] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of the present specification.
[0116] refer to Fig. 9 As shown, a program product 900 for implementing the above-mentioned model material construction method according to an embodiment of the present disclosure is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0117] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0118] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0119] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0120] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0121] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0122] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0123] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0124] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A model material construction method, characterized in that: include: In response to the model import operation, an original model to be edited is obtained, and a material region identifier corresponding to the original model is determined; the original model refers to a preliminary model to which no material is applied; In response to the layered material construction operation, determining the target material required by the original model corresponding to the layered material according to the material region identifier; the target material includes a basic material or a composite material; Applying the target material to the original model through the material region identifier to construct the layered material corresponding to the original model; The step of applying the target material to the original model through the material region identifier to construct the layered material corresponding to the original model includes: Based on a pre-designed layered material scheme, different target materials are applied to the original model through the material area identifier to generate a layered material corresponding to the layered material scheme on the original model; the layered material scheme includes the correspondence between the material area identifier and the different types of target materials.
2. The model material construction method according to claim 1, characterized in that: Before determining the corresponding material area identifier on the original model, the method further includes: In response to the model editing operation, the original model is divided into material regions according to a preset material ball to determine a material region corresponding to the material layer of the original model; The material area is marked to generate a material area mark corresponding to the original model.
3. The model material construction method according to claim 1, characterized in that: Before determining the corresponding material area identifier on the original model, the method further includes: In response to the model editing operation, constructing a mask map corresponding to the original model to determine a material area corresponding to the material layer of the original model based on the mask map; The material area is marked to generate a material area mark corresponding to the original model.
4. The model material construction method according to claim 1, characterized in that: Before determining the target material required for the layered material corresponding to the original model according to the material region identifier, the method further includes: In response to the material creation operation, a material library is created; wherein the material library includes material data and material balls; The step of determining the target material required for the layered material corresponding to the original model according to the material region identifier includes: The target material required for the layered material corresponding to the original model is determined from the pre-created material library according to the material region identifier.
5. The model material construction method according to claim 3, characterized in that: The step of obtaining the original model to be edited in response to the model import operation further includes: Obtain the normal map corresponding to the original model and the mask map of each material layer of the original model.
6. The model material construction method according to claim 4, characterized in that: The method further comprises: Unique identification information is created for all materials in the material library.
7. The model material construction method according to claim 6, characterized in that: After applying the target material to the original model through the material region identifier to construct the layered material corresponding to the original model, the method further includes: Based on the unique identification information, the target material of the original model is replaced by a replacement material selected from the material library to generate the original model with different layered materials.
8. A model material construction device, characterized in that: include: A model import module, for obtaining an original model to be edited in response to a model import operation, and determining a corresponding material region identifier on the original model; the original model refers to a preliminary model without applying a material; A target material determination module, configured to determine, in response to a layered material construction operation, a target material required for the layered material corresponding to the original model according to the material region identifier; the target material includes a basic material or a composite material; A layered material construction module, used for applying the target material to the original model through the material region identifier to construct the layered material corresponding to the original model; The step of applying the target material to the original model through the material region identifier to construct the layered material corresponding to the original model includes: Based on a pre-designed layered material scheme, different target materials are applied to the original model through the material area identifier to generate a layered material corresponding to the layered material scheme on the original model; the layered material scheme includes the correspondence between the material area identifier and the different types of target materials.
9. An electronic device, comprising: processor; as well as A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the model material construction method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the model material construction method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Luminosity diagram-based geometry and surface material reconstructing method
CN102819864A
Layered rendering method
CN102831649A
Material adding method and apparatus of 3D model, and terminal
CN105574918A
Rendering plotting method for replacing specific part material based on three-dimensional model
CN107680153A
Method and device for acquiring merged map, storage medium, processor and terminal
CN109603155A
