Optimization method of 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 the PBR material library for intelligent screening and matching scores, the problem of PBR material selection is solved, and the automation and intelligence of material selection is realized, which improves selection efficiency and accuracy, and optimizes the rendering effect.
Patent Information
- Application Number
- CN202510847976.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-07-22
- 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, and combining the PBR material library for intelligent screening and matching scores, to determine 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 the rendering effect is optimized.
Smart Images

Figure CN120353953A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of computer graphics, and particularly to an optimization method for PBR material set selection strategy. Background Art
[0002] Physically Based Rendering (PBR) is a rendering technology based on physical laws. By simulating the real interaction between light and the object surface, it generates highly realistic images. In 3D scene rendering, PBR materials can provide more realistic lighting and surface interaction effects, and PBR materials are widely used in scenarios such as games, movies, virtual reality (VR), and augmented reality (AR). However, with the continuous expansion of the PBR material library, the process of manually selecting suitable materials takes longer and is prone to errors. Traditional material selection methods mainly rely on manual operation or simple rules, lacking comprehensive consideration of the scene information of the model, lacking intelligence and automation, and prone to distortion of the physical interaction effect between the material and the scene, especially 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 in PBR material selection in the prior art.
[0004] To achieve the above object, this application proposes an optimization method for PBR material set selection strategy, and the optimization method for PBR material set selection strategy includes: Obtain the sub-object metadata of the sub-objects in the target model, and the environmental light category corresponding to the environmental light 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-objects; Select the first candidate PBR material from the PBR material library according to the material requirement parameters, the sub-object metadata, and the environmental light category; Match the first candidate PBR material with the environmental light category, the material requirement parameters, and the sub-object metadata respectively to determine the matching degree score of the first candidate PBR material; Select the target PBR material from the first candidate PBR materials according to the matching degree score.
[0005] In some embodiments, the sub-object metadata includes the sub-object category, and the step of obtaining the sub-object category includes: Obtain the 3D model file corresponding to the target model; Call the parser to parse the 3D model file to obtain the vertex coordinate array corresponding to the sub-object; Generate a sub-object contour image corresponding to the sub-object based on the vertex coordinate array; Perform class prediction on the sub-object contour image through a target detection model to obtain the sub-object class.
[0006] In some embodiments, the sub-object metadata includes a sub-object label, the rule library includes label 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: Precisely match the sub-object label with the label trigger condition corresponding to the label rule to obtain a precise matching result; If the precise matching result is a match, determine the preset requirement condition corresponding to the label rule to which the label trigger condition belongs as the material requirement attribute and the requirement attribute parameter range of the sub-object; Determine the rule weight corresponding to the label rule to which the label trigger condition belongs as the requirement attribute weight; Determine the requirement attribute weight, the material requirement attribute, and the requirement attribute parameter range as the material requirement parameters.
[0007] In some embodiments, the sub-object metadata includes a sub-object name, the rule library includes name 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: Perform fuzzy matching on the sub-object name with the name trigger keyword corresponding to the name rule to obtain a fuzzy matching result; If the fuzzy matching result is a match, determine the requirement condition corresponding to the name rule to which the name trigger keyword belongs as the material requirement attribute and the 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; Determine the requirement attribute weight, the material requirement attribute, and the requirement attribute parameter range as the material requirement parameters.
[0008] In some embodiments, the steps of obtaining the environmental light category include: Read the light source component attributes of the target model based on a preset interface, and extract the environmental light intensity from the light source component attributes; According to the preset light intensity classification standard, map the environmental light intensity to the corresponding light category to determine the environmental light category corresponding to the environmental light intensity.
[0009] In some embodiments, the step of selecting a first candidate PBR material from a PBR material library according to the material requirement parameters, the sub-object metadata, and the environmental light category includes: According to the PBR material library, determine the material category, material name, material attributes, material attribute ranges, applicability labels, and light category adaptation data of each PBR material; Determine the PBR materials with the same material attributes as the material requirement attributes as the second candidate PBR materials; Calculate the similarity between the sub-object labels and the material category, the material name, and the applicability label respectively, and determine the average similarity corresponding to the multiple similarities; Determine the second candidate PBR materials with the average similarity greater than or equal to a first preset threshold as the third candidate PBR materials; According to the light category adaptation data corresponding to the third candidate PBR materials and the environmental light category, screen the third candidate PBR materials to obtain the first candidate PBR materials.
[0010] In some embodiments, the light category adaptation data includes light category adaptation scores for each light category, and the light category adaptation scores are used to indicate the degree of adaptation between the PBR material and the corresponding light category. The step of screening the third candidate PBR materials according to the light category adaptation data corresponding to the third candidate PBR materials and the environmental light category to obtain the first candidate PBR materials includes: Determine the light category adaptation score between the third candidate PBR material and the environmental light category according to the light category adaptation data; Determine the third candidate PBR materials with the light category adaptation score greater than or equal to a second preset threshold as the first candidate PBR materials.
[0011] In some embodiments, the step of matching the first candidate PBR material with the environmental light category, the material requirement parameters, and the sub-object metadata respectively to determine the matching degree score of the first candidate PBR material includes: Determine the light category adaptation score corresponding to the first candidate PBR material according to the light category adaptation data corresponding to the first candidate PBR material and the environmental light category; Determine the average similarity corresponding to the first candidate PBR material according to at least one of the material category, the material name, and the applicability label corresponding to the first candidate PBR material and the sub-object label; Determine the attribute parameter adaptability of the first candidate PBR material according to the range of the required attribute parameters and the range of the material attributes corresponding to the first candidate PBR material; Perform a weighted average of the light category adaptation score corresponding to the first candidate PBR material, the average similarity corresponding to the first candidate PBR material, the attribute parameter adaptability corresponding to the first candidate PBR material, and the required attribute weight to obtain the matching score of the first candidate PBR material.
[0012] In some embodiments, the step of selecting a target PBR material from the first candidate PBR materials according to the matching score includes: Determine the first candidate PBR material with a matching score greater than or equal to a third preset threshold as the target PBR material; Or, Determine the first candidate PBR material corresponding to the maximum value of the matching score as the target PBR material.
[0013] In some embodiments, the step of calculating the similarity between the sub-object label and the material category, the material name, and the applicability label respectively, and determining the average similarity corresponding to multiple similarities includes: Calculate the similarity between the material category of the second candidate PBR material and all sub-object labels respectively to obtain a corresponding plurality of initial category similarities, and determine the maximum 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; Calculate the similarity between the material name of the second candidate PBR material and all sub-object labels respectively to obtain a corresponding plurality of initial name similarities, and determine the maximum 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; Calculate the similarity between the applicability label of the second candidate PBR material and all the sub-object labels respectively to obtain a corresponding plurality of initial applicability label similarities, and determine the maximum 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; Perform an average calculation on the applicability label similarity, the name similarity, and the category similarity to obtain the average similarity.
[0014] In addition, to achieve the above object, the present application further provides an optimization device for a PBR material set selection strategy, and the optimization device for the PBR material set selection strategy includes: An acquisition module, configured to acquire sub-object metadata of sub-objects in a target model and an ambient light category corresponding to the ambient light intensity of the target model; A rule mapping module, configured to perform rule mapping on the sub-object metadata based on a preset rule library to determine material requirement parameters of the sub-objects; A material screening module, configured to select a first candidate PBR material from a PBR material library according to the material requirement parameters, the sub-object metadata, and the ambient light category; A matching quantification module, configured to match the first candidate PBR material with the ambient light category, the material requirement parameters, and the sub-object metadata respectively to determine a matching degree score of the first candidate PBR material; A determination module, configured to select a target PBR material from the first candidate PBR materials according to the matching degree score.
[0015] In addition, to achieve the above object, the present application further provides an optimization device for a PBR material set selection strategy. The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor. The computer program is configured to implement the steps of the optimization method for the PBR material set selection strategy as described above.
[0016] In addition, to achieve the above object, the present application further provides a storage medium. The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the optimization method for the PBR material set selection strategy as described above are implemented.
[0017] In addition, to achieve the above object, the present application further provides a computer program product. The computer program product includes a computer program. When the computer program is executed by a processor, the steps of the optimization method for the PBR material set selection strategy as described above are implemented.
[0018] One or more technical solutions proposed in this application have at least the following technical effects: By obtaining the sub-object metadata of the sub-objects in the target model and the environmental light category corresponding to the environmental light intensity of the target model, it provides basic data support 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-objects, and the material characteristics required by the sub-objects are clarified through the rule library, thereby guiding the subsequent screening process. According to the material requirement parameters, sub-object metadata, and environmental light category, each PBR material in the PBR material library is screened to obtain the first candidate PBR materials. The scene of the target model is semantically understood by combining the sub-object metadata in the target model and the environmental light intensity of the target model, and each PBR material in the PBR material library is screened according to the understanding result. The first candidate PBR materials are respectively matched with the environmental light category, material requirement parameters, and sub-object metadata to determine the matching degree scores of the first candidate PBR materials, quantifying the degree of fit of each first candidate PBR material to the sub-object requirements. The target PBR material is selected from the first candidate PBR materials according to the matching degree scores. The optimization method for the PBR material set selection strategy provided in this application, by parsing the metadata of the sub-objects in the target model and determining the environmental light category, uses a preset rule library to map out the material requirement attributes and parameter ranges, and combines the environmental light intensity to perform intelligent screening and matching degree scoring on the PBR material library, and finally determines the target PBR material recommended to the user, solving the technical problems of low accuracy and low efficiency in PBR material selection and matching in the prior art, realizing the automation and intelligence of PBR material selection, improving the selection efficiency and accuracy, so that the target PBR material recommended to the user highly matches the scene of the target model, thereby optimizing the rendering effect. Description of the Drawings
[0019] The drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application.
[0020] In order to more clearly explain the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0021] Figure 1 It is a schematic flowchart provided for the first embodiment of the optimization method for the PBR material set selection strategy of this application; Figure 2 It is a schematic module structure diagram of the optimization device for the PBR material set selection strategy in the embodiments of this application; Figure 3The schematic diagram of the device structure of the hardware operating environment involved in the optimization method for the PBR material set selection strategy in the embodiments of the present application.
[0022] The implementation, functional features, and advantages of the present application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. Detailed implementation manners
[0023] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0024] To better understand the technical solutions of the present application, the following will be described in detail in conjunction with the drawings of the specification and specific implementation manners.
[0025] The main solution of the embodiments of the present application is: obtaining the sub-object metadata of the sub-objects in the target model and the environmental light category corresponding to the environmental light 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-objects; selecting the first candidate PBR material from the PBR material library according to the material requirement parameters, sub-object metadata, and environmental light category; matching the first candidate PBR material with the environmental light category, material requirement parameters, and sub-object metadata respectively to determine the matching score of the first candidate PBR material; and selecting the target PBR material from the first candidate PBR materials according to the matching score.
[0026] In this embodiment, for the convenience of description, the optimization device for identifying the PBR material set selection strategy is used as the execution subject for elaboration below.
[0027] In the prior art, as the PBR material library continues to expand, the process of manually selecting the adapted materials takes longer and is prone to errors. The traditional material selection methods are mainly manual operations or based on simple rules, lacking comprehensive consideration of the scene information of the model, lacking intelligence and automation, and prone to distortion of the physical interaction effect between the material and the scene, especially more obvious in complex or large-scale scenes.
[0028] The present application provides a solution. By parsing the metadata of the sub-objects in the target model, mapping out the material requirement attributes and parameter ranges using a preset rule library, and combining the environmental light intensity to perform intelligent screening and matching score on the PBR material library, the target PBR material recommended to the user is finally determined, solving the technical problems of low accuracy and low efficiency in PBR material selection and matching in the prior art, realizing the automation and intelligence of PBR material selection, improving the selection efficiency and accuracy, so that the target PBR material recommended to the user highly matches the scene of the target model, thereby optimizing the rendering effect.
[0029] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an optimization device for implementing the above-mentioned PBR material set selection strategy. Hereinafter, taking the optimization device for the PBR material set selection strategy as an example, this embodiment and the following embodiments will be described.
[0030] Based on this, the embodiment of the present application provides an optimization method for the PBR material set selection strategy. Refer to Figure 1 , Figure 1 which is a schematic flowchart of the first embodiment of the optimization method for the PBR material set selection strategy of the present application.
[0031] In this embodiment, the optimization method for the PBR material set selection strategy includes steps 101 to 105: Step 101, obtain the sub-object metadata of the sub-objects in the target model, and the environmental light category corresponding to the environmental light intensity of the target model.
[0032] Specifically, the sub-object metadata includes the sub-object category, sub-object label, and sub-object name.
[0033] As an example, the steps of obtaining the sub-object label include: obtaining the 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.
[0034] As an example, the steps of obtaining the sub-object name include: obtaining the 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.
[0035] As an example, the steps of obtaining the sub-object category include: obtaining the 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, where the geometric data includes the vertex coordinate array, surface normal vector array, and bounding box size value; based on the vertex coordinate array, surface normal vector array, and bounding box size value, determine the sub-object category.
[0036] Optionally, the steps of obtaining the sub-object category further include: obtaining the three-dimensional model file corresponding to the target model; calling a parser to parse the three-dimensional model file to obtain the 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; performing category prediction on the sub-object contour image through a target detection model to obtain the sub-object category.
[0037] Specifically, the 3D model to be rendered is called the target model. For example, it can be a chair model or a car model. It can be understood that the target model can include a single 3D model or multiple 3D models. In a 3D model (target model), a complex model usually consists of multiple parts, and each part can be regarded as a sub-object. For example, the backrest, seat, and armrests in a chair model are sub-objects. Sub-object metadata are data that describe the characteristics of sub-objects and include: sub-object tags, sub-object categories, and sub-object names. A sub-object tag is a short description or classification identifier for a sub-object and can be used to quickly identify its function or purpose. For example, "door", "window", "floor", etc. are all possible tags. A sub-object category is a broader classification of a sub-object and is more general than a tag. For example, "building components", "furniture", "vehicles", etc. belong to different categories. A sub-object name is the unique identifier of a 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. The ambient light intensity is the light intensity in the scene where the target model is located and affects the reflection, shadow, and overall visual effect of the sub-object surface. The ambient light category classifies the ambient light intensity into different categories based on different value ranges, such as "bright", "dim", "dusk", etc. Determining the ambient light category helps to more accurately match the PBR material suitable for the current lighting conditions.
[0038] In some embodiments, a parser can be invoked to parse a 3D model file corresponding to a target model. The parser can be the Open Asset Import Library (Assimp), Open3D, etc. The format of the 3D model file can be the Wavefront Object File (OBJ), Graphics Library Transmission Format (glTF), Filmbox Exchange (FBX), etc. After parsing the 3D model file, each sub-object in the target model is traversed. Each sub-object can exist in the form of a node in the 3D model file. Sub-object metadata of the sub-object is extracted from the 3D model file, and information such as sub-object labels, sub-object categories, and sub-object names is extracted from each node. For example, sub-object labels are extracted from the custom attributes or comments of the node. If not defined, the label can be inferred based on the node name or category; the sub-object category is determined according to the hierarchical structure of the node or predefined classification rules; the sub-object name is obtained from the name attribute of the node. The sub-object metadata of the sub-objects in the target model that is extracted is organized into a structured format and stored in a structured data object for subsequent steps to call. The structured format can be JavaScript Object Notation (JSON), eXtensible Markup Language (XML), etc. The stored sub-object metadata corresponds to the sub-objects one by one, facilitating subsequent quick retrieval of its metadata based on the sub-objects. 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 for the entire PBR material set selection strategy, providing standardized input for subsequent rule mapping and material screening steps. By automatically extracting and utilizing sub-object metadata, it not only helps improve the accuracy of material selection but also enhances the efficiency of material selection, solving the technical problems of low accuracy and low efficiency in PBR material selection and matching in the prior art.
[0039] In some embodiments, in some embodiments, the ambient light map can be parsed or the API provided by the rendering engine can be used to obtain the ambient light intensity of the target model. According to the preset lighting intensity classification standard, the ambient light intensity is mapped to the corresponding ambient light category. For example, the specific implementation of determining the ambient light category corresponding to the ambient light intensity of the target model can be arbitrarily as follows: { def determine_lighting_category(light_intensity): if light_intensity < 0.3: return "dark" elif light_intensity < 0.7: return "moderate" else: return "bright" } Step 102: Based on a preset rule library, perform rule mapping on the sub-object metadata to determine the material requirement parameters of the sub-object.
[0040] Specifically, the material requirement parameters of the sub-object include the material requirement attributes of the sub-object, the range of requirement attribute parameters, and the weight of the requirement attribute. The preset rule library is a pre-constructed set of rules that contains the mapping relationships from the sub-object metadata to the material requirement attributes, the range of requirement attribute parameters, and the weight of the requirement attribute. Each rule in the rule library defines the material requirement attributes, the range of requirement attribute parameters, and the weight of the requirement attribute that a specific type of sub-object should possess. The material requirement attributes are used to describe the physical and visual characteristics of the material required for the sub-object, such as reflectivity, roughness, metallicity, normal map, etc. The attributes of the material directly affect the appearance of the material during rendering. The range of requirement attribute parameters defines a reasonable parameter range for the material requirement attributes of the sub-object. For example, for a sub-object with the sub-object label "Metal", the corresponding material requirement attribute "metallicity" can have a range of requirement attribute parameters set from 0.7 to 1.0. Setting the parameter range can ensure that the subsequent selected PBR material is suitable for the actual needs of the sub-object, thus avoiding distortion of the rendering effect caused by unreasonable setting of attribute parameters. The weight of the requirement attribute is the weight assigned to the sub-object. For example, for a sub-object with the sub-object label "Metal", the weight of the requirement attribute can be 0.8. The weight of the requirement attribute can be used for subsequent matching degree scoring to ensure that the subsequently selected material has a high metallicity and to determine the most suitable material, so as to more realistically display the visual effect of the metallic texture of the sub-object during rendering.
[0041] In some embodiments, before the step of performing rule mapping on the sub-object metadata based on a preset rule library, it further includes: constructing a rule library. Specifically, the rule library can be constructed based on expert knowledge, material database analysis, or machine learning algorithms. For example, according to the experience of material experts, the material requirement attributes, requirement attribute parameter ranges, and requirement attribute weights of typical sub-objects can be defined for different sub-object tags, sub-object categories, and sub-object names. Or, by analyzing a large number of PBR material databases, the common material attribute ranges of different sub-object tags, sub-object categories, and sub-object names can be statistically analyzed, and the weights of the sub-objects can be determined, thereby constructing a rule library. In addition, machine learning algorithms 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 library can be stored in JSON format.
[0042] In some embodiments, for each sub-object, according to the sub-object metadata (including sub-object tags, sub-object categories, and sub-object names), a rule matching it is searched for in the rule library. Rule matching can be achieved through exact matching or fuzzy matching. For the sub-object metadata, the matched rule is 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, rule mapping is performed on the sub-object metadata 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 a standard and quantitative index for subsequent material screening, making the material selection more accurate, avoiding the problem of material mismatch with the target model scene caused by random selection or subjective judgment, and helping to improve the accuracy of PBR material selection.
[0043] Step 103, select a first candidate PBR material from the PBR material library according to the material requirement parameters, sub-object metadata, and environmental light category.
[0044] Specifically, the PBR material library contains multiple PBR materials, and 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 ranges, applicability tags, and light category adaptation data. The light category adaptation data includes the light category adaptation scores corresponding to each light category, and the light category adaptation scores are used to indicate the adaptability between the PBR material and the corresponding light category.
[0045] In some embodiments, various PBR materials in the PBR material library are screened under multiple conditions according to material requirement parameters, sub-object metadata, and ambient light category. The first candidate PBR materials that meet all the screening conditions are obtained from various PBR materials in the PBR material library. The first candidate PBR materials are candidate PBR materials that meet the material requirements of the sub-object and the ambient light conditions, providing a data basis for subsequent matching score calculation and target material recommendation. By determining the ambient light category and considering the ambient light conditions, the screened PBR materials are adapted to the lighting conditions of the target model, which helps to present a reasonable visual effect after rendering and avoid rendering effect distortion caused by the mismatch between the material and the scene lighting. At the same time, multi-condition screening is combined with material requirement parameters and sub-object tags to further improve the matching degree between the first candidate PBR materials and the semantic and physical properties of the sub-object.
[0046] Step 104: Match each of the first candidate PBR materials with the ambient light category, material requirement parameters, and sub-object metadata to determine the matching score of the first candidate PBR materials.
[0047] Specifically, the matching score is a quantitative index determined according to the PBR material library, ambient light category, range of required attribute parameters, sub-object tags, and required attribute weights, and is used to evaluate the matching degree between the first candidate PBR materials and the material requirements of the sub-object and the ambient light conditions. The higher the score, the better the match between the first candidate PBR material and the target model scene.
[0048] In some embodiments, an evaluation model is constructed. The evaluation model is used to calculate the matching score of each first candidate PBR material. The evaluation model can consider the following factors: ambient light category, material requirement parameters, sub-object metadata. For each first candidate PBR material, according to the evaluation model, the matching score of the first candidate PBR material is calculated. By determining the matching score of the first candidate PBR material, the matching score can comprehensively and accurately reflect the matching degree between a candidate PBR material and the target model scene, quantify the matching degree between each first candidate PBR material and the target model scene, ensure that the selected PBR material not only meets the functional attributes of the sub-object, but also can adapt to a specific lighting environment, and avoid the problem of material-scene mismatch caused by random selection or subjective judgment, thereby improving the accuracy of PBR material selection.
[0049] Step 105: Select the target PBR material from the first candidate PBR materials according to the matching score.
[0050] 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.
[0051] In some embodiments, the first candidate PBR materials are sorted in descending order according to their matching score. The first candidate PBR materials with higher scores are ranked ahead, indicating a higher degree of matching with the target model scene. According to actual requirements, a matching score threshold is set. Only the first candidate PBR materials with a matching score higher than this threshold can be used as the target materials further recommended to the user. Screening through the threshold can help filter out PBR materials with lower matching degrees and improve the quality of the recommended target materials.
[0052] Further, brief information such as the material category and material name of the target PBR materials is displayed to the user in the form of a list. The list can be sorted according to the corresponding matching scores of the target PBR materials, and the materials with higher scores are ranked ahead. Alternatively, the target PBR materials are displayed to the user in the form of thumbnails, which can reflect the visual characteristics of the materials and help the user quickly identify the appearance of the materials. When the user hovers the mouse over a list item or thumbnail of a certain target PBR material, the rendering effect after applying the target PBR material to the sub-object of the target model is displayed, so that the user can preview the rendering effect after applying the target PBR material to the sub-object of the target model. By providing a comparison preview mode, the user is allowed to simultaneously preview the effects after applying multiple target PBR materials to the sub-objects, facilitating comparison and selection by the user. In addition, the user clicks on the list item or thumbnail to select one or more target PBR materials. After confirming the user's selection, the selected target PBR materials are applied to the sub-objects of the target model, and the application process can be completed automatically without the user manually adjusting the material parameters.
[0053] Based on the optimization method of the PBR material set selection strategy provided by the present application, by obtaining 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, basic data support is provided for subsequent rule mapping and material matching. Based on the predefined rule library, the sub-object metadata is rule-mapped to determine the material requirement parameters of the sub-object, and the material characteristics required by the sub-object are clarified through the rule library, thereby guiding the subsequent screening process. According to the material requirement parameters, sub-object metadata and ambient lighting category, each PBR material in the PBR material library is screened to obtain the first candidate PBR material, and the scene of the target model is semantically understood in combination with the sub-object metadata in the target model and the ambient lighting intensity of the target model, and each PBR material in the PBR material library is screened according to the understanding results. The first candidate PBR material is matched with the ambient lighting category, material requirement parameters and sub-object metadata respectively, the matching score of the first candidate PBR material is determined, the degree of fit between each first candidate PBR material and the sub-object requirement is quantified, and the target PBR material is selected from the first candidate PBR material according to the matching score. The optimization method of the PBR material set selection strategy provided by the present application parses the metadata of the sub-objects in the target model and determines the ambient lighting category, maps out the material requirement attributes and parameter ranges using a preset rule library, and intelligently screens and scores the matching degree of the PBR material library in combination with the ambient lighting intensity, and finally determines the target PBR material recommended to the user, thereby solving the technical problems of low accuracy and low efficiency in the selection and matching of PBR materials in the prior art, realizing the automation and intelligence of PBR material selection, and improving the selection efficiency and accuracy, so as to determine that the target PBR material recommended to the user is highly matched with the scene of the target model, thereby optimizing the rendering effect.
[0054] In some embodiments, when the sub-object metadata includes a sub-object category, the step of obtaining the sub-object category includes: Obtain the 3D model file corresponding to the target model; 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; Determines the sub-object category based on the vertex coordinate array, surface normal vector array, and bounding box size values.
[0055] Specifically, the 3D model file is a file storing target model data, and the format of the 3D model file can be OBJ, FBX, glTF, etc. The 3D model file contains geometric information of the target model (such as vertex coordinates, surface normals, faces, etc.), sub-object metadata of sub-objects in the target model, etc. The parser is a software library or tool for reading and parsing 3D model files. The parser can understand 3D model files in various formats and extract the stored data therein, such as geometric data, sub-object metadata, etc. The parser can be Assimp, Open3D, etc. The vertex coordinate array is a set of coordinates of vertices that make up the geometric shape of a sub-object in the target model. Each vertex is represented by three coordinate values (x, y, z), which define its position in 3D space. The vertex coordinate array can describe the shape and contour of the sub-object. The surface normal vector array is a vector associated with each vertex or face of the sub-object surface, representing the orientation of the surface. The surface normal vector can be used to calculate lighting and shadow effects and is very important for rendering realistic graphics. The surface normal vector array can describe the direction and concavity / convexity characteristics of the sub-object surface. The bounding box size values (length, width, height) are the size data of the smallest cuboid enclosing the sub-object and can be used as an approximation of the overall size of the sub-object. Through the bounding box size values, the occupied range of the sub-object in 3D space can be reflected. The sub-object category is a description of the type or category to which the sub-object belongs. By determining the sub-object category, it helps to understand the use and characteristics of the sub-object and provides semantic information for subsequent operations such as material selection.
[0056] As an example, obtain the 3D model file corresponding to the target model from a preset path or storage location. The 3D model file format includes but is not limited to OBJ, FBX, glTF, etc. Call the parser to read and parse the 3D model file, and extract the sub-objects contained in the target model and the geometric data of each sub-object. The geometric data includes the vertex coordinate array, the surface normal vector array, and the bounding box size values. Further, a minimum convex body can be generated based on the vertex coordinate array through the convex hull algorithm, and the ratio of its volume to the volume of the bounding box (convex hull volume ratio) can be calculated. If the ratio is greater than the corresponding preset value, the sub-object can be determined to be a regular artifact (such as a building / furniture); based on the surface normal vector array, the variance value of the angle between the normal vector and the Z-axis (standard deviation of the normal direction) can be statistically calculated. If the variance value is greater than the corresponding preset value, the sub-object can be classified as an organic object (such as vegetation / living things); based on the bounding box size values, the aspect ratio can be determined. For sub-objects with an aspect ratio greater than the corresponding preset value, combined with the convex hull volume ratio, columns and trees can be distinguished. To improve the speed of the steps for obtaining the sub-object categories in the target model, the above processing process can use a Graphics Processing Unit (GPU) to accelerate parallel computing and output structured sub-object categories after classification.
[0057] Optionally, the step of obtaining the sub-object category further includes: Obtain the 3D model file corresponding to the target model; Call a parser to parse the 3D model file to obtain the vertex coordinate array corresponding to the sub-object; Generate a sub-object contour image corresponding to the sub-object based on the vertex coordinate array; Perform category prediction on the sub-object contour image through the target detection model to obtain the sub-object category.
[0058] Specifically, the contour image is a binary image (black background and white edges) describing the object edge and is used for target detection. The target detection model is an algorithm model based on deep learning and can be YOLOv5, Faster R-CNN. The target detection model can identify the category and position of the sub-object in the sub-object contour image.
[0059] In some embodiments, the sub-object metadata includes sub-object tags, and the rule library includes tag rules. The step of determining the material requirement parameters of the sub-object by performing rule mapping on the sub-object metadata based on the preset rule library includes: Perform an exact match on the tag trigger condition corresponding to the sub-object tag and the tag rule to obtain an exact match result; If the exact match result is a match, determine the preset requirement condition corresponding to the tag rule to which the tag trigger condition belongs as the material requirement attribute and the requirement attribute parameter range of the sub-object; Determine the rule weight corresponding to the tag rule to which the tag trigger condition belongs as the requirement attribute weight; Determine the requirement attribute weight, the material requirement attribute, and the requirement attribute parameter range as the material requirement parameters.
[0060] Specifically, the tag rule is a rule defined specifically for the sub-object tag in the rule library, and the tag rule includes information such as a tag trigger condition, a preset requirement condition, and a rule weight. For example, the tag rule can be as follows: { "trigger":{"tag":"Metal"}, "requirements":{"metalness":[0.7,1.0],"roughness":[0.0,0.5]}, "weight":0.8 } Among them, trigger defines the tag trigger condition corresponding to the tag rule, and the tag trigger condition corresponding to the above tag rule is "Metal"; requirements define the preset requirement conditions corresponding to the tag rule, that is, the attributes and parameter ranges that the matching PBR material should have, the material requirement attributes and requirement attribute parameter ranges, and weight defines the rule weight corresponding to the tag rule.
[0061] As an example, the rule library contains multiple tag rules, and each tag rule defines the material requirement attributes, requirement attribute parameter ranges, and rule weights corresponding to specific sub-object tags. The sub-object metadata contains sub-object tags. Case-insensitive string exact matching is performed between the sub-object tags (such as "metal") and the trigger conditions of each tag rule in the rule library to obtain the exact matching result between the sub-object tags and the tag trigger conditions corresponding to the tag rules. If the matching is successful, that is, the exact matching result is a match. For example, if the sub-object tag "metal" matches the rule trigger condition "Metal", then extract the preset requirement conditions corresponding to this tag rule, including the material requirement attributes defined by this tag rule, that is, "metalness" and "roughness", and the requirement attribute parameter ranges, that is, "metalness": [0.7, 1.0] and "roughness": [0.0, 0.5]. And directly inherit the predefined rule weight "weight": 0.8 in the tag rule as the requirement attribute weight. Through the exact matching mechanism of the tag rule, the automation and precision determination of sub-object material requirements are realized, effectively improving the accuracy and efficiency of material selection.
[0062] In some embodiments, the rule library includes category rules. In the case where the sub-object metadata includes the sub-object category, The steps of determining the material requirement attributes, requirement attribute parameter ranges, and requirement attribute weights of the sub-object based on the preset rule library for rule mapping of the sub-object metadata include: Determine the exact matching result between the sub-object category and the category trigger condition corresponding to the category rule; In the case where the exact matching result indicates that the sub-object category is the same as the category trigger condition, perform rule mapping 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 ranges of the sub-object; Determine the rule weight corresponding to the category rule to which the category trigger condition belongs as the requirement attribute weight.
[0063] In some embodiments, the sub-object metadata includes the sub-object name, the rule library includes name rules, and the steps of determining the material requirement parameters of the sub-object based on the preset rule library for rule mapping of the sub-object metadata include: Perform fuzzy matching on the name trigger keywords corresponding to the sub-object name and the name rules to obtain the fuzzy matching results; If the fuzzy matching result is a match, determine the material requirement attributes and the range of requirement attribute parameters of the sub-object according to the requirement conditions corresponding to the name rule to which the name trigger keyword belongs; Determine the rule weight corresponding to the name rule to which the name trigger keyword belongs as the requirement attribute weight; Determine the requirement attribute weight, the material requirement attributes and the range of requirement attribute parameters as the material requirement parameters.
[0064] Specifically, the name rule is a rule specifically defined for the sub-object name in the rule library.
[0065] As an example, the name rule contains information such as name trigger keywords, requirement conditions corresponding to the name rule, and rule weights. For example, the name rule can be as follows: { "trigger":{"name_contains":["door","polymer"]}, "requirements":{"metalness":[0.0,0.2],"roughness":[0.1,0.7]}, "weight":0.5 } Among them, trigger defines the name trigger keywords corresponding to the name rule. The name trigger keywords corresponding to the above name rule are "plastic" and "polymer"; requirements define the requirement conditions that the matched PBR material should have, that is, the attributes and parameter ranges that the PBR material should have, that is, the material requirement attributes and the range of requirement attribute parameters, and weight defines the rule weight corresponding to the name rule. The rule weight corresponding to the above name rule is 0.5.
[0066] As an example, the rule library contains multiple name rules. Each name rule defines the material requirement attributes, the range of requirement attribute parameters, and the rule weight corresponding to the name rule for the sub-objects that contain specific sub-object tags. The sub-object metadata contains the sub-object name. The sub-object name is fuzzy matched with the name trigger keywords corresponding to each name rule in the rule library to determine whether there is a semantic association. For example, when the matched sub-object name is "main_door" or "left_door", the name rule corresponding to the name trigger keyword "door" can be fuzzy matched. At this time, 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, that is, the material requirement attributes "metalness" and "roughness", and the range of requirement attribute parameters, that is, "metalness": [0.0, 0.2] and "roughness": [0.1, 0.7]. And the predefined rule weight "weight": 0.5 in the name rule is directly inherited as the requirement attribute weight. Through the fuzzy matching mechanism of the name rule, it can flexibly cope with diverse naming habits. Even if the sub-object name expressions are different, as long as the name trigger keyword is included, the rule can be correctly triggered, effectively improving the accuracy and efficiency of material selection, especially suitable for scenarios where the sub-object name has a certain degree of descriptiveness.
[0067] In some embodiments, the step of obtaining the environmental light category includes: Reading the light source component attributes of the target model based on a preset interface and extracting the environmental light intensity from the light source component attributes; According to the preset light intensity classification standard, mapping the environmental light intensity to the corresponding light category to determine the environmental light category corresponding to the environmental light intensity.
[0068] Specifically, the preset interface is the application programming interface API provided by the rendering engine. The rendering engine is the core component in 3D graphics software responsible for converting information such as the target model, materials, and lighting into the final image, and can be Unity, UnrealEngine, Blender Cycles, Cinema 4D, etc. The rendering engine can provide rich application programming interfaces API for controlling and obtaining various parameters in the rendering process. The API of the rendering engine can provide an interface for accessing and operating the functions of the rendering engine, so as to read or modify the component attributes in the target model. The light source component attributes are the parameters and settings included in the light source component of the target model, such as the environmental light type (directional light, point light, spotlight, etc.), the environmental light color, the environmental light intensity, the environmental light position, etc. The light source component attributes determine the lighting effect of the environmental light.
[0069] As an example, the API of the rendering engine is called to read the relevant properties of the light source component in the target model, and the ambient light intensity is extracted therefrom. According to the preset light intensity classification standard, the ambient light intensity is mapped to a specific light 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, more suitable PBR materials for the current environment can be selected, and determining the ambient light category corresponding to the ambient light intensity can provide an important basis for subsequent PBR materials.
[0070] In some embodiments, the step of selecting the first candidate PBR material from the PBR material library according to the material requirement parameters, sub-object metadata, and ambient light category includes: According to the PBR material library, determine the material category, material name, material properties, material property range, applicability label, and light category adaptation data of each PBR material; Determine the PBR materials with the same material properties as the material requirement properties as the second candidate PBR materials; Calculate the similarity between the sub-object label and the material category, material name, and applicability label respectively, and determine the average value of the multiple similarities; Determine the second candidate PBR materials with the average similarity value greater than or equal to the first preset threshold as the third candidate PBR materials; According to the light category adaptation data and ambient light category corresponding to the third candidate PBR materials, screen the third candidate PBR materials to obtain the first candidate PBR materials.
[0071] In some embodiments, the step of calculating the similarity between the sub-object label and the material category, material name, and applicability label respectively, and determining the average value of the multiple similarities includes: Calculate the similarity between the material category of the second candidate PBR material and all sub-object labels respectively, obtain the corresponding multiple initial category similarities, and determine the maximum 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; Calculate the similarity between the material name of the second candidate PBR material and all sub-object labels respectively, obtain the corresponding multiple initial name similarities, and determine the maximum 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; Calculate the similarity 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 maximum 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; Perform an average calculation on the applicability label similarity, name similarity, and category similarity to obtain the average similarity.
[0072] Specifically, each PBR material in the PBR material library has its corresponding material metadata. The material metadata is data describing the attributes and characteristics of the PBR material, including material category, material name, material attributes, material attribute ranges, applicability labels, light category adaptation data, etc. The material metadata provides an important basis for PBR material screening. The light category adaptation data is data used to describe the ability of the PBR material to adapt to different light categories. The light category adaptation data includes various light category adaptation scores, and the light category adaptation scores are used to indicate the degree of fit between the PBR material and the corresponding light category. The material category is the major category to which the PBR material belongs, such as "metal", "wood", "glass", "stone", "fabric", etc.; the material name is the specific naming of the PBR material, such as "MatteWood01", "BrushedMetal"; the material attributes can be PBR core parameters such as metallicity, roughness, normal map, reflectivity, etc. The material attribute range is the possible change range of each material attribute. The applicability label can be used to indicate which uses or scenarios the PBR material is suitable for, such as "outdoor", "indoor", "architecture", etc.
[0073] As an example, traverse each PBR material in the PBR material library, and extract the material metadata of the PBR material. The material metadata includes but is not limited to: material category, material name, material attributes, material attribute ranges, applicability labels, and light 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 include this PBR material in the second candidate PBR material set. The selected second candidate PBR materials meet 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 this second candidate PBR material, including: Calculate the similarity 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 maximum value among the multiple initial category similarities as the category similarity between the sub-object label and the material category of this second candidate PBR material; Calculate the similarity between the material name of the second candidate PBR material and all sub-object tags 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 tag and the material name of this second candidate PBR material; Calculate the similarity between the applicability tag of the second candidate PBR material and all sub-object tags respectively to obtain multiple corresponding initial applicability tag similarities, and determine the largest value among the multiple initial applicability tag similarities as the applicability tag similarity between the sub-object tag and the applicability tag of this second candidate PBR material.
[0074] The similarity calculation can adopt text similarity algorithms such as cosine similarity or Jaccard similarity to quantify the semantic proximity between the sub-object tag and the material metadata. After obtaining at least one similarity (i.e., class similarity, applicability tag similarity, and name similarity), calculate the average value of the class similarity, applicability tag similarity, and name similarity to obtain the similarity average value, so as to comprehensively evaluate the overall semantic matching degree between the sub-object tag and the material metadata. Compare the calculated similarity average value with a pre-set first preset threshold. The first preset threshold is used to judge whether the semantic similarity degree between the sub-object tag and the material metadata reaches the expected standard. If the similarity average value is greater than or equal to the first preset threshold, it indicates that this second candidate PBR material is highly relevant to the sub-object tag semantically, and determine it as the third candidate PBR material. For each third candidate PBR material, evaluate the applicability of the third candidate PBR material under the current lighting conditions according to its lighting class adaptation data and the environmental lighting class of the current scene. If it is determined that the third candidate PBR material is applicable to the current environmental lighting class through the lighting class adaptation data of the third candidate PBR material, then determine this third candidate PBR material as the first candidate PBR material. The first candidate PBR material determined through multi-condition screening is a candidate PBR material that simultaneously meets the material attribute requirements, semantic relevance, and environmental lighting adaptability. Through multi-level screening conditions, accurately screen out the candidate PBR material that best matches the sub-object material requirements and environmental lighting conditions from a large PBR material library, providing a high-quality candidate material set for subsequent material matching degree scoring and final material selection.
[0075] In some embodiments, the lighting class adaptation data includes various lighting class adaptation scores, and the lighting class adaptation scores are used to indicate the adaptability between the PBR material and the corresponding lighting class. The steps of screening the third candidate PBR material according to the lighting class adaptation data corresponding to the third candidate PBR material and the environmental lighting class to obtain the first candidate PBR material include: Determine the 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 with a lighting category adaptation score greater than or equal to the second preset threshold as the first candidate PBR material.
[0076] Specifically, the lighting category adaptation score is the specific value in the corresponding lighting category adaptation data, which is used to quantitatively indicate the adaptation degree between the PBR material and the corresponding lighting category. The lighting category adaptation score is a value between 0 and 1. The higher the score, the higher the adaptation degree of the PBR material to the lighting category, that is, the better the visual performance of the PBR material under this lighting category and the more suitable it is to be used under this lighting condition.
[0077] As an example, for each third candidate PBR material, according to its lighting category adaptation data, find the lighting category adaptation score corresponding to this third candidate PBR material under the current ambient lighting category. For example, if the current ambient lighting category is "bright", then find the lighting category adaptation score of this third candidate PBR material under the "bright" category. Compare the lighting category adaptation score of each third candidate PBR material under the current ambient lighting category with the pre-set second preset threshold. If the lighting category adaptation score is greater than or equal to the second preset threshold, it indicates that this third candidate PBR material is suitable to be used under the current ambient lighting category. Therefore, it is determined as the first candidate PBR material. By using this quantitative index of the lighting category adaptation score, accurately evaluate the applicability of the third candidate PBR material under the current ambient lighting category, so as to screen out the candidate PBR that performs excellently in terms of material attributes, semantic relevance, and ambient lighting adaptability as the first candidate PBR material.
[0078] In some embodiments, the steps of matching the first candidate PBR material with the ambient lighting category, material requirement parameters, and sub-object metadata respectively to determine the matching degree score of the first candidate PBR material include: 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; Determine the average similarity corresponding to the first candidate PBR material according to at least one of the material category, material name, and applicability label corresponding to the first candidate PBR material and the sub-object label respectively; Determine the attribute parameter adaptation degree corresponding to the first candidate PBR material according to the demand attribute parameter range and the material attribute range corresponding to the first candidate PBR material; Perform a weighted average on the lighting category adaptation score corresponding to the first candidate PBR material, the average similarity corresponding to the first candidate PBR material, the attribute parameter adaptation degree corresponding to the first candidate PBR material, and the demand attribute weight to obtain the matching score of the first candidate PBR material.
[0079] Specifically, the attribute parameter adaptation degree is an index used to indicate the matching degree between the material attribute range of the first candidate PBR material and the demand attribute parameter range of the sub-object. The higher the attribute parameter adaptation degree, the higher the range of the demand attribute parameter range falling 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.
[0080] As an example, for each first candidate PBR material, according to the lighting category adaptation data corresponding to the first candidate PBR material, find the lighting category adaptation score corresponding to the first candidate PBR material under the current ambient lighting category. For each first candidate PBR material, calculate the similarity between the sub-object label and at least one material metadata among the material category, material name, and applicability label of the first candidate PBR material, and calculate the average value of these similarities to obtain the average similarity. For each first candidate PBR material, according to the material attribute range of the first candidate PBR material and the demand attribute parameter range of the sub-object, determine the intersection corresponding to the material attribute range of the first candidate PBR material and the demand attribute parameter range of the sub-object, and calculate the overlap degree between the intersection and the demand attribute parameter range of the sub-object, and determine the overlap degree as the attribute parameter adaptation degree corresponding to the first candidate PBR material. Perform a weighted average on the lighting category adaptation score, average similarity, attribute parameter adaptation degree, and demand attribute weight of each first candidate PBR material to obtain the matching score of the first candidate PBR material.
[0081] In some embodiments, the step of selecting the target PBR material from the first candidate PBR materials according to the matching score includes: Determine the first candidate PBR material with a matching score greater than or equal to the third preset threshold as the target PBR material; Or, Determine the first candidate PBR material corresponding to the maximum matching score value as the target PBR material.
[0082] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the optimization method of the PBR material set selection strategy of this application. Based on this technical concept, more forms of simple transformations are within the protection scope of this application.
[0083] This application also provides an optimization device for the PBR material set selection strategy, please refer to Figure 2, the optimization device for the PBR material set selection strategy includes: An acquisition module 201, configured to acquire the sub-object metadata of the sub-objects in the target model and the ambient light category corresponding to the ambient light intensity of the target model; A rule mapping module 202, 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-objects; A material screening module 203, configured to select a first candidate PBR material from the PBR material library according to the material requirement parameters, the sub-object metadata, and the ambient light category; A matching quantification module 204, configured to match the first candidate PBR material with the ambient light category, the material requirement parameters, and the sub-object metadata respectively to determine the matching degree score of the first candidate PBR material; A determination module 205, configured to select a target PBR material from the first candidate PBR materials according to the matching degree score.
[0084] The optimization device for the PBR material set selection strategy provided in this application adopts the optimization method for the PBR material set selection strategy in the above embodiment, and 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 optimization device for the PBR material set selection strategy provided in this application are the same as those of the optimization method for the PBR material set selection strategy provided in the above embodiment, and other technical features in the optimization device for the PBR material set selection strategy are the same as the features disclosed in the method of the above embodiment, and will not be elaborated here.
[0085] This application provides an optimization device for the PBR material set selection strategy. The optimization device for the PBR material set selection strategy includes: 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 first embodiment above.
[0086] Next, refer to Figure 3 , which shows a schematic structural diagram of an optimization device for the PBR material set selection strategy suitable for implementing the embodiments of this application. The optimization device for the PBR material set selection strategy in the embodiments of this application may include, but is not limited to, mobile terminals such as laptop computers, tablet computers (Portable Application Description, PAD), portable multimedia players (Portable Media Player, PMP), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3The optimized device for the PBR material set selection strategy shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0087] As Figure 3 shown, the optimized device for the PBR material set selection strategy may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage device 1003 into the random access memory (RAM) 1004. In the random access memory 1004, various programs and data required for the operation of the optimized device for the PBR material set selection strategy are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the optimized device for the PBR material set selection strategy to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows an optimized device for the PBR material set selection strategy with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or had alternatively.
[0088] Specifically, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device, or installed from the storage device 1003, or installed from the 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 embodiments disclosed in the present application are executed.
[0089] The optimization device for the PBR material set selection strategy provided by this application adopts the optimization method of the PBR material set selection strategy in the above-mentioned embodiment, and 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 optimization device for the PBR material set selection strategy provided by this application are the same as those of the optimization method of the PBR material set selection strategy provided in the above-mentioned embodiment, and other technical features in the optimization device for the PBR material set selection strategy are the same as those disclosed in the method of the previous embodiment, which will not be elaborated here.
[0090] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0091] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and all of them should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0092] This application provides a computer-readable storage medium with computer-readable program instructions (i.e., computer programs) 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-mentioned embodiment.
[0093] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0094] The above computer-readable storage medium can be included in the optimization device for the PBR material set selection strategy; or it can exist independently without being assembled into the optimization device for the PBR material set selection strategy.
[0095] The above computer-readable storage medium carries one or more programs. When the one or more programs are executed by the optimization device for the PBR material set selection strategy, the optimization device for the PBR material set selection strategy is caused to: obtain the sub-object metadata of the sub-objects in the target model and the environmental light category corresponding to the environmental light 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-objects; select a first candidate PBR material from the PBR material library according to the material requirement parameters, sub-object metadata, and environmental light category; match the first candidate PBR material with the environmental light category, material requirement parameters, and sub-object metadata respectively to determine the matching degree score of the first candidate PBR material; and select a target PBR material from the first candidate PBR materials according to the matching degree score.
[0096] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent 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 can be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external computer (for example, by connecting through an Internet service provider using the Internet).
[0097] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and this module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks can occur in a different order from that marked in the accompanying drawings. For example, two consecutively represented blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0098] The modules described in the embodiments of this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation on the unit itself in some cases.
[0099] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for performing the optimization method of the above-mentioned PBR material set selection strategy, and 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 computer-readable storage medium provided by this application are the same as those of the optimization method of the PBR material set selection strategy provided by the above embodiments, and will not be elaborated here.
[0100] 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 for the PBR material set selection strategy as described above.
[0101] The computer program product provided by the present application 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 computer program product provided by the present application are the same as those of the optimization method for the PBR material set selection strategy provided in the above embodiments, and will not be elaborated here.
[0102] The above are only partial embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. An optimization method for the selection strategy of PBR material sets, characterized in that, The optimization method for the PBR material set selection strategy includes: Obtaining the sub-object metadata of the sub-objects in the target model, and the environmental light category corresponding to the environmental light 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-objects; Selecting the first candidate PBR material from the PBR material library according to the material requirement parameters, the sub-object metadata, and the environmental light category; Matching the first candidate PBR material with the environmental light category, the material requirement parameters, and the sub-object metadata respectively to determine the matching degree score of the first candidate PBR material; Selecting the target PBR material from the first candidate PBR materials according to the matching degree score.
2. The optimization method of the PBR material set selection strategy according to claim 1, wherein The sub-object metadata includes the sub-object category, and the steps for obtaining the sub-object category include: Obtaining the three-dimensional model file corresponding to the target model; Invoking a parser to parse the three-dimensional model file to obtain the 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; Performing category prediction on the sub-object contour image through a target detection model to obtain the sub-object category.
3. The optimization method for the PBR material set selection strategy according to claim 1, wherein The sub-object metadata includes the sub-object label, the rule library includes label 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: Performing an exact match on the sub-object label and the label trigger condition corresponding to the label rule to obtain an exact match result; If the exact match result is a match, determining the preset requirement condition corresponding to the label rule to which the label trigger condition belongs as the material requirement attribute and the requirement attribute parameter range of the sub-object; Determining the rule weight corresponding to the label rule to which the label trigger condition belongs as the requirement attribute weight; Determining the requirement attribute weight, the material requirement attribute, and the requirement attribute parameter range as the material requirement parameters.
4. The optimization method for the PBR material set selection strategy according to claim 1, characterized in that, The sub-object metadata includes the sub-object name, the rule library includes name 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: Performing a fuzzy match on the sub-object name and the name trigger keyword corresponding to the name rule to obtain a fuzzy match result; If the fuzzy match result is a match, determining the requirement condition corresponding to the name rule to which the name trigger keyword belongs as the material requirement attribute and the requirement attribute parameter range of the sub-object; Determining the rule weight corresponding to the name rule to which the name trigger keyword belongs as the requirement attribute weight; Determining the requirement attribute weight, the material requirement attribute, and the requirement attribute parameter range as the material requirement parameters.
5. The optimization method of the PBR material set selection strategy according to claim 1, characterized in that, The steps for obtaining the environmental light category include: Reading the light source component attributes of the target model based on a preset interface, and extracting the environmental light intensity from the light source component attributes; According to a preset ambient light intensity classification standard, map the ambient light intensity to the corresponding light category, and determine the ambient light category corresponding to the ambient light intensity.
6. The optimization method for the PBR material set selection strategy according to any one of claims 1 to 5, characterized in that, The step of selecting a first candidate PBR material from the PBR material library according to the material requirement parameters, the sub-object metadata, and the ambient light category includes: According to the PBR material library, determine the material category, material name, material attributes, material attribute range, applicability label, and light category adaptation data of each PBR material; Determine the PBR materials with the same material attributes as the material requirement attributes as the second candidate PBR materials; Calculate the similarity between the sub-object label and each of the material category, the material name, and the applicability label, and determine the average value of the similarities corresponding to multiple similarities; Determine the second candidate PBR materials with the average similarity value greater than or equal to a first preset threshold as the third candidate PBR materials; According to the light category adaptation data corresponding to the third candidate PBR materials and the ambient light category, screen the third candidate PBR materials to obtain the first candidate PBR materials.
7. The optimization method of the PBR material set selection strategy according to claim 6, characterized in that, The light category adaptation data includes light category adaptation scores for each light category, and the light category adaptation scores are used to indicate the adaptability between the PBR material and the corresponding light category. The step of screening the third candidate PBR materials according to the light category adaptation data corresponding to the third candidate PBR materials and the ambient light category to obtain the first candidate PBR materials includes: Determine the light category adaptation score between the third candidate PBR material and the ambient light category according to the light category adaptation data; Determine the third candidate PBR materials with the light category adaptation score greater than or equal to a second preset threshold as the first candidate PBR materials.
8. The optimization method for the PBR material set selection strategy according to claim 7, characterized in that The step of matching the first candidate PBR material with the ambient light category, the material requirement parameters, and the sub-object metadata respectively to determine the matching score of the first candidate PBR material includes: Determine the light category adaptation score corresponding to the first candidate PBR material according to the light category adaptation data corresponding to the first candidate PBR material and the ambient light category; Determine the average similarity value corresponding to the first candidate PBR material according to at least one of the material category, the material name, and the applicability label corresponding to the first candidate PBR material and the sub-object label; Determine the attribute parameter adaptability corresponding to the first candidate PBR material according to the demand attribute parameter range and the material attribute range corresponding to the first candidate PBR material; Perform a weighted average on the light category adaptation score corresponding to the first candidate PBR material, the average similarity value corresponding to the first candidate PBR material, the attribute parameter adaptability corresponding to the first candidate PBR material, and the demand attribute weight to obtain the matching score of the first candidate PBR material.
9. The optimization method for the PBR material set selection strategy according to claim 1, wherein The step of selecting a target PBR material from the first candidate PBR materials according to the matching degree score includes: Determining the first candidate PBR material with a matching degree score greater than or equal to a third preset threshold as the target PBR material; Or, Determining the first candidate PBR material corresponding to the largest value of the matching degree score as the target PBR material.
10. The optimization method of the PBR material set selection strategy according to claim 6, characterized in that The step of calculating the similarity between the sub-object label and the material category, the material name, and the applicability label respectively, and determining the average value of the similarities corresponding to multiple similarities includes: Calculating the similarity between the material category of the second candidate PBR material and all sub-object labels respectively to obtain a corresponding plurality of 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 the similarity between the material name of the second candidate PBR material and all sub-object labels respectively to obtain a corresponding plurality of 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 the similarity between the applicability label of the second candidate PBR material and all the sub-object labels respectively to obtain a corresponding plurality of 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; Performing an average calculation on the applicability label similarity, the name similarity, and the category similarity to obtain the average value of the similarities.
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
Apparatus and Method for Density-Aware Stochastic Subsets for Improved Importance Sampling
US20240320782A1
Cited By
Method and device for determining equipment
CN120849223A
Method and apparatus for determining a device
CN120849223B