3D modeling feature extraction method and system combined with natural language processing
By performing multi-level semantic parsing and 3D topology reconstruction optimization on the text description of the target object, the problem of low efficiency of traditional 3D modeling is solved, an efficient and accurate 3D modeling process is achieved, and high-quality 3D models are generated.
Patent Information
- Application Number
- CN202510941954.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-07-09
AI Technical Summary
Traditional 3D modeling methods rely on manual operations, are inefficient, and cannot meet the needs of rapid iteration. When dealing with complex or abstract objects, it is difficult to accurately capture the object's form, spatial relationships, and surface features, resulting in deviations between the model and the intended design.
By obtaining the text description data of the target object, performing multi-level semantic parsing processing, extracting a set of key semantic features, generating intermediate representation data, and performing three-dimensional topology reconstruction and multi-stage optimization, high-quality 3D model features are generated.
It achieves accurate and efficient conversion from natural language text descriptions to high-quality 3D models, improves modeling efficiency and accuracy, reduces modeling costs, and provides an efficient and convenient 3D modeling solution.
Smart Images

Figure CN120451369B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of game development technology, and in particular to a 3D modeling feature extraction method and system combined with natural language processing. Background Art
[0002] In today's game development, the creation and optimization of 3D models is a crucial step, directly affecting the game's visual effects, interactive experience, and overall quality. Traditional 3D modeling methods rely primarily on the manual work of professional modelers, who use 3D modeling software such as Maya and 3dsMax to gradually build models according to design requirements. Although this method can create high-quality 3D models, it has many drawbacks. On the one hand, the manual modeling process is tedious, time-consuming, and labor-intensive, requiring modelers to have extensive experience and professional skills, resulting in low modeling efficiency and difficulty meeting the needs of rapid iteration in game development. On the other hand, when dealing with complex or abstract target objects, manual modeling often fails to accurately capture details such as the object's morphology, spatial relationships, and surface features, resulting in deviations between the model and the intended design. Summary of the Invention
[0003] In view of the above-mentioned problems, in combination with the first aspect of the present invention, an embodiment of the present invention provides a 3D modeling feature extraction method combined with natural language processing, the method comprising:
[0004] Acquire text description data of a target object, wherein the text description data includes morphological attributes, spatial relationships, and surface features of the target object;
[0005] Performing multi-level semantic parsing on the text description data to extract a set of key semantic features from the text description data, wherein the set of key semantic features includes a global semantic vector, a local semantic vector, and a dynamic context vector of the target object;
[0006] generating intermediate representation data based on the key semantic feature set, wherein the intermediate representation data includes geometric contour features, material distribution features, and illumination response features of the target object in an abstract space;
[0007] Performing a three-dimensional topology reconstruction process according to the intermediate representation data to generate initial 3D model data of the target object;
[0008] A multi-stage optimization process is performed on the initial 3D model data to generate an optimized 3D model feature set, wherein the optimized 3D model feature set includes a geometric smoothness feature, a texture continuity feature, a lighting rendering feature, and a physical collision feature.
[0009] On the other hand, an embodiment of the present invention also provides a 3D modeling feature extraction system combined with natural language processing, including a processor and a machine-readable storage medium, wherein the machine-readable storage medium is connected to the processor, the machine-readable storage medium is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the machine-readable storage medium to implement the above method.
[0010] Based on the above aspects, the embodiment of the present invention obtains detailed text description data of the target object and performs multi-level semantic analysis on it, so as to comprehensively and deeply extract the key semantic feature set contained in the text, covering the global semantic vector, local semantic vector and dynamic context vector of the target object. The intermediate representation data generated based on these key semantic feature sets can accurately describe the geometric contour features, material distribution features and lighting response features of the target object in the abstract space, making the conversion process from text description to 3D model more accurate and efficient. After generating the initial 3D model data, it is further optimized in multiple stages. The optimized 3D model feature set finally obtained includes geometric smoothness features, texture continuity features, lighting rendering features and physical collision features, which greatly improves the quality and authenticity of the 3D model, and realizes the complete process from natural language text description to high-quality 3D model feature extraction, significantly improving the efficiency and accuracy of 3D modeling, reducing modeling costs, and providing a more efficient and convenient 3D modeling solution for game development and other fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 It is a schematic diagram of the execution flow of the 3D modeling feature extraction method combined with natural language processing provided by an embodiment of the present invention.
[0012] Figure 2 Schematic diagram of exemplary hardware and software components of a 3D modeling feature extraction system combined with natural language processing provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0013] The present invention will be described in detail below with reference to the accompanying drawings. Figure 1 This is a flow chart of a 3D modeling feature extraction method combined with natural language processing provided by an embodiment of the present invention. The 3D modeling feature extraction method combined with natural language processing is introduced in detail below.
[0014] Taking the development process of open-world games as an example, 3D modeling can create realistic and immersive gaming environments for players. This example will detail a 3D modeling feature extraction method that combines natural language processing. This method can generate high-quality 3D model features using text description data. Each step is explained in detail below.
[0015] Step S110: Acquire text description data of the target object, wherein the text description data includes morphological attributes, spatial relationships, and surface features of the target object.
[0016] For example, in open-world game development, let's say the target object is a mysterious magic tower in a fantastical valley. The game planner, art team, and story writers will write a text description of the magic tower based on the game's overall world view, plot direction, and artistic style.
[0017] The description of the tower's morphological attributes details its appearance. For example, the tower's main body rises in a spiral, its top a pointed cone. The tower's body isn't a regular cylinder, but instead expands and contracts to varying degrees at different heights, creating a unique visual effect. Protruding balconies and observation towers, each of varying shapes and sizes, add a rich sense of depth to the tower.
[0018] In terms of spatial relationships, the text explains the Magic Tower's location within the valley. The Magic Tower is located slightly above the center of the valley, surrounded by small veins of magic crystals. There's a certain distance and angle between the Tower and the veins, which radiate along the valley's topography, echoing the Magic Tower. Furthermore, the Magic Tower also has specific spatial relationships with other elements in the surrounding environment, such as streams and trees. The stream meanders past the Tower, and the trees are scattered around the Tower in a staggered pattern.
[0019] Regarding surface features, the description details the tower's materials and textures. Its exterior is constructed from a mysterious purple crystal stone, which shimmers faintly and has an irregular, streamlined pattern, seemingly imbued with a mysterious magical power. The tower's windows are made of stained glass, intricately painted with magical runes, which refract a dazzling array of colors in the sunlight. The tower's gate is constructed from heavy metal, engraved with ancient magical patterns, creating a mysterious and solemn atmosphere.
[0020] Step S120: performing multi-level semantic parsing processing on the text description data to extract a set of key semantic features from the text description data, wherein the set of key semantic features includes a global semantic vector, a local semantic vector, and a dynamic context vector of the target object.
[0021] After obtaining the text description data of the magic tower, it is necessary to perform multi-level semantic analysis on it to extract a set of key semantic features that can accurately describe the characteristics of the magic tower.
[0022] Step S121: calling the dependency syntax analysis model to perform grammatical structure decomposition processing on the text description data, generating multiple semantic segment sets, wherein the semantic segment sets include subject-predicate structure, attributive-predicate structure and adverbial-predicate structure, and marking dependency relationship types and core predicates.
[0023] The dependency parser model is a natural language processing model based on deep learning. Trained on a large corpus, it accurately analyzes the syntactic relationships between words in a sentence. When Magic Tower's text description data is input, the dependency parser model meticulously decomposes the grammatical structure of each sentence.
[0024] For example, the model decomposes the sentence "The top of the magic tower shines with a mysterious light" into a subject-predicate structure. "The top of the magic tower" is the subject, with "magic tower" and "top" forming a attributive-predicate structure, with "magic tower" modifying "top"; "shining" is the predicate; "mysterious light" is the object, with "mysterious" and "light" also forming an attributive-predicate structure, with "mysterious" modifying "light." The dependency parsing model labels the dependency relationship type for this sentence, identifying "the top of the magic tower" and "shining" as a subject-predicate dependency relationship, and "the mysterious light" and "shining" as a verb-object dependency relationship, while also identifying "shining" as the core predicate.
[0025] For the entire text description data, the dependency syntactic analysis model performs such analysis sentence by sentence, breaking the text into a set of multiple semantic segments, each of which has a clear grammatical structure and dependency relationship annotations.
[0026] Step S122: performing context association analysis on each semantic segment to generate a dynamic semantic dependency graph between the semantic segments, wherein the dynamic semantic dependency graph includes spatial dependencies and attribute transfer paths between components of the target object.
[0027] After obtaining the set of semantic fragments, we need to further analyze the contextual associations between each semantic fragment to construct a dynamic semantic dependency graph. This dynamic semantic dependency graph can clearly show the spatial dependencies and attribute transfer paths between the various components of the magic tower.
[0028] First, each semantic fragment is numbered, such as F1, F2, F3, and so on. For example, F1 describes the main shape of the magic tower, F2 describes the decoration on the top of the magic tower, and F3 describes the positional relationship between the magic tower and the surrounding crystal veins. Through contextual analysis, we can find that there is a part-whole relationship between F1 and F2, as the top decoration is part of the main body of the magic tower. There is also a spatial relationship between F1 and F3, as the main body of the magic tower and the surrounding crystal veins have a specific location distribution.
[0029] When constructing a dynamic semantic dependency graph, nodes and edges are created based on these relationships. For example, for F1, F2, and F3, three nodes are created to represent each semantic fragment, and edges are then added based on the relationships between them. If F1 and F2 have a part-whole relationship, a directed edge is added from F1 to F2; if F1 and F3 have a spatial relationship, an undirected edge is added connecting F1 and F3. Edge weights are assigned based on the strength of the relationship; the closer the relationship, the greater the weight.
[0030] Furthermore, the dynamic semantic dependency graph also reflects the paths through which attributes are transferred. For example, if the main material of a magic tower affects the material of its roof decorations, a corresponding path in the graph will represent this attribute transfer relationship. In this way, the dynamic semantic dependency graph can fully reflect the complex relationships between the various semantic segments in a text description.
[0031] Step S123: Call the pre-trained language feature encoder to perform multi-granularity encoding processing on the semantic segment set to generate the global semantic vector, local semantic vector and dynamic context vector of the target object, wherein the global semantic vector represents the overall topological structure of the target object, the local semantic vector represents the relative position relationship of different components in the target object, and the dynamic context vector represents the temporal characteristics in the text description data.
[0032] The pre-trained language feature encoder is a powerful natural language processing tool. Pre-trained on large-scale text data, it can learn rich linguistic semantic information. When a set of semantic fragments from the Magic Tower is input, the encoder performs multi-granular encoding processing to generate different types of semantic vectors.
[0033] To generate the global semantic vector, the encoder comprehensively considers information from all semantic segments and extracts features that represent the Magic Tower's overall topological structure. The encoder analyzes semantic segments describing the Magic Tower's main shape and its overall layout relative to the surrounding environment. It captures information such as the Magic Tower's spiraling shape, its approximate position within the valley, and its overall spatial relationship to surrounding elements, encoding this information into the global semantic vector. The global semantic vector is a high-dimensional vector, with each dimension representing a specific topological feature. The combination of these dimensions fully describes the Magic Tower's overall topological structure.
[0034] The local semantic vector focuses on the relative positions of different components within the magic tower. The encoder encodes semantic fragments that describe the positional relationships between specific components. For example, for the tower's balconies and observation decks, the encoder analyzes information such as their connection locations to the tower, their distances from each other, and their angles, and encodes this information into the local semantic vector. A local semantic vector can be a collection of multiple vectors, each corresponding to a specific component or combination of components. These vectors accurately represent the relative positions of the various components within the magic tower.
[0035] The dynamic context vector is primarily used to represent temporal features in text description data. For example, a description of a magic tower might include information about its construction process and changes over time. The encoder captures these temporal descriptions and encodes them into the dynamic context vector. For example, if the text mentions that the magic tower was expanded at a certain time, the dynamic context vector will include feature information related to the time and scope of the expansion. The dynamic context vector can reflect the changes and development of the magic tower over time.
[0036] Step S124: construct an attention weight distribution matrix based on the dynamic semantic dependency graph, perform feature fusion processing on the global semantic vector, local semantic vector and dynamic context vector through the attention weight distribution matrix, and generate the key semantic feature set.
[0037] The dynamic semantic dependency graph shows the association between semantic segments. Based on this dynamic semantic dependency graph, an attention weight distribution matrix can be constructed. The purpose of this attention weight distribution matrix is to determine the importance of different semantic vectors in the feature fusion process.
[0038] When constructing the attention weight distribution matrix, the values of the matrix elements are determined based on the weights of the edges between nodes in the dynamic semantic dependency graph. Assume that the matrix is A, and the rows and columns of the matrix correspond to different semantic fragment numbers. If the semantic fragments Fi and Fj are connected by an edge in the dynamic semantic dependency graph, and the weight of the edge is wij, then the value of the matrix element Aij is assigned based on wij. At the same time, the type of semantic vector corresponding to the semantic fragment is also considered, such as the global semantic vector, the local semantic vector, and the dynamic context vector. Different initial weights are set for different types of semantic vectors to reflect their different importance in the overall features.
[0039] After obtaining the attention weight distribution matrix, the global semantic vector, local semantic vector, and dynamic context vector will be subjected to feature fusion processing. Specifically, each semantic vector will be multiplied by the corresponding attention weight, and then these weighted vectors will be spliced together. Assume that the global semantic vector is G, the local semantic vector is L, the dynamic context vector is D, and the attention weights are wG, wL, and wD respectively. First, the weighted vectors wG*G, wL*L, and wD*D are calculated, and then they are spliced together in the set order to obtain the fused vector. The fused vector is a set of key semantic features, which integrates multiple aspects of information such as the overall topological structure of the magic tower, the relative position relationship of the components, and the temporal characteristics.
[0040] Step S130: generating intermediate representation data based on the key semantic feature set, wherein the intermediate representation data includes geometric contour features, material distribution features, and illumination response features of the target object in an abstract space.
[0041] After obtaining a set of key semantic features, it is necessary to generate intermediate representation data based on these features. Intermediate representation data is an important bridge connecting semantic information and 3D models. It includes the geometric outline features, material distribution features, and lighting response features of the magic tower in abstract space.
[0042] Step S131: Mapping the key semantic feature set to a geometric generation space to generate basic geometric data of the target object, wherein the basic geometric data includes bounding box parameters, symmetry axis distribution information, and principal component analysis features.
[0043] The geometry generation space is an abstract space used to transform semantic information into geometric data. When a set of key semantic features is mapped to the geometry generation space, basic geometric data is generated based on the topological structure and positional relationships of the key semantic features.
[0044] To generate the bounding box parameters, we determine the smallest cube or cuboid that can completely enclose the magic tower based on its overall shape and size. The bounding box parameters include length, width, height, and position coordinates in the geometric generation space. By analyzing the overall size and position of the magic tower in the key semantic feature set, we can accurately calculate the bounding box parameters.
[0045] The determination of the distribution of symmetry axes is based on the geometric symmetry of the Magic Tower. The Magic Tower may possess certain rotational or mirror symmetry properties. By analyzing the information describing the Magic Tower's shape within the key semantic feature set, the position and direction of the Tower's symmetry axis can be determined. For example, if the Magic Tower rises in a spiral but exhibits mirror symmetry on a plane, the normal direction of that plane can be determined to be the direction of the symmetry axis.
[0046] The principal component analysis features are calculated to extract the key features of the Magic Tower's geometric shape. Principal component analysis is a data dimensionality reduction technique that analyzes the Magic Tower's geometric point cloud data (derived from a set of key semantic features) to identify the data's primary directions and variation patterns. These principal component features can reflect the Magic Tower's key shape characteristics, such as the changing trends in its height and width. Principal component analysis can reduce high-dimensional geometric data to a lower dimension, reducing data complexity while preserving important shape information.
[0047] Step S132: performing geometric detail expansion processing according to the basic geometric body data to generate a subdivision geometric feature set of the target object, wherein the subdivision geometric feature set includes surface subdivision level, edge sharpness parameters, hole distribution information and non-uniform rational B-spline control points.
[0048] After obtaining the basic geometric data, it is necessary to perform geometric detail expansion processing on it to generate a richer set of subdivided geometric features.
[0049] The goal of determining the tessellation level is to make the tower's surface smoother and more detailed. The required level of tessellation is determined based on the shape information in the underlying geometry data and the description of surface smoothness in the key semantic feature set. For the tower's circular top, a higher tessellation level might be required to make its surface more realistically circular. For the relatively flat tower body, a lower tessellation level can be used to reduce computational effort.
[0050] The edge sharpness parameter is set to control the sharpness of the Magic Tower's edges. Different architectural styles and design requirements may require different edge sharpness. The edge sharpness parameter is determined by analyzing the description of the Magic Tower's appearance in the key semantic feature set. If the description mentions sharp edges, a higher edge sharpness parameter can be set; if the description emphasizes rounded edges, a lower edge sharpness parameter can be set.
[0051] The hole distribution information is generated based on the magic tower's functionality and design requirements. A magic tower might have holes, such as windows and vents. By analyzing the hole descriptions in the key semantic feature set, the location, size, and shape of the holes are determined. For example, if the description mentions a magic tower with circular windows, a circular hole can be placed at the corresponding location, with its radius determined based on the description.
[0052] The control points of the non-uniform rational B-spline (NUBS) are determined to accurately describe the surface shape of the Magic Tower. NUBS is a commonly used method for representing curves and surfaces. By adjusting the position and weights of the control points, curves and surfaces of varying shapes can be generated. The control points of the NUBS are determined based on the description of the Magic Tower's surface shape from the underlying geometry data and a set of key semantic features. The position and weights of the control points affect the surface shape and curvature. By properly setting the control points, the generated surface can be made to more closely match the actual shape of the Magic Tower.
[0053] Step S133: performing parameterized surface coordinate extraction processing on the non-uniform rational B-spline control points in the subdivided geometric feature set to generate a material feature set bound to the parameterized surface coordinates, wherein the material feature set includes reflectivity parameters, roughness parameters, transparency parameters, and subsurface scattering parameters.
[0054] After obtaining the subdivided geometric feature set, it is necessary to perform parametric surface coordinate extraction processing on the non-uniform rational B-spline control points therein to generate a material feature set bound to the parametric surface coordinates.
[0055] Parametric surface coordinate extraction converts the surface described by non-uniform rational B-spline control points into a parametric coordinate system. By analyzing the mathematical models of non-uniform rational B-spline curves and surfaces, points on the surface can be represented as functions of parameters. For example, for a two-dimensional surface, the position of a point on the surface can be represented by two parameters, u and v. This method allows the surface of the magic tower to be parameterized, facilitating subsequent material feature binding.
[0056] The material feature set is generated based on the description of the magic tower's surface material in the key semantic feature set. The reflectivity parameter represents the material's ability to reflect light. This parameter is determined based on the glossiness of the crystal stones on the magic tower's exterior. If the description describes the crystal stone's surface as shimmering, a higher reflectivity parameter can be set; if the description describes the surface as dull, a lower reflectivity parameter can be set.
[0057] The roughness parameter reflects the roughness of the material's surface, affecting how light scatters on it. Determine the roughness parameter based on the texture and feel of the Magic Tower's surface as described in the description. If the description describes a noticeably grainy surface, set a higher roughness parameter; if the description describes a very smooth surface, set a lower roughness parameter.
[0058] The transparency parameter indicates the material's degree of transparency. For parts like the stained glass windows of the Magic Tower, the transparency parameter needs to be determined based on the description. If the description says the glass is translucent, then set a moderate transparency parameter; if the description says the glass is completely transparent, then set the transparency parameter to the maximum value.
[0059] Subsurface scattering parameters simulate the scattering effect of light within a material. For materials with internal structure, such as the crystals in a magic tower, subsurface scattering parameters need to be set. Determine the subsurface scattering parameters based on the light propagation within the crystals described. If the description mentions light scattering within the crystals, then set appropriate subsurface scattering parameters.
[0060] By binding these material features to the parametric surface coordinates, each surface point has corresponding material properties in the subsequent 3D modeling, thus accurately simulating the appearance of the magic tower.
[0061] Step S134: performing spatial alignment processing on the subdivided geometric feature set and the material feature set to generate intermediate geometric material fusion data of the target object.
[0062] After obtaining the subdivided geometric feature set and the material feature set, they need to be spatially aligned to generate intermediate geometric material fusion data.
[0063] The goal of spatial alignment is to ensure spatial correspondence between subdivision geometry and material features. Subdivision geometry describes the geometry of the Magic Tower, while material features describe the material properties of the Magic Tower's surface. Spatial alignment requires accurate mapping of material features to corresponding geometric surfaces.
[0064] First, each material attribute in the material feature set is associated with the corresponding surface point in the subdivided geometry feature set based on the parametric surface coordinates. For example, for a specific surface section of the magic tower, the corresponding material attributes, such as reflectivity and roughness, are found based on its parametric surface coordinates. These material attributes are then fused with the geometric information of that surface section to form a new data structure, the intermediate geometry-material fusion data.
[0065] During the fusion process, the geometry and material information are checked for consistency. If a surface point's geometry and material information are found to be inconsistent, such as when the position of the geometric surface is inconsistent with the binding position of the material attribute, adjustments and corrections are made. Through this spatial alignment and fusion process, the resulting intermediate geometry-material fusion data accurately describes the Magic Tower's geometry and surface material attributes.
[0066] Step S135: performing illumination response feature injection processing on the intermediate geometric material fusion data based on the dynamic context vector to generate the intermediate representation data containing dynamic illumination response.
[0067] The dynamic context vector contains the change and development information of the magic tower in the time dimension. Based on the dynamic context vector, the intermediate geometric material fusion data is injected with lighting response features to generate intermediate representation data containing dynamic lighting response.
[0068] The core of the illumination-responsive feature injection process is to simulate the lighting effects of the magic tower at different time points based on the temporal information in the dynamic context vector. The dynamic context vector may contain descriptions of the magic tower's lighting conditions in different seasons and time periods. For example, during sunny daytime, the magic tower will be illuminated by strong direct sunlight, while at night it will be primarily affected by moonlight and ambient light. The sun's angle and light intensity also vary across seasons, all of which affect the magic tower's lighting performance.
[0069] First, the dynamic context vector needs to be parsed to extract the time series information related to lighting. Assume that the dynamic context vector is Vc, which contains multiple time-related feature dimensions, such as timestamp T, season identifier S, and weather condition W. By analyzing these feature dimensions, the current lighting scenario can be determined. For example, if timestamp T corresponds to daytime, season identifier S is summer, and weather condition W is sunny, then the current lighting scenario can be determined to be a sunny daytime summer scene.
[0070] For different lighting scenarios, corresponding lighting models need to be defined. These models describe the interaction between light and the surface material of the magic tower, thereby calculating the lighting effects on the tower's surface. Common lighting models include diffuse reflection and specular reflection. In this embodiment, these lighting models are comprehensively considered to simulate the magic tower's lighting response.
[0071] In a sunny daytime scene in summer, the sun is the primary light source. Sunlight can be broken down into two components: direct light and scattered light. Direct light has a strong directionality, creating distinct highlights and shadows on the surface of the magic tower. Scattered light, on the other hand, is more evenly distributed throughout the surrounding environment, contributing to the overall brightness of the magic tower.
[0072] To calculate the impact of direct sunlight, the sun's position and direction must be determined. The sun's position can be calculated based on the timestamp T and the season identifier S. The sun's altitude and azimuth vary across Earth's seasons and times. Using astronomical models, the sun's position in the sky can be calculated based on the time and season, yielding the direction vector Ld of the sun's rays.
[0073] For each surface point P of the Magic Tower, we need to calculate the normal vector N at that point. The normal vector indicates the orientation of the surface point, and the angle between it and the sun's direction vector Ld affects the intensity of direct sunlight. A smaller angle increases the intensity, while a larger angle decreases the intensity. We can calculate the cosine of the angle using a vector dot product operation, thereby obtaining the intensity Id of direct sunlight at that surface point.
[0074] We also need to consider the reflective properties of the tower's surface material. The material feature set includes a reflectivity parameter, R, which varies with different materials. Reflectivity determines how much light a surface point reflects. By multiplying the direct light intensity, Id, by the reflectivity, R, we can calculate the direct light intensity, Ir, reflected by that surface point.
[0075] In addition to direct light, scattered light also affects the Magic Tower's lighting. The intensity of scattered light can be determined by weather conditions W. On sunny days, scattered light is relatively weak; on cloudy days, scattered light is relatively strong. Assuming the scattered light intensity is Is, it will evenly illuminate all points on the Magic Tower's surface.
[0076] By adding the reflected direct light intensity Ir and the scattered light intensity Is, we can get the total light intensity I of the surface point under the daytime lighting scene on a sunny summer day.
[0077] The sun's position and illumination intensity change with each season and time of day, so the sun's direction vector Ld and direct light intensity Id need to be recalculated. In winter, the sun's altitude is low, and the direct light intensity is relatively weak. At night, the sun disappears, and the main source of illumination is moonlight and ambient light.
[0078] Moonlight is relatively weak, and its direction can be determined by the position of the Moon. Ambient light includes lights around the Magic Tower and reflected light from other buildings. Both moonlight and ambient light can be considered as ambient light, and their intensity can be adjusted based on the scene settings.
[0079] When calculating the effect of ambient light, the reflective properties of the tower's surface material also need to be considered. Multiply the ambient light intensity by the reflectivity R to obtain the ambient light intensity Ie reflected at that point on the surface.
[0080] In a nighttime lighting scene, the total illumination intensity I at the surface point is equal to the reflected ambient light intensity Ie.
[0081] By parsing the dynamic context vector and simulating different lighting scenarios, the illumination response characteristics are injected into the intermediate geometry-material fusion data. Specifically, for each surface point in the intermediate geometry-material fusion data, the calculated total illumination intensity I is associated with the geometric and material information at that point. This allows the intermediate geometry-material fusion data to incorporate dynamic illumination response information, forming the final intermediate representation data.
[0082] Step S140: performing a three-dimensional topology reconstruction process according to the intermediate representation data to generate initial 3D model data of the target object.
[0083] After obtaining the intermediate representation data containing the dynamic lighting response, 3D topology reconstruction is required to generate the initial 3D model data of the magic tower. The purpose of 3D topology reconstruction is to convert the geometric, material, and lighting information in the intermediate representation data into a specific 3D model structure.
[0084] Step S141: extracting a vertex generation rule set and a face connection rule set from the intermediate representation data, wherein the vertex generation rule set includes vertex density control parameters, curvature constraints and dynamic weight distribution thresholds; and the face connection rule set includes face connection methods, face subdivision rules and boundary processing rules.
[0085] The intermediate representation data contains rich geometric information. By analyzing this information, we can extract a set of vertex generation rules and a set of face connection rules.
[0086] The vertex density control parameter in the vertex generation rule set controls the density of vertices generated on the surface of the magic tower. Different areas may require different vertex densities. For example, detailed areas of the magic tower, such as windows and decorations, require a higher vertex density to accurately represent their shape; while smoother areas can be appropriately reduced in vertex density to reduce data volume. The vertex density control parameter is determined based on the curvature information in the intermediate representation data. Areas with greater curvature correspond to higher vertex density, while areas with less curvature correspond to lower vertex density.
[0087] Curvature constraints ensure that the generated vertices accurately reflect the curvature of the tower's surface. When generating vertices, the curvature variation between adjacent vertices must be within a certain range to avoid overly sharp or smooth transitions. This curvature constraint is implemented by calculating the curvature difference between adjacent vertices and comparing it to a preset curvature threshold.
[0088] Dynamic weight distribution thresholds are used to adjust vertex distribution. Different parts of the magic tower may require different weightings for vertex generation. For example, key parts of the magic tower, such as the top and gate, can have their vertex generation weights increased to highlight their importance; whereas less important parts can have their vertex generation weights reduced. The dynamic weight distribution threshold can be determined based on importance information in the intermediate representation data.
[0089] The patch connection method in the patch connection rule set determines how the generated vertices are connected to form patches. Common patch connection methods include triangular patch connection, quadrilateral patch connection, etc. In this embodiment, the triangular patch connection method is adopted because triangular patches have good flexibility and versatility.
[0090] The patch subdivision rule controls the degree of subdivision of the patch. For some larger patches, subdivision may be necessary to improve model accuracy. The patch subdivision rule is determined based on the geometric complexity information in the intermediate representation data, with higher geometric complexity corresponding to a higher degree of subdivision.
[0091] Boundary processing rules are used to handle the boundaries of the magic tower surface. At the boundaries of the magic tower, it is necessary to ensure smooth transitions between meshes to avoid cracks or overlaps. Boundary processing rules can be determined based on boundary information in the intermediate representation, such as boundary shape and location.
[0092] Step S142: performing adaptive vertex sampling processing on the geometric contour feature according to the vertex generation rule set to generate a uniformly distributed vertex coordinate sequence, wherein the adaptive vertex sampling processing includes adjusting vertex sampling density according to the curvature change rate.
[0093] After extracting the vertex generation rule set, adaptive vertex sampling processing is performed on the geometric contour features in the intermediate representation data according to these rules.
[0094] The core of adaptive vertex sampling is adjusting vertex sampling density based on the curvature rate of change. The curvature rate of change reflects the speed of change in the surface curvature of the magic tower. Areas with a higher curvature rate of change indicate that the surface curvature changes rapidly, requiring more vertices to accurately represent its shape; areas with a lower curvature rate of change indicate that the surface curvature changes slowly, and the number of vertices can be appropriately reduced.
[0095] First, calculate the curvature of the geometric contour features. This can be obtained by calculating the angle between adjacent tangent lines or the second-order derivative. For each surface point on the magic tower, calculate its curvature value and record it.
[0096] Then, the vertex sampling density of each region is determined based on the vertex density control parameters and curvature constraints in the vertex generation rule set. For regions with a large curvature change rate, the vertex sampling density is increased; for regions with a small curvature change rate, the vertex sampling density is reduced.
[0097] During the sampling process, uniform sampling is used to generate a vertex coordinate sequence. Starting from the starting point of the geometric contour feature, sampling is performed at a set interval. The sampling interval is determined by the vertex sampling density of the current area. In areas with a large curvature change rate, the sampling interval is small; in areas with a small curvature change rate, the sampling interval is large.
[0098] Through this adaptive vertex sampling process, the generated vertex coordinate sequence can be evenly distributed on the surface of the magic tower and can accurately reflect the curvature changes of the magic tower surface.
[0099] Step S143: performing multi-resolution patch partitioning processing on the vertex coordinate sequence based on the patch connection rule set to generate an initial patch connection relationship of the target object, wherein the multi-resolution patch partitioning processing includes dynamically adjusting the patch subdivision level according to geometric complexity.
[0100] After generating the vertex coordinate sequence, these vertices are subjected to multi-resolution patch partitioning based on the patch connection rule set to generate the initial patch connection relationship of the magic tower.
[0101] The core of multi-resolution mesh partitioning is to dynamically adjust the mesh subdivision level based on geometric complexity. Areas with higher geometric complexity require higher mesh subdivision levels to accurately represent their shape; areas with lower geometric complexity can use lower mesh subdivision levels to reduce data volume.
[0102] First, according to the patch connection method in the patch connection rule set, the vertices in the vertex coordinate sequence are connected into an initial patch. In this embodiment, a triangle patch connection method is adopted to connect three adjacent vertices into a triangle patch.
[0103] Then, based on the geometric complexity information in the intermediate representation, the meshes in different regions are subdivided. For areas with high geometric complexity, such as the details of the magic tower, the subdivision level of the mesh is increased; for areas with low geometric complexity, such as the smoother parts of the tower, the subdivision level of the mesh is reduced.
[0104] During the subdivision process, a recursive subdivision method can be used. For each facet, it is divided into multiple smaller faces. The number of subdivisions is determined by the geometric complexity of the current area and the preset subdivision level.
[0105] Through this multi-resolution mesh division process, the generated initial mesh connection relationship can accurately reflect the geometric shape of the magic tower, and different mesh subdivision levels are used in different areas to achieve a balance between data volume and accuracy.
[0106] Step S144: performing texture coordinate intelligent allocation processing on the initial patch connection relationship according to the material distribution characteristics to generate initial texture data including UV mapping relationship.
[0107] After generating the initial patch connection relationship, texture coordinates are intelligently assigned to these patches according to the material distribution characteristics in the intermediate representation data to generate initial texture data including UV mapping relationships.
[0108] The material distribution characteristics describe the material properties of different parts of the magic tower surface, such as color, texture, etc. The purpose of the texture coordinate intelligent allocation processing is to accurately map the material texture to the surface of the magic tower.
[0109] First, you need to analyze the material texture to determine its size and resolution. Different material textures may have different sizes and resolutions, so you need to adjust them according to the actual situation.
[0110] Then, for each patch in the initial patch connection relationship, its corresponding texture coordinate is calculated based on its position and orientation on the magic tower surface. Texture coordinates are two-dimensional coordinates that represent a point on the material texture. When calculating texture coordinates, it is necessary to consider the shape, size, and position of the patch, as well as the size and resolution of the material texture.
[0111] Texture coordinates can be calculated using a parametric mapping method. For each patch, its vertex coordinates are mapped into a two-dimensional parameter space, and then the corresponding texture coordinates are calculated based on the coordinates in the parameter space. During the mapping process, the continuity and consistency of the texture coordinates must be ensured to avoid stretching or deformation of the texture.
[0112] Through this intelligent texture coordinate allocation process, the generated initial texture data contains the UV mapping relationship corresponding to each facet, which can accurately map the material texture onto the surface of the magic tower.
[0113] Step S145: performing topology structure verification and lighting parameter binding processing on the vertex coordinate sequence, initial facet connection relationship and initial texture data and the lighting response features in the intermediate representation data to generate the initial 3D model data.
[0114] After generating the vertex coordinate sequence, initial patch connection relationship and initial texture data, they need to be verified with the lighting response characteristics in the intermediate representation data for topological structure and lighting parameter binding to generate the initial 3D model data of the magic tower.
[0115] The purpose of topology verification is to ensure the correctness and integrity of the generated 3D model structure. This involves checking the consistency of vertex coordinate sequences, initial facet connectivity, and initial texture data to avoid issues such as duplicate vertices, overlapping, or missing faces. Topology verification can be performed by calculating vertex connectivity and facet adjacency.
[0116] Lighting parameter binding involves associating the lighting response characteristics in the intermediate representation with the vertex coordinate sequence, the initial patch connectivity, and the initial texture data. For each vertex and patch, the corresponding lighting parameters, such as light intensity and direction, are recorded. These lighting parameters are then used to calculate the lighting effect for each vertex and patch during the subsequent rendering process.
[0117] Through topology verification and lighting parameter binding, the vertex coordinate sequence, initial patch connectivity, initial texture data, and lighting response characteristics were integrated to generate the initial 3D model data of the magic tower. This initial 3D model data includes information such as the magic tower's geometric shape, material textures, and lighting effects.
[0118] Step S150: performing multi-stage optimization processing on the initial 3D model data to generate an optimized 3D model feature set, wherein the optimized 3D model feature set includes geometric smoothness features, texture continuity features, lighting rendering features, and physical collision features.
[0119] After obtaining the initial 3D model data for the magic tower, it was necessary to perform a multi-stage optimization process to improve the model's quality and performance. The optimization process included optimizing geometric smoothness, texture continuity, lighting rendering, and physical collision.
[0120] Step S151: performing curvature consistency analysis on the vertex coordinate sequence to generate a set of geometric smoothness constraint conditions.
[0121] A curvature consistency analysis is performed on the vertex coordinate sequence in the initial 3D model data to generate a set of geometric smoothness constraints. The purpose of the curvature consistency analysis is to ensure that the curvature changes of the Magic Tower surface are smooth, avoiding overly sharp or discontinuous curvature changes.
[0122] Step S1511: Calculate the local curvature information and normal vector direction of each vertex in the vertex coordinate sequence, wherein the local curvature information includes the normalized Gaussian curvature, mean curvature, and principal curvature direction.
[0123] Local curvature information can be obtained by calculating the surface curvature around a vertex. Common curvature metrics include Gaussian curvature, mean curvature, and principal curvature. To facilitate subsequent processing and comparison, the calculated Gaussian curvature and mean curvature are normalized. The normal vector direction indicates the orientation of the surface where the vertex is located and can be obtained by calculating the normal vector of the facets around the vertex.
[0124] When calculating local curvature information, the neighborhood around a vertex needs to be considered. You can choose either the first-order or second-order neighborhood of a vertex as the calculation range, adjusting the range based on actual conditions. For each vertex, calculate the curvature value within the neighborhood and record the normalized Gaussian curvature, mean curvature, and principal curvature directions.
[0125] Step S1512: constructing a multi-scale curvature consistency loss function based on the local curvature information, wherein the multi-scale curvature consistency loss function includes a short-range curvature smoothing constraint and a long-range curvature change constraint based on geometric scale adaptation.
[0126] The multi-scale curvature consistency loss function measures the consistency of curvature changes around a vertex. The short-range curvature smoothness constraint ensures that the curvature changes between adjacent vertices are smooth, avoiding local sharp changes. The long-range curvature change constraint ensures that the curvature changes are continuous over a large range, avoiding global discontinuous changes.
[0127] Step S1513: constructing a normal vector smoothing constraint condition based on the normal vector direction, wherein the normal vector smoothing constraint condition includes limiting the angle between the normal vectors of adjacent vertices and optimizing the normal vector propagation path.
[0128] The consistency of normal vectors is measured by calculating the angle between adjacent vertex normal vectors and setting a threshold for this angle. When the angle between adjacent vertex normal vectors exceeds the threshold, adjustments are made. Furthermore, to ensure continuous and smooth propagation of normal vectors across the entire model surface, the normal propagation path must be optimized. Specifically, the normal propagation path can be rationally planned based on vertex distribution and normal vector trends to avoid issues such as sudden changes in normal vectors that could affect model lighting and visual quality.
[0129] Step S1514: Dynamically weight the multi-scale curvature consistency loss function and the normal vector smoothness constraint condition to generate a set of geometric smoothness constraint conditions.
[0130] The purpose of dynamic weight fusion is to adjust the weights of the multi-scale curvature consistency loss function and the normal vector smoothness constraint according to different situations. In areas with large curvature variations, the weight of the multi-scale curvature consistency loss function can be increased; in areas with large normal vector variations, the weight of the normal vector smoothness constraint can be increased. By dynamically adjusting the weights, the generated set of geometric smoothness constraints can more effectively guide the optimization of vertex positions, achieving a smooth transition of curvature on the surface of the magic tower and a continuous distribution of normal vectors.
[0131] Step S152: performing vertex position iterative optimization processing on the vertex coordinate sequence according to the set of geometric smoothness constraints to generate optimized vertex distribution data.
[0132] After generating a set of geometric smoothness constraints, the vertex coordinate sequence is iteratively optimized for vertex positions according to these constraints to generate optimized vertex distribution data.
[0133] Step S1521: Initialize a vertex position optimization weight matrix, where the vertex position optimization weight matrix includes a curvature sensitivity parameter, a local density weight, and a position adjustment step threshold for each vertex.
[0134] The curvature sensitivity parameter is used to measure the sensitivity of vertices to curvature changes. Vertices with larger curvature changes correspond to higher curvature sensitivity parameters. The local density weight is used to adjust the distribution density of vertices in local areas. Areas with larger local density correspond to higher local density weights. The position adjustment step threshold is used to control the maximum distance of each vertex adjustment to avoid model deformation caused by excessive vertex adjustment.
[0135] Step S1522: generating a vertex position gradient direction set based on a set of geometric smoothness constraints, wherein the gradient direction set includes a curvature driving direction, a normal vector alignment direction, and a density equalization direction.
[0136] The curvature-driven direction refers to the movement of vertices along the direction with the smallest curvature change to reduce the discontinuity of curvature change; the normal alignment direction refers to the movement of vertices along the direction with consistent normal vectors to ensure that the normal vector directions of adjacent vertices are consistent; the density balance direction refers to the movement of vertices along the direction of local density balance to adjust the distribution density of vertices in the local area.
[0137] Step S1523: performing vertex coordinate multi-objective optimization processing according to the vertex position gradient direction set and the vertex position optimization weight matrix to generate a candidate vertex distribution data set.
[0138] In each iteration, a new vertex position is calculated based on its current position and a set of gradient directions. The new position is calculated by adding the current vertex position to the gradient direction and multiplying it by the position adjustment step threshold. At the same time, a weight matrix is optimized based on the vertex position to weight the different gradient directions to balance the relationships between different objectives.
[0139] After performing multi-objective optimization of vertex coordinates based on the vertex position gradient direction set and the vertex position optimization weight matrix, a series of new vertex distribution data will be obtained. These new vertex distribution data generated in each iteration constitute the candidate vertex distribution dataset.
[0140] Specifically, at each iteration, the new vertex position is calculated based on the vertex's current position, a set of gradient directions (including the curvature-driven direction, normal alignment direction, and density-balanced direction), and a position adjustment step threshold. Because different vertices experience different position adjustments under the influence of different gradient directions, each iteration produces a new set of vertex distributions. After multiple iterations, the vertex distribution data generated from these different iterations is combined to form a candidate vertex distribution dataset.
[0141] For example, in the first iteration, vertex A moves from position P1 to position P2, vertex B moves from position Q1 to position Q2, and so on. The new positions of all vertices constitute the vertex distribution data for this iteration. The second iteration will generate a new set of vertex distribution data. The data sets generated by these multiple iterations are the candidate vertex distribution data sets.
[0142] Step S1524: performing topological structure consistency verification processing on the candidate vertex distribution data sets, and screening vertex distribution data that meets the curvature constraint and the patch connection integrity.
[0143] The curvature constraint here means that the curvature change between adjacent vertices should be within a certain reasonable range to avoid sudden changes in curvature. This can be determined by comparing parameters such as the normalized Gaussian curvature and mean curvature of adjacent vertices. Metric connectivity integrity refers to the fact that the meshes in the model are tightly connected, free of cracks and overlaps, and have a reasonable topological structure. Topological structure verification can be performed by calculating vertex connectivity and mesh adjacency. If a vertex distribution data set in the candidate vertex distribution dataset does not meet the curvature constraint or mesh connectivity integrity requirements, it will be excluded.
[0144] Step S1525: Record the vertex movement trajectory and constraint satisfaction status during the iterative optimization process to generate vertex optimization history data.
[0145] In each iteration, the vertex movement trajectory and constraint satisfaction status are recorded for subsequent analysis and adjustment. If a vertex movement trajectory is found to be too large or the constraint satisfaction status is poor, for example, a vertex fails to meet the curvature constraint in multiple iterations or causes problems with patch connectivity, the vertex position optimization weight matrix or the number of iterations can be appropriately adjusted.
[0146] That is, the data generated by recording the vertex movement trajectory and constraint satisfaction status during the iterative optimization process is the vertex optimization history data.
[0147] The vertex movement trajectory records the position changes of each vertex in each iteration. For example, vertex C moves from its initial position to a new position in the first iteration, and then moves from this new position to another position in the second iteration. These position changes are recorded as part of the vertex movement trajectory.
[0148] The constraint satisfaction status records whether each vertex satisfies the relevant constraints in the set of geometric smoothness constraints in each iteration, such as whether the curvature constraint (the curvature change between adjacent vertices is within a reasonable range) and the normal vector smoothness constraint (the angle between the normal vectors of adjacent vertices is within the limit and the normal vector propagation path is reasonable) are satisfied.
[0149] The combined records of vertex movement trajectories and constraint satisfaction status form vertex optimization history data. This data is crucial for subsequent analysis of the effectiveness of the vertex optimization process and whether optimization parameters (such as the vertex position optimization weight matrix and number of iterations) need to be adjusted. For example, if a vertex's movement trajectory is too large or fails to meet constraints in multiple iterations, the vertex position optimization weight matrix or the number of iterations can be adjusted based on the vertex optimization history data to ensure that the final vertex distribution data better meets the optimization requirements.
[0150] Step S1526: generating final optimized vertex distribution data according to vertex optimization history data and topology structure consistency verification processing results.
[0151] After the iteration is completed, based on the recorded vertex optimization history data and the topological structure consistency verification processing results, the vertex distribution data that meets the constraints and has the correct topological structure is selected as the final optimized vertex distribution data.
[0152] Step S153: performing edge continuity detection processing on the initial patch connection relationship to generate a patch connection optimization rule set.
[0153] After obtaining the initial facet connectivity relationships in the initial 3D model data, edge continuity detection is performed to generate a set of facet connectivity optimization rules. The purpose of edge continuity detection is to ensure that the connections between adjacent facets are smooth and continuous, avoiding obvious cracks or discontinuous edges, thereby improving the visual quality of the model.
[0154] First, extract the spatial coordinates and connected patch identifiers of all edge segments in the initial patch connectivity. Each edge segment is defined by the spatial coordinates of its two endpoints, and the identifiers of the two patches connected to it are recorded. By traversing all patches in the initial patch connectivity, all edge segments are found and their spatial coordinates and connected patch identifiers are stored in corresponding sets.
[0155] Next, based on the spatial coordinate set and the connected patch identifier set, the angle deviation parameters, length difference parameters, and curvature matching parameters between adjacent edge segments are calculated. For each adjacent edge segment, the included angle is calculated to obtain the angle deviation parameter. The angle deviation parameter reflects the degree of directional difference between adjacent edge segments. A larger angle deviation indicates a more significant directional difference between adjacent edge segments.
[0156] The length difference parameter refers to the difference in length between adjacent edge segments. It is calculated by calculating the lengths of adjacent edge segments and then taking their difference. The length difference parameter reflects the degree of length difference between adjacent edge segments. A larger length difference indicates a more significant length difference between adjacent edge segments.
[0157] The curvature matching parameter is used to measure the degree of curvature similarity between adjacent edge segments. This parameter can be obtained by calculating the curvature of adjacent edge segments and comparing their curvature values. A higher curvature matching parameter indicates a more similar curvature between adjacent edge segments.
[0158] Then, a dynamically adjusted multi-dimensional edge continuity score is constructed based on the angle deviation parameter, length difference parameter, and curvature matching parameter, combined with the target object's geometric scale factor. The geometric scale factor is used to take into account the overall size and scale of the target object. Different sized targets may have different requirements for edge continuity.
[0159] The multi-dimensional edge continuity score includes a geometric continuity index and a visual smoothness index. The geometric continuity index primarily considers the angular deviation and length difference between adjacent edge segments. The smaller the angular deviation and length difference, the higher the geometric continuity index. The visual smoothness index primarily considers the curvature matching between adjacent edge segments. The higher the curvature matching, the higher the visual smoothness index.
[0160] The geometric continuity index and the visual smoothness index are weighted together to obtain a multi-dimensional edge continuity score. The weight setting can be adjusted according to the specific application scenario and requirements. For example, in scenarios with high visual requirements, the weight of the visual smoothness index can be appropriately increased.
[0161] Based on a dynamically adjusted multidimensional edge continuity score, edge segments are prioritized and classified to generate a set of critical, non-critical, and retained edges that are tailored to the target object's geometric scale. Edge segments with high multidimensional edge continuity scores are classified as critical, indicating good connectivity and requiring priority merging to improve the model's overall continuity.
[0162] For edge segments with low multidimensional edge continuity scores but still suitable for merging, they are divided into non-critical merging edge sets. These edge segments can be merged as needed in subsequent processing. For edge segments with extremely low multidimensional edge continuity scores or not suitable for merging, they are divided into retained edge sets. These edge segments need to be retained to ensure the geometric integrity of the model.
[0163] Finally, a set of patch connection optimization rules is generated based on the key merging edge set. The rule set includes a merge angle threshold, a length tolerance range, and a curvature matching threshold. The merge angle threshold is used to limit the maximum angular deviation when merging adjacent edge segments. Only when the angular deviation of adjacent edge segments is less than this threshold can the merge be allowed.
[0164] The length tolerance range is used to limit the length difference when merging adjacent edge segments. When the length difference of adjacent edge segments is within this tolerance range, merging is allowed. The curvature matching threshold is used to limit the curvature difference when merging adjacent edge segments. When the curvature matching degree of adjacent edge segments is higher than this threshold, merging is allowed.
[0165] Step S154: performing adaptive patch merging processing on the initial patch connection relationship based on the patch connection optimization rule set to generate an optimized patch topology structure.
[0166] After generating a set of mesh connection optimization rules, adaptive mesh merging is performed on the initial mesh connection relationships based on these rules to generate an optimized mesh topology. The purpose of adaptive mesh merging is to reduce the number of meshes in the model and improve model performance while ensuring that the model's geometry and visual effects are not affected.
[0167] First, edge segment pairs that meet the merging criteria are selected from the set of key merging edges. These merging criteria include an angle deviation less than a dynamically adjusted threshold, a length difference within a tolerance, and a curvature match greater than a set lower limit. The dynamically adjusted threshold is adjusted based on the geometric scale of the target object and the actual situation to ensure the rationality of the merging operation.
[0168] For edge segment pairs that meet the merge criteria, patch topology reconstruction is performed to generate the new patch connectivity relationships after the merge. This topology reconstruction process includes vertex index remapping, patch normal updates, and texture coordinate adjustments. During vertex index remapping, the two endpoints of the merged edge segment are merged into a single vertex, and the vertex indices of all patches associated with this vertex are updated.
[0169] Updating patch normals means recalculating the patch normals based on the merged patch shape to ensure the correctness of the lighting effect. Texture coordinate adjustment means recalculating the patch texture coordinates based on the merged patch shape and position to ensure the continuity of texture mapping.
[0170] After retopology is complete, verify the geometric integrity of the new mesh connections. Ensure that the merged meshes are free of overlap, holes, or non-manifold edges. This can be done by checking the vertex coordinates, adjacency, and topology of the meshes.
[0171] If verification fails, it indicates that the merge operation may have caused problems with the model's geometric structure. Reverse topology repair is required for the merge operation that failed verification to generate an alternative mesh connection scheme. Reverse topology repair can solve the problem by restoring the pre-merge mesh connection relationship or using other reasonable connection methods.
[0172] Finally, the patch identifiers, vertex indices, and texture coordinate references in the initial patch connection relationships are updated to generate the optimized patch topology. During the update process, ensure that all patch identifiers, vertex indices, and texture coordinate references are correct and consistent to ensure the correctness and integrity of the optimized patch topology.
[0173] Step S155: performing texture seam elimination processing on the initial texture data to generate continuously distributed texture mapping data.
[0174] The initial texture data may have texture seams, where the textures of adjacent patches are discontinuous at the seams, resulting in noticeable cracks or color differences. To address this issue, the initial texture data needs to be processed to eliminate the texture seams and generate continuously distributed texture mapping data.
[0175] For example, first, the texture seam locations and seam width parameters are detected in the initial texture data. By analyzing the texture coordinates and color values of adjacent patches, areas with significant color differences can be identified, thereby determining the locations of texture seams. The seam width parameter indicates the width range of the texture seam and is used in subsequent texture processing.
[0176] Based on the texture seam position and seam width parameters, a separate set of texture coordinate offset vectors is generated for the diffuse channel, normal channel, and specular channel. The diffuse channel, normal channel, and specular channel are different channels in the texture data, used to represent the object's color, surface normal, and specular reflection effect, respectively.
[0177] A set of texture coordinate offset vectors is used to align texture seams between adjacent patches and maintain spatial consistency across channels. For each texture seam, an appropriate texture coordinate offset vector is calculated based on the seam width parameter and the texture coordinates of the adjacent patches. The magnitude and direction of the offset vector are adjusted based on the specific texture seam to ensure a smooth transition between the textures of adjacent patches at the seam.
[0178] Channel-by-channel texture blending is performed on the initial texture data based on the texture coordinate offset vector set. Channel-by-channel texture blending involves blending the diffuse, normal, and specular channels separately. Within each channel, textures from adjacent patches are weighted according to the texture coordinate offset vector set.
[0179] The weights of weighted blending are adjusted based on the location and width of the texture seams. At the center of the seams, the weights gradually transition, allowing the textures of adjacent patches to blend smoothly. Through the channel-by-channel texture blending process, smooth transitions and visually coherent texture mapping data are generated.
[0180] Anisotropic filtering is performed on texture mapping data. Anisotropic filtering can improve the display quality of textures at different viewing angles, reducing blur and distortion. Anisotropic filtering applies a filtering operation to the texture based on its orientation and viewing angle, ensuring that texture details are clearly displayed regardless of orientation.
[0181] The processed texture data is then remapped to the patch topology using UV coordinates. This recalculation of the texture data's UV coordinates is done based on the optimized patch topology, ensuring the texture is correctly mapped onto the patch. This process generates continuously distributed texture mapping data, resolving any seams in the initial texture data and improving the model's visual quality.
[0182] Step S156: Based on the illumination response characteristics, dynamic illumination direction calibration processing is performed on the vertex normal vectors in the optimized vertex distribution data to generate vertex-level illumination intensity weight distribution data.
[0183] The illumination response features contain information about the illumination effects of the target object under different lighting conditions. Based on these features, the vertex normal vectors in the optimized vertex distribution data are dynamically calibrated to generate vertex-level illumination intensity weight distribution data.
[0184] First, the current lighting direction information is extracted from the lighting response features. Lighting direction information represents the incident direction of light, which affects the lighting intensity of the vertex. Based on this lighting direction information, the normal vector of each vertex in the optimized vertex distribution data is analyzed.
[0185] The vertex normal vector represents the orientation of the surface on which the vertex is located. The angle between the normal vector and the light direction affects the light intensity of the vertex. The smaller the angle, the greater the light intensity received by the vertex; the larger the angle, the smaller the light intensity received by the vertex.
[0186] For each vertex, calculate the angle between its normal vector and the lighting direction. Based on the angle, determine the vertex's lighting intensity weight. The range of the lighting intensity weight can be adjusted based on the specific lighting model and requirements. Generally speaking, the smaller the angle, the greater the lighting intensity weight.
[0187] When calculating light intensity weights, you also need to consider light attenuation. Light gradually attenuates as it propagates, so the farther a vertex is from the light source, the less light it receives. Light intensity weights can be modified based on the vertex's distance from the light source.
[0188] By dynamically calibrating the normal vector of each vertex to achieve the desired illumination direction, vertex-level illumination intensity weight distribution data is generated, which contains the illumination intensity weight information of each vertex.
[0189] Step S157: performing illumination attenuation calculation according to the vertex-level illumination intensity weight distribution data and the dynamic illumination response parameters in the intermediate representation data to generate a patch-level illumination response feature.
[0190] After obtaining the vertex-level illumination intensity weight distribution data, the illumination attenuation calculation is performed in combination with the dynamic illumination response parameters in the intermediate representation data to generate the patch-level illumination response features.
[0191] Dynamic lighting response parameters include information such as the lighting attenuation pattern and lighting color. Light attenuation describes how light intensity changes with distance. Common lighting attenuation patterns include linear attenuation and quadratic attenuation.
[0192] For each patch, the average light intensity weight of the patch is calculated based on the light intensity weight distribution data of its vertices. The average light intensity weight can be obtained by weighted averaging the light intensity weights of the vertices of the patch, and the weight can be set according to the importance of the vertex in the patch.
[0193] The light intensity of the patch under the current lighting conditions is calculated based on the average light intensity weight and the light attenuation law in the dynamic light response parameters. During the calculation process, factors such as the distance between the patch and the light source and the light propagation path are taken into account to ensure that the calculated light intensity accurately reflects the actual lighting effect.
[0194] In addition to light intensity, the color of the light also needs to be considered. The dynamic light response parameters include light color information. Based on the light intensity and light color of the patch, the light color value of the patch is calculated. The light color value can be obtained by multiplying the light intensity and light color.
[0195] By performing light attenuation calculation on each patch, a patch-level light response feature is generated, which contains the light intensity and light color information of each patch.
[0196] Step S158: Based on the optimized vertex distribution data and patch topology structure, a rigid body collision volume calculation process is performed to generate collision body mesh data and mass distribution parameters of the target object.
[0197] In open-world games, collision detection between objects is crucial. Based on optimized vertex distribution data and patch topology, rigid body collision volume calculations are performed to generate the target object's collision mesh data and mass distribution parameters.
[0198] First, a simplified geometric model of the target object is constructed based on the optimized vertex distribution data and patch topology. The simplified geometric model can take the form of a bounding box or convex hull, which can be used to quickly determine whether collisions between objects are likely.
[0199] For simplified geometric models in the form of bounding boxes, the smallest cube or cuboid that can completely enclose the target object can be calculated based on the coordinate range of the vertices. For simplified geometric models in the form of convex hulls, the convex hull of the vertices can be calculated to obtain a convex polygon or polyhedron as the simplified geometric shape of the target object.
[0200] Based on the simplified geometric model, a rigid body collision volume calculation is performed. Based on the shape and size of the simplified geometric model, the collision volume mesh data for the target object is calculated. The collision volume mesh data can be a triangular mesh or other form to accurately represent the collision volume of the target object.
[0201] When calculating the collision mesh data, the geometry and physical properties of the target object must be considered. Complex geometries can be converted into simple triangle meshes using subdivision or merging. Furthermore, the mass distribution parameters of the target object are calculated based on its material and density.
[0202] The mass distribution parameter represents the distribution of the target object's mass in space, which affects the object's collision response and motion behavior. It can be obtained by integrating the target object's volume and density.
[0203] By performing rigid body collision volume calculation processing, the collision body mesh data and mass distribution parameters of the target object are generated, which provides an important foundation for collision detection and physics simulation in the game, ensuring that the collision behavior between objects complies with the laws of physics.
[0204] Step S159: Perform attribute association processing on the optimized vertex distribution data, optimized patch topology structure, continuously distributed texture mapping data, patch-level lighting response characteristics and collision body mesh data to generate the optimized 3D model feature set including geometric smoothness features, texture continuity features, lighting rendering features and physical collision features.
[0205] After completing the multi-stage optimization process of the initial 3D model data, it is necessary to perform attribute association processing on the optimized data to generate an optimized 3D model feature set.
[0206] First, the optimized vertex distribution data is associated with the optimized patch topology. The optimized vertex distribution data determines the location of the model's vertices, while the optimized patch topology determines the connections between the vertices. By associating these two pieces of data, a complete 3D model geometry can be obtained.
[0207] Next, the continuously distributed texture mapping data is associated with the optimized patch topology. The texture mapping data determines the texture information of the model surface. By associating it with the patch topology, the texture can be correctly mapped to the model surface, achieving a continuous texture display.
[0208] The patch-level lighting response features are then associated with the optimized vertex distribution data and patch topology. The lighting response features determine how the model will light under different lighting conditions. By associating them with the vertex distribution data and patch topology, the lighting effect of the model can be accurately calculated during rendering.
[0209] Finally, the collision volume mesh data and mass distribution parameters are associated with the entire 3D model. The collision volume mesh data and mass distribution parameters determine the collision volume and physical properties of the model. By associating them with the model, accurate collision detection and physics simulation can be achieved in the game.
[0210] By performing attribute association processing on optimized vertex distribution data, optimized patch topology, continuously distributed texture mapping data, patch-level lighting response features, and collision body mesh data, an optimized 3D model feature set is generated, which includes geometric smoothness features, texture continuity features, lighting rendering features, and physical collision features. It comprehensively describes the geometric shape, texture, lighting, and physical properties of the target object, providing high-quality model data for 3D modeling in open world games.
[0211] Figure 2 A schematic diagram illustrates exemplary hardware and software components of a 3D modeling feature extraction system 100 combined with natural language processing, which can implement the concepts of the present application, as provided in some embodiments of the present application. For example, a processor 120 can be used in the 3D modeling feature extraction system 100 combined with natural language processing to perform the functions described in the present application.
[0212] The 3D modeling feature extraction system 100 combined with natural language processing can be a general-purpose server or a special-purpose server, both of which can be used to implement the 3D modeling feature extraction method combined with natural language processing of this application. Although only one server is shown in this application, for convenience, the functions described in this application can be implemented in a distributed manner on multiple similar platforms to balance the processing load.
[0213] For example, the 3D modeling feature extraction system 100 combined with natural language processing may include a network port 110 connected to a network, one or more processors 120 for executing program instructions, a communication bus 130, and storage media 140 in different forms, such as a disk, ROM, or RAM, or any combination thereof. Exemplarily, the 3D modeling feature extraction system 100 combined with natural language processing may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present application can be implemented according to these program instructions. The 3D modeling feature extraction system 100 combined with natural language processing also includes an I / O interface 150 between the computer and other input and output devices.
[0214] For ease of explanation, only one processor is described in the 3D modeling feature extraction system 100 combined with natural language processing. However, it should be noted that the 3D modeling feature extraction system 100 combined with natural language processing in the present application may also include multiple processors, so the steps performed by one processor described in the present application may also be performed jointly or individually by multiple processors. For example, if the processor of the 3D modeling feature extraction system 100 combined with natural language processing performs step A and step B, it should be understood that step A and step B may also be performed jointly by two different processors or performed individually in one processor. For example, the first processor performs step A, the second processor performs step B, or the first processor and the second processor perform steps A and B together.
[0215] In addition, an embodiment of the present invention further provides a readable storage medium, in which computer-executable instructions are preset. When a processor executes the computer-executable instructions, the 3D modeling feature extraction method combined with natural language processing as described above is implemented.
[0216] It should be noted that in order to simplify the description of the present invention and thus help understand one or more embodiments of the invention, in the foregoing description of the embodiments of the present invention, multiple features are sometimes combined into one embodiment, figure or description thereof.
Claims
1. A 3D modeling feature extraction method combined with natural language processing, characterized in that: The method comprises: Acquire text description data of a target object, wherein the text description data includes morphological attributes, spatial relationships, and surface features of the target object; Performing multi-level semantic parsing on the text description data to extract a set of key semantic features from the text description data, wherein the set of key semantic features includes a global semantic vector, a local semantic vector, and a dynamic context vector of the target object; generating intermediate representation data based on the key semantic feature set, wherein the intermediate representation data includes geometric contour features, material distribution features, and illumination response features of the target object in an abstract space; Performing a three-dimensional topology reconstruction process according to the intermediate representation data to generate initial 3D model data of the target object; Performing a multi-stage optimization process on the initial 3D model data to generate an optimized 3D model feature set, wherein the optimized 3D model feature set includes a geometric smoothness feature, a texture continuity feature, a lighting rendering feature, and a physical collision feature; The performing multi-level semantic parsing processing on the text description data to extract a set of key semantic features in the text description data includes: Calling a dependency syntax analysis model to perform grammatical structure decomposition processing on the text description data to generate a plurality of semantic segment sets, wherein the semantic segment sets include a subject-predicate structure, an attributive-predicate structure, and an adverbial-predicate structure, and annotating dependency relationship types and core predicates; Performing contextual analysis on each semantic segment to generate a dynamic semantic dependency graph between the semantic segments, wherein the dynamic semantic dependency graph includes spatial dependencies and attribute transfer paths between components of the target object; Calling a pre-trained language feature encoder to perform multi-granularity encoding processing on the semantic segment set to generate a global semantic vector, a local semantic vector, and a dynamic context vector of the target object, wherein the global semantic vector represents the overall topological structure of the target object, the local semantic vector represents the relative positional relationship of different components in the target object, and the dynamic context vector represents the temporal features in the text description data; An attention weight distribution matrix is constructed based on the dynamic semantic dependency graph, and feature fusion processing is performed on the global semantic vector, local semantic vector and dynamic context vector through the attention weight distribution matrix to generate the key semantic feature set.
2. The 3D modeling feature extraction method combined with natural language processing according to claim 1, characterized in that: Generating intermediate representation data based on the key semantic feature set includes: Mapping the key semantic feature set to a geometric generation space to generate basic geometric data of the target object, wherein the basic geometric data includes bounding box parameters, symmetry axis distribution information, and principal component analysis features; Performing geometric detail expansion processing on the basic geometric body data to generate a subdivision geometric feature set of the target object, wherein the subdivision geometric feature set includes a surface subdivision level, an edge sharpness parameter, hole distribution information, and non-uniform rational B-spline control points; performing parameterized surface coordinate extraction processing on the non-uniform rational B-spline control points in the subdivided geometric feature set to generate a material feature set bound to the parameterized surface coordinates, the material feature set including a reflectivity parameter, a roughness parameter, a transparency parameter, and a subsurface scattering parameter; Performing spatial alignment processing on the subdivided geometric feature set and the material feature set to generate intermediate geometric material fusion data of the target object; Performing illumination response feature injection processing on the intermediate geometric material fusion data based on the dynamic context vector to generate the intermediate representation data containing dynamic illumination response.
3. The 3D modeling feature extraction method combined with natural language processing according to claim 1, characterized in that: The performing of three-dimensional topology reconstruction processing according to the intermediate representation data to generate initial 3D model data of the target object includes: Extracting a vertex generation rule set and a face connection rule set from the intermediate representation data, wherein the vertex generation rule set includes a vertex density control parameter, a curvature constraint condition, and a dynamic weight distribution threshold; Performing adaptive vertex sampling processing on the geometric contour feature according to the vertex generation rule set to generate a uniformly distributed vertex coordinate sequence, the adaptive vertex sampling processing including adjusting vertex sampling density according to a curvature change rate; performing a multi-resolution patch partitioning process on the vertex coordinate sequence based on the patch connection rule set to generate an initial patch connection relationship of the target object, wherein the multi-resolution patch partitioning process includes dynamically adjusting the patch subdivision level according to geometric complexity; Performing texture coordinate intelligent allocation processing on the initial patch connection relationship according to the material distribution characteristics to generate initial texture data including UV mapping relationship; The vertex coordinate sequence, the initial patch connection relationship and the initial texture data are subjected to topological structure verification and lighting parameter binding processing with the lighting response features in the intermediate representation data to generate the initial 3D model data.
4. The 3D modeling feature extraction method combined with natural language processing according to claim 3, characterized in that: The performing of multi-stage optimization processing on the initial 3D model data to generate an optimized 3D model feature set includes: Performing curvature consistency analysis on the vertex coordinate sequence to generate a set of geometric smoothness constraint conditions; performing iterative vertex position optimization processing on the vertex coordinate sequence according to the set of geometric smoothness constraints to generate optimized vertex distribution data; Performing edge continuity detection processing on the initial patch connection relationship to generate a patch connection optimization rule set; Performing adaptive patch merging processing on the initial patch connection relationship based on the patch connection optimization rule set to generate an optimized patch topology structure; Performing texture seam elimination processing on the initial texture data to generate continuously distributed texture mapping data; Based on the illumination response characteristics, performing dynamic illumination direction calibration processing on vertex normal vectors in the optimized vertex distribution data to generate vertex-level illumination intensity weight distribution data; Performing illumination attenuation calculation based on the vertex-level illumination intensity weight distribution data and the dynamic illumination response parameters in the intermediate representation data to generate a patch-level illumination response feature; Based on the optimized vertex distribution data and patch topology structure, a rigid body collision volume calculation process is performed to generate collision body mesh data and mass distribution parameters of the target object; The optimized vertex distribution data, optimized patch topology structure, continuously distributed texture mapping data, patch-level lighting response characteristics and collision body mesh data are attribute-associated to generate the optimized 3D model feature set including geometric smoothness features, texture continuity features, lighting rendering features and physical collision features.
5. The 3D modeling feature extraction method combined with natural language processing according to claim 4, characterized in that: The performing curvature consistency analysis on the vertex coordinate sequence to generate a set of geometric smoothness constraint conditions includes: Calculating local curvature information and a normal vector direction of each vertex in the vertex coordinate sequence, wherein the local curvature information includes normalized Gaussian curvature, mean curvature, and principal curvature direction; Constructing a multi-scale curvature consistency loss function based on the local curvature information, wherein the multi-scale curvature consistency loss function includes a short-range curvature smoothing constraint and a long-range curvature change constraint based on geometric scale adaptation; Constructing a normal vector smoothing constraint condition based on the normal vector direction, wherein the normal vector smoothing constraint condition includes limiting the angle between the normal vectors of adjacent vertices and optimizing the normal vector propagation path; The multi-scale curvature consistency loss function and the normal vector smoothness constraint condition are dynamically weighted fused to generate the geometric smoothness constraint condition set.
6. The 3D modeling feature extraction method combined with natural language processing according to claim 4, characterized in that: The performing iterative optimization of vertex positions on the vertex coordinate sequence according to the set of geometric smoothness constraints to generate optimized vertex distribution data includes: Initializing a vertex position optimization weight matrix, wherein the vertex position optimization weight matrix includes a curvature sensitivity parameter, a local density weight, and a position adjustment step threshold for each vertex; generating a vertex position gradient direction set based on the geometric smoothness constraint set, wherein the gradient direction set includes a curvature driving direction, a normal vector alignment direction, and a density equalization direction; Performing vertex coordinate multi-objective optimization processing according to the vertex position gradient direction set and the vertex position optimization weight matrix to generate a candidate vertex distribution data set; Performing topological structure consistency verification on the candidate vertex distribution data set to screen vertex distribution data that meets curvature constraints and facet connectivity integrity; Record the vertex movement trajectory and constraint satisfaction status during the iterative optimization process to generate vertex optimization history data; The final optimized vertex distribution data is generated according to the vertex optimization history data and the topology structure consistency verification processing result.
7. The 3D modeling feature extraction method combined with natural language processing according to claim 4, characterized in that: The performing edge continuity detection processing on the patch connection relationship to generate a patch connection optimization rule set includes: Extracting a spatial coordinate set of all edge line segments in the facet connection relationship and a connection facet identifier set; Calculating an angle deviation parameter, a length difference parameter, and a curvature matching parameter between adjacent edge segments according to the spatial coordinate set and the connection patch identifier set; According to the angle deviation parameter, the length difference parameter and the curvature matching parameter, combined with the geometric scale factor of the target object, a dynamically adjusted multi-dimensional edge continuity score is constructed, wherein the multi-dimensional edge continuity score includes a geometric continuity index and a visual smoothness index; performing priority classification processing on the edge segments based on the dynamically adjusted multi-dimensional edge continuity score to generate a critical merged edge set, a non-critical merged edge set, and a retained edge set adapted to the geometric scale of the target object; A patch connection optimization rule set is generated according to the key merging edge set, wherein the rule set includes a merging angle threshold, a length tolerance range, and a curvature matching threshold.
8. The 3D modeling feature extraction method combined with natural language processing according to claim 7, characterized in that: The performing adaptive patch merging processing on the patch connection relationship based on the patch connection optimization rule set to generate an optimized patch topology structure includes: Selecting edge line segment pairs that meet merging conditions from the key merging edge set, the merging conditions including that the angle deviation is less than a dynamic adjustment threshold, the length difference is within a tolerance range, and the curvature matching degree is higher than a set lower limit; Performing patch topology reconstruction processing on the selected edge segment pairs to generate a new patch connection relationship after merging, wherein the topology reconstruction processing includes vertex index remapping, patch normal vector update and texture coordinate adjustment; Verify the geometric integrity of the connection relationship of the new facets to ensure that the merged facets have no overlapping areas, holes or non-manifold edges; Perform reverse topology repair on merge operations that fail verification to generate alternative patch connection schemes; The patch identifiers, vertex indices, and texture coordinate references in the patch connection relationship are updated to generate an optimized patch topology structure.
9. A 3D modeling feature extraction system combined with natural language processing, characterized in that: It includes a processor and a memory, the memory is connected to the processor, the memory is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the memory to implement the 3D modeling feature extraction method combined with natural language processing as described in any one of claims 1 to 8.
Citation Information
Patent Citations
News scene three-dimensional reconstruction and visualization method based on multi-source remote sensing data
CN119904592A
Three-dimensional model intelligent generation method and system based on natural language
CN120147551A