Material processing method and device, electronic equipment, storage medium and program product
By automating the material conversion of 3D models, new materials with the same physical characteristics as the original materials are generated. This solves the problem of low efficiency caused by manual operation in existing technologies, and achieves fast and accurate material processing to meet the needs of project changes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NETEASE (SHANGHAI) NETWORK CO LTD
- Filing Date
- 2025-12-10
- Publication Date
- 2026-04-24
AI Technical Summary
Existing methods for material processing of 3D models rely heavily on manual operation, resulting in low efficiency and difficulty in quickly and accurately meeting material requirements after project changes.
By determining the first material and its texture channel information of the 3D model, and generating a second material with the same physical characteristics based on the material requirements of the second project, the automatic conversion of materials is achieved. The material processing is carried out using modules and rendering engines in the game engine, avoiding manual adjustment of parameters.
It enables efficient, accurate, and flexible processing of 3D model materials, meeting the material requirements of diverse application scenarios in different projects, improving processing efficiency and accuracy, and reducing manpower and time costs.
Smart Images

Figure CN121921435A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more particularly to a material processing method, apparatus, electronic device, storage medium, and program product. Background Technology
[0002] With 3D technology now widely applied in film and television production, virtual simulation, digital twins, and many other fields, material processing of 3D models has become a core element in shaping the realism and artistic expression of virtual worlds. Precise material configuration allows models to exhibit realistic physical properties, such as the luster of metal and the texture of fabric, thereby meeting the high-quality presentation needs of various industries for 3D scenes and models.
[0003] In related technologies, the material processing methods for 3D models are often customized around the specific needs of a project. However, when project requirements change, such as when transitioning from one project to another, the entire material processing workflow becomes highly dependent on manual operation by designers. They need to rely on their own experience to analyze each parameter of the material one by one, and then manually adjust it according to the expected effect of the new project. This not only consumes a lot of time and energy, but also, due to the limitations of manual operation, it is difficult to quickly and accurately meet the material requirements of the new project, resulting in low overall efficiency. Summary of the Invention
[0004] This invention provides a material processing method, apparatus, electronic device, storage medium, and program product to automate and intelligently convert materials, enabling rapid and accurate processing of 3D model materials. This meets the diverse material requirements of different projects and achieves the technical effect of efficient, accurate, and flexible processing of 3D model materials.
[0005] According to one aspect of the present invention, a material processing method is provided for use in a game engine, the method comprising:
[0006] A first three-dimensional model is determined, the first three-dimensional model including a first material configured according to the material requirements of the first project;
[0007] Obtain the first texture channel information corresponding to the first material and the material requirements of the second project, wherein the material requirements of the second project are at least used to specify the second texture channel information corresponding to the project material used in the second project;
[0008] Based on the first texture channel information and the second texture channel information, a second material with the same physical characteristics as the first material is generated.
[0009] According to another aspect of the present invention, a material processing apparatus is provided for use in a game engine, the apparatus comprising:
[0010] The first module is used to determine the first three-dimensional model, the first three-dimensional model including a first material configured according to the material requirements of the first project;
[0011] The second module is used to obtain the first texture channel information corresponding to the first material and the material requirements of the second project, wherein the material requirements of the second project are at least used to specify the second texture channel information corresponding to the project material used in the second project.
[0012] The third module is used to generate a second material with the same physical characteristics as the first material based on the first texture channel information and the second texture channel information.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] One or more processors;
[0015] Storage device for storing one or more programs.
[0016] When one or more programs are executed by one or more processors, the one or more processors implement any of the material processing methods described in the embodiments of this disclosure.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement any of the material processing methods of the present invention.
[0018] According to another aspect of the present disclosure, a computer program product is provided, which, when executed by a processor, implements any of the material processing methods described in the embodiments of the present disclosure.
[0019] The technical solution of this disclosure involves determining a first 3D model, which includes a first material configured according to the material requirements of a first project, and identifying the material object to be processed. It acquires the first texture channel information corresponding to the first material and at least the second texture channel information corresponding to the project material used in the second project, defining the channel information of the first material and the requirements of the new project for the material channels. Based on the first and second texture channel information, the material conversion and generation can be automatically completed, generating a second material with the same physical characteristics as the first material. In this process, there is no need for manual adjustment of parameters one by one, greatly saving manpower and time costs and improving the efficiency and accuracy of material processing. The technical solution of this disclosure solves the problem in the prior art where material processing heavily relies on manual operation when the material requirements of a 3D model project change, resulting in low efficiency and difficulty in accurately meeting the material requirements of the new project. It achieves automation and intelligence in material conversion, enabling rapid and accurate processing of 3D model materials, thereby meeting the material needs of diverse application scenarios in different projects, and achieving the technical effect of efficient, accurate, and flexible processing of 3D model materials.
[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A schematic flowchart illustrating a material processing method provided in an embodiment of this disclosure;
[0023] Figure 2 A flowchart illustrating the material processing method applicable to the embodiments of this disclosure is provided.
[0024] Figure 3 A schematic diagram illustrating the effect of material treatment applicable to the material treatment method provided in the embodiments of this disclosure;
[0025] Figure 4 A schematic flowchart illustrating a material processing method provided in an embodiment of this disclosure;
[0026] Figure 5 An example diagram of a material mapping texture provided in an embodiment of this disclosure;
[0027] Figure 6 An example diagram of a material mapping texture provided in an embodiment of this disclosure;
[0028] Figure 7 An example diagram of an information display interface applicable to a material processing method provided in an embodiment of this disclosure;
[0029] Figure 8 An example diagram of an information display interface applicable to a material processing method provided in an embodiment of this disclosure;
[0030] Figure 9 This is a schematic diagram of the structure of a material processing apparatus provided in an embodiment of the present disclosure;
[0031] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0032] 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. 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.
[0033] 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.
[0034] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0035] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0036] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose whether to "agree" or "disagree" to provide personal information to the electronic device.
[0037] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0038] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0039] Figure 1 This is a flowchart illustrating a material processing method provided in an embodiment of this disclosure. This embodiment is applicable to situations involving material processing. The method can be executed by a material processing device, which can be implemented in hardware and / or software and can be configured in electronic devices such as computers or servers. Figure 1 As shown, the method in this embodiment includes:
[0040] S110. Determine the first three-dimensional model, wherein the first three-dimensional model includes a first material configured according to the material requirements of the first project.
[0041] In this embodiment of the disclosure, in a 3D model project, the materials of the 3D model need to be configured according to the material requirements of the second project. However, the existing materials of the 3D model are configured according to the material requirements of the first project, which are different from the material requirements of the second project. Therefore, if the existing materials are directly applied in the project, the 3D model will not be able to present the expected visual effect. It can be understood that the material requirements of the first project can be understood as the material requirements of the first 3D model in the first project; the material requirements of the second project can be understood as the material requirements of the first 3D model in the second project. Here, the first project and the second project are 3D model projects with different material requirements.
[0042] To ensure that materials accurately adapt to project requirements, enabling the 3D model to achieve the same rendering effect as when using existing materials, if the material of a certain 3D model needs to be processed, this 3D model can be used as the first 3D model. In this embodiment, the first 3D model can be a 3D mesh model or a 3D point cloud model. For existing materials applied to the first 3D model, if the material does not match the project requirements, and if the material needs to be processed quickly to meet the material project requirements, this material can be used as the first material. In this embodiment, the first material can be understood as the material that needs to be processed at the current moment for the materials applied to the 3D model. The number of materials applied to the first 3D model can be one, two, or more. In practical applications, the number of materials applied to the first 3D model is usually multiple.
[0043] In this embodiment, the material requirements for the first project specify the first texture channel information corresponding to the project material used in the first project. The first texture channel information can be understood as the texture channel information corresponding to the first material of the first 3D model. To ensure the model exhibits the desired material effect, the texture channel information includes a channel identifier and a texture type identifier to reflect the mapping relationship between textures and material channels. In simpler terms, it indicates which textures are assigned to which channels of the material. It is understood that the channel identifier can be used to distinguish different material channels. The texture type identifier can be used to distinguish different types of textures. In this embodiment, a mapping table is used to define the correspondence between different types of material channels (such as diffuse, normal, etc.) and specific textures. A texture is a file that stores image data and is used to define the surface properties of the material (such as color, bump, transparency, etc.). In this embodiment, a texture can include at least one type of base color texture, ambient occlusion texture, normal texture, roughness texture, and metallic texture. In practical applications, a material of a 3D model typically corresponds to at least two types of textures. Material channels can be used to receive texture data and control rendering effects. Each channel corresponds to a surface property of the material (such as color, bump, transparency, etc.). Optionally, material channels may include at least one of diffuse channels, normal channels, roughness channels, metallicity channels, and transparency channels. In practical applications, 3D models typically have multiple material channels.
[0044] For example, the first material of the 3D model includes 5 channels, labeled T1, T2, T3, T4, and T5. The corresponding textures for this material can include 5 different types of textures, labeled M1, M2, M3, M4, and M5. The correspondence between texture type labels and channel labels in the texture channel information of this material can be as follows: channel T1 corresponds to texture M1, channel T2 corresponds to texture M2, channel T3 corresponds to texture M3, channel T4 corresponds to texture M4, and channel T5 corresponds to texture M5.
[0045] Specifically, the 3D model to be processed, i.e., the first 3D model, is determined. Then, the material of the first 3D model can be determined. In one optional embodiment, the first 3D model may have only one material, and the material to be processed is determined as the first material of the first 3D model. In another optional embodiment, the first 3D model may have multiple materials. Determining the material to be processed of the first 3D model may include: traversing the existing materials corresponding to the first 3D model, and using the currently traversed material as the material to be processed of the first 3D model. Then, the texture channel information corresponding to the material to be processed, i.e., the first texture channel information, can be obtained.
[0046] In this embodiment of the disclosure, determining the first material of the first three-dimensional model may include: displaying a first interface; wherein the first interface includes a model identifier of at least one second three-dimensional model; in response to an identifier selection operation for the model identifier, determining a three-dimensional model to be materialized based on the identifier selection operation, and performing material traversal processing on the three-dimensional model to be materialized to determine the first material of the first three-dimensional model.
[0047] The first interface can be understood as an interface used to present the model identifier of the second 3D model. In this embodiment, the second 3D model can be understood as a 3D model whose pre-set model material is not compatible with the material requirements of the current project. The number of second 3D models can be one, two, or more. In practical applications, the number of second 3D models is usually multiple. The model identifier can be used to distinguish different 3D models. The model identifier can be visualized through text information and / or image information. When the model identifier includes text information, the model identifier can include at least one of model number and model name. When the model identifier includes image information, the model identifier can be a two-dimensional icon (such as a model thumbnail) or a 3D model preview image. In this embodiment, the identifier selection operation can be understood as a trigger operation (e.g., a click trigger operation) used to select the model identifier of the second 3D model in the first interface.
[0048] In this embodiment, there are various ways to display the first interface, and no specific limitation is made herein. For example, after the game engine runs, a first interface including model identifiers of multiple second 3D models is displayed. Alternatively, a second interface can be displayed after a preset application runs; wherein the second interface includes a first control, the first control being used to display the first interface including model identifiers of multiple second 3D models. The first interface is displayed in response to a control trigger operation on the first control.
[0049] In this embodiment of the disclosure, determining the 3D model to be processed based on the identifier selection operation, and performing material traversal processing on the 3D model to determine the first material of the first 3D model, may include: determining the selected 3D model, i.e., the 3D model to be processed, based on the identifier selection operation. Then, the existing materials applied to the 3D model can be traversed to determine the currently traversed material. Thus, the currently traversed material can be used as the first material of the first 3D model.
[0050] S120. Obtain the first texture channel information and the second project material requirements corresponding to the first material, wherein the second project material requirements are used to specify at least the second texture channel information corresponding to the project material used in the second project.
[0051] In this embodiment, the material requirements for the second project include at least the second texture channel information corresponding to the project materials to be used in the 3D model of the second project. The second texture channel information can be understood as the texture channel information pre-defined for the materials of the 3D model in the project specifications established beforehand for the materials of the 3D model in the second project. It should be noted that the project specifications, i.e., the pre-defined development rules at the beginning of the project, must be followed by relevant technical personnel in their design. Following unified specifications helps avoid differences affecting work efficiency during team collaboration. However, the 3D model to be processed often cannot be directly applied to the project because the texture channel information of the materials in the specifications differs from that in this project specification. In this embodiment, the second texture channel information is different from the first texture channel information. Specifically, the number of channels in the second texture channel information is different from the number of channels in the first texture channel information; and / or, the mapping relationship between the texture type identifier and the channel identifier in the second texture channel information and the first texture channel information is different. Optionally, the number of channels in the second texture channel information is less than the number of channels in the first texture channel information. Or, the number of channels in the second texture channel information is more than the number of channels in the first texture channel information. Alternatively, the number of channels in the second texture channel information is the same as that in the first texture channel information, but the mapping relationship between the texture type identifier and the channel identifier is different.
[0052] Continuing with the previous example, the material required for the 3D model in the project includes three channels, labeled T6, T7, and T8. Channel T6 corresponds to texture M1, and channel T7 corresponds to the texture generated based on textures M2 and M3. Figure 6 Correspondingly, channel T8 corresponds to the texture generated based on textures M4 and M5. Figure 7 correspond.
[0053] S130. Based on the first texture channel information and the second texture channel information, generate a second material with the same physical characteristics as the first material.
[0054] In this embodiment, the second material can be understood as a material with the same physical characteristics as the first material, obtained based on the first and second texture channel information. The second texture channel information can be understood as the texture channel information of the second material. In this embodiment, the second texture channel information and the first texture channel information are identical. In this embodiment, a second material that meets the project requirements is generated, and this second material has the same physical characteristics as the first material. Therefore, the rendering effect of applying the second material to the 3D model is the same as the rendering effect produced when the first material is applied to the same 3D model.
[0055] In this embodiment, a texture corresponding to the first material is determined based on the correspondence between materials and textures. Therefore, based on the first and second texture channel information, the texture corresponding to the first material can undergo texture channel recombination processing to obtain a processed texture. Furthermore, based on the processed material, a second material with the same physical characteristics as the first material and texture channel information as the second texture channel information can be obtained. For example, the textures corresponding to the first material of the 3D model include a base color texture, an ambient occlusion texture, a normal texture, a roughness texture, and a metallic texture. Depending on project requirements, the base color texture and the ambient occlusion texture can be recombinated into a single texture. Also, the normal texture, the roughness texture, and the metallic texture can be recombinated into a single texture.
[0056] In this embodiment of the disclosure, a second material with the same physical characteristics as the first material is generated based on the first texture channel information and the second texture channel information. This can improve the reusability of the 3D model and its existing materials in different projects, and avoid repetitive and time-consuming operations such as manually adjusting texture parameters and redrawing textures during the material processing.
[0057] Based on the above embodiments, after generating a second material with the same physical characteristics as the first material based on the first texture channel information and the second texture channel information, the method further includes: replacing the material of the three-dimensional model with the second material so that the three-dimensional model maintains the original physical rendering effect.
[0058] See Figure 2 The following example uses a mailbox model 200 as an illustration. The existing material 210 of this mailbox model 200 is instantiated based on the parent material A220. The material map 230 corresponding to the existing material 210 includes various types, specifically including a base color map 231, a normal map 232, a detail normal map 233, a roughness map 234, a detail roughness map 235, a metallic map 236, and an ambient occlusion map 237.
[0059] The project requirements necessitate that the 3D model utilize a second material, 250, instantiated from the parent material B240. This second material 250 supports setting two textures. To ensure the existing project model maintains its original rendering effect (e.g., ...), ... Figure 3 As shown in Figure 301, and by reusing existing model resources, in this embodiment of the disclosure, a "base color-ambient mask" figure 260 is generated by combining the base color figure 231 and the environment mask figure 237; and a "normal-roughness-metal" figure 261 is generated by combining the normal figure 232, the detail normal figure 232, the roughness figure 234, the detail roughness figure 235, and the metal figure 236. The "base color-ambient mask" figure 260 and the "normal-roughness-metal" figure 261 can then be set as two material maps of the second material 250. The material of the mailbox model is then replaced from the existing material 210 to the second material 250, and the rendering effect after the replacement is as follows. Figure 3 As shown in 302. It should be noted that parent material A220 and parent material B240 are inherited, that is, different subclasses of the same parent material.
[0060] As an optional implementation in this disclosure, in response to the generation event of the second material, the material of the first three-dimensional model in the project can be automatically replaced by the second material so that the first three-dimensional model maintains the original physical rendering effect, thereby realizing the automatic adaptation of the three-dimensional model material, improving project development efficiency and reducing development costs.
[0061] As another optional implementation in this disclosure, upon detecting the generation of a second material, a second control can be displayed; wherein the second control is used to replace the material of the first 3D model with the second material. In response to a control trigger operation on the second control, the material of the first 3D model is replaced with the second material. This approach provides an intuitive and convenient interaction method, enabling users to quickly and accurately perform material replacement operations according to their actual needs.
[0062] The material processing method in this embodiment can use a preset rendering engine to process the materials of 3D models that are not suitable for the project requirements, and can quickly generate materials that meet the project requirements. In other words, the preset engine can automatically generate a series of materials that meet the project requirements. Furthermore, the preset rendering engine provides operation controls that allow for convenient and quick replacement of the materials of a 3D model with a second material, realizing a batch one-click processing workflow and fully automated processing from material extraction and generation to material replacement.
[0063] The technical solution of this disclosure involves determining a first 3D model, which includes a first material configured according to the material requirements of a first project, and identifying the material object to be processed. It acquires the first texture channel information corresponding to the first material and at least the second texture channel information corresponding to the project material used in the second project, defining the channel information of the first material and the requirements of the new project for the material channels. Based on the first and second texture channel information, the material conversion and generation can be automatically completed, generating a second material with the same physical characteristics as the first material. In this process, there is no need for manual adjustment of parameters one by one, greatly saving manpower and time costs and improving the efficiency and accuracy of material processing. The technical solution of this disclosure solves the problem in the prior art where material processing heavily relies on manual operation when the material requirements of a 3D model project change, resulting in low efficiency and difficulty in accurately meeting the material requirements of the new project. It achieves automation and intelligence in material conversion, enabling rapid and accurate processing of 3D model materials, thereby meeting the material needs of diverse application scenarios in different projects, and achieving the technical effect of efficient, accurate, and flexible processing of 3D model materials.
[0064] Figure 4 This is a schematic flowchart illustrating another material processing method provided in this embodiment. The technical solution of this embodiment can be combined with other embodiments; for the same or related parts, they can be described in conjunction with the descriptions of other embodiments, and will not be repeated here. Figure 4 As shown, the method in this embodiment may specifically include:
[0065] S410. Determine the first three-dimensional model, the first three-dimensional model including a first material configured according to the material requirements of the first project, the first material being a PBR material.
[0066] PBR (Physically Based Rendering) is a rendering technique that generates images by simulating the interaction between light and materials in the real world.
[0067] S420. Obtain the first texture channel information and the second project material requirements corresponding to the first material, wherein the second project material requirements are used to specify at least the second texture channel information corresponding to the project material used in the second project.
[0068] S430. Determine the physically based rendering (PBR) texture of the first material.
[0069] In this embodiment of the disclosure, the physically based rendering (PBR) map may include at least one of a base color map, an ambient occlusion map, a normal map, a roughness map, and a metallicity map. Specifically, multiple physical properties of the first material (e.g., metallicity, roughness, transparency, color, etc.) are determined. Thus, a physically based rendering (PBR) map corresponding to each physical feature can be obtained based on these physical properties, i.e., the physically based rendering (PBR) map of the first material.
[0070] In this embodiment of the disclosure, determining the physically based rendering (PBR) map of the first material may include: assigning the first material to a material processing object of a pre-created patch model; and extracting PBR attributes of the first material by calling the program data corresponding to the material processing object to determine the physically based rendering (PBR) map of the first material.
[0071] In this embodiment, the patch model is a three-dimensional model with negligible thickness, and its width and height can be set according to actual needs, without specific limitations. The material processing object can be understood as a feature used to obtain and separate the PBR attribute information of the first material, ensuring the feasibility of subsequent texture information reassembly and adaptation to the project's material texture. Optionally, the material processing object can be a material merging processing object provided for the three-dimensional model in a preset engine. PBR attributes are the physical properties of the first material. In this embodiment, PBR attributes can include one of the following attributes: metallicity, roughness, transparency, and color. The program data corresponding to the material processing object can be program data pre-written according to project requirements for processing the first material.
[0072] Specifically, a material processing object for a pre-created patch model is used. The first material is assigned to the material processing object. Then, using the program data corresponding to the material processing object and leveraging the material merging function of the material processing object, PBR attributes of the first material are extracted to obtain the PBR attributes of the first material, i.e., the physical properties of the first material. This allows the generation of a physically based rendering PBR map corresponding to the physical attributes, i.e., the physically based rendering PBR map of the first material.
[0073] Compared to using the material processing object of the first 3D model itself, in this embodiment of the disclosure, using the material processing object of the planar model can avoid the need for texture rearrangement of the mesh when using the material processing object of the first 3D model itself for material processing (see...). Figure 5 This ensures that the generated texture map still conforms to the original texture map distribution (see...). Figure 6 This achieves the effect of material baking. Furthermore, by using the material processing object of the first 3D model itself, even if only one material is processed, the textures are rearranged. If this result is used to generate a texture, the generated texture will no longer fit the first 3D model, resulting in incorrect material results. This method can only use the processed 3D model to replace the existing 3D model; it is only suitable for 3D models using a single material and cannot adapt to 3D models with multiple materials.
[0074] In this embodiment, the material processing object of the planar model is used to process each material of the first 3D model, decoupling the material processing from the 3D model so that the processing does not affect the first 3D model. Furthermore, since the planar model itself is simply a square formed by two triangles joined together, its texture effectively fills the [0..1] space. Therefore, rearranging the texture information during material processing will not affect the texture, and the extracted texture information will not be reorganized into pixel positions. The resulting texture perfectly matches the texture arrangement and can be used directly, ensuring the feasibility of using the material merging characteristics of the material processing object to adapt the existing materials of the first 3D model to project materials.
[0075] In the embodiments disclosed herein, such as Figure 7 As shown, after the PBR attribute of the first material is extracted, the PBR attribute can also be displayed in the third interface to ensure the feasibility of subsequent texture information reorganization and adaptation to the project material texture.
[0076] S440. Based on the first texture channel information and the second texture channel information, perform texture channel recombination processing on the physically based rendering (PBR) texture to obtain the recombined texture.
[0077] Specifically, based on the mapping relationship between channel identifiers and texture type identifiers in the second texture channel information, and the mapping relationship between channel identifiers and texture type identifiers in the first texture channel information, the physically based rendering (PBR) texture is subjected to texture channel reassembly processing to obtain the reassembled texture. In this embodiment of the disclosure, the correspondence between channel identifiers and texture type identifiers in the second texture channel information can be one-to-one, one-to-many, or many-to-one.
[0078] S450. Based on the recombined texture, a second material with the same physical characteristics as the first material is obtained. The second texture channel information of the second material is different from the first texture channel information.
[0079] Specifically, the recombined textures are subjected to feature extraction and stitching to obtain fused features. Then, a second material with the same physical characteristics as the first material can be generated based on these fused features.
[0080] Based on the above embodiments, before generating a second material with the same physical characteristics as the first material based on the first texture channel information and the second texture channel information, the method may further include: determining first texture attribute information of the second material. The first texture attribute information can be understood as the texture attribute information of the second material. In this embodiment, the first texture attribute information may include a first texture resolution and / or a first texture aspect ratio.
[0081] The first texture resolution can be understood as the resolution of the first texture corresponding to the second material. The first texture can be understood as the texture corresponding to the second material. Optionally, it can be a texture resolution pre-set for the material to be generated, or it can be the default texture resolution of the first material; etc. In this embodiment, the first texture resolution can be set or adjusted according to project requirements, and is not specifically limited here. The aspect ratio of the first texture can be understood as the aspect ratio of the first texture corresponding to the second material. Optionally, the aspect ratio of the first texture can be the aspect ratio of the texture corresponding to the first material. It is understood that the aspect ratio is the ratio of the width to the height of the texture.
[0082] Accordingly, obtaining a second material with the same physical characteristics as the first material based on the reconstructed texture may include: performing texture processing on the reconstructed texture based on the first texture attribute information to obtain a processed texture, and obtaining a second material with the same physical characteristics as the first material based on the processed texture. In one embodiment, the first texture attribute information includes a first texture resolution, and performing texture processing on the reconstructed texture based on the first texture attribute information to obtain a processed texture may include: processing the reconstructed texture into a texture with a resolution equal to the first texture resolution. The first texture attribute information includes a first texture aspect ratio, and performing texture processing on the reconstructed texture based on the first texture attribute information to obtain a processed texture may include: processing the reconstructed texture into a texture with an aspect ratio equal to the first texture aspect ratio.
[0083] To facilitate viewing and adjusting the first texture attribute information, in this embodiment of the disclosure, the first texture attribute information can be displayed once obtained. Based on this, the first texture attribute information can be flexibly and conveniently adjusted according to actual needs. Optionally, the first texture attribute information includes a first aspect ratio; displaying the first texture attribute information may include displaying the first aspect ratio. Specifically, displaying the first aspect ratio may involve determining the aspect ratio of the texture corresponding to the first material and using that aspect ratio as the first aspect ratio.
[0084] Based on the above embodiments, before determining the first texture attribute information of the second material, the method may further include: displaying a default texture resolution corresponding to the first material; obtaining a modified texture resolution in response to a modification operation on the default texture resolution; and obtaining the first texture attribute information for the second material based on the modified texture resolution.
[0085] The default texture resolution can be understood as the resolution (e.g., 1024×1024) pre-set for the texture to be generated for the first material. In this embodiment, the default texture resolutions for different materials can be the same or different. Specifically, the default texture resolution corresponding to the first material is determined. The default texture resolution is displayed. Upon receiving a modification operation for the default texture resolution, the modified texture resolution can be obtained. The modified texture resolution can then be used to update the first texture attribute information for the second material to obtain the updated first texture attribute information. This process allows the default texture resolution to be adjusted according to actual needs, accurately adapting to different detail requirements or performance limitations, avoiding excessive resource consumption or loss of detail due to a fixed resolution, and improving the flexibility and practicality of material generation.
[0086] Based on the above embodiments, the method may further include: displaying second texture attribute information of the first material. The second texture attribute information can be understood as the texture attribute information of the first material. In this embodiment, the second texture attribute information may include a second texture resolution and / or a second texture aspect ratio.
[0087] In this context, the second texture resolution can be understood as the resolution of the second texture corresponding to the first material. The second texture can be understood as the texture corresponding to the first material. In one embodiment, if the first material corresponds to only one texture, the second texture corresponding to that first material can be that same texture. Therefore, the second texture resolution is the resolution of the texture corresponding to the first material. In another embodiment, if the first material corresponds to multiple textures, the second texture corresponding to the first material can be the texture with the highest resolution among those corresponding to the first material. In this case, the second texture resolution can be the resolution of the texture with the highest resolution.
[0088] In this embodiment, the aspect ratio of the second texture can be understood as the resolution of the third texture corresponding to the first material. The third texture can be understood as the texture corresponding to the first material. In one embodiment, if there is only one texture corresponding to the first material, the third texture corresponding to the first material can be that same texture. Therefore, the aspect ratio of the second texture is the aspect ratio of the texture corresponding to the first material. In another embodiment, if there are multiple textures corresponding to the first material, the third texture corresponding to the first material can be the texture with the largest aspect ratio corresponding to the first material. In this case, the aspect ratio of the second texture can be the aspect ratio of the texture with the largest aspect ratio. In this embodiment, the third texture and the second texture can be the same texture or different textures.
[0089] In this embodiment of the disclosure, the interface displaying the second texture attribute information and the interface displaying the first texture attribute information can be the same interface or different interfaces. See also Figure 8 The second texture resolution, the first texture resolution, and the first texture aspect ratio are displayed on the same interface, namely the fourth interface 80. This fourth interface 80 includes a first area 81, a second area 82, and a third area 83. The first area 81 is used to display at least one second texture resolution. The second area 82 is used to display at least one first texture resolution. The third area 83 is used to display at least one first texture aspect ratio. Furthermore, in this embodiment, the interface for displaying the second texture attribute information and the first texture attribute information may also include a preset control, so that upon receiving a control trigger operation on the preset control, the second texture attribute information and the first texture attribute information are displayed on the fourth interface.
[0090] The technical solution of this disclosure embodiment determines the physically based rendering (PBR) texture of the first material; performs texture channel recombination processing on the physically based rendering (PBR) texture based on the first texture channel information and the second texture channel information to obtain a recombined texture; and obtains a second material with the same physical characteristics as the first material based on the recombined texture, thereby realizing the function of obtaining a second material through texture channel recombination.
[0091] Figure 9 This is a schematic diagram of a material processing apparatus provided in an embodiment of the present disclosure. Figure 9 As shown, the material processing device includes a first module 910, a second module 920, and a third module 930. The first module 910 is used to determine a first three-dimensional model, which includes a first material configured according to the material requirements of a first project. The second module 920 is used to obtain first texture channel information corresponding to the first material and second project material requirements, wherein the second project material requirements at least specify the second texture channel information corresponding to the project material used in the second project. The third module 930 is used to generate a second material with the same physical characteristics as the first material based on the first texture channel information and the second texture channel information.
[0092] The technical solution of this disclosure involves a first module 910 determining a first 3D model, which includes a first material configured according to the material requirements of a first project, thus clarifying the material object to be processed. A second module 920 acquires the first texture channel information corresponding to the first material and at least the second texture channel information corresponding to the project material used in the second project, thus clarifying the channel information of the first material and the new project's requirements for the material channels. A third module 930, based on the first and second texture channel information, automatically completes the material conversion and generation, generating a second material with the same physical characteristics as the first material. In this process, no manual adjustment of parameters is required, greatly saving manpower and time costs and improving the efficiency and accuracy of material processing. This technical solution solves the problem in the prior art where material processing heavily relies on manual operation when the material requirements of a 3D model project change, leading to low efficiency and difficulty in accurately meeting the material requirements of the new project. It achieves automated and intelligent material conversion, enabling rapid and accurate processing of 3D model materials, thereby meeting the material needs of diverse application scenarios in different projects and achieving the technical effect of efficient, accurate, and flexible processing of 3D model materials.
[0093] In some embodiments of this disclosure, the material processing apparatus optionally further includes a fourth module. The fourth module is configured to, after generating a second material with the same physical characteristics as the first material based on the first texture channel information and the second texture channel information, replace the material of the first 3D model with the second material, so that the first 3D model maintains its original physical rendering effect.
[0094] In some embodiments of this disclosure, optionally, the first material is a PBR material, and the third module 930 includes a first unit, a second unit, and a third unit. The first unit is used to determine the physically based rendering (PBR) texture of the first material; the second unit is used to perform texture channel recombination processing on the physically based rendering (PBR) texture based on the first texture channel information and the second texture channel information to obtain a recombined texture; and the third unit is used to obtain a second material with the same physical characteristics as the first material based on the recombined texture.
[0095] In some embodiments of this disclosure, optionally, a first unit is used to assign the first material to a material processing object of a pre-created patch model; and to extract the PBR attributes of the first material by calling the program data corresponding to the material processing object, so as to determine the physically based rendering PBR map of the first material.
[0096] In some embodiments of this disclosure, the material processing apparatus optionally further includes a fifth module. The fifth module is configured to determine first texture attribute information of the second material before generating a second material with the same physical characteristics as the first material based on the first texture channel information and the second texture channel information; wherein the first texture attribute information includes a first texture resolution and / or a first texture aspect ratio; and a third unit is configured to perform texture processing on the reconstructed texture based on the first texture attribute information to obtain a processed texture, and obtain a second material with the same physical characteristics as the first material based on the processed texture.
[0097] In some embodiments of this disclosure, the material processing apparatus may optionally further include a sixth module. The sixth module is configured to: display a default texture resolution corresponding to the first material before determining the first texture attribute information of the second material; obtain a modified texture resolution in response to a modification operation on the default texture resolution; and obtain the first texture attribute information for the second material based on the modified texture resolution.
[0098] In some embodiments of this disclosure, the material processing apparatus optionally further includes a seventh module. The seventh module is used to display second texture attribute information of the first material; wherein the second texture attribute information includes a second texture resolution and / or a second texture aspect ratio.
[0099] In some embodiments of this disclosure, the material processing apparatus optionally further includes an eighth module. The eighth module is configured to display a first interface before acquiring the first texture channel information corresponding to the first material of the 3D model; wherein the first interface includes a model identifier of at least one second 3D model; in response to an identifier selection operation for the model identifier, a 3D model to be material-processed is determined based on the identifier selection operation, and material traversal processing is performed on the 3D model to be material-processed to determine the first material of the first 3D model.
[0100] The material processing apparatus provided in this disclosure can execute the material processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0101] It is worth noting that the various units and modules included in the above-mentioned material processing device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.
[0102] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0103] like Figure 10As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0104] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0105] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as material processing methods.
[0106] In some embodiments, the material processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via read-only memory (ROM) 12 and / or communication unit 19. When the computer program is loaded into random access memory (RAM) 13 and executed by processor 11, one or more steps of the material processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the material processing method by any other suitable means (e.g., by means of firmware).
[0107] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0108] Computer programs for implementing the material processing methods of this disclosure may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0109] This disclosure provides a computer-readable storage medium storing computer instructions for causing a processor to execute a material processing method, comprising: determining a first three-dimensional model, the first three-dimensional model including a first material configured according to a first project material requirement; obtaining first texture channel information corresponding to the first material and a second project material requirement, wherein the second project material requirement is at least used to specify second texture channel information corresponding to the project material used in the second project; and generating a second material having the same physical characteristics as the first material based on the first texture channel information and the second texture channel information.
[0110] In the context of this disclosure, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0111] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0112] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0113] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0114] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of embodiments of this disclosure.
[0115] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements a material processing method according to any embodiment of this disclosure.
[0116] In implementing a computer program product, computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0117] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this disclosure can be achieved, and this is not limited herein.
[0118] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A material processing method, characterized in that, Applied to a game engine, the method includes: A first three-dimensional model is determined, the first three-dimensional model including a first material configured according to the material requirements of the first project; Obtain the first texture channel information corresponding to the first material and the material requirements of the second project, wherein the material requirements of the second project are at least used to specify the second texture channel information corresponding to the project material used in the second project; Based on the first texture channel information and the second texture channel information, a second material with the same physical characteristics as the first material is generated.
2. The method according to claim 1, characterized in that, After generating a second material with the same physical characteristics as the first material based on the first texture channel information and the second texture channel information, the method further includes: The material of the first 3D model is replaced with the second material so that the first 3D model retains its original physical rendering effect.
3. The method according to claim 1, characterized in that, The first material is a PBR material. The step of generating a second material with the same physical characteristics as the first material based on the first texture channel information and the second texture channel information includes: Determine the physically based rendering (PBR) texture of the first material; Based on the first and second texture channel information, the physically based rendering (PBR) texture is reconstructed to obtain the reconstructed texture. Based on the reconstructed texture, a second material with the same physical characteristics as the first material is obtained.
4. The method according to claim 3, characterized in that, Determining the physically based rendering (PBR) texture of the first material includes: Assign the first material to the material handling object of the pre-created patch model; The PBR attributes of the first material are extracted by calling the program data corresponding to the material processing object, so as to determine the physically based rendering PBR map of the first material.
5. The method according to claim 3, characterized in that, Before generating a second material with the same physical characteristics as the first material based on the first texture channel information and the second texture channel information, the method further includes: Determine the first texture attribute information of the second material; wherein, the first texture attribute information includes the first texture resolution and / or the first texture aspect ratio; The process of obtaining a second material with the same physical characteristics as the first material based on the reconstructed texture includes: Based on the first texture attribute information, the recombined texture is processed to obtain a processed texture, and a second material with the same physical characteristics as the first material is obtained based on the processed texture.
6. The method according to claim 5, characterized in that, Before determining the first texture attribute information of the second material, the method further includes: Displays the default texture resolution corresponding to the first material; In response to the modification operation of the default texture resolution, the modified texture resolution is obtained, and the first texture attribute information for the second material is obtained based on the modified texture resolution.
7. The method according to claim 6, characterized in that, The method further includes: Display the second texture attribute information of the first material; wherein, the second texture attribute information includes the second texture resolution and / or the second texture aspect ratio.
8. The method according to claim 1, characterized in that, Before obtaining the first texture channel information corresponding to the first material of the 3D model, the method further includes: Display a first interface; wherein the first interface includes a model identifier for at least one second three-dimensional model; In response to the identifier selection operation for the model identifier, a three-dimensional model to be materialized is determined based on the identifier selection operation, and a material traversal process is performed on the three-dimensional model to be materialized to determine the first material of the first three-dimensional model.
9. A material processing apparatus, characterized in that, Applied to a game engine, the device includes: The first module is used to determine the first three-dimensional model, the first three-dimensional model including a first material configured according to the material requirements of the first project; The second module is used to obtain the first texture channel information corresponding to the first material and the material requirements of the second project, wherein the material requirements of the second project are at least used to specify the second texture channel information corresponding to the project material used in the second project. The third module is used to generate a second material with the same physical characteristics as the first material based on the first texture channel information and the second texture channel information.
10. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the material processing method as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are used to cause a processor to execute the material processing method according to any one of claims 1-8.
12. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the material processing method according to any one of claims 1-8.