An optimization method for PBR material set selection strategy
By obtaining the sub-object metadata and ambient lighting categories of the target model, using the preset rule library to map material demand parameters, and combining with the PBR material library for intelligent screening and matching scores, the problem of PBR material selection is solved, and efficient and accurate material selection and optimized rendering effects are achieved.
Patent Information
- Application Number
- CN202510847976.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-06-24
AI Technical Summary
In the prior art, the PBR material selection process takes a long time and is prone to errors, lacking intelligence and automation, resulting in distortion of the physical interaction between the material and the scene, especially in complex or large-scale scenarios.
By obtaining the sub-object metadata and ambient lighting categories of the target model, using the preset rule library to map material requirements parameters, combining the PBR material library for intelligent screening and matching scores, and determining the target PBR material.
The automation and intelligence of PBR material selection is realized, and the selection efficiency and accuracy are improved, so that the recommended materials are highly matched with the target model scene and optimized rendering effect.
Smart Images

Figure CN120353953B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer graphics technology, and in particular to an optimization method for a PBR material set selection strategy. Background Art
[0002] Physically Based Rendering (PBR) is a rendering technology based on the laws of physics that generates highly realistic images by simulating the real-world interaction between light and the surface of an object. In 3D scene rendering, PBR materials can provide more realistic lighting and surface interaction effects. PBR materials are widely used in scenes such as games, film and television, virtual reality (VR), and augmented reality (AR). However, with the continuous expansion of PBR material libraries, the process of manually selecting suitable materials is becoming increasingly time-consuming and error-prone. Traditional material selection methods mainly rely on manual operations or simple rules. They lack comprehensive consideration of the model's scene information, lack intelligence and automation, and are prone to distortion of the physical interaction effects between materials and the scene, which is particularly obvious in complex or large-scale scenes. Summary of the Invention
[0003] The main purpose of this application is to provide an optimization method for PBR material set selection strategy, aiming to solve the technical problem of low accuracy of PBR material selection in the existing technology.
[0004] To achieve the above objectives, this application proposes a method for optimizing a PBR material set selection strategy, which includes:
[0005] Obtaining sub-object metadata of a sub-object in a target model and an ambient lighting category corresponding to the ambient lighting intensity of the target model;
[0006] Perform rule mapping on the sub-object metadata based on a preset rule library to determine the material requirement parameters of the sub-object;
[0007] Selecting a first candidate PBR material from a PBR material library based on the material requirement parameters, the sub-object metadata, and the ambient lighting category;
[0008] Matching the first candidate PBR material with the ambient lighting category, the material requirement parameters, and the sub-object metadata, respectively, to determine a matching score for the first candidate PBR material;
[0009] A target PBR material is selected from the first candidate PBR materials according to the matching score.
[0010] In some embodiments, the sub-object metadata includes a sub-object category, and the step of obtaining the sub-object category includes:
[0011] Obtaining a three-dimensional model file corresponding to the target model;
[0012] Calling a parser to parse the three-dimensional model file to obtain an array of vertex coordinates corresponding to the sub-object;
[0013] generating a sub-object contour image corresponding to the sub-object based on the vertex coordinate array;
[0014] The sub-object category is obtained by performing category prediction on the sub-object contour image through a target detection model.
[0015] In some embodiments, the sub-object metadata includes a sub-object tag, the rule library includes tag rules, and the step of performing rule mapping on the sub-object metadata based on a preset rule library to determine the material requirement parameters of the sub-object includes:
[0016] Performing an exact match between the sub-object tag and the tag trigger condition corresponding to the tag rule to obtain an exact match result;
[0017] If the exact matching result is a match, the preset requirement condition corresponding to the tag rule to which the tag trigger condition belongs is determined as the material requirement attribute and requirement attribute parameter range of the sub-object;
[0018] Determining a rule weight corresponding to the tag rule to which the tag trigger condition belongs as a requirement attribute weight;
[0019] The requirement attribute weight, the material requirement attribute, and the requirement attribute parameter range are determined as the material requirement parameter.
[0020] In some embodiments, the sub-object metadata includes a sub-object name, the rule base includes a name rule, and the step of performing rule mapping on the sub-object metadata based on a preset rule base to determine the material requirement parameters of the sub-object includes:
[0021] Performing fuzzy matching on the sub-object name and the name trigger keyword corresponding to the name rule to obtain a fuzzy matching result;
[0022] If the fuzzy matching result is a match, the requirement condition corresponding to the name rule to which the name trigger keyword belongs is determined as the material requirement attribute of the sub-object and the requirement attribute parameter range;
[0023] Determine the rule weight corresponding to the name rule to which the name trigger keyword belongs as the requirement attribute weight;
[0024] The requirement attribute weight, the material requirement attribute and the requirement attribute parameter range are determined as the material requirement parameter.
[0025] In some embodiments, the step of obtaining the ambient lighting category includes:
[0026] Reading the light source component properties of the target model based on a preset interface, and extracting the ambient light intensity from the light source component properties;
[0027] According to a preset light intensity classification standard, the ambient light intensity is mapped to a corresponding light category, and the ambient light category corresponding to the ambient light intensity is determined.
[0028] In some embodiments, the step of selecting a first candidate PBR material from a PBR material library based on the material requirement parameters, the sub-object metadata, and the ambient lighting category includes:
[0029] Determine the material category, material name, material attribute, material attribute range, applicability label, and lighting category adaptation data of each PBR material according to the PBR material library;
[0030] Determine the PBR material having the same material attribute as the required material attribute as a second candidate PBR material;
[0031] Calculating similarities between the sub-object label and the material category, the material name, and the applicability label, respectively, and determining an average similarity value corresponding to a plurality of similarities;
[0032] Determine the second candidate PBR material whose similarity average value is greater than or equal to the first preset threshold as the third candidate PBR material;
[0033] The third candidate PBR material is screened according to the lighting category adaptation data and the ambient lighting category corresponding to the third candidate PBR material to obtain the first candidate PBR material.
[0034] In some embodiments, the lighting category adaptation data includes each lighting category adaptation score, where the lighting category adaptation score is used to indicate the degree of adaptation between the PBR material and the corresponding lighting category.
[0035] The step of screening the third candidate PBR material according to the illumination category adaptation data and the ambient illumination category corresponding to the third candidate PBR material to obtain the first candidate PBR material includes:
[0036] Determining a lighting category adaptation score between the third candidate PBR material and the ambient lighting category according to the lighting category adaptation data;
[0037] The third candidate PBR material whose lighting category adaptation score is greater than or equal to a second preset threshold is determined as the first candidate PBR material.
[0038] In some embodiments, the step of matching the first candidate PBR material with the ambient lighting category, the material requirement parameters, and the sub-object metadata, and determining a matching score for the first candidate PBR material, includes:
[0039] Determining the lighting category adaptation score corresponding to the first candidate PBR material according to the lighting category adaptation data corresponding to the first candidate PBR material and the ambient lighting category;
[0040] Determining an average similarity value corresponding to the first candidate PBR material based on the sub-object tags and at least one of the material category, the material name, and the applicability tag corresponding to the first candidate PBR material;
[0041] Determining a degree of compatibility of attribute parameters corresponding to the first candidate PBR material based on the required attribute parameter range and the material attribute range corresponding to the first candidate PBR material;
[0042] The lighting category adaptation score corresponding to the first candidate PBR material, the similarity average corresponding to the first candidate PBR material, the attribute parameter adaptation corresponding to the first candidate PBR material, and the required attribute weight are weighted averaged to obtain the matching score of the first candidate PBR material.
[0043] In some embodiments, the step of selecting a target PBR material from the first candidate PBR materials based on the matching score includes:
[0044] Determine the first candidate PBR material whose matching score is greater than or equal to a third preset threshold as the target PBR material;
[0045] or,
[0046] The first candidate PBR material corresponding to the one with the largest matching score value is determined as the target PBR material.
[0047] In some embodiments, the step of calculating the similarities between the sub-object label and the material category, the material name, and the applicability label, and determining an average of the similarities corresponding to the multiple similarities, includes:
[0048] Calculating similarities between the material category of the second candidate PBR material and all sub-object labels respectively to obtain a plurality of corresponding initial category similarities, and determining the largest value among the plurality of initial category similarities as the category similarity between the sub-object label and the material category of the second candidate PBR material;
[0049] Calculating similarities between the material name of the second candidate PBR material and all sub-object labels respectively to obtain a plurality of corresponding initial name similarities, and determining the largest value among the plurality of initial name similarities as the name similarity between the sub-object label and the material name of the second candidate PBR material;
[0050] Calculating similarities between the applicability label of the second candidate PBR material and all the sub-object labels respectively to obtain a plurality of corresponding initial applicability label similarities, and determining the largest value among the plurality of initial applicability label similarities as the applicability label similarity between the sub-object label and the applicability label of the second candidate PBR material;
[0051] The applicability tag similarity, the name similarity, and the category similarity are averaged to obtain the similarity average value.
[0052] In addition, to achieve the above purpose, the present application also proposes an optimization device for a PBR material set selection strategy, the optimization device for a PBR material set selection strategy comprising:
[0053] An acquisition module, configured to acquire sub-object metadata of a sub-object in a target model and an ambient lighting category corresponding to the ambient lighting intensity of the target model;
[0054] A rule mapping module, configured to perform rule mapping on the sub-object metadata based on a preset rule library to determine the material requirement parameters of the sub-object;
[0055] A material screening module, configured to select a first candidate PBR material from a PBR material library based on the material requirement parameters, the sub-object metadata, and the ambient lighting category;
[0056] a matching quantification module, configured to match the first candidate PBR material with the ambient lighting category, the material requirement parameters, and the sub-object metadata, respectively, to determine a matching score for the first candidate PBR material;
[0057] A determination module is configured to select a target PBR material from the first candidate PBR materials based on the matching score.
[0058] In addition, to achieve the above-mentioned purpose, the present application also proposes an optimization device for a PBR material set selection strategy, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the optimization method for the PBR material set selection strategy as described above.
[0059] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the optimization method of the PBR material set selection strategy as described above are implemented.
[0060] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the optimization method of the PBR material set selection strategy as described above.
[0061] One or more technical solutions proposed in this application have at least the following technical effects: By obtaining sub-object metadata of sub-objects in a target model and the ambient lighting category corresponding to the target model's ambient lighting intensity, basic data support is provided for subsequent rule mapping and material matching. Based on a predefined rule library, rule mapping is performed on the sub-object metadata to determine the material requirement parameters of the sub-object. The rule library then defines the required material properties of the sub-object, thereby guiding the subsequent screening process. Based on the material requirement parameters, sub-object metadata, and ambient lighting category, each PBR material in the PBR material library is screened to obtain a first candidate PBR material. A semantic understanding of the target model's scene is performed based on the sub-object metadata and the target model's ambient lighting intensity, and each PBR material in the PBR material library is screened based on the understanding results. The first candidate PBR materials are matched against the ambient lighting category, material requirement parameters, and sub-object metadata, and a matching score is determined for the first candidate PBR materials. The degree of fit between each first candidate PBR material and the sub-object requirements is quantified, and a target PBR material is selected from the first candidate PBR materials based on the matching score. The optimization method of the PBR material set selection strategy provided in this application parses the metadata of the sub-objects in the target model and determines the ambient lighting category, uses a preset rule library to map the material requirement attributes and parameter ranges, and intelligently screens and scores the PBR material library in combination with the ambient light intensity, and finally determines the target PBR material recommended to the user. This solves the technical problems of low accuracy and low efficiency in PBR material selection and matching in the existing technology, realizes the automation and intelligence of PBR material selection, improves the selection efficiency and accuracy, so that the target PBR material recommended to the user is highly matched with the scene of the target model, thereby optimizing the rendering effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0063] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0064] Figure 1 A flow chart illustrating the first embodiment of the optimization method for the PBR material set selection strategy of this application;
[0065] Figure 2 Schematic diagram of the module structure of the optimization device of the PBR material set selection strategy in the embodiment of the present application;
[0066] Figure 3 Schematic diagram of the device structure of the hardware operating environment involved in the optimization method of the PBR material set selection strategy in the embodiment of the present application.
[0067] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0068] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0069] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0070] The main solution of the embodiment of the present application is: obtaining sub-object metadata of sub-objects in the target model, and the ambient lighting category corresponding to the ambient lighting intensity of the target model; performing rule mapping on the sub-object metadata based on a preset rule library to determine the material requirement parameters of the sub-object; selecting a first candidate PBR material in the PBR material library according to the material requirement parameters, sub-object metadata and ambient lighting category; matching the first candidate PBR material with the ambient lighting category, material requirement parameters and sub-object metadata respectively to determine the matching score of the first candidate PBR material; and selecting a target PBR material from the first candidate PBR material according to the matching score.
[0071] In this embodiment, for ease of description, the following description is made with the optimization device for identifying the PBR material set selection strategy as the execution subject.
[0072] As the PBR material library continues to expand, the process of manually selecting suitable materials in existing technologies is becoming increasingly time-consuming and error-prone. Traditional material selection methods, primarily manual or based on simple rules, lack comprehensive consideration of the model's scene information and lack intelligence and automation. This can easily lead to distortions in the physical interaction between materials and the scene, especially in complex or large-scale scenes.
[0073] This application provides a solution. By parsing the metadata of sub-objects in the target model, the material requirement attributes and parameter ranges are mapped out using a preset rule library, and the PBR material library is intelligently screened and scored for matching in combination with the ambient light intensity, the target PBR material recommended to the user is finally determined. This solves the technical problems of low accuracy and low efficiency in the selection and matching of PBR materials in the existing technology, realizes the automation and intelligence of PBR material selection, improves the selection efficiency and accuracy, and ensures that the target PBR material recommended to the user is highly matched with the scene of the target model, thereby optimizing the rendering effect.
[0074] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an optimization device for a PBR material set selection strategy that can implement the above functions. The following uses the optimization device for a PBR material set selection strategy as an example to illustrate this embodiment and the following embodiments.
[0075] Based on this, the embodiment of the present application provides an optimization method for the PBR material set selection strategy, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the optimization method for the PBR material set selection strategy of this application.
[0076] In this embodiment, the optimization method of the PBR material set selection strategy includes steps 101 to 105:
[0077] Step 101: Obtain sub-object metadata of a sub-object in a target model, and an ambient lighting category corresponding to the ambient lighting intensity of the target model.
[0078] Specifically, the sub-object metadata includes the sub-object category, the sub-object label, and the sub-object name.
[0079] As an example, the step of obtaining the sub-object label includes: obtaining a three-dimensional model file corresponding to the target model, calling a parser to parse the three-dimensional model file, and extracting the sub-object label.
[0080] As an example, the step of obtaining the sub-object name includes: obtaining a three-dimensional model file corresponding to the target model, calling a parser to parse the three-dimensional model file, and extracting the sub-object name.
[0081] As an example, the steps for obtaining the sub-object category include: obtaining a three-dimensional model file corresponding to the target model, calling a parser to parse the three-dimensional model file, extracting the geometric data of the sub-object, the geometric data including a vertex coordinate array, a surface normal vector array, and a bounding box size value; and determining the sub-object category based on the vertex coordinate array, the surface normal vector array, and the bounding box size value.
[0082] Optionally, the step of obtaining the sub-object category also includes: obtaining a three-dimensional model file corresponding to the target model; calling a parser to parse the three-dimensional model file to obtain a vertex coordinate array corresponding to the sub-object; generating a sub-object contour image corresponding to the sub-object based on the vertex coordinate array; and performing category prediction on the sub-object contour image through a target detection model to obtain the sub-object category.
[0083] Specifically, the 3D model to be rendered is referred to as the target model, for example, a chair model or a car model. It should be understood that the target model can include a single 3D model or multiple 3D models. Within a 3D model (target model), a complex model is typically composed of multiple parts, each of which can be considered a sub-object, such as the backrest, seat, and armrests in a chair model. Sub-object metadata describes the characteristics of a sub-object and includes: sub-object label, sub-object category, and sub-object name. The sub-object label is a brief description or classification identifier of the sub-object, allowing for quick identification of its function or purpose. For example, "door," "window," and "floor" are all possible labels. The sub-object category is a broader classification of the sub-object, more general than the label. For example, "building component," "furniture," and "vehicle" belong to different categories. The sub-object name is a unique identifier for the sub-object and can be a user-defined string used to distinguish different sub-objects. For example, "house_01_door" is a specific sub-object name. Ambient lighting intensity is the lighting intensity in the scene where the target model resides, affecting reflections, shadows, and the overall visual quality of the sub-object surface. Ambient lighting categories are categorized into different categories based on the different value ranges of ambient lighting intensity, such as "bright", "dark", "dusk", etc. Determining the ambient lighting category helps to more accurately match PBR materials suitable for the current lighting conditions.
[0084] In some embodiments, a parser can be invoked to parse the 3D model file corresponding to the target model. The parser can be Open Asset Import Library (Assimp), Open3D, or other similar parsers. The 3D model file format can be Wavefront Object File (OBJ), Graphics Library Transmission Format (glTF), or Filmbox Exchange (FBX). After parsing the 3D model file, each sub-object in the target model is traversed. Each sub-object can exist as a node in the 3D model file. Sub-object metadata for the sub-objects is extracted from the 3D model file, and information such as the sub-object label, sub-object category, and sub-object name is extracted from each node. For example, the sub-object label can be extracted from a node's custom attributes or annotations. If undefined, the label can be inferred based on the node name or category. The sub-object category is determined based on the node's hierarchical structure or predefined classification rules. The sub-object name is obtained from the node's name attribute. The sub-object metadata of the sub-objects in the target model is organized into a structured format and stored in a structured data object for subsequent call. The structured format can be JavaScript Object Notation (JSON), eXtensible Markup Language (XML), etc. The stored sub-object metadata corresponds one-to-one to the sub-object, which facilitates the subsequent rapid retrieval of its metadata based on the sub-object. In this application, obtaining the sub-object metadata of the sub-objects in the target model is a basic step in the optimization method process of the entire PBR material set selection strategy, providing standardized input for the subsequent rule mapping and material screening steps. By automatically extracting and utilizing the sub-object metadata, it not only helps to improve the accuracy of material selection, but also improves the efficiency of material selection, solving the technical problems of low accuracy and low efficiency of PBR material selection matching in the existing technology.
[0085] In some embodiments, the ambient light intensity of the target model can be obtained by parsing the ambient light map or using the API provided by the rendering engine. The ambient light intensity is mapped to the corresponding ambient light category according to a preset light intensity classification standard. For example, the specific implementation method for determining the ambient light category corresponding to the ambient light intensity of the target model can be arbitrarily as follows:
[0086] {
[0087] def determine_lighting_category(light_intensity):
[0088] if light_intensity<0.3:
[0089] return "dark"
[0090] elif light_intensity<0.7:
[0091] return "moderate"
[0092] else:
[0093] return "bright"
[0094] }
[0095] Step 102 : performing rule mapping on the sub-object metadata based on a preset rule library to determine the material requirement parameters of the sub-object.
[0096] Specifically, the material requirement parameters for a sub-object include the sub-object's required material attributes, required attribute parameter ranges, and required attribute weights. The preset rule library is a pre-built set of rules that maps sub-object metadata to required material attributes, required attribute parameter ranges, and required attribute weights. Each rule in the rule library defines the required material attributes, required attribute parameter ranges, and required attribute weights that a specific sub-object type should possess. Required material attributes describe the physical and visual properties of the sub-object's material, such as reflectivity, roughness, metallicity, and normal mapping. These material properties directly affect the material's appearance during rendering. The required attribute parameter range defines a reasonable parameter range for the sub-object's required material attributes. For example, for a sub-object labeled "Metal," the corresponding material required attribute "Metalness" can be set within a parameter range of 0.7 to 1.0. Setting a parameter range ensures that the subsequently selected PBR material meets the sub-object's actual requirements, thus avoiding rendering artifacts caused by improperly set attribute parameters. The required attribute weight is the weight assigned to the sub-object. For example, for a sub-object with the sub-object label "Metal", the required attribute weight can be 0.8. The required attribute weight can be used in subsequent matching scores to ensure that the subsequently selected material has a high metallicity and determine the most suitable material, so that the visual effect of the metallic texture of the sub-object can be more realistically expressed during rendering.
[0097] In some embodiments, before the step of performing rule mapping on the sub-object metadata based on a preset rule base, the step further includes: constructing a rule base. Specifically, the rule base can be constructed based on expert knowledge, material database analysis, or machine learning algorithms. For example, based on the experience of material experts, typical sub-object material requirement attributes, requirement attribute parameter ranges, and requirement attribute weights can be defined for different sub-object labels, sub-object categories, and sub-object names. Alternatively, a rule base can be constructed by analyzing a large number of PBR material databases, counting the commonly used material attribute ranges for different sub-object labels, sub-object categories, and sub-object names, and determining the weights of the sub-objects. In addition, a machine learning algorithm can be used to train a model to automatically learn the mapping relationship between sub-object metadata and material requirement attributes, requirement attribute parameter ranges, and requirement attribute weights. The rule base can be stored in JSON format.
[0098] In some embodiments, for each sub-object, a matching rule is searched in the rule library based on the sub-object metadata (including the sub-object tag, sub-object category, and sub-object name). Rule matching can be achieved through exact matching or fuzzy matching. For the sub-object metadata, the matched rules are applied to extract the material requirement attributes, requirement attribute parameter ranges, and requirement attribute weights of the sub-object. Based on the preset rule library, the sub-object metadata is rule-mapped to determine the material attribute requirement description (including material requirement attributes, requirement attribute parameter ranges, and requirement attribute weights) suitable for the sub-object, providing standards and quantitative indicators for subsequent material screening, making material selection more accurate, avoiding the problem of mismatch between materials and target model scenes caused by arbitrary selection or subjective judgment, and helping to improve the accuracy of PBR material selection.
[0099] Step 103 : Select a first candidate PBR material from the PBR material library based on material requirement parameters, sub-object metadata, and ambient lighting category.
[0100] Specifically, the PBR material library contains multiple PBR materials. Each PBR material in the PBR material library has its corresponding material metadata. The material metadata includes material category, material name, material attributes, material attribute range, applicability label, and lighting category adaptation data. The lighting category adaptation data includes the lighting category adaptation score corresponding to each lighting category. The lighting category adaptation score is used to indicate the adaptability between the PBR material and the corresponding lighting category.
[0101] In some embodiments, a multi-condition screening is performed on each PBR material in the PBR material library based on material requirement parameters, sub-object metadata, and ambient lighting categories, and a first candidate PBR material that meets all screening conditions is obtained from each PBR material in the PBR material library. The first candidate PBR material is a candidate PBR material that meets the sub-object material requirements and ambient lighting conditions, providing a data basis for subsequent matching scores and target material recommendations. By determining the ambient lighting category and considering the ambient lighting conditions, the filtered PBR material can adapt to the lighting conditions of the target model, which helps to present a reasonable visual effect after rendering and avoid distortion of the rendering effect caused by the mismatch between the material and the scene lighting. At the same time, multi-condition screening is performed in combination with the material requirement parameters and the sub-object label to further improve the matching degree between the filtered first candidate PBR material and the semantic and physical properties of the sub-object.
[0102] Step 104 : Match the first candidate PBR material with the ambient lighting category, material requirement parameters, and sub-object metadata respectively to determine a matching score of the first candidate PBR material.
[0103] Specifically, the match score is a quantitative indicator determined based on the PBR material library, ambient lighting category, required attribute parameter range, sub-object label, and required attribute weight. It is used to evaluate the degree of match between the first candidate PBR material and the sub-object's material requirements and ambient lighting conditions. The higher the score, the more closely the first candidate PBR material matches the target model scene.
[0104] In some embodiments, an evaluation model is constructed, and the evaluation model is used to calculate the matching score of each first candidate PBR material. The evaluation model can take into account the following factors: ambient lighting category, material requirement parameters, and sub-object metadata. For each first candidate PBR material, the matching score of the first candidate PBR material is calculated according to the evaluation model. By determining the matching score of the first candidate PBR material, the matching score can comprehensively and accurately reflect the degree of matching between a candidate PBR material and the target model scene, quantify the degree of matching between each first candidate PBR material and the target model scene, ensure that the selected PBR material not only meets the functional properties of the sub-object, but also can adapt to the specific lighting environment, avoid the problem of material and scene mismatch caused by arbitrary selection or subjective judgment, and thus improve the accuracy of PBR material selection.
[0105] Step 105 : Select a target PBR material from the first candidate PBR materials based on the matching score.
[0106] Specifically, the target PBR material is the best PBR material selected from the first candidate PBR materials, and will be recommended to the user for rendering a specific sub-object in the target model.
[0107] In some embodiments, the first candidate PBR materials are sorted in descending order based on their matching scores, with higher-scoring first candidate PBR materials placed first, indicating a higher degree of match with the target model scene. A matching score threshold is set based on actual needs. Only first candidate PBR materials with matching scores above the threshold are recommended as target materials. This threshold screening can help filter out PBR materials with lower matching scores, thereby improving the quality of recommended target materials.
[0108] Furthermore, brief information such as the material category and material name of the target PBR material is displayed to the user in the form of a list. The list can be sorted according to the matching score corresponding to the target PBR material, with materials with higher scores placed first. Alternatively, the target PBR material is displayed to the user in the form of a thumbnail. The thumbnail can reflect the visual characteristics of the material and help the user quickly identify the appearance of the material. When the user hovers the mouse over the list item or thumbnail of a target PBR material, the rendering effect of the target PBR material applied to the target model sub-object is displayed, allowing the user to preview the rendering effect of the target PBR material applied to the target model sub-object. By providing a comparison preview mode, the user is allowed to preview the effects of multiple target PBR materials applied to the sub-objects at the same time, making it easier for the user to compare and select. In addition, the user selects one or more target PBR materials by clicking on the list item or thumbnail. After confirming the user's selection, the selected target PBR material is applied to the sub-object of the target model. The application process can be completed automatically, and the user does not need to manually adjust the material parameters.
[0109] The optimization method for the PBR material set selection strategy provided in this application obtains sub-object metadata of sub-objects in a target model, as well as the ambient lighting category corresponding to the target model's ambient lighting intensity, providing basic data support for subsequent rule mapping and material matching. Based on a predefined rule library, the sub-object metadata is rule-mapped to determine the sub-object's material requirement parameters. The rule library then clarifies the required material properties for the sub-object, guiding the subsequent screening process. Based on the material requirement parameters, sub-object metadata, and ambient lighting category, each PBR material in the PBR material library is screened to obtain a first candidate PBR material. A semantic understanding of the target model's scene is performed using the sub-object metadata and the target model's ambient lighting intensity. Based on the understanding results, each PBR material in the PBR material library is screened. The first candidate PBR material is matched against the ambient lighting category, material requirement parameters, and sub-object metadata, and a matching score is determined for the first candidate PBR material. The degree of fit between each first candidate PBR material and the sub-object requirements is quantified, and a target PBR material is selected from the first candidate PBR materials based on the matching score. The optimization method of the PBR material set selection strategy provided in this application parses the metadata of the sub-objects in the target model and determines the ambient lighting category, uses a preset rule library to map the material requirement attributes and parameter ranges, and intelligently screens and scores the PBR material library in combination with the ambient light intensity, and finally determines the target PBR material recommended to the user. This solves the technical problems of low accuracy and low efficiency in PBR material selection and matching in the existing technology, realizes the automation and intelligence of PBR material selection, improves the selection efficiency and accuracy, so that the target PBR material recommended to the user is highly matched with the scene of the target model, thereby optimizing the rendering effect.
[0110] In some embodiments, when the sub-object metadata includes a sub-object category, the step of obtaining the sub-object category includes:
[0111] Obtain the 3D model file corresponding to the target model;
[0112] Call the parser to parse the 3D model file and extract the geometric data of the sub-object, which includes the vertex coordinate array, the surface normal vector array and the bounding box size value;
[0113] Determines the sub-object category based on the vertex coordinate array, surface normal vector array, and bounding box size values.
[0114] Specifically, a 3D model file is a file that stores the target model data. 3D model file formats can be OBJ, FBX, glTF, etc. A 3D model file contains the target model's geometric information (such as vertex coordinates, surface normals, and facets), as well as sub-object metadata for the target model's sub-objects. A parser is a software library or tool used to read and parse 3D model files. A parser can understand 3D model files of various formats and extract the stored data, such as geometric data and sub-object metadata. Parsers can be Assimp, Open3D, etc. The vertex coordinate array is a set of coordinates for the vertices that make up the geometry of the sub-objects in the target model. Each vertex is represented by three coordinate values (x, y, z) that define its position in 3D space. The vertex coordinate array can describe the sub-object's shape and outline. The surface normal vector array is a vector associated with each vertex or facet on the sub-object's surface, indicating the surface's orientation. Surface normal vectors are used to calculate lighting and shading effects and are crucial for rendering realistic graphics. The surface normal vector array can describe the sub-object's surface's orientation and concavity. The bounding box dimensions (length, width, and height) are the dimensions of the smallest rectangular block enclosing a sub-object. They can be used as an approximation of the sub-object's overall size and reflect the sub-object's occupancy in three-dimensional space. The sub-object category describes the sub-object's type or category. Determining the sub-object category helps understand its purpose and characteristics, providing semantic information for subsequent operations such as material selection.
[0115] As an example, a 3D model file corresponding to a target model is obtained from a preset path or storage location. 3D model file formats include, but are not limited to, OBJ, FBX, and glTF. A parser is called to read and parse the 3D model file, extracting the sub-objects contained in the target model and the geometric data of each sub-object. The geometric data includes vertex coordinate arrays, surface normal vector arrays, and bounding box dimensions. Furthermore, a convex hull algorithm can be used to generate a minimum convex body based on the vertex coordinate array, and the ratio of its volume to the bounding box volume (convex hull volume ratio) can be calculated. If the ratio is greater than a corresponding preset value, the sub-object can be determined to be a regular man-made object (such as a building / furniture). The variance of the angle between the normal vector and the Z axis (normal direction standard deviation) is calculated based on the surface normal vector array. If the variance is greater than a corresponding preset value, the sub-object can be classified as an organic object (such as vegetation / organisms). The aspect ratio is determined based on the bounding box size value. For sub-objects with an aspect ratio greater than the corresponding preset value, the convex hull volume ratio can be combined to distinguish between pillars and trees. To speed up the step of obtaining the sub-object category in the target model, a graphics processing unit (GPU) can be used to accelerate parallel computing in the above process, and structured sub-object categories can be output after classification.
[0116] Optionally, the step of obtaining the sub-object category further includes:
[0117] Obtain the 3D model file corresponding to the target model;
[0118] Call the parser to parse the 3D model file and get the vertex coordinate array corresponding to the sub-object;
[0119] Generate a sub-object outline image corresponding to the sub-object based on the vertex coordinate array;
[0120] The sub-object category is obtained by performing category prediction on the sub-object contour image through the target detection model.
[0121] Specifically, the contour image is a binary image (black background with white edges) depicting the edges of an object and is used for object detection. The object detection model is a deep learning-based algorithm, such as YOLOv5 or Faster R-CNN. This model identifies the category and location of sub-objects within the sub-object contour image.
[0122] In some embodiments, the sub-object metadata includes a sub-object tag, the rule library includes tag rules, and the step of performing rule mapping on the sub-object metadata based on a preset rule library to determine the material requirement parameters of the sub-object includes:
[0123] Perform an exact match between the sub-object label and the label trigger condition corresponding to the label rule to obtain an exact match result;
[0124] If the exact match result is a match, the preset requirement condition corresponding to the tag rule to which the tag trigger condition belongs is determined as the material requirement attribute and requirement attribute parameter range of the sub-object;
[0125] The rule weight corresponding to the tag rule to which the tag trigger condition belongs is determined as the requirement attribute weight;
[0126] The requirement attribute weight, material requirement attribute and requirement attribute parameter range are determined as material requirement parameters.
[0127] Specifically, a tag rule is a rule defined in the rule base specifically for sub-object tags. The tag rule contains information such as tag trigger conditions, preset requirement conditions, and rule weights. For example, a tag rule can be as follows:
[0128] {
[0129] "trigger":{"tag":"Metal"},
[0130] "requirements":{"metalness":[0.7,1.0],"roughness":[0.0,0.5]},
[0131] "weight":0.8
[0132] }
[0133] Among them, trigger defines the tag trigger condition corresponding to the tag rule. The tag trigger condition corresponding to the above tag rule is "Metal"; requirements defines the preset requirement conditions corresponding to the tag rule, that is, the properties and parameter ranges that the matching PBR material should have, the material requirement properties and the requirement property parameter ranges; weight defines the rule weight corresponding to the tag rule.
[0134] As an example, a rule library contains multiple tagging rules. Each tagging rule defines the material requirement attributes, requirement attribute parameter ranges, and rule weights for a specific sub-object tag. Sub-object metadata includes sub-object tags. A case-insensitive string match is performed between the sub-object tag (e.g., "metal") and the trigger conditions of each tagging rule in the rule library. This results in an exact match between the sub-object tag and the tag trigger conditions corresponding to the tagging rule. If a match is successful, the exact match result is considered a match. For example, if the sub-object tag "metal" matches the rule trigger condition "Metal," the pre-defined requirement conditions corresponding to the tagging rule are extracted, including the material requirement attributes defined in the tagging rule, namely, "metalness" and "roughness," as well as the requirement attribute parameter ranges, namely, "metalness": [0.7, 1.0] and "roughness": [0.0, 0.5]. The pre-defined rule weight "weight": 0.8 in the tagging rule is directly inherited as the requirement attribute weight. This exact matching mechanism of tagging rules enables automated and precise determination of sub-object material requirements, effectively improving the accuracy and efficiency of material selection.
[0135] In some embodiments, the rule base includes category rules, and in the case where the sub-object metadata includes the sub-object category,
[0136] The steps of mapping sub-object metadata based on a preset rule library to determine the required material attributes, required attribute parameter ranges, and required attribute weights of the sub-objects include:
[0137] Determine the exact match result between the sub-object category and the category trigger condition corresponding to the category rule;
[0138] When the exact matching result indicates that the sub-object category is the same as the category trigger condition, rule mapping is performed on the sub-object category based on the category rule to which the category trigger condition belongs to obtain the material requirement attributes and requirement attribute parameter range of the sub-object;
[0139] The rule weight corresponding to the category rule to which the category trigger condition belongs is determined as the requirement attribute weight.
[0140] In some embodiments, the sub-object metadata includes a sub-object name, the rule library includes a name rule, and the step of performing rule mapping on the sub-object metadata based on a preset rule library to determine the material requirement parameters of the sub-object includes:
[0141] Perform fuzzy matching on the sub-object name and the name trigger keyword corresponding to the name rule to obtain the fuzzy matching result;
[0142] If the fuzzy matching result is a match, the name triggers the requirement conditions corresponding to the name rule to which the keyword belongs, and determines the material requirement attributes and requirement attribute parameter range of the sub-object;
[0143] Determine the rule weight corresponding to the name rule to which the name trigger keyword belongs as the requirement attribute weight;
[0144] The requirement attribute weight, material requirement attribute and requirement attribute parameter range are determined as material requirement parameters.
[0145] Specifically, the name rule is a rule defined in the rule base specifically for the sub-object name.
[0146] As an example, a name rule includes information such as name trigger keywords, the requirements corresponding to the name rule, and the rule weight. For example, a name rule can be as follows:
[0147] {
[0148] "trigger":{"name_contains":["door","polymer"]},
[0149] "requirements":{"metalness":[0.0,0.2],"roughness":[0.1,0.7]},
[0150] "weight":0.5
[0151] }
[0152] Among them, trigger defines the name trigger keyword corresponding to the name rule. The name trigger keywords corresponding to the above name rule are "plastic" and "polymer"; requirements defines the requirements that the matching PBR material should have, that is, the properties and parameter ranges that the PBR material should have, that is, the material requirement properties and requirement property parameter ranges; weight defines the rule weight corresponding to the name rule. The rule weight corresponding to the above name rule is 0.5.
[0153] As an example, a rule library contains multiple name rules. Each name rule defines the material requirement attributes, requirement attribute parameter ranges, and rule weights for sub-objects containing specific sub-object tags. The sub-object metadata contains the sub-object name. Fuzzy matching is performed against the name trigger keywords corresponding to each name rule in the rule library to determine whether a semantic association exists. For example, if the matching sub-object name is "main_door" or "left_door," a fuzzy match can be found for the name rule corresponding to the name trigger keyword "door." In this case, the fuzzy match result indicates that the sub-object name contains the name trigger keyword, and the match is successful. The requirement conditions corresponding to the name rule are extracted, namely, the material requirement attributes "metalness" and "roughness," as well as the requirement attribute parameter ranges: "metalness": [0.0, 0.2] and "roughness": [0.1, 0.7]. The predefined rule weight "weight": 0.5 in the name rule is directly inherited as the requirement attribute weight. The fuzzy matching mechanism of name rules can flexibly respond to diverse naming habits. Even if the sub-object names are expressed differently, as long as the name trigger keywords are included, the rules can be correctly triggered, effectively improving the accuracy and efficiency of material selection. This is especially suitable for scenarios where sub-object names are descriptive.
[0154] In some embodiments, the step of obtaining the ambient lighting category includes:
[0155] Read the light source component properties of the target model based on the preset interface, and extract the ambient light intensity from the light source component properties;
[0156] According to a preset light intensity classification standard, the ambient light intensity is mapped to a corresponding light category, and the ambient light category corresponding to the ambient light intensity is determined.
[0157] Specifically, the preset interface is the application programming interface API provided by the rendering engine. The rendering engine is the core component in the 3D graphics software responsible for converting the target model, material, lighting and other information into the final image. It can be Unity, UnrealEngine, Blender Cycles, Cinema 4D, etc. The rendering engine can provide a rich application programming interface API for controlling and obtaining various parameters in the rendering process. The rendering engine API can provide an interface for accessing and operating the rendering engine functions, so as to read or modify the component properties in the target model. The light source component properties are the parameters and settings contained in the light source component in the target model, such as the ambient lighting type (parallel light, point light, spotlight, etc.), ambient lighting color, ambient lighting intensity, ambient lighting position, etc. The light source component properties determine the lighting effect of the ambient lighting.
[0158] As an example, the rendering engine's API is called to read the relevant properties of the light source component in the target model and extract the ambient light intensity from it. According to the preset light intensity classification standard, the ambient light intensity is mapped to a specific lighting category, and the ambient light category corresponding to the ambient light intensity is determined, such as "bright", "medium", "dim", etc., to achieve semantic recognition of the lighting environment. Under different lighting conditions, the same PBR material may present completely different visual effects. By identifying the ambient light category, PBR materials that are more suitable for the current environment can be selected. Determining the ambient light category corresponding to the ambient light intensity can provide an important basis for subsequent PBR materials.
[0159] In some embodiments, the step of selecting a first candidate PBR material from a PBR material library based on material requirement parameters, sub-object metadata, and ambient lighting category includes:
[0160] According to the PBR material library, determine the material category, material name, material properties, material property range, applicability label and lighting category adaptation data of each PBR material;
[0161] Determine the PBR material with the same material properties as the material requirement properties as the second candidate PBR material;
[0162] Calculating similarities between the sub-object label and the material category, material name, and applicability label, and determining an average of the similarities corresponding to the multiple similarities;
[0163] Determine the second candidate PBR material whose average similarity value is greater than or equal to the first preset threshold as the third candidate PBR material;
[0164] According to the lighting category adaptation data and the ambient lighting category corresponding to the third candidate PBR material, the third candidate PBR material is screened to obtain the first candidate PBR material.
[0165] In some embodiments, the steps of calculating similarities between the sub-object label and the material category, material name, and applicability label, and determining an average of the similarities corresponding to the multiple similarities, include:
[0166] Calculate the similarities between the material category of the second candidate PBR material and all sub-object labels respectively to obtain multiple corresponding initial category similarities, and determine the largest value among the multiple initial category similarities as the category similarity between the sub-object label and the material category of the second candidate PBR material;
[0167] Calculate the similarities between the material name of the second candidate PBR material and all sub-object labels respectively, and obtain multiple corresponding initial name similarities. The one with the largest value among the multiple initial name similarities is determined as the name similarity between the sub-object label and the material name of the second candidate PBR material.
[0168] Calculate the similarities between the applicability label of the second candidate PBR material and all sub-object labels respectively to obtain multiple corresponding initial applicability label similarities, and determine the one with the largest value among the multiple initial applicability label similarities as the applicability label similarity between the sub-object label and the applicability label of the second candidate PBR material;
[0169] The applicability tag similarity, name similarity, and category similarity are averaged to obtain the average similarity.
[0170] Specifically, each PBR material in the PBR material library has corresponding material metadata. Material metadata describes the properties and characteristics of a PBR material and includes material category, material name, material properties, material property ranges, applicability tags, and lighting category adaptability data. Material metadata provides an important basis for PBR material selection. Light category adaptability data describes a PBR material's ability to adapt to different lighting categories. Light category adaptability data includes each lighting category adaptability score, which indicates the compatibility of the PBR material with the corresponding lighting category. Material category is the broad category of PBR materials, such as "Metal," "Wood," "Glass," "Stone," and "Cloth." Material name is the specific name of the PBR material, such as "MatteWood01" and "BrushedMetal." Material properties can include core PBR parameters such as metalness, roughness, normal map, and reflectivity. Material property ranges represent the range of possible variations for each material property. Applicability tags can be used to indicate the applications or scenarios for which a PBR material is suitable, such as "Outdoor," "Indoor," and "Architectural."
[0171] As an example, traverse each PBR material in the PBR material library and extract the material metadata of the PBR material, which includes but is not limited to: material category, material name, material attributes, material attribute range, applicability label, and lighting category adaptation data. Compare the material attributes of each PBR material with the material requirement attributes of the sub-object. If the material attributes of the PBR material are exactly the same as the material requirement attributes of the sub-object, then the PBR material is included in the second candidate PBR material set. The selected second candidate PBR material meets the basic physical property requirements of the sub-object for the material. For each second candidate PBR material, calculate the similarity between the sub-object label and the material category, material name, and applicability label of the second candidate PBR material, including:
[0172] Calculate the similarities between the material category of the second candidate PBR material and all sub-object labels respectively to obtain multiple corresponding initial category similarities, and determine the largest value among the multiple initial category similarities as the category similarity between the sub-object label and the material category of the second candidate PBR material;
[0173] Calculate the similarities between the material name of the second candidate PBR material and all sub-object labels respectively to obtain multiple corresponding initial name similarities, and determine the largest value among the multiple initial name similarities as the name similarity between the sub-object label and the material name of the second candidate PBR material;
[0174] The similarities between the applicability label of the second candidate PBR material and all sub-object labels are calculated respectively to obtain multiple corresponding initial applicability label similarities. The one with the largest value among the multiple initial applicability label similarities is determined as the applicability label similarity between the sub-object label and the applicability label of the second candidate PBR material.
[0175] Similarity calculations can use text similarity algorithms, such as cosine similarity or Jaccard similarity, to quantify the semantic proximity between the sub-object label and the material metadata. After obtaining at least one similarity (i.e., category similarity, applicability label similarity, and name similarity), the average of these similarities is calculated to obtain an average similarity value, which comprehensively assesses the overall semantic match between the sub-object label and the material metadata. The calculated average similarity value is then compared with a pre-set first threshold, which determines whether the semantic similarity between the sub-object label and the material metadata meets the expected standard. If the average similarity value is greater than or equal to the first threshold, the second candidate PBR material is highly semantically related to the sub-object label and is selected as the third candidate PBR material. For each third candidate PBR material, its suitability under the current lighting conditions is evaluated based on its lighting category adaptation data and the ambient lighting category of the current scene. If the third candidate PBR material is determined to be suitable for the current ambient lighting category through the lighting category adaptation data of the third candidate PBR material, the third candidate PBR material is determined as the first candidate PBR material. The first candidate PBR material determined by multi-condition screening is a candidate PBR material that meets the material attribute requirements, semantic relevance, and ambient lighting adaptability at the same time. Through multi-level screening conditions, the candidate PBR material that best matches the sub-object material requirements and ambient lighting conditions is accurately screened from the vast PBR material library, providing a high-quality candidate material set for subsequent material matching scoring and final material selection.
[0176] In some embodiments, the lighting class adaptation data includes each lighting class adaptation score, where the lighting class adaptation score is used to indicate the degree of adaptation between the PBR material and the corresponding lighting class.
[0177] The step of screening the third candidate PBR material according to the illumination category adaptation data and the ambient illumination category corresponding to the third candidate PBR material to obtain the first candidate PBR material includes:
[0178] Determine a lighting category adaptation score between the third candidate PBR material and the ambient lighting category based on the lighting category adaptation data;
[0179] The third candidate PBR material having a lighting category adaptation score greater than or equal to the second preset threshold is determined as the first candidate PBR material.
[0180] Specifically, the Lighting Category Adaptation Score is a specific value in the corresponding Lighting Category Adaptation Data, which is used to quantitatively indicate the degree of adaptation between the PBR material and the corresponding Lighting Category. The Lighting Category Adaptation Score is a value between 0 and 1. A higher score indicates a higher degree of adaptation of the PBR material to the Lighting Category, that is, the better the visual performance of the PBR material under the Lighting Category and the more suitable it is for use under those lighting conditions.
[0181] As an example, for each third candidate PBR material, based on its lighting category adaptation data, the lighting category adaptation score corresponding to the third candidate PBR material under the current ambient lighting category is found. For example, if the current ambient lighting category is "bright", the lighting category adaptation score of the third candidate PBR material under the "bright" category is found. The lighting category adaptation score of each third candidate PBR material under the current ambient lighting category is compared with a pre-set second preset threshold. If the lighting category adaptation score is greater than or equal to the second preset threshold, it indicates that the third candidate PBR material is suitable for use under the current ambient lighting category, and therefore it is determined as the first candidate PBR material. By using the lighting category adaptation score as a quantitative indicator, the applicability of the third candidate PBR material under the current ambient lighting category is accurately evaluated, thereby screening out candidate PBRs that perform well in three aspects: material properties, semantic relevance, and ambient lighting adaptability, as the first candidate PBR material.
[0182] In some embodiments, the step of matching the first candidate PBR material with the ambient lighting category, the material requirement parameters, and the sub-object metadata, and determining a matching score for the first candidate PBR material, includes:
[0183] Determine the lighting category adaptation score corresponding to the first candidate PBR material according to the lighting category adaptation data corresponding to the first candidate PBR material and the ambient lighting category;
[0184] Determine an average similarity value corresponding to the first candidate PBR material based on the sub-object tags and at least one of the material category, material name, and applicability tag corresponding to the first candidate PBR material;
[0185] Determine the adaptability of the attribute parameters corresponding to the first candidate PBR material according to the required attribute parameter range and the material attribute range corresponding to the first candidate PBR material;
[0186] The matching score of the first candidate PBR material is obtained by weightedly averaging the illumination category adaptation score corresponding to the first candidate PBR material, the average similarity value corresponding to the first candidate PBR material, the attribute parameter adaptation degree corresponding to the first candidate PBR material, and the required attribute weight.
[0187] Specifically, the attribute parameter adaptability is an indicator for indicating the degree of matching between the material attribute range of the first candidate PBR material and the required attribute parameter range of the sub-object. The higher the attribute parameter adaptability, the higher the range within which the required attribute parameter range falls into the material attribute range of the first candidate PBR material, and the more the material attributes of the first candidate PBR material meet the requirements of the sub-object.
[0188] As an example, for each first candidate PBR material, based on the lighting category adaptation data corresponding to the first candidate PBR material, the lighting category adaptation score corresponding to the first candidate PBR material under the current ambient lighting category is found. For each first candidate PBR material, the similarity between the sub-object tag and at least one of the material metadata of the first candidate PBR material, including the material category, material name, and applicability tag, is calculated, and these similarities are averaged to obtain an average similarity. For each first candidate PBR material, based on the material attribute range of the first candidate PBR material and the required attribute parameter range of the sub-object, the intersection of the material attribute range of the first candidate PBR material and the required attribute parameter range of the sub-object is determined, and the overlap between the intersection and the required attribute parameter range of the sub-object is calculated. This overlap is used to determine the attribute parameter adaptation of the first candidate PBR material. The lighting category adaptation score, average similarity, attribute parameter adaptation, and required attribute weight of each first candidate PBR material are weighted averaged to obtain a matching score for the first candidate PBR material.
[0189] In some embodiments, the step of selecting a target PBR material from the first candidate PBR material according to the matching score includes:
[0190] Determine the first candidate PBR material with a matching score greater than or equal to a third preset threshold as the target PBR material;
[0191] or,
[0192] The first candidate PBR material corresponding to the one with the largest matching score value is determined as the target PBR material.
[0193] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the optimization method of the PBR material set selection strategy of the present application. More forms of simple transformations based on this technical concept are all within the scope of protection of the present application.
[0194] This application also provides an optimization device for PBR material set selection strategy, please refer to Figure 2 , the optimization device of PBR material set selection strategy includes:
[0195] An acquisition module 201 is configured to acquire sub-object metadata of a sub-object in a target model and an ambient lighting category corresponding to the ambient lighting intensity of the target model;
[0196] A rule mapping module 202 is used to perform rule mapping on the sub-object metadata based on a preset rule library to determine the material requirement parameters of the sub-object;
[0197] A material screening module 203 is configured to select a first candidate PBR material from a PBR material library based on material requirement parameters, sub-object metadata, and ambient lighting category;
[0198] A matching quantification module 204 is configured to match the first candidate PBR material with the ambient lighting category, the material requirement parameters, and the sub-object metadata, respectively, to determine a matching score for the first candidate PBR material;
[0199] The determination module 205 is configured to select a target PBR material from the first candidate PBR materials based on the matching score.
[0200] The device for optimizing the PBR material set selection strategy provided in this application adopts the method for optimizing the PBR material set selection strategy in the above-mentioned embodiment, which can solve the technical problem of the accuracy of PBR material selection and matching in the prior art. Compared with the prior art, the beneficial effects of the device for optimizing the PBR material set selection strategy provided in this application are the same as those of the method for optimizing the PBR material set selection strategy provided in the above-mentioned embodiment, and the other technical features of the device for optimizing the PBR material set selection strategy are the same as those disclosed in the above-mentioned embodiment method, and are not further described here.
[0201] The present application provides an optimization device for a PBR material set selection strategy, the optimization device for a PBR material set selection strategy including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the optimization method for the PBR material set selection strategy in the above-mentioned embodiment one.
[0202] Reference below Figure 3 , which shows a schematic diagram of the structure of an optimization device suitable for implementing the PBR material set selection strategy in the embodiments of the present application. The optimization device for the PBR material set selection strategy in the embodiments of the present application can include, but is not limited to, mobile terminals such as laptops, tablet computers (Portable Application Description, PAD), portable multimedia players (Portable Media Player, PMP), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 3 The optimization device for the PBR material set selection strategy shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0203] like Figure 3 As shown, the device for optimizing the PBR material set selection strategy may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the device for optimizing the PBR material set selection strategy. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, hard disk, etc.; and communication devices 1009. Communication devices 1009 can allow the optimization device for the PBR material set selection strategy to communicate wirelessly or wired with other devices to exchange data. While the figure shows an optimization device for the PBR material set selection strategy with various systems, it should be understood that implementation or presence of all the illustrated systems is not required. More or fewer systems may alternatively be implemented or present.
[0204] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are performed.
[0205] The device for optimizing the PBR material set selection strategy provided by this application adopts the method for optimizing the PBR material set selection strategy in the above-mentioned embodiment, which can solve the technical problem of the accuracy of PBR material selection and matching in the prior art. Compared with the prior art, the beneficial effects of the device for optimizing the PBR material set selection strategy provided by this application are the same as the beneficial effects of the method for optimizing the PBR material set selection strategy provided by the above-mentioned embodiment, and the other technical features of the device for optimizing the PBR material set selection strategy are the same as those disclosed in the method of the previous embodiment, and are not further described here.
[0206] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0207] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0208] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, and the computer-readable program instructions are used to execute the optimization method of the PBR material set selection strategy in the above embodiment.
[0209] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0210] The above-mentioned computer-readable storage medium can be included in the optimization device of the PBR material set selection strategy; or it can exist independently without being assembled into the optimization device of the PBR material set selection strategy.
[0211] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the optimization device of the PBR material set selection strategy, the optimization device of the PBR material set selection strategy: obtains the sub-object metadata of the sub-object in the target model, and the ambient lighting category corresponding to the ambient lighting intensity of the target model; performs rule mapping on the sub-object metadata based on a preset rule library to determine the material requirement parameters of the sub-object; selects a first candidate PBR material in the PBR material library according to the material requirement parameters, the sub-object metadata and the ambient lighting category; matches the first candidate PBR material with the ambient lighting category, the material requirement parameters and the sub-object metadata respectively to determine the matching score of the first candidate PBR material; and selects the target PBR material from the first candidate PBR material according to the matching score.
[0212] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0213] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0214] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0215] The computer-readable storage medium provided herein stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned method for optimizing the PBR material set selection strategy. This computer-readable storage medium can address the prior art technical issues related to accurate PBR material selection and matching. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided herein are similar to those of the method for optimizing the PBR material set selection strategy provided in the aforementioned embodiments, and are not further elaborated upon here.
[0216] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the optimization method of the PBR material set selection strategy as described above.
[0217] The computer program product provided in this application can solve the technical problem of accurate matching of PBR material selection in the prior art. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the optimization method of the PBR material set selection strategy provided in the above embodiment, and will not be repeated here.
[0218] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for optimizing a PBR material set selection strategy, characterized in that: The optimization method of the PBR material set selection strategy includes: Obtaining sub-object metadata of a sub-object in a target model and an ambient lighting category corresponding to the ambient lighting intensity of the target model; Perform rule mapping on the sub-object metadata based on a preset rule library to determine the material requirement parameters of the sub-object; Selecting a first candidate PBR material from a PBR material library based on the material requirement parameters, the sub-object metadata, and the ambient lighting category; Matching the first candidate PBR material with the ambient lighting category, the material requirement parameters, and the sub-object metadata, respectively, to determine a matching score for the first candidate PBR material; Selecting a target PBR material from the first candidate PBR materials according to the matching score; The sub-object metadata includes a sub-object tag, and the step of selecting a first candidate PBR material in a PBR material library according to the material requirement parameters, the sub-object metadata, and the ambient lighting category includes: Determining, based on the PBR material library, a material category, a material name, material attributes, a material attribute range, a suitability label, and lighting category adaptation data for each PBR material, the lighting category adaptation data including each lighting category adaptation score, the lighting category adaptation score being used to indicate a degree of compatibility between the PBR material and the corresponding lighting category; Determine the PBR material having the same material attribute as the required material attribute as a second candidate PBR material; Calculating similarities between the sub-object label and the material category, the material name, and the applicability label, respectively, and determining an average similarity value corresponding to a plurality of similarities; Determine the second candidate PBR material whose similarity average value is greater than or equal to the first preset threshold as the third candidate PBR material; Determining a lighting category adaptation score between the third candidate PBR material and the ambient lighting category according to the lighting category adaptation data; Determine the third candidate PBR material, whose illumination category adaptation score is greater than or equal to a second preset threshold, as the first candidate PBR material; The step of matching the first candidate PBR material with the ambient lighting category, the material requirement parameters, and the sub-object metadata to determine the matching score of the first candidate PBR material includes: Determining the lighting category adaptation score corresponding to the first candidate PBR material according to the lighting category adaptation data corresponding to the first candidate PBR material and the ambient lighting category; Determining an average similarity value corresponding to the first candidate PBR material based on the sub-object tags and at least one of the material category, the material name, and the applicability tag corresponding to the first candidate PBR material; Determining a degree of compatibility of attribute parameters corresponding to the first candidate PBR material based on the required attribute parameter range and the material attribute range corresponding to the first candidate PBR material; The lighting category adaptation score corresponding to the first candidate PBR material, the similarity average corresponding to the first candidate PBR material, the attribute parameter adaptation corresponding to the first candidate PBR material, and the required attribute weight are weighted averaged to obtain the matching score of the first candidate PBR material.
2. The optimization method for the PBR material set selection strategy according to claim 1, characterized in that: The sub-object metadata includes a sub-object category, and the step of obtaining the sub-object category includes: Obtaining a three-dimensional model file corresponding to the target model; Calling a parser to parse the three-dimensional model file to obtain a vertex coordinate array corresponding to the sub-object; generating a sub-object contour image corresponding to the sub-object based on the vertex coordinate array; The sub-object category is obtained by performing category prediction on the sub-object contour image through a target detection model.
3. The optimization method for the PBR material set selection strategy according to claim 1, characterized in that: The sub-object metadata includes a sub-object tag, the rule base includes tag rules, and the step of performing rule mapping on the sub-object metadata based on a preset rule base to determine the material requirement parameters of the sub-object includes: Performing an exact match between the sub-object tag and the tag trigger condition corresponding to the tag rule to obtain an exact match result; If the exact matching result is a match, the preset requirement condition corresponding to the tag rule to which the tag trigger condition belongs is determined as the material requirement attribute and requirement attribute parameter range of the sub-object; Determining a rule weight corresponding to the tag rule to which the tag trigger condition belongs as a requirement attribute weight; The requirement attribute weight, the material requirement attribute, and the requirement attribute parameter range are determined as the material requirement parameter.
4. The optimization method for the PBR material set selection strategy according to claim 1, characterized in that: The sub-object metadata includes a sub-object name, the rule base includes a name rule, and the step of performing rule mapping on the sub-object metadata based on a preset rule base to determine the material requirement parameters of the sub-object includes: Performing fuzzy matching on the sub-object name and the name trigger keyword corresponding to the name rule to obtain a fuzzy matching result; If the fuzzy matching result is a match, the requirement condition corresponding to the name rule to which the name trigger keyword belongs is determined as the material requirement attribute and requirement attribute parameter range of the sub-object; Determine the rule weight corresponding to the name rule to which the name trigger keyword belongs as the requirement attribute weight; The requirement attribute weight, the material requirement attribute, and the requirement attribute parameter range are determined as the material requirement parameter.
5. The optimization method for the PBR material set selection strategy according to claim 1, characterized in that: The step of obtaining the ambient lighting category includes: Reading the light source component properties of the target model based on a preset interface, and extracting the ambient light intensity from the light source component properties; According to a preset light intensity classification standard, the ambient light intensity is mapped to a corresponding light category, and the ambient light category corresponding to the ambient light intensity is determined.
6. The optimization method for the PBR material set selection strategy according to claim 1, characterized in that: The step of selecting a target PBR material from the first candidate PBR materials according to the matching score comprises: Determine the first candidate PBR material whose matching score is greater than or equal to a third preset threshold as the target PBR material; or, The first candidate PBR material corresponding to the one with the largest matching score value is determined as the target PBR material.
7. The optimization method for the PBR material set selection strategy according to claim 1, characterized in that: The step of calculating the similarities between the sub-object label and the material category, the material name, and the applicability label, and determining an average value of similarities corresponding to the multiple similarities, includes: Calculating similarities between the material category of the second candidate PBR material and all sub-object labels respectively to obtain a plurality of corresponding initial category similarities, and determining the largest value among the plurality of initial category similarities as the category similarity between the sub-object label and the material category of the second candidate PBR material; Calculating similarities between the material name of the second candidate PBR material and all sub-object labels respectively to obtain a plurality of corresponding initial name similarities, and determining the largest value among the plurality of initial name similarities as the name similarity between the sub-object label and the material name of the second candidate PBR material; Calculating similarities between the applicability label of the second candidate PBR material and all the sub-object labels respectively to obtain a plurality of corresponding initial applicability label similarities, and determining the largest value among the plurality of initial applicability label similarities as the applicability label similarity between the sub-object label and the applicability label of the second candidate PBR material; The applicability tag similarity, the name similarity, and the category similarity are averaged to obtain the similarity average value.
Citation Information
Patent Citations
Fabric image retrieval method in complex scene
CN119537627A
Personalized digital human image creating and generating system based on deep learning
CN119600162A