Structure generation method and apparatus
Patent Information
- Application Number
- CN202610921933.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-24
- Publication Date
- 2026-09-22
AI Technical Summary
[0003]然而,上述方式在局部采样控制、真实几何厚度输出及跨模型复用方面存在不足
[0009]本公开其中一实施例提供一种结构生成方法,包括:获取输入的三维网格模型,并对三维网格模型执行预处理,得到目标模型;基于目标模型的表面曲率信息,构建密度场;根据密度场对目标模型执行自适应重网格处理,得到重网格模型;对重网格模型执行拓扑对偶变换,得到对偶网格模型;基于对偶网格模型表面各区域的曲率特征,从对偶网格模型中确定目标区域,并对目标区域执行选择性外推处理,生成表面结构。这样,通过基于目标模型表面曲率信息构建密度场并执行自适应重网格处理,可根据局部形态特征调节采样分布,有助于减少冗余网格数据带来的处理负荷;经拓扑对偶变换形成非规则单元边界后,可得到趋于自然弯折的路径拓扑基础;再基于曲率特征从对偶网格中确定目标区域并执行选择性外推,有助于将厚度生成操作集中在形态变化显著的区域,降低无意义凸起及自相交风险,从而减少后续几何修正的计算开销;综合上述处理,可在模型表面生成具备真实厚度与清晰拓扑边界的几何结构,提升程序化建模的处理效率。
Smart Images

Figure CN122799042A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more particularly to structure generation methods, apparatus, computer-readable storage media, and electronic devices. Background Technology
[0002] In 3D digital content production, it is often necessary to generate irregular path structures on the model surface that mimic natural forms to simulate organic details such as coral, cracks, or erosion marks. Related technologies typically employ methods such as manual drawing, texture replacement, noise perturbation, or uniform subdivision to construct decorative textures or path boundaries on the model surface.
[0003] However, the above methods have shortcomings in terms of local sampling control, realistic geometric thickness output, and cross-model reuse. Uniform subdivision makes it difficult to dynamically adjust vertex sampling density according to surface morphology, and it is prone to generating redundant mesh data in flat areas, increasing the processor's geometric computation load and memory usage. Texture replacement methods mostly remain at the level of visual height changes, and if realistic geometric structures are needed later, additional reconstruction is still required, increasing the process overhead of data processing. In addition, when performing geometric extrapolation directly in complex curved surface areas, self-intersection or interpenetration is prone to occur, requiring additional detection and correction calculations, which reduces the overall processing efficiency of the modeling pipeline. Summary of the Invention
[0004] This disclosure provides a structure generation method, apparatus, computer-readable storage medium, and electronic device to at least partially solve the aforementioned problems existing in the related art.
[0005] According to one aspect of this disclosure, a structure generation method is provided, the method comprising: acquiring an input three-dimensional mesh model and performing preprocessing on the three-dimensional mesh model to obtain a target model; constructing a density field based on the surface curvature information of the target model; performing adaptive remeshing processing on the target model according to the density field to obtain a remeshed model; performing a topological dual transformation on the remeshed model to obtain a dual mesh model; determining a target region from the dual mesh model based on the curvature characteristics of each region on the surface of the dual mesh model, and performing selective extrapolation processing on the target region to generate a surface structure.
[0006] According to one aspect of this disclosure, a structure generation apparatus is provided, comprising: an acquisition module for acquiring an input three-dimensional mesh model and performing preprocessing on the three-dimensional mesh model to obtain a target model; a construction module for constructing a density field based on the surface curvature information of the target model; a remeshing module for performing adaptive remeshing processing on the target model according to the density field to obtain a remeshing model; a transformation module for performing topological dual transformation on the remeshing model to obtain a dual mesh model; and a generation module for determining a target region from the dual mesh model based on the curvature characteristics of each region on the surface of the dual mesh model and performing selective extrapolation processing on the target region to generate a surface structure.
[0007] According to one aspect of this disclosure, a computer-readable storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements any of the above-described structure generation methods.
[0008] According to one aspect of this disclosure, an electronic device is provided, comprising: a processor and a memory; the memory for storing a computer program; and the processor for executing the computer program stored in the memory to cause the electronic device to perform any of the above-described structure generation methods.
[0009] One embodiment of this disclosure provides a structure generation method, comprising: acquiring an input three-dimensional mesh model and performing preprocessing on the three-dimensional mesh model to obtain a target model; constructing a density field based on the surface curvature information of the target model; performing adaptive remeshing processing on the target model according to the density field to obtain a remeshed model; performing topological dual transformation on the remeshed model to obtain a dual mesh model; determining a target region from the dual mesh model based on the curvature characteristics of each region on the surface of the dual mesh model, and performing selective extrapolation processing on the target region to generate a surface structure. In this way, by constructing a density field based on the surface curvature information of the target model and performing adaptive remeshing, the sampling distribution can be adjusted according to local morphological features, which helps to reduce the processing load caused by redundant mesh data. After forming irregular cell boundaries through topological dual transformation, a path topology basis that tends to be naturally curved can be obtained. Then, based on the curvature features, the target region is determined from the dual mesh and selective extrapolation is performed, which helps to concentrate the thickness generation operation in the region with significant morphological changes, reduce the risk of meaningless protrusions and self-intersections, and thus reduce the computational cost of subsequent geometric correction. By combining the above processing, a geometric structure with real thickness and clear topological boundaries can be generated on the model surface, improving the processing efficiency of procedural modeling. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A schematic diagram of a system architecture is shown in one exemplary embodiment of this disclosure; Figure 2 A flowchart illustrating a method in one exemplary embodiment of this disclosure is shown; Figure 3 A schematic diagram of a target model is shown in one exemplary embodiment of this disclosure; Figure 4 This diagram illustrates a re-grid and smoothing iteration process in one exemplary embodiment of the present disclosure; Figure 5 A schematic diagram of a remesh model is shown in one exemplary embodiment of this disclosure; Figure 6 A schematic diagram of a dual mesh model is shown in one exemplary embodiment of this disclosure; Figure 7 A schematic diagram showing a vertex curvature value in one exemplary embodiment of this disclosure is shown; Figure 8 A schematic diagram of a vertex-level separation operation is shown in one exemplary embodiment of this disclosure; Figure 9 This diagram illustrates a target surface group according to one exemplary embodiment of the present disclosure; Figure 10 A schematic diagram of a final model is shown in one exemplary embodiment of this disclosure; Figure 11 This diagram illustrates an apparatus configuration in one exemplary embodiment of the present disclosure. Figure 12 A schematic diagram of the structure of an electronic device is shown in one exemplary embodiment of the present disclosure. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0013] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0014] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise expressly specified.
[0015] It should be noted that the information (including but not limited to: user input information, such as information entered by the user into an input box), data (including but not limited to data used for analysis, stored data, and displayed data, such as context code, all code of the current project, service pressure corresponding to operations performed on all code of the current project, and code development status of the current project), and signals involved in the embodiments of this disclosure are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with relevant laws, regulations, and standards. For example, the context code, operations performed on all code of the current project, and the service pressure and code development status involved in the operations in the embodiments of this disclosure are all obtained under full authorization.
[0016] According to one embodiment of the structure generation method of this disclosure, such as Figure 2 As shown, the method may include: Step S210: Obtain the input 3D mesh model and perform preprocessing on the 3D mesh model to obtain the target model; Step S220: Construct a density field based on the surface curvature information of the target model; Step S230: Perform adaptive regrinding on the target model based on the density field to obtain a regrinding model; Step S240: Perform a topological dual transformation on the heavy mesh model to obtain the dual mesh model; Step S250: Based on the curvature characteristics of each region on the surface of the dual mesh model, the target region is determined from the dual mesh model, and selective extrapolation is performed on the target region to generate the surface structure.
[0017] According to one embodiment of this disclosure, by constructing a density field based on the surface curvature information of the target model and performing adaptive remeshing, the sampling distribution can be adjusted according to local morphological features, which helps to reduce the processing load caused by redundant mesh data. After forming irregular cell boundaries through topological dual transformation, a path topology basis that tends to be naturally curved can be obtained. Then, based on the curvature features, the target region is determined from the dual mesh and selective extrapolation is performed, which helps to concentrate the thickness generation operation in the region with significant morphological changes, reduce the risk of meaningless protrusions and self-intersections, and thus reduce the computational cost of subsequent geometric correction. In summary, the above processing can generate a geometric structure with real thickness and clear topological boundaries on the model surface, improving the processing efficiency of procedural modeling.
[0018] The embodiments of this disclosure will now be further described.
[0019] In step S210, the input 3D mesh model is obtained, and preprocessing is performed on the 3D mesh model to obtain the target model. In this way, the scale difference and surface noise in the input model are eliminated through preprocessing, providing a topologically clean and scale-uniform mesh foundation for subsequent curvature calculation and path generation, thereby improving the adaptability and stability of the entire generation process to models from different sources.
[0020] In one implementation, the system first loads a rock surface model acquired by a 3D scanning device as a 3D mesh model. The original size of the model is arbitrary and the surface has small noise. The system then performs preprocessing on the model, scaling it to a standard size according to the preset bounding box diagonal length, and performing three rounds of Laplacian smoothing on the surface vertices to eliminate scanning noise, finally obtaining a topologically closed and normal continuous target model.
[0021] Optionally, the 3D mesh model can include scanned models, sculpted models, basic geometry, or industrial shells, which are converted into a target model with uniform scale and complete topology after preprocessing. Optionally, the 3D mesh model serves as the starting data source for this generation process, and its specific model source and file format can be flexibly selected according to actual production needs. For example, the 3D mesh model can be a scanned model of a real object obtained through a 3D scanner, a high-precision sculpted model handcrafted by artists in digital sculpting software, or a basic geometry, character equipment, natural object, or industrial product shell used in game or film scenes. 3D mesh models from different sources may have significant differences in initial scale, mesh density, and topological quality. Therefore, preprocessing is necessary to unify the scale and correct potential normal discontinuities or holes, ensuring that subsequent curvature calculations and noise deformation steps have a stable and reliable input basis, avoiding path generation failures or abnormal results due to inconsistent quality of the original model.
[0022] Optional preprocessing includes scale normalization, base smoothing, or normal repair to eliminate input discrepancies and provide a topologically stable mesh base.
[0023] Optionally, the sub-operations in the preprocessing step can be dynamically combined and their parameters adjusted according to the actual quality of the input 3D mesh model and the accuracy requirements of subsequent path generation. Considering that models from different sources often have objective problems such as inconsistent scales, surface noise, or topological defects, scale normalization is used to scale the model bounding box to a preset range, allowing the same set of generated parameters to be reused across models; basic smoothing or resampling is used to reduce the interference of local noise on curvature estimation; normal repair and boundary closure are used to handle discontinuous normals and surface holes, thereby significantly improving the stability of subsequent curvature calculations. In actual implementation, the above sub-steps can be executed sequentially in a fixed order, or some operations can be selectively enabled based on the model diagnostic results; this disclosure does not limit this.
[0024] In an optional implementation, preprocessing is performed on the 3D mesh model, including: performing scale normalization on the 3D mesh model to obtain a standardized 3D mesh model; performing surface deformation on the standardized 3D mesh model to obtain a deformed model; and performing remeshing and smoothing iteration on the deformed model to obtain the target model. Thus, by sequentially performing scale normalization, surface deformation, and multiple rounds of remeshing and smoothing iteration on the input model, not only can processing deviations caused by size differences and surface noise be eliminated, but also controllable organic undulations can be formed, thereby providing high-quality basic geometry for subsequent curvature estimation and adaptive remeshing.
[0025] In one example, after acquiring the 3D mesh model to be processed, the system first reads the minimum and maximum corner points of its bounding box, calculates the normalized scaling factor to make the model fall within a preset size range, and performs center alignment and proportional scaling on the vertex positions to obtain a standardized 3D mesh model. Subsequently, based on a preset noise generation function and control parameters, the vertices of the standardized model are displaced along their normal directions to produce controllable surface undulations, resulting in a deformed model. Next, the deformed model undergoes a first round of remeshing processing with an initial edge length threshold set. After smoothing out local sharp features, at least one more round of subsequent remeshing processing with a smaller target edge length is performed to gradually densify the mesh, ultimately obtaining a target model that meets the requirements of subsequent curvature calculations, such as... Figure 3 The diagram shows a target model.
[0026] Optionally, scale normalization is used to unify the input model to a preset scale range, eliminating processing parameter deviations caused by size differences. Optionally, scale normalization can map the bounding box size of the input model to a preset target scale range. Specifically, the system records the minimum and maximum corner points of the model's bounding box, calculates the ratio of the current maximum size to the target size as a scaling factor, and performs proportional scaling on each vertex relative to the center of the bounding box. Considering that scanned or sculpted models from different sources often have original sizes with orders of magnitude differences, the above normalization operation can avoid significant deviations in subsequent parameters such as noise amplitude, remesh edge length, and extrapolation distance due to inconsistent model sizes. It should be noted that the normalization process does not limit the specific bounding box calculation method; both axis-aligned bounding boxes and directional bounding boxes can be used, and this disclosure does not impose any limitations on this.
[0027] Optionally, surface deformation processing drives vertex displacement along the normal direction through a noise function, introducing natural undulations to the surface and enhancing the organic feel of path generation. Optionally, surface deformation processing uses a spatial noise function to perturb the vertex positions of the normalized model. In one implementation, for a vertex position, the system superimposes a displacement vector calculated by the noise function according to its normal direction, where the noise sampling coordinates are determined by frequency scaling and offset translation of the vertex world coordinates, and the displacement intensity is controlled by an amplitude parameter. To avoid mesh distortion caused by tangential stretching, the displacement direction is typically executed along the vertex normal direction. Considering different visual style requirements, the noise basis function can be unit noise with blocky characteristics or continuous gradient noise with a sense of flow. Furthermore, deformation processing can also combine the noise result with local curvature or masking properties to locally modulate the undulation intensity of specific regions, thereby forming more obvious wrinkles or erosion marks in high curvature regions. It should be noted that the above description of the noise basis function and modulation method is only an example. In actual implementation, other forms of noise and displacement strategies can be selected based on experience or specific application conditions, and this disclosure is not limited to this.
[0028] Optionally, the remeshing and smoothing iterative process reduces the edge length in each round to increase density, forming a preprocessed surface suitable for curvature calculation while preserving undulations. Optionally, the remeshing and smoothing iterative process employs a multi-round progressive strategy to perform topology optimization on the deformation model. Specifically, the first round of remeshing reconstructs the surface with a larger initial edge length threshold, forming relatively uniformly distributed triangular units, followed by smoothing to eliminate local sharp features introduced by noise deformation; based on this, at least one subsequent round of remeshing is performed, with the target edge length of subsequent rounds being smaller than that of the previous round. Considering that progressive refinement can better preserve the organic undulation details generated by previous steps, directly remeshing with extremely small edge lengths in a single round can easily over-homogenize surface features and increase unnecessary computation. It should be noted that the edge length reduction ratio between rounds can be dynamically adjusted according to the complexity of the model; for example, the local density can be appropriately increased for high curvature regions. This disclosure does not limit the specific edge length sequence.
[0029] In an optional implementation, surface deformation processing is performed on the standardized 3D mesh model, including: obtaining a preset noise generation function and control parameters; and, based on the noise generation function and control parameters, performing displacement operations on the vertices of the standardized 3D mesh model along the normal direction to obtain a deformed model. In this way, driving the vertices to displace along the normal direction through the noise generation function not only quickly forms a natural undulating shape on the model surface but also provides a geometrically organic and random basis for subsequent curvature calculations and adaptive remeshing.
[0030] Optionally, the noise generation function is used to generate continuous or discrete random scalar values based on the vertex spatial coordinates to drive the surface vertices to produce displacement along the normal direction.
[0031] Optionally, the noise generation function can be Perlin Flow (a type of flowing noise), Chebyshev Cellular (a type of cellular noise), or other noise basis functions with spatial continuity. In one implementation, the input to the function is the scaled and translated spatial coordinates of the vertex position, and the output is a normalized or range-limited scalar value, which is then multiplied by the amplitude term in the control parameters to determine the final displacement distance. It should be noted that the types of noise generation functions are not limited to the two mentioned above; other composite noises with continuous smoothness or domain warping can also be used. Different basis functions produce different texture features. For example, Perlin Flow tends to form smooth, flowing, vein-like undulations, while Chebyshev Cellular tends to produce a clear, segmented structure similar to a cell wall. Users can select or combine these functions according to the style requirements of the target biomimetic form to obtain differentiated surface undulation patterns.
[0032] Optionally, considering that using only a single frequency of noise might result in an overly simplistic scale of surface undulations, as a possible implementation, the aforementioned noise generation function can also be composed of multiple noise layers with different frequencies and amplitudes, where each noise layer corresponds to a different spatial frequency and amplitude weight. For example, a low-frequency, large-amplitude noise layer can control the overall undulation trend, while a high-frequency, small-amplitude noise layer can be used to superimpose local surface roughness. Furthermore, the superposition of these multiple noise layers can not only be linear addition, but also multiplicative mixing, maximum value fusion, or nonlinear mixing after mapping curve adjustment. In this way, the noise components of different frequencies can form richer and more layered natural forms on the model surface after superposition, effectively avoiding the repetitiveness and mechanical appearance caused by a single noise pattern, and making the final generated biomimetic path have a high degree of organic realism in both macroscopic contours and microscopic details.
[0033] Optionally, control parameters are used to adjust the intensity, spatial frequency, and phase offset of the noise generation function to reproduce suitable surface undulation effects on different models. Optionally, these control parameters may include, but are not limited to, displacement amplitude, noise element size, spatial offset, and the density response curve control parameter gamma. The displacement amplitude determines the maximum distance a single vertex can move in the normal direction; the noise element size reflects the reciprocal of the noise frequency and affects the density of the undulation texture; and the spatial offset is used to move the noise sampling coordinates in three-dimensional space to avoid identical deformation patterns across different models. It should be noted that the specific values of these parameters can be flexibly set according to the bounding box size of the input model, the expected scale of the target biomimetic structure, and the artistic style requirements. For example, when generating large-scale undulations similar to brain gyri, a larger amplitude and lower frequency can be set, while when generating fine textures similar to mycelium or coral surfaces, a smaller amplitude and higher frequency are suitable. By independently adjusting these control parameters, users can obtain a variety of differentiated surface deformation effects, from gentle waves to sharp wrinkles, while maintaining the same noise generation function.
[0034] Optionally, the displacement operation along the normal direction aims to offset each vertex along its local normal vector, thereby creating surface undulations while maintaining the original patch connectivity.
[0035] Optionally, the aforementioned displacement operation along the normal direction can be implemented as follows: For each vertex on the standardized 3D mesh model, the system first obtains the unit normal vector of that vertex and a displacement scalar value determined by the noise generation function and control parameters. Then, the scalar value is multiplied by the unit normal vector to obtain a 3D displacement vector, which is then added to the vertex's original coordinates to obtain updated position coordinates. Considering that displacement along the tangential or random directions can easily damage the original topological quality of the mesh and cause facet stretching, compression, or even flipping, the displacement strategy along the normal direction can maximize the shape stability and topological connectivity of local facets, making the undulations primarily manifest as increases or decreases in surface thickness rather than in-plane distortion. Furthermore, the aforementioned displacement operation can be not only an outward bulge along the positive normal direction, but also an inward depression along the negative normal direction, or a mixture of positive and negative displacements applied to different vertices to simultaneously form bulges and grooves. In this way, the model surface can produce organic undulations similar to natural erosion or biological growth without changing the connectivity relationships.
[0036] In an optional implementation, the deformation model undergoes remeshing and smoothing iterations, including: performing a first round of remeshing with the target edge length set to an initial edge length threshold; performing smoothing on the result of the first round of remeshing; and performing at least one subsequent round of remeshing, where the target edge length of the subsequent remeshing is smaller than the target edge length of the previous round. Thus, through multiple rounds of remeshing and smoothing iterations with decreasing edge lengths, not only can the organic undulations of the deformed surface maintain continuity during the gradual refinement process, but it can also effectively suppress local topological distortions caused by a single remeshing, balancing mesh quality and natural morphology.
[0037] In one specific approach, when performing multiple rounds of remeshing and smoothing on the deformed model after noise displacement, the first round of remeshing is performed with an initial edge length threshold (e.g., 0.1 model units) to form uniformly distributed triangular elements on the surface. Then, smoothing is applied to this result to eliminate local sharp features caused by noise displacement. Based on this, the target edge length for subsequent rounds is set to decreasing values such as 0.05, 0.025, etc., and remeshing and smoothing are performed round by round to gradually increase the mesh density. In each round, the target edge length is smaller than the previous round, and the smoothing intensity is adaptively adjusted according to the degree of surface oscillation. Through this iterative process, the deformed model retains its natural undulating morphological features and obtains a fine and uniform topological structure to support subsequent curvature calculations; for example... Figure 4 The diagram shows a regrinding and smoothing iteration process.
[0038] Optionally, the initial side length threshold is used to control the sampling density of the first round of remeshing, and is dynamically determined based on the macroscopic scale of the deformation model. Optionally, the initial side length threshold can be a value determined based on the proportion of the diagonal length of the bounding box of the deformation model, or it can be an absolute length value directly input by the user. It should be noted that the magnitude of the initial side length threshold directly affects the average size of the triangular elements after the first round of remeshing. If the initial side length threshold is set too large, the organic undulations generated by subsequent noise deformation may be over-homogenized in the coarse mesh; conversely, if the initial side length threshold is too small, the first round will produce an overly fine mesh, which not only increases the computational cost of subsequent iterations but may also lead to unwanted topological fragmentation due to high-frequency noise sampling. To avoid this negative result, as a possible implementation, the initial side length threshold can be set between 1 / 50 and 1 / 20 of the maximum side length of the model bounding box, so that the first round of remeshing provides a topological basis for subsequent side length reduction processing while preserving the macroscopic morphology.
[0039] Optionally, the target edge length is progressively reduced in each round of remeshing to gradually increase the mesh density, allowing the surface topology to transition from coarse to fine. Optionally, the reduction ratio of the target edge length in subsequent remeshing rounds relative to the previous round can be fixed (e.g., 50% of the previous round's length per round) or non-linearly decreasing (e.g., 40% reduction in the first round, 30% reduction in subsequent rounds). It should be noted that the above description of the reduction ratio is merely one example, and this disclosure does not intend to limit the form of the reduction pattern. In actual implementation, it can be adaptively adjusted according to the local curvature distribution or noise frequency characteristics of the deformation model. Furthermore, inserting a smoothing process after remeshing can, on the one hand, eliminate local jagged edges caused by mesh refinement, and on the other hand, make the vertex distribution more uniform, thus providing a good foundation for the next round of remeshing with a smaller target edge length. In other words, the alternating iteration of edge length reduction and smoothing processing achieves a dynamic balance between mesh quality and geometric feature preservation.
[0040] Optionally, the iterative remeshing and smoothing process gradually optimizes the mesh quality and surface continuity of the deformation model by alternately performing topology reconstruction and geometric smoothing. Optionally, the iterative remeshing and smoothing process can include, but is not limited to, two, three, or more rounds of alternating execution. In each round, remeshing is used to reorganize the local topology and unify the edge length distribution, while smoothing is used to relax vertex positions and suppress high-frequency oscillations. Considering that a single remeshing may inherit or amplify the geometric irregularities introduced during the deformation stage, as a possible implementation, the smoothing intensity in the above iterative process can be finely adjusted round by round. For example, a stronger smoothing is used in the first round to eliminate sharp abrupt changes caused by noise displacement, while a weaker smoothing is used in the last round to retain subtle fluctuations. Furthermore, the number of iterations for remeshing and smoothing is not limited by a fixed value; it can be explicitly specified by the user or the termination condition can be automatically determined based on the convergence of the changes in mesh vertex positions after two consecutive rounds of processing. For example, the iterative process can end when the average vertex displacement is less than a preset tolerance after two consecutive rounds of iteration.
[0041] In step S220, a density field is constructed based on the surface curvature information of the target model. This allows for dynamic adjustment of the local mesh sampling density according to the model's surface curvature, enabling finer mesh resolution in high-curvature regions and effectively improving the structural accuracy and local controllability of subsequent path generation steps.
[0042] In one implementation, after completing surface preprocessing, the system enters the density field construction stage. Specifically, the processor traverses each geometric element on the target model surface, estimating the local curvature value of each element using the neighborhood normal angle or second-order position difference; subsequently, the obtained curvature values are mapped to the target edge length range according to a preset mapping interval to obtain the density attribute value corresponding to each region; finally, the density attribute values are written into the scalar attribute field of the corresponding vertex, forming a density field that is continuously or discretely distributed on the model surface. Optionally, surface curvature information is used to describe the degree of curvature of each local region of the target model, which can serve as the input basis for constructing the density field.
[0043] Optionally, considering that the undulation of different regions on the model surface directly affects the density distribution of subsequent path structures, as a possible implementation, the aforementioned surface curvature information can be estimated using methods such as the neighborhood normal angle or second-order position difference. The neighborhood normal angle method reflects local concavity / convexity changes by calculating the angular deviation between the normal vectors of adjacent surface elements; the second-order position difference method quantifies the degree of curvature by analyzing the position gradient changes of vertices and their neighboring points in space. It should be noted that the above description of curvature estimation methods is merely an example; in actual implementation, other differential geometry methods can also be used to obtain surface curvature information, and this disclosure is not limited to this. Furthermore, to improve numerical stability, the obtained curvature information can also be processed by local neighborhood averaging or threshold truncation to avoid abnormal jump values caused by residual noise on the input model surface interfering with the density field construction.
[0044] Optionally, the density field is a scalar property field defined at the vertices of the target model surface, used to drive the local sampling density distribution of subsequent adaptive remeshing.
[0045] Optionally, one objective of this embodiment is to establish a density field associated with surface curvature, enabling the mesh sampling density to adaptively match the local morphological features of the model, thereby balancing computational resource consumption and geometric representation accuracy. As a possible implementation, the density field can be an attribute density field, with its scalar values stored in the attribute fields of each vertex. The numerical values correspond to the target edge length or sampling density in the remeshing stage. High-density scalar regions correspond to shorter edge lengths and denser sampling point distributions, while low-density scalar regions retain a sparser mesh structure. Besides curvature-driven approaches, the density attribute values can also be locally modulated using distance information from weighted masking regions or preset reference points, further expanding the artistic control over path density in specific regions. It should be noted that the above description of the density field mapping relationship is merely an example; in actual implementation, it can be dynamically adjusted based on experience or specific application conditions, and this disclosure is not limited thereto.
[0046] In an optional implementation, a density field is constructed based on the surface curvature information of the target model, including: calculating the local curvature values of each region of the target model; mapping the local curvature values to a preset target edge length range to obtain density attribute values; and writing the density attribute values into the scalar attribute field of the corresponding vertex of the target model. In this way, by mapping surface curvature to density attribute values and storing them in the vertex scalar field, not only can subsequent adaptive remeshing automatically refine sampling in geometrically complex regions, but the path distribution density can also naturally transition with surface undulations.
[0047] In one implementation, the aforementioned density field can be constructed based on the preprocessed surface geometry of the target model. Specifically, the system first traverses each surface region of the target model and calculates the local curvature value for each facet or vertex neighborhood. This calculation can be performed using the angle between the normals of adjacent faces or second-order position differences. Subsequently, the obtained curvature values are nonlinearly mapped according to a preset target edge length range. For example, a remapping formula with response curve control parameters is used to convert the curvature interval into a density target edge length interval, thereby obtaining density attribute values. Finally, the system writes these density attribute values as scalar data into the attribute fields of the corresponding vertices of the target model for subsequent remeshing stages to read and drive the sampling density distribution. It should be noted that the face-level calculation results of the aforementioned local curvature values can be averaged or interpolated to the vertex level as needed before writing to ensure the compatibility of the vertex scalar attribute fields with subsequent processing steps.
[0048] Optionally, the local curvature value is used to characterize the degree of local bending in each region of the target model surface, and it is calculated based on the neighborhood geometry.
[0049] Optionally, the aforementioned local curvature values can be obtained through various geometric measurements. For example, the degree of surface curvature can be estimated by calculating the angle between the normals of each facet and its adjacent facets, or by measuring local geometric undulations using second-order position differences. It should be noted that the above description of curvature calculation methods is not intended to be an exhaustive list. In practice, principal curvature, Gaussian curvature, mean curvature, or other differential geometric quantities can also be used to characterize local curvature features. Considering that surface noise may be introduced into the input model during scanning or engraving, as a possible implementation, one or more rounds of smoothing processing can be performed on the target model before calculating the local curvature values to reduce the interference of high-frequency noise on curvature estimation, thereby avoiding flat areas being misjudged as high-curvature areas and leading to unnecessary subsequent mesh refinement. In this way, the local curvature values can more accurately reflect the true geometric changes of the model surface, providing a reliable input basis for the construction of the density field.
[0050] Optionally, besides directly calculating curvature based on patch geometry, local curvature values can also be obtained through vertex-level neighborhood statistics. For example, the curvature of all adjacent faces around each vertex can be averaged or weighted to obtain the curvature measure corresponding to that vertex. Furthermore, to avoid curvature calculation distortion due to insufficient adjacent faces at model boundaries, the above method can correct the curvature estimation results based on the triangle distribution on both sides of the boundary when a vertex is detected as being at the mesh boundary, or inherit the curvature value of that vertex from the average value of adjacent internal vertices. It should be understood that the aforementioned local curvature values can be not only scalar curvature values, but can also be extended to vector forms or other tensor forms containing curvature directions; this disclosure is not limited to these. Thus, through a flexible curvature calculation strategy, the density field can maintain high robustness and adaptability on model surfaces with different topologies.
[0051] Optionally, the density attribute value is used to quantify and control the local sampling density of subsequent regrinding, which is obtained by mapping the local curvature value.
[0052] Optionally, the aforementioned density attribute value is a key intermediate quantity connecting geometric analysis and mesh reconstruction. Its acquisition can be achieved by converting local curvature values into a target edge length range using linear or nonlinear mapping. To avoid abrupt density differences between flat and high-curvature regions, as a possible implementation, a response curve control parameter can be introduced during the mapping process to modulate the mapping relationship, making the conversion from curvature to density smoother and more natural. It should be noted that the preset target edge length range in the above mapping relationship is not limited to a fixed numerical range. In practical applications, it can be dynamically adjusted according to the overall scale of the model, the required level of detail in subsequent paths, or the processing power of the target hardware. By converting curvature information into density attribute values, the system can automatically allocate denser sampling points in convex, concave, or transitional regions of the model during subsequent remeshing stages, while maintaining a sparser mesh in flat regions, thus balancing geometric performance with computational resource consumption.
[0053] Optionally, density attribute values can be stored not only as vertex scalar attributes but also converted into face or voxel attributes as needed for the processing flow, facilitating their use by different remeshing algorithms. For example, in a remeshing process that uses faces as the operational unit, the system can average vertex density attribute values and assign them to the corresponding faces, or directly obtain face-level density attribute values through face-level curvature mapping. Furthermore, before writing density attribute values, the calculation results can be truncated or normalized to ensure that each density attribute value converges within a preset target edge length range, preventing abnormal curvature values from causing local meshes to be too dense or too sparse. In this way, by solidifying density attribute values into the model data structure in a standardized form, it not only facilitates direct calls from subsequent processing nodes but also allows users to intuitively review whether the density distribution meets expectations through color levels or numerical labels in the workflow pipeline, thereby enabling timely adjustments to the mapping parameters.
[0054] Optionally, a preset target side length range is used to define the output boundary of the density attribute value, which includes the minimum density side length and the maximum density side length.
[0055] Optionally, a preset target edge length range is used to define the numerical boundary of the density attribute value, which consists of a minimum edge length threshold and a maximum edge length threshold. It should be noted that the setting of these thresholds should be coordinated with the overall bounding box size of the target model, the expected width of the final biomimetic path, and the thickness parameters in the subsequent extrapolation stage, to avoid excessively fine remeshing results leading to facet inflation, or excessively coarse results leading to loss of path details. As one possible implementation, the minimum edge length threshold can be set to the order of one-thousandth of the longest side size of the model, and the maximum edge length threshold can be set to the order of one-hundredth of the longest side size. Both thresholds can be adjusted by the user through a parametric interface according to specific asset requirements. In this way, by presetting a reasonable target edge length range, the density field can maintain good adaptability when processing input models of different scales, ensuring that the size of the triangular units in the adaptive remeshing output is within a controllable range, thereby providing a topological foundation with moderate regularity and significant density differences for subsequent dual transformations and boundary separation.
[0056] Optionally, a scalar attribute field is used to store density attribute values at the model vertex level, serving as input control data for subsequent adaptive remeshing. Alternatively, the scalar attribute field is a carrier in the model data structure for storing floating-point density attribute values, which can be attached to the vertex level of the target model and read and parsed in subsequent processing nodes. It should be noted that, in addition to directly storing density attribute values, this scalar attribute field can also store auxiliary information such as original curvature values, mapping weights, or timestamps, as long as this information can be recognized and correctly distinguished by the remeshing module. As a possible implementation, if the target model needs to be imported into an external system that does not support custom vertex attributes, the density attribute values can be encoded into vertex color channels, texture coordinate components, or skinning weights to achieve cross-platform data transfer. In this way, by embedding density information in the model data as a scalar attribute field or equivalent encoding, it not only helps ensure the stable transfer of the curvature-driven density field between different stages of the process but also allows users to intuitively review the density settings corresponding to each vertex in the 3D viewport through color levels or numerical labels, thus facilitating parameter fine-tuning and quality control.
[0057] In an optional implementation, the step of constructing the density field further includes: obtaining a preset weighted masking region; and performing local modulation on the density attribute values based on the weighted masking region, so that the sampling density within the weighted masking region is different from that of other regions. In this way, introducing a weighted masking region and performing local modulation on the density attribute values, making the sampling density of a specified region different from other regions, not only enables adaptive distribution based on curvature, but also allows for fine-tuning of the mesh density in key local areas, significantly improving the artistic controllability and local structural expressiveness of path generation.
[0058] In one implementation, the user can use a brush tool in a 3D editing environment to paint a grayscale texture on the model surface as a weighted masking region. For example, the forehead area, which needs to generate a dense coral-like texture, can be painted white (mask value 1.0), while the chin area, which needs to remain sparse, can be painted black (mask value 0.0). The system performs a multiplicative local modulation on the value of this weighted masking region and the initial density attribute value obtained based on curvature, so that the sampling density of the forehead area is significantly higher than the curvature estimate, while the chin area remains at a lower level. The modulated density attribute value then drives the adaptive remeshing process to form a distinct irregular cell distribution under masking control.
[0059] Optionally, the weighted masking region is designed to receive spatial distribution information preset by the user or system to achieve differentiated control of sampling density within a specified area of the model surface. Optionally, this weighted masking region can be a grayscale texture hand-drawn by the user using a brush, or a procedural mask automatically extracted based on a certain type of geometric feature of the model surface, such as a binary or gradient region automatically generated from distance fields, erosion marks, or semantic partitioning of a character's face. This masking region can not only be applied to the entire surface of the model, but can also be limited to a local sub-component or a specified face group. Its spatial resolution can either correspond one-to-one with the number of model vertices, or it can use an independent texture map to cover the surface with higher precision. It should be noted that the above description of the source and representation of the weighted masking region is only one example and is not intended to limit the generation method of the mask. In actual implementation, it can be flexibly determined according to the specific needs of the art pipeline or the logic of procedural generation.
[0060] Optionally, considering that relying solely on curvature estimation might lead to unexpected sampling densities in key areas under certain artistic scenarios, as a possible implementation, the aforementioned weighted masking region can also be configured as a dynamically adjustable intensity layer. Furthermore, after the basic masking distribution is determined, the system can adjust the masking values in real time based on user-inputted local correction commands. For example, the masking intensity can be increased from 0.5 to 1.2 in the eye socket area where a more pronounced effect is needed, while the masking intensity can be reduced to below 0.2 in the neck transition area where texture needs to be weakened. This dynamic adjustment process can be computed in parallel with the curvature-driven density field. By using a blending node, multi-layer masking information and basic density attribute values are fused according to weights. This preserves the natural undulation characteristics brought about by curvature adaptation and empowers artists to precisely intervene in local details without disrupting the overall topological regularity.
[0061] Optionally, local modulation may include, but is not limited to, multiplicative superposition, additive offset, or curve remapping methods, for targeted adjustment of density attribute values based on the values of the weighted masking region.
[0062] Optionally, the aforementioned local modulation is not limited to a single mathematical operation, but can employ multiple computational paradigms based on the channel characteristics of the weighted masking region and the target density range. For example, when the weighted masking region is a normalized grayscale texture, the system can perform multiplicative superposition of the mask value and the density attribute value, ensuring that regions with a mask value of zero retain their original curvature density, while regions with a positive mask value have their sampling density increased linearly. In another case, the system can also employ an additive offset strategy, directly superimposing the mask intensity on the base density value to ensure that flat regions with low curvature still receive sufficient subdivision support under mask control. In addition to multiplication and addition, power function mapping or piecewise curve remapping can be introduced to further widen the contrast between high-density and low-density regions through nonlinear responses, thereby balancing natural form transitions and precise expression of artificial artistic intent in the specific generation process.
[0063] In an optional implementation, the step of constructing the density field further includes: determining the distance information from each region of the target model to a preset reference point; and modulating the density attribute values based on the distance information so that regions closer to the reference point have higher sampling density. In this way, by introducing distance modulation in the density field construction, not only can the path density form a gradient change around the reference point to enhance the sense of local clustering, but it can also avoid the distribution homogenization problem caused by simply relying on curvature, making the focal area denser and fuller, thereby effectively improving the diversity and artistic controllability of the path distribution.
[0064] For example, in one implementation, the nose tip position of the 3D character model is set as a preset reference point. The straight-line distance from each vertex on the model surface to the nose tip position is calculated, and the distance value is normalized to a value range of zero to one. Then, based on a preset attenuation coefficient, the distance value is mapped to a density multiplier, so that the density attribute value of the area closer to the nose tip is amplified more. After adaptive remeshing, the number of mesh cells generated in this area increases significantly, ultimately resulting in the bionic path presenting an organic distribution pattern that converges towards the nose tip in the center of the face.
[0065] Optionally, a preset reference point is used to provide a spatial reference for distance field calculations, guiding the density properties to form a non-uniform distribution around this reference.
[0066] Optionally, preset reference points can be one or more local feature locations on the surface of the target model, such as the geometric center of the model, user-specified vertices, curvature extrema, or joint nodes in the skeleton rigging. Preset reference points can also be arbitrary 3D coordinates from external space, not fixed to the model itself. It should be noted that the above description of the location of preset reference points is merely one example, and this disclosure is not intended to limit the selection method of preset reference points. In actual implementation, users can dynamically specify the location of reference points according to artistic creation needs or procedural generation rules, for example, by clicking "OK" in the viewport through an interactive picking interface, or by automatically calculating the location using an expression based on the model's axis-aligned bounding box center. The number of preset reference points can also be flexibly configured according to needs. A single reference point can be used to construct a radially decaying density distribution, or multiple reference points can be specified simultaneously, generating a composite distance field through minimum distance values or weighted superposition. In this way, by flexibly setting the spatial location and number of reference points, the path generation system can quickly respond to the art director's differentiated requirements for local density aggregation without modifying the overall curvature-driven framework.
[0067] Optionally, the mechanism aims to convert spatial distance into density control weights to achieve spatial gradient modulation of sampling density in coordination with curvature properties.
[0068] Optionally, in one possible implementation, the modulation process may specifically include: for each vertex or face center of the target model surface, calculating its spatial distance to a preset reference point, and mapping this distance according to a preset attenuation function to obtain a distance modulation factor. Considering that when relying solely on curvature-driven operation, high curvature regions may be uniformly distributed throughout the model and lack visual focus, as a possible implementation, the distance modulation factor is multiplicatively superimposed or interpolated with the density attribute value obtained from the original curvature mapping, so that even if the curvature value is at a moderate level in regions closer to the reference point, the final density attribute value can still be boosted to a higher level, thereby generating finer mesh cells in that region. For example, if an exponential attenuation function is used, its expression can be set as the modulation factor equal to the power of the product of a negative attenuation coefficient with the natural constant as the base and the distance value; the larger the attenuation coefficient, the faster the density attenuation. Alternatively, a linear piecewise mapping can be used, for example, maintaining the maximum density multiplier when the distance to the reference point does not exceed a first threshold, and reducing it to the minimum multiplier when it exceeds a second threshold, with a linear transition between the two. Furthermore, to avoid oversampling in the neighborhood of the reference point, which could lead to an overly dense mesh, an upper limit truncation can be set on the modulation results. In other words, by combining different distance mapping curves and fusion strategies, diverse density distributions with either central clustering or edge sparseness can be constructed on the model surface.
[0069] Optionally, in another implementation, the aforementioned distance information can be not only a direct straight-line distance, but also a geodesic distance along the model surface or a weighted distance after topological correction; this disclosure does not limit this. It should be noted that when the target model has multiple preset reference points, the distance information can be the minimum value of the corresponding distances of each reference point, or a weighted average method can be used to calculate the comprehensive distance, where the weight of each reference point can be dynamically adjusted according to artistic control conditions. For example, if three independent reference points are distributed on the character's shoulder armor, each reference point controls the density enhancement of the local badge, rivet area, and edge chamfer, the system calculates the distance from each point on the surface to these three points and mixes them according to the influence weights assigned by the user, thereby forming multiple independent or mutually transitional density clusters on the same model. If the influence ranges of multiple reference points overlap, the density attributes of conflict areas can be processed according to preset mixing rules to prevent unexpected high-density peaks. It should be understood that the mapping relationship between distance information and density attribute values can be flexibly set according to specific production needs. A monotonically decreasing function can be used to achieve a denser-to-closer effect, or a band-stop or ring wave function can be used to generate high-density bands within a specific distance range. In this way, by using multi-dimensional distance calculation methods and flexible modulation strategies, the responsiveness of the density field to spatial location attributes is significantly expanded.
[0070] In step S230, adaptive regrinding is performed on the target model based on the density field to obtain a regrinded model. In this way, by performing adaptive regrinding on the target model through a curvature-driven density field, sampling can be made more detailed in high curvature regions to improve local accuracy, while maintaining a sparse grid in low curvature regions to save computational resources, thus balancing detail and efficiency.
[0071] For example, the system first reads the density attribute value of each vertex of the target model, which has been previously mapped to the target edge length range based on the local curvature value; then, the remeshing algorithm sets the target edge length parameter to be positively correlated with the density attribute value, performs adaptive triangulation on the model surface, so that the mesh cell size in the high curvature area is automatically reduced to increase the sampling density, and the cell size in the low curvature area is automatically increased to maintain sparseness. After processing, a remeshing model with a non-uniform distribution of face number is obtained.
[0072] Optionally, the aforementioned adaptive remeshing process aims to control the local sampling density based on the density field, so that the mesh cell size automatically adjusts with the curvature. Optionally, the aforementioned adaptive remeshing process can dynamically adjust the local target edge length during the remeshing process based on the density attribute values stored at each vertex of the target model. As a possible implementation, when the density attribute value of a certain region is high, the remeshing algorithm inserts more sampling points and reduces the size of the triangular cells in that region to enhance the geometric accuracy of subsequent dual transformations and boundary extraction; conversely, when the density attribute value is low, the algorithm enlarges the target edge length and reduces the number of faces in that region, thereby avoiding redundant geometric data in flat areas. It should be noted that the mapping relationship between the density attribute value and the target edge length can take various forms such as linear mapping, power function mapping, or piecewise mapping, and this disclosure is not limited to these. Furthermore, the aforementioned remeshing process can locally refine or sparse the surface mesh while maintaining the overall topology of the original model, so that the final generated remeshed model has sufficient geometric resolution in areas of drastic surface changes, while maintaining low storage and computational overhead in flat areas.
[0073] Optionally, the aforementioned remesh model can refer to a surface mesh entity with a non-uniform facet distribution obtained after adaptive remesh processing. Optionally, the aforementioned remesh model inherits the overall shape of the target model, but the surface sampling density has been redistributed according to the density field. In high-curvature regions, this remesh model consists of densely arranged triangular units, providing a fine-grained irregular polygonal boundary basis for subsequent topological dual transformations; in low-curvature regions, it consists of sparsely arranged larger triangular units to reduce the amount of data processed subsequently. Furthermore, the topological structure of this remesh model can be a triangular mesh, or it can retain some quadrilateral regions according to specific implementation requirements; this disclosure does not limit the uniqueness of its mesh type. As an intermediate carrier connecting the curvature-driven density field and the topological dual transformation, the non-uniform mesh distribution characteristics of this model directly affect the density and geometric expressiveness of the subsequent path structure, such as... Figure 5 The diagram shows a regrid model.
[0074] In step S240, a topological dual transformation is performed on the heavy mesh model to obtain a dual mesh model. In this way, the regular triangular mesh is transformed into irregular polygonal units through the topological dual transformation, so that the path boundary presents a naturally curved organic shape, enhancing the natural randomness of the biomimetic irregular path.
[0075] In one implementation, after the adaptive remeshing process is complete, the system obtains the current remeshed model, which is typically a regular triangular mesh. The system traverses each triangular face of the remeshed model and calculates the geometric center of each face. Subsequently, for each original vertex, the system finds all adjacent triangular faces and connects their geometric centers sequentially around the original vertex, thereby generating a new polygonal face. The original vertex is transformed into the center of this new polygonal face, and the common edges between the original triangular faces are transformed into new edges connecting adjacent geometric centers. After this transformation, the originally regularly divided triangular mesh is converted into an irregular polygonal cell structure, thus obtaining the dual mesh model.
[0076] Optionally, a topological dual transformation is used to convert regular triangular meshes into irregular polygonal units, forming boundaries with naturally curved shapes. In this transformation, for each original vertex, the system finds its adjacent triangular faces and calculates the geometric centers of each face. These geometric centers are then connected sequentially in a wraparound order to generate new polygonal faces, transforming the original vertices into the centers of these polygonal faces and converting the original edges into new edges connecting adjacent geometric centers. Considering that non-convex polygons may affect the stability of subsequent processing, the transformation may also include performing convexification on the new polygonal faces and limiting their edge count to a preset threshold to maintain the irregular curved characteristics of the boundary while ensuring topological regularity. The geometric center calculation can use coordinate mean or area weighting, and the threshold can be adjusted according to extrapolation accuracy and model complexity. This transformation breaks the mechanical feel of regular meshes, giving the boundaries a natural and organic shape; it also provides an irregular topological basis for subsequent curvature selection and vertex separation, enhancing the natural randomness of the biomimetic path.
[0077] Optionally, the dual mesh model is a set of irregular elements generated by topological dual transformation, which serves as the carrier for subsequent curvature selection and extrapolation.
[0078] Optionally, the dual mesh model is a set of irregular cells generated by topological dual transformation, serving as the carrier for subsequent curvature filtering and extrapolation. In this model, each cell corresponds to a vertex region in the original triangular mesh, and its boundary is formed by connecting the geometric centers of adjacent triangular faces, presenting a naturally curved contour. It should be noted that the aforementioned polygonal cells can be triangles, quadrilaterals, or irregular polygons with fewer sides, and their shape depends on the number of adjacent faces of the original vertex; the number of cell sides can be limited by a maximum side count constraint to avoid excessive computational complexity. The vertex positions of this model are associated with the face centers of the original mesh, and their surface curvature can be averaged to the vertex level, providing a data basis for subsequent curvature threshold filtering. By adopting the dual mesh model, the path boundary can be freed from the mechanical feel of uniform heavy mesh, and a differential cell density distribution can be formed in different curvature regions, thereby enabling the path shape to maintain geometric continuity while possessing stronger natural randomness.
[0079] In an optional implementation, a topological dual transformation is performed on the re-mesh model, including: traversing each triangular face of the re-mesh model and determining the geometric center of each triangular face; for each original vertex, connecting the geometric centers of its adjacent triangular faces in a wraparound order to generate a new polygonal face; converting the original vertex into the center of the new polygonal face, and converting the edges of the original triangular face into new edges connecting adjacent geometric centers. Thus, through face-centered wraparound connections and vertex dual mapping, a regular triangular mesh can be reconstructed into polygonal units with irregular boundaries, not only giving the path structure a natural organic form, but also providing a differentiated topological basis for subsequent curvature filtering and boundary separation, such as... Figure 6 The diagram shows a dual mesh model.
[0080] In one implementation, the remesh model is assumed to consist of a large number of regular triangular faces. For this model, the system first traverses each triangular face, calculating the average coordinates of its three vertices to determine the geometric center. For example, for multiple adjacent triangular faces surrounding vertex v0, their center positions p1, p2, p3, and p4 are recorded respectively. Then, following the order in which these triangular faces surround v0 (e.g., clockwise distribution based on common edges), p1 is connected to p2, p2 to p3, and so on, until a new polygonal face is formed. During this transformation, the original vertex v0 becomes the center position of this polygonal face, while the common edges between the original triangular faces are transformed into line segments connecting the centers of adjacent faces. Thus, the originally regular triangular mesh is reconstructed into a new topological structure with face centers as vertices and irregular polygons as units, providing a boundary morphology with organic undulations for subsequent generation of biomimetic irregular paths.
[0081] Optionally, the geometric center mentioned above is the result of calculating the average coordinates of the vertices of the triangular face, which is used as the spatial positioning node for the dual transformation. Optionally, the geometric center of each triangular face can be obtained by calculating the arithmetic mean or the weighted average of the centroid coordinates of all vertices of the triangular face. It should be noted that the geometric center is not limited to the centroid in a strict mathematical sense, and can also be offset and adjusted according to the local density of the mesh or the requirements of the artistic style, such as slightly shifting it to the side with higher curvature, so that the polygonal elements generated by the subsequent dual transformation present a more compact or looser distribution in a specific area. In implementation, if the triangular face is non-planar or has slight distortion, the triangular face can be locally flattened or projected normally before calculating the center coordinates to ensure that the lines connecting the centers of adjacent faces do not intersect abnormally. One objective of this embodiment is to provide accurate surrounding reference points for adjacent faces around the vertices through precise face center positioning, and to smoothly map the element spacing of the original triangular mesh into the dual mesh.
[0082] Optionally, the above wrapping order is determined based on the topological adjacency of the adjacent triangle faces around the original vertex, with the aim of generating closed polygonal boundaries in an orderly manner.
[0083] Optionally, the above-mentioned wrapping order can be determined based on the common edge relationships of the adjacent triangular faces around the original vertex. Specifically, it can start from any adjacent triangular face and traverse sequentially along the common edge shared by that face and the next adjacent face until returning to the starting face to complete the closed loop connection. It should be noted that the above description of the connection order is only one example. In actual implementation, other methods such as angle sorting, index sorting, or preset rule sorting can also be used depending on the number of adjacent faces of the vertex. This disclosure is not intended to limit the wrapping strategy. Considering that the adjacency relationship in non-planar meshes may be ambiguous, as a possible implementation, it is also possible to detect whether the arrangement of each adjacent face around the vertex is flipped or intersected before connection. If an abnormal arrangement is detected, the order is corrected by normal consistency check to avoid generating self-intersecting polygonal faces. Furthermore, the number of edges of the new polygonal face generated after connection is consistent with the number of the original adjacent faces of the vertex, so that the dual mesh automatically presents differentiated cell shapes in different curvature regions.
[0084] Optionally, the above transformation is used to establish a topological correspondence between the original triangular mesh and the dual polygonal mesh, enabling bidirectional traceability of mesh elements. Optionally, the conversion of the original vertex into the center of the new polygonal face means that after the dual transformation, the spatial position of the original vertex is replaced by the new polygonal face, and the center coordinates of the polygonal face are inherited from the coordinate values of the corresponding original vertex, so that the attributes on the original vertex can be naturally transferred to the face elements after dualization. Similarly, the edges of the original triangular face are converted into new edges connecting adjacent geometric centers, meaning that two triangular faces sharing a common edge in the original mesh correspond to two polygonal faces directly connected by the new edge in the dual result. It should be noted that the above mapping relationship is not limited to a simple one-to-one replacement. In some implementations, if the original vertex is located at the mesh boundary, the number of its adjacent faces is reduced, and the number of edges of the corresponding generated dual polygonal face is reduced accordingly. The system can automatically adapt to such degradation of open boundaries. One objective of this embodiment is that, through this dual mapping, on the one hand, the topological connectivity of the original mesh is preserved, and on the other hand, the unit boundary after dualization presents a naturally curved irregular shape, thereby enhancing the organic feel of the biomimetic path.
[0085] In an optional implementation, after generating the new polygonal face, the method further includes: performing convexity processing on the new polygonal face; and limiting the number of sides of the new polygonal face to a preset maximum side count threshold. In this way, the polygonal units after dual transformation, after convexity processing and side count constraints, can suppress topological anomalies such as narrow, sharp corners and excessive side counts, ensuring the stability and geometric quality of subsequent curvature calculations and boundary extrapolation.
[0086] In one implementation, after the dual transformation is completed, the system traverses the newly generated polygon faces and performs convexity processing on each face: if a concave vertex with an interior angle greater than 180 degrees is detected in the polygon, the concave corner is eliminated by projecting to the face center or rearranging the vertex connection order, so that the face is restored to convexity; at the same time, the system loads a preset maximum edge number threshold (e.g., 3), counts the edge number of each polygon face, and if the edge number of a face exceeds the threshold, the face is split by connecting the face center to the midpoint of the super-long edge, or redundant adjacency relationships are directly removed to reduce the edge number to within the threshold, thereby obtaining a set of irregular units mainly composed of convex triangles, which retains the randomness of the organic form and avoids topological anomalies from affecting subsequent path generation.
[0087] Optionally, convexity processing is used to eliminate the concave corners of polygonal surfaces, restore the convexity of the elements, and avoid narrow, sharp corners interfering with subsequent curvature measurements.
[0088] Optionally, the aforementioned convexification process can be achieved by projecting the polygon vertices onto the best-fit plane through planar projection to eliminate concave corners, or by adjusting the vertex connection order or introducing auxiliary vertices to decompose the non-convex polygon into several convex sub-faces. This disclosure does not limit the specific implementation method. Considering that during the dual transformation process, when the number of adjacent triangular faces of the original vertex is large or their arrangement is irregular, the new polygonal face formed by connecting the face centers is prone to complex contours with concavity or even self-intersection. If curvature filtering and extrapolation are directly performed on such non-convex units, thickness distortion or local interpenetration is easily formed in the concave corner region. Therefore, one of the purposes of performing convexification is to restore the convexity constraint of the polygonal face. On the one hand, it can eliminate the curvature measurement deviation caused by contour concavity. On the other hand, it can also enable subsequent vertex separation and extrapolation operations to be performed based on regular convex boundaries, reducing invalid or abnormal geometric outputs. Furthermore, this convexification process can also be combined with edge number constraints for collaborative execution, so that the dual unit has topological stability that meets the requirements of subsequent path generation while maintaining an irregular appearance.
[0089] Optionally, a maximum edge count threshold is used to constrain the number of edges on the polygonal face after dual transformation, suppressing the degradation of topological quality caused by excessive edge count.
[0090] Optionally, the aforementioned maximum edge count threshold can be 3, 4, 5, or other integers greater than or equal to 3. It can also be dynamically determined by the user or preset rules during system initialization based on the scale of the input model, the desired path density, and the number of subsequent subdivision iterations. This disclosure does not limit its specific value or setting method. It should be noted that if the original vertex is adjacent to a large number of triangular faces, the polygonal face generated after the dual transformation will have far more edges than usual, resulting in redundant unit boundaries and a flattened, uniform shape. This leads to wide, flat top surfaces or overstretched sides during extrapolation, weakening the organic feel and randomness of the biomimetic path. By limiting the upper limit of the edge count to a preset threshold, the complexity of the dual unit and the original mesh resolution can be appropriately decoupled. This ensures that even in areas with dense sampling of the original model, the final generated path is still composed of irregular polygonal units with a limited number of edges and compact shapes. This preserves the organic variation of the surface while balancing the regularity of the topological structure and the computational efficiency of subsequent processing.
[0091] In step S250, based on the curvature characteristics of each region on the surface of the dual mesh model, the target region is determined from the dual mesh model, and selective extrapolation is performed on the target region to generate a surface structure. In this way, by filtering the target region through the curvature characteristics of the dual mesh model surface and selectively extrapolating, the path generation can be curvature-adaptive, avoiding invalid protrusions in flat areas, significantly reducing the risk of intersecting, and outputting a biomimetic geometric structure with realistic thickness and clear boundaries. In one example, the system calculates the curvature value face by face on the polygonal mesh surface after dual transformation and aggregates the face curvature to each vertex; then it traverses the two endpoints of each edge, compares the maximum vertex curvature with a set threshold, and filters out a set of target boundaries that meet the conditions; then it performs vertex-level separation on these boundaries so that adjacent faces no longer share vertices, obtaining a group of target faces that can move independently; finally, it performs two extrapolations at different distances along the face normal direction on the target face group to generate a protruding structure with top, side, and fine edge transitions, thereby forming a biomimetic path with realistic geometric thickness without relying on hand-drawn curves.
[0092] Optionally, the target region is determined by curvature feature filtering, which aims to define the effective scope of subsequent extrapolation processing.
[0093] Optionally, the process of determining the target region can include various specific implementation methods. In one implementation, the system first calculates the curvature values of each face on the surface of the dual mesh model and elevates the face-level curvature attributes to the vertex level. Subsequently, for each edge in the model, the vertex curvature values of its two endpoints are read, and the larger of the two is compared with a given curvature threshold. If the larger value is greater than or equal to the threshold, the edge is included in the target boundary set. Further, a vertex-level separation operation is performed on the target boundary set, causing adjacent faces that originally shared vertices to be separated at the boundary, forming independent face groups, which constitute the target region. In another implementation, the system can also calculate the probability value for each edge to be included in the target boundary set and determine whether the edge is selected according to the random sampling rule corresponding to the probability value, thereby introducing a controllable random fracture effect. In this way, the target region can be accurately limited to the location with significant curvature changes, avoiding meaningless extrapolation in excessively flat or low-curvature regions.
[0094] Optionally, selective extrapolation processes assign geometric thickness to the target region, including vertex-level separation, multi-stage extrapolation, and anti-self-crossing detection.
[0095] Optionally, the aforementioned selective extrapolation process may include multi-stage extrapolation and corresponding anti-interference control mechanisms. Specifically, after determining the target surface group, the system can calculate the average surface normal direction of the target surface group as the extrapolation direction and perform the first extrapolation, with the extrusion distance set as the base distance threshold, thereby generating a geometric structure with a base thickness, which includes both the top and side surfaces. Further, a second small-distance extrapolation is performed based on the first extrapolation result. The transition distance threshold of this second extrapolation is much smaller than the base distance threshold of the first extrapolation, used to create a finer edge transition at the top of the protruding structure, preventing the top from being too flat. It should be noted that before performing extrapolation, the system can also detect whether self-intersection occurs after the target surface group moves along the given extrapolation direction; if a risk of self-intersection is detected, the extrapolation distance is limited to a safe distance threshold, or the extrapolation operation of the target surface group is skipped directly to reduce the probability of intersection and overlap. The combination of the above multi-stage extrapolation results in a multi-layered, step-like natural contour of the path cross-section, forming a geometric structure resembling coral or gyri-like protrusions.
[0096] In an optional implementation, selective extrapolation is performed on the target region, including: calculating the curvature value of each face in the dual mesh model; for each vertex, calculating the average curvature value of its adjacent faces, and using the average value as the vertex curvature value; filtering the target boundary set from the edges of the dual mesh model based on a preset curvature threshold; performing vertex-level separation on the target boundary set to obtain the separated target face group; and performing extrapolation on the target face group to generate the surface structure. In this way, by filtering target boundaries through curvature attributes and performing vertex-level separation, the extrapolation is concentrated in areas with significant surface changes, avoiding meaningless bulges in flat areas, reducing the risk of self-intersection during face group extrapolation, and improving the clarity and stability of the path structure.
[0097] In one implementation, the system calculates the curvature values face-by-face on the irregular polygonal mesh after dual transformation, and then averages the curvature values of the adjacent faces of each vertex to obtain vertex-level curvature filtering attributes, such as... Figure 7 The diagram illustrates a vertex curvature value. When the maximum curvature value of the two vertices of an edge reaches a preset threshold, the edge is included in the target boundary set, and the system then performs vertex-level separation operations on the boundary, such as... Figure 8 The diagram illustrates a vertex-level separation operation, which separates shared vertices so that adjacent faces no longer share the same index, ultimately resulting in a group of target faces that can be independently extrapolated, such as... Figure 9 The diagram shows a target surface group.
[0098] Optionally, the curvature values of each face are used to describe the local bending degree of the polygonal unit after dual transformation, providing a geometric metric for subsequent boundary selection. Optionally, the curvature values of each face can be scalar indices such as curvature, Gaussian curvature, or mean curvature. In one calculation method, the system can estimate the local bending degree of each polygonal face on the dual-transformed polygonal mesh based on the geometry surrounding it, using the angle between adjacent normals or second-order position differences; for example, the curvature value of a unit face with obvious convexity or concavity is significantly higher than that of an approximately flat unit face. It should be noted that the above method of calculating curvature values is only an example; in actual implementation, principal curvature synthesis, tensor voting, or other discrete differential geometry methods can also be used for determination. Thus, by assigning an independent curvature metric to each face, a reliable face-level sampling basis can be provided for subsequently elevating attributes to the vertex level, ensuring the objectivity and geometric consistency of boundary selection.
[0099] Optionally, the vertex curvature value aims to aggregate face-level curvature information to the vertex level, giving the edges scalar attributes for boundary filtering. Optionally, the vertex curvature value can be a scalar result obtained by equally weighted averaging, area-weighted averaging, or angle-weighted averaging of the curvature values of its adjacent faces. In one implementation, for an irregular polygonal mesh after dual transformation, each vertex is typically connected to multiple adjacent faces. The system can read the curvature values of these adjacent faces and calculate their arithmetic mean, writing this average value into the scalar attribute field of the corresponding vertex; for example, if the curvature values of the five adjacent faces around a vertex are 0.8, 0.6, 0.9, 0.5, and 0.7 respectively, then the vertex curvature value of that vertex can be recorded as 0.7. It should be noted that, in addition to the arithmetic mean, different weights can also be assigned based on the area or vertex angle of the adjacent faces to reduce the calculation bias caused by uneven mesh distribution. Furthermore, after obtaining the vertex curvature value, the system can quickly determine whether the edge belongs to a region with significant geometric changes by comparing the attribute values of the vertices at both ends of the edge at the edge level, thus providing a unified and continuous quantitative basis for the automated extraction of boundaries.
[0100] Optionally, a curvature threshold is used to define a critical criterion for the significance of geometric changes at the edge level, distinguishing edges that should be included in the target boundary from non-target edges. Optionally, the curvature threshold can be manually set by the user based on the expected density of the target path, or it can be automatically derived by the system based on the statistical characteristics of the overall curvature distribution of the model. In one manual setting method, the user can set the curvature threshold in the graphical user interface via a slider or numerical input box, for example, setting the threshold to 0.5. In this case, only edges whose maximum curvature values at both ends of the edge are not less than 0.5 will be included in the target boundary set. In another automatic derivation method, the system can calculate the median or upper quartile of the maximum curvature values of the endpoints corresponding to all edges in the dual mesh model and use it as the default threshold. It should be noted that the above threshold setting process can also be combined with weight masking or distance fields, allowing different local thresholds to be used for different regions. In this way, by setting adjustable critical conditions for edge filtering, a flexible balance can be achieved between path sparseness and density, avoiding excessive path growth in flat areas or excessive sparseness in complex areas.
[0101] Optionally, the target boundary set consists of edges that satisfy curvature conditions, used to identify the region contour to be subjected to vertex separation and extrapolation.
[0102] Optionally, the target boundary set can consist of a single continuous edge loop or multiple separate sub-boundaries. In one implementation, the system traverses all edges of the dual mesh model, reads the vertex curvature values of the two endpoints of each edge and takes the larger one. If the larger value is greater than or equal to a curvature threshold, the edge is marked as a target edge. When multiple such target edges are connected end-to-end, a target boundary set surrounding a specific polygonal unit is formed. It should be noted that the edges in the target boundary set may exhibit closed loops, open chains, or isolated single edges. For boundaries with complex shapes, the system can further perform pruning or connected component marking to optimize their topology. In this way, by filtering out a subset of boundaries with significant geometric changes from the global edge set, candidate regions suitable for generating biomimetic paths can be automatically identified without relying on manually drawn curves.
[0103] Optionally, the vertex-level splitting operation aims to split the shared vertices at the target boundary into independent indices, so that the face groups on both sides of the boundary are topologically disconnected for subsequent independent extrapolation.
[0104] Optionally, the vertex-level separation operation can be to copy and split the shared vertices of each edge in the target boundary set, or to perform batch separation on all associated vertices of the entire boundary. In one specific implementation, for an edge included in the target boundary set, each of its two sides belongs to a polygonal face, and these two faces originally shared the two endpoint vertices of the edge; the system performs separation at these vertices, creating independent vertex copies for each adjacent face, so that the vertex indices of the two sides no longer overlap. It should be noted that the separation operation can be performed locally only on the vertices involved in the boundary itself, or the separation range can be extended to both sides of the boundary by one or more adjacent faces to form a wider transition zone. In this way, by decoupling the topological coupling of the two side face groups of the boundary, the displacement of one side of the boundary during subsequent extrapolation will not affect the face on the other side, thereby ensuring that the generated grooves or protrusions have clear contour edges and independent geometric thickness.
[0105] Optionally, to avoid gaps in non-target regions during vertex-level separation, the system can pre-check the connectivity and adjacency of the boundary set before separation. In one implementation, if an adjacent face of a target edge is shared by another target edge, the system can determine that the vertex belongs to a corner point where multiple edges intersect. In this case, the copying strategy can be set to copy only once and ensure that each face at the intersection obtains an independent vertex instance with the same geometric position; that is, the vertex is split into several copies equal to the number of adjacent faces, with each copy having the same coordinates but different indices. It should be noted that for boundary endpoints or boundary intersection regions, a grouping and labeling method can also be used to classify the separated vertices into the corresponding face groups for unified control during multi-stage extrapolation. Furthermore, after separation, the system can also detect the width of the newly generated boundary gaps. If the gaps are too large, minor smoothing or stitching corrections are performed to ensure that the subsequently generated thickness structure remains tightly connected at the root of the boundary.
[0106] Optionally, the target face group is a set of continuous faces that are topologically independent of the surrounding faces after vertex-level separation, and serves as the basic working unit for extrapolation processing.
[0107] Optionally, the target face group can be a single polygonal face completely surrounded by a boundary, or a collection of region facets composed of several adjacent faces. In one implementation, after the system completes vertex-level separation, several polygonal faces that were originally penetrated or surrounded by the target boundary are topologically isolated, and these isolated faces constitute the target face group; for example, in the mesh after dual transformation, a hexagonal central polygonal face is surrounded by a high-curvature boundary. After vertex separation, this central facet becomes an independent target face group, which can be extrapolated along its normal direction as a whole. It should be noted that the extrapolation direction of the target face group can be a simple average of the normals of each face in the face group, or it can be corrected according to the direction of the line connecting the geometric center of the face group to the centroid of the model as a whole; if multiple target face groups are detected to be too close to each other, the system can also merge them into the same group or mark them as mutually exclusive groups to avoid collisions. In this way, by organizing the continuous facets within the boundary into independent face group units, the extrapolation operation can perform uniform displacement and thickness superposition at the face group granularity, ensuring that the generated biomimetic path has a continuous and consistent cross-sectional profile.
[0108] In an optional implementation, a target boundary set is selected from the edges of the dual mesh model based on a preset curvature threshold. This includes: for each edge, reading the vertex curvature values of the two vertices corresponding to the two endpoints; comparing the larger of the two vertex curvature values with the curvature threshold; and if the larger value is greater than or equal to the curvature threshold, then the edge is included in the target boundary set. In this way, by rigidly comparing the larger of the curvature values of the vertices at both ends of an edge with a preset threshold, a target boundary set with significant geometric changes can be stably selected, ensuring that the generation position of the biomimetic path strictly corresponds to the concave and convex features of the surface.
[0109] In one specific approach, the system traverses all edges of the dual mesh model, reading the vertex curvature values of each edge's two endpoints. Assuming an edge has endpoint curvature values of 0.82 and 0.45, the system takes the larger value (0.82) and compares it to a preset curvature threshold of 0.6. Since 0.82 is greater than 0.6, the edge is included in the target boundary set. If another edge has endpoint curvature values of 0.35 and 0.50, and the larger value (0.50) is less than the threshold 0.6, then that edge is not included in the target boundary set. Thus, the system automatically extracts edges in regions of significant curvature change as candidate path boundaries.
[0110] Optionally, the probability value can be calculated based on the endpoint curvature and local geometric properties to quantitatively characterize the likelihood of the edge being included in the target boundary. Optionally, the probability value is used to transform the vertex curvature information at both ends of the edge into a continuous probability measure, replacing rigid binary discrimination. The probability value can be calculated by directly using the larger or average of the vertex curvature values of the two endpoints as input, mapping it to the interval between 0 and 1 through linear mapping or power function curves; alternatively, the density field intensity of the local region where the edge is located, the area of the original triangle face corresponding to the edge, or the normal deviation angle of the adjacent faces on both sides of the edge can be introduced as weighted correction terms for comprehensive calculation. It should be noted that a higher probability value indicates a greater likelihood of the edge being included in the target boundary set, but it is not equivalent to guaranteed inclusion; its final inclusion depends on the judgment result of subsequent random sampling rules. This continuous probabilistic processing method, on the one hand, retains the macroscopic control of the curvature threshold over the overall path direction, and on the other hand, introduces a controlled random floating space for the local boundary, making the final generated biomimetic path conform to both the macroscopic curvature distribution law and possess natural uncertainty at the microscopic level.
[0111] Optionally, the random sampling rule aims to perform non-deterministic screening of candidate edges based on probability values to simulate the irregular distribution characteristics of natural forms. Optionally, the above random sampling rule is used to non-deterministically accept or exclude candidate edges based on probability values to break the mechanical boundary feel brought about by simple threshold screening. As one implementation method, Monte Carlo sampling can be used, where a uniformly distributed random number between 0 and 1 is independently generated for each edge. When the random number is less than or equal to the probability value corresponding to the edge, the edge is included in the target boundary set. As another implementation method, stratified sampling or reservoir sampling mechanisms can also be used to perform batch random screening of candidate edges while ensuring that the overall selection ratio roughly matches the probability value distribution. Furthermore, to avoid extreme cases of excessively fragmented or excessively dense sampling results, local connectivity constraints or minimum neighbor number constraints can be introduced before and after random sampling to post-process and smooth the initial sampling results. In other words, random sampling rules can be implemented using simple and independent edge-by-edge decision logic, or they can be combined with topological adjacency relationships and global distribution density for multi-level control, thereby preserving the main continuous path while giving the biomimetic irregular path a controllable local break and natural sparse transition.
[0112] In an optional implementation, extrapolation is performed on the target surface group, including: performing a first extrapolation on the target surface group, with the extrapolation distance being a base distance threshold, generating a geometric structure with a base thickness distance, the geometric structure including a top surface and side surfaces; and performing a second extrapolation on the target surface group after the first extrapolation, with the extrapolation distance being a transition distance threshold, the transition distance threshold being less than the base distance threshold. In this way, by performing phased, progressive extrapolation and differentially controlling the distance at each stage, not only can the path obtain a realistic base thickness and lateral support, but a fine edge transition can also be formed at the top, thereby avoiding an overly flat, mechanical feel at the top after a single extrapolation and enhancing the natural hierarchy of the biomimetic path.
[0113] For example, when performing extrapolation on a target surface group, a first extrapolation can be performed first, with the extrapolation distance set to a base distance threshold, thereby generating a base thickness structure including the top and side surfaces in the path region; further, a second extrapolation can be performed on top of this base structure, with the extrapolation distance set to a transition distance threshold, and this transition distance threshold being less than the base distance threshold, so that a slightly contracted edge transition layer can be constructed at the top of the path, making the overall cross-section present a multi-layered stepped profile that is approximately naturally grown.
[0114] Optionally, the first extrapolation is used to extrapolate the target surface group using a base distance threshold, generating a basic thickness structure including the top and side surfaces. It should be noted that the base distance threshold used for the first extrapolation can be a fixed parameter adaptively determined based on the model scale, or a scalar value manually specified by the user in the procedural modeling interface. In actual processing, the system first calculates the average surface normal direction of the target surface group as the extrapolation reference direction, and then translates each surface in the surface group along this direction by the length defined by the base distance threshold. During the translation, new top and side surface geometries are generated simultaneously. The top surface retains the original shape and contour of the target surface group, while the side surfaces connect the edges of the original surfaces to the extruded top surface edges, thus forming a closed three-dimensional convex structure with realistic thickness. The purpose of this processing method is to provide a solid geometric basis for biomimetic irregular paths that can be subsequently subdivided and smoothed, avoiding surface floating or boundary cracking problems caused by simple displacement. The above description of the base distance threshold value is only one example, and this disclosure is not intended to limit it.
[0115] Optionally, further, when determining the base distance threshold for the first extrapolation, in addition to using a globally uniform fixed parameter, a dynamic value can be assigned based on the local curvature of the region where the target face group is located. For example, in concave or bent regions with high curvature, the base distance threshold can be appropriately reduced to decrease the risk of self-intersection or face overlap after extrapolation; in transition regions with relatively gentle curvature, a larger base distance threshold can be maintained to ensure that the path has sufficient visual convexity intensity. That is to say, the base distance threshold can not only be a constant, but also a function mapping result related to the vertex curvature value or the face group area, and this embodiment does not limit this. This dynamic adjustment mechanism can maintain the stability of the extrapolation operation on complex surfaces, and can also make the biomimetic path in different regions present a natural gradient in thickness.
[0116] Optionally, a second extrapolation is performed on the infrastructure with a transition distance threshold, forming a fine edge transition layer at the top of the path.
[0117] Optionally, the transition distance threshold used in the second extrapolation is significantly smaller than the base distance threshold of the first extrapolation. This aims to create a finer edge transition at the top of the protruding structure, preventing the top surface from becoming too flat after the first extrapolation and revealing traces of artificial machining. In one embodiment, the transition distance threshold can be a scalar value ranging from one-twentieth to one-fifth of the base distance threshold. It should be noted that the above proportional relationship is only one example. In actual implementation, it can be adaptively adjusted according to the overall scale of the biomimetic path, the surface complexity of the target model, or the number of subsequent subdivisions. This disclosure is not intended to limit it. Considering that a single large-distance extrapolation can easily create a sharp geometric transition at the boundary between the top and side surfaces, superimposing a small-distance secondary extrapolation can construct a subtle step-like contraction at the top. This makes the connection between the top and side surfaces of the path more rounded after subsequent subdivision smoothing, thereby effectively enhancing the naturalness and organic nature of the biomimetic path.
[0118] Optionally, the determination of the transition distance threshold can be varied. It can be a pre-set fixed ratio value, user-defined input received through a programmatic interface, or the result of dynamic feedback adjustment via a safety detection module. For example, before performing the second extrapolation, the system can estimate a recommended transition distance threshold based on the spatial enclosure size of the target surface group or the dispersion of the normals of neighboring surfaces. If a risk of self-intersection is detected after moving along the preset extrapolation direction, the recommended value is compressed to within the safe distance threshold, or the second extrapolation operation of the target surface group is directly canceled. This adaptive distance control mechanism can, on the one hand, avoid the batch interleaving problem caused by fixed parameters on complex surfaces, and on the other hand, allow the thickness of the top transition layer to change naturally according to the local geometry. It should be noted that the above explanation of the logic for determining the transition distance threshold is only one example, and this disclosure is not intended to limit the specific calculation method of the threshold.
[0119] In an optional implementation, before performing extrapolation on the target surface group, the method further includes: detecting whether self-intersection occurs after the target surface group moves along a preset extrapolation direction; if self-intersection occurs, the extrapolation distance is limited to a safe distance threshold, or the extrapolation operation of the target surface group is skipped. In this way, by predicting the spatial interference of the surface group before generating the thickness structure, the extrusion amplitude can be compressed or local thickening can be canceled in a timely manner, thereby effectively suppressing interpenetration defects caused by geometric overlap and improving the structural stability of the generated result in concave and high-curvature regions.
[0120] In one implementation, when the system is about to perform the first extrusion on the separated face group, it first temporarily translates the face group along a predetermined direction vector by a length equal to the base distance threshold, and calls mesh collision detection to determine whether the translated geometry penetrates the original mesh. Specifically, if the test finds that a face group will overlap with the opposite model surface at the target extrusion position, the system automatically reduces the extrusion amplitude to a preset safe distance threshold to retain a non-intersecting gap; if the intersection area is too large and cannot be eliminated by reducing the distance, the extrusion operation of the face group is abandoned directly, so that it maintains its original surface state, thereby avoiding the generation of intersecting geometry in complex concave areas.
[0121] Optionally, the preset extrapolation direction indicates the virtual displacement orientation during the target surface group detection stage, which can be determined based on the surface group normal or local geometric trend.
[0122] Optionally, the aforementioned preset extrapolation direction can be set as the average surface normal direction of a single target surface group, or as a corrected direction after weighted smoothing of the normals of neighboring surfaces, or as a direction specified by a custom guide vector. It should be noted that the method for establishing this extrapolation direction is not limited to a single algorithm, but can be flexibly adjusted according to the local concavity / convexity properties of the model and the overall shape requirements. For example, in areas with obvious ridge-like protrusions, to make the extrapolation result better fit the trend of the original surface, the system can first calculate the normals of each original surface in the target surface group, and then perform smoothing aggregation under angle constraints on the neighboring normals, thereby obtaining a corrected direction that is neither abrupt nor does it reflect the local trend. Furthermore, if certain areas have strong directional texture requirements, artists can indirectly intervene in the distribution of the extrapolation direction by drawing direction fields or setting guide curves. By configuring differentiated extrapolation directions for different surface groups, the subsequently generated thickness structures can be more diverse in orientation and shape, while ensuring that self-intersection detection can simulate the spatial occupancy after real extrusion, improving the accuracy of collision prediction.
[0123] Optionally, the self-intersection detection, which predicts spatial conflicts after the displacement of the target face group, can be achieved through initial screening using bounding boxes and precise face intersection testing. Optionally, the self-intersection detection is performed before the actual polygon extrusion. The system can simulate the geometry after extrusion by temporarily copying the target face group and translating it a corresponding distance along a preset extrapolation direction. During this simulation, the detection logic can be implemented in layers: first, a coarse-grained intersection screening is performed on the translated face group with the original model and adjacent extrapolation structures using axially aligned bounding boxes or directional bounding boxes to quickly eliminate obviously non-collision situations; when potential overlaps are found during initial screening, a precise geometric intersection test is further performed face-by-face and edge-by-edge to confirm whether face penetration has actually occurred. It should be noted that, to improve detection efficiency, a local spatial hash or octree structure can be maintained for each target face group to accelerate the querying and intersection determination of neighboring faces within a relatively optimal time complexity. By classifying detection results into different levels such as no collision, slight overlap, and severe penetration, the system can provide a grading basis for subsequent distance limitation or skipping decisions, avoiding topological chaos and waste of computing resources caused by directly performing extrapolation and then repairing the overlap.
[0124] Optionally, the self-intersection detection described above can not only determine the interpenetration between the target face group and the original input model, but can also be extended to detect the mutual penetration between neighboring face groups that have already been extrapolated. Considering that in actual processing, multiple neighboring target face groups may have similar extrapolation distances and directions, and they are prone to face-to-face overlap in local narrow areas after being extruded simultaneously, as a possible implementation, the system can establish a dynamically updated spatial index of processed face groups before extrapolating each batch of face groups, and compare the virtual translation result of the face group to be tested with the stored geometry of the extrapolated face groups. If a potential conflict is found, the extrapolation amplitude is reduced in advance or the processing order of the face group is delayed, and the determination is made after the surrounding structure is stable. By introducing this neighborhood interpenetration prediction mechanism, the local density accumulation problem during large-scale batch extrapolation can be effectively controlled, so that the final generated biomimetic irregular path maintains high density without being overcrowded.
[0125] Optionally, the safety distance threshold defines the maximum non-intersecting extrusion range, which can be determined based on local minimum gap or global parameters.
[0126] Optionally, the aforementioned safety distance threshold can be a globally unified scalar parameter or an adaptive variable dynamically calculated based on local model features. In one implementation, the system can calculate a local safety distance threshold by sampling the nearest opposite surface distance along the extrapolation direction of the target face group and multiplying this distance by a safety factor less than 1, thereby ensuring that extrapolation in narrow recesses does not touch the opposite surface. In another implementation, the user can directly specify a global threshold proportional to the model bounding box size, enabling unified control of the extrapolation upper limit for all regions during the quick preview stage. It should be noted that this threshold can be expressed as a fixed value or as a proportional coefficient relative to the current extrapolation distance. When the detection result indicates that self-intersection will occur after the face group is virtually translated, the system automatically limits the extrapolation distance below the safety distance threshold, making it a geometric upper bound that retains a certain thickness while avoiding intersecting. Furthermore, the safety distance threshold can also be correlated with curvature filtering attributes, such as automatically tightening the threshold in high curvature regions and appropriately widening it in open regions, thereby achieving a balance between structural stability and visual prominence under different local morphologies.
[0127] Optionally, the above extrapolation distance limit preserves the local protrusion by reducing the distance, while avoiding penetration between the target surface group and the surrounding geometry.
[0128] Optionally, when the self-intersection detection determines that there is local overlap after the target surface group is translated along the preset extrapolation direction, but the overlap amount does not exceed the preset tolerance, the system can prioritize the distance reduction strategy instead of directly canceling the extrapolation. Specifically, the system can calculate the difference between the current extrapolation distance and the safety distance threshold in real time, and redetermine a new extrapolation distance that does not exceed the safety distance threshold based on this difference, so that the extruded top surface stops just before the penetration boundary. As a possible implementation, this distance reduction process can be combined with iterative binary search: first, using the safety distance threshold as the upper limit and zero as the lower limit, the maximum non-interlacing distance is approximated through multiple virtual translations and intersection tests, thereby obtaining an actual extrusion value that is both close to the ideal thickness and sufficiently safe. It should be noted that if the remaining distance after distance reduction is too small to form an effective visual protrusion, the system can further trigger the extrapolation skip logic to avoid the thin film structure that is temporarily retained affecting the overall aesthetics. In this way, most of the path details that should have been generated can be retained in the recessed and adjacent dense structure areas, reducing the large-area loss of details caused by conservative processing and improving geometric utilization.
[0129] Optionally, the aforementioned limiting mode for extrapolation distance can be differentiated based on the severity of intersection and the local morphology of the region where the face group is located. For example, for face groups with only slight penetration at a few points on the edge, the system can directly compress their extrapolation distance to a safe distance threshold and supplement it with subdivision smoothing to make the top contour of the reduced distance transition naturally. For face groups that have a large area overlap with multiple opposite regions, the side generation can be further reduced on the basis of the reduced distance, or the face group can be split into smaller sub-face groups and re-detected separately. In addition, in order to avoid step-like discontinuities after the reduction distance, the system can also perform fusion smoothing or bridging processing on the boundary between the reduced face group and the unreduced neighboring face groups. By introducing this combination mechanism of hierarchical processing and boundary repair, the limited extrapolation result can still blend into the overall undulation rhythm of the surrounding biomimetic path while maintaining non-intersection, avoiding abrupt planar truncation or abrupt depression.
[0130] Optionally, skipping the extrapolation operation of the target face group means directly canceling the extrusion of the face group when an irreconcilable penetration risk is detected. Optionally, when the self-intersection detection indicates that the target face group will produce severe geometric interlacing that cannot be eliminated by the reduction distance after moving along the preset extrapolation direction, the system can directly abandon the extrapolation process of the face group, so that it retains the boundary shape after vertex separation without adding additional extrusion structure. As a possible implementation, the above skip decision can be based on a dynamic threshold: if the available extrusion space between the original base distance threshold and the safety distance threshold is less than the preset minimum effective thickness, it is determined that the face group does not have the physical space to generate an effective protrusion structure, and the skip logic is directly triggered. It should be noted that the skipped face group is still retained in the final model, which is represented by a clear groove or boundary line, rather than deleting the face in that area. In this way, even if some extreme concave areas cannot form protrusions, the groove effect generated by the separation boundary can be used to maintain the visual continuity of the biomimetic path, thereby obtaining a natural undulating texture with both protrusions and grooves as a whole. Furthermore, to reduce the sense of local discontinuity caused by skipping operations, the system can select a portion of adjacent boundaries that do not severely overlap around the skipped face group and perform alternative extrapolation to fill the visual gap.
[0131] In an optional implementation, after generating the surface structure, the method further includes: performing subdivision smoothing on the model containing the surface structure to obtain a smooth surface; generating color gradient attributes based on the curvature values of each region; and outputting the final model. Figure 10 The diagram shows a final model. By performing subdivision smoothing on the model containing surface structures and generating color gradient attributes, not only can the angular features of polygon extrapolation be eliminated to obtain a smooth, rounded surface geometry, but it also allows subsequent rendering pipelines to intuitively distinguish the curvature distribution of path regions based on color.
[0132] In one implementation, a subdivision smoothing process is performed on the biomimetic irregular path model after multi-stage extrapolation. The Catmull-Clark subdivision algorithm is iterated twice to transition the original polygonal top and side surfaces into continuous smooth surfaces and close micro-cracks. Subsequently, the curvature values of each region on the model surface are read, and color gradient attributes are generated according to a multi-point gradient rule that maps low curvature to cool colors and high curvature to warm colors. These attributes are then written into the vertex color channels, outputting a final model with geometric thickness and visual intuitiveness. Optionally, the subdivision smoothing process is used to perform topological subdivision and geometric smoothing on models containing surface structures to obtain continuously differentiable surface geometry.
[0133] Optionally, the subdivision smoothing process can employ the Catmull-Clark subdivision algorithm to iteratively calculate the model containing surface structures. During each subdivision, facets are split and vertex positions are smoothly updated, gradually transitioning the sharp edges and stepped cross-sections originally generated by polygon extrapolation into a continuous, smooth curved surface. It should be noted that the number of subdivision iterations can be flexibly set according to the required level of detail, for example, two iterations to achieve sufficient geometric density and visual smoothness while maintaining computational efficiency. Furthermore, the consistency of boundary topology can be maintained during the subdivision process, avoiding cracks or geometric drift at the boundaries, thereby ensuring the overall structural integrity of the biomimetic path and facilitating direct use in high-fidelity rendering or precision manufacturing processes.
[0134] Optionally, the color gradient attribute is generated based on curvature for visual differentiation and subsequent material processing. Alternatively, the color gradient attribute can be generated through multi-point gradient mapping based on the curvature values of different regions on the surface of the dual mesh model. For example, low-curvature areas can be mapped to cool tones while high-curvature areas are mapped to warm tones, making the curvature of the path structure visually identifiable. This attribute can be stored in the vertex color channel or a separate material attribute table, serving as input data for the rendering pipeline or 3D printing visualization stage. This helps artists or engineers quickly identify dense and flat areas of the path, allowing for further surface processing or local enhancement of specific areas. It should be noted that the above description of the color tone configuration is only one example, and this disclosure is not intended to limit the color mapping rules. In actual implementation, any suitable color gamut distribution scheme can be adopted according to the material style or visualization requirements, such as mapping curvature values to grayscale steps or custom multi-color gradients.
[0135] In an optional implementation, the process of selecting a target boundary set from the edges of the dual mesh model based on a preset curvature threshold further includes: for the two vertices corresponding to the two endpoints of each edge, reading the vertex curvature values of the two vertices and calculating the probability value of the edge being included in the target boundary set; and determining whether the edge is included in the target boundary set based on the probability value and the corresponding random sampling rule. In this way, by extending the deterministic curvature threshold selection to probabilistic random sampling, not only can the rigidity of boundary selection leading to mechanical path traces be avoided, but natural random breaks can also be introduced while maintaining curvature dominance, making the biomimetic path more organically varied.
[0136] For example, for a selected edge on the mesh surface after dual transformation, the vertex curvature values of its two endpoints are read as 0.85 and 0.52, respectively. Based on these values, the system calculates a probability of 0.78 for this edge to be included in the target boundary set. Subsequently, the system generates a uniform random number between 0 and 1, 0.63. Since 0.63 is less than or equal to 0.78, this edge is included in the target boundary set. As another implementation, if the calculated probability value for another edge with a lower curvature value is 0.25, and the random number is 0.81, then this edge is rejected, thereby forming a discontinuous path boundary with a natural sense of breakage on the dual mesh surface.
[0137] Optionally, the above probability value is calculated based on the curvature of the two vertices and is used to characterize the probability that the edge is included in the target boundary set, thereby achieving flexible curvature screening.
[0138] Optionally, the above probability value can be calculated in various ways. Considering that relying solely on a hard curvature threshold for boundary screening can easily produce overly regular broken boundaries, lacking the accidental breaks and sparse variations common in natural forms, as a possible implementation, the probability value can be determined based on the weighted average, maximum value, or normalized result of the curvature values at the two ends of an edge after nonlinear mapping. For example, if the vertex curvature values at the two endpoints of an edge are 0.8 and 0.5 respectively, the larger value of 0.8 can be selected as the base, and then a decay coefficient related to the curvature difference can be superimposed to finally calculate a probability value of 0.72. It should be noted that the specific calculation logic of the probability value is not limited to the above example; it can also be comprehensively evaluated by combining the curvature gradient of the vertex's neighborhood, the local concavity / convexity index, or multi-scale curvature features. Furthermore, the probability value can be mapped to different numerical ranges, for example, by adjusting the power function curve to enhance the selection advantage of high curvature regions, or by truncating to limit the selection probability of low curvature regions, thereby flexibly controlling the density contrast and breakage frequency of path boundaries in practical applications.
[0139] Optionally, the above random sampling rule controls whether an edge is included in the target boundary set based on probability values, introducing controllable random breaks and organic discontinuities. Optionally, the above random sampling rule determines whether to include the corresponding edge in the target boundary set based on the probability value. The sampling method can include, but is not limited to, uniform random number comparison, Bernoulli trial, stratified sampling, or conditional sampling based on spatial correlation. To avoid the problem of excessively strong or weak local path continuity caused by simultaneously retaining or removing adjacent edges when directly sampling independently based on probability values, as a possible implementation, the rule can independently generate a uniformly distributed random number between 0 and 1 for each edge and compare this random number with the edge's probability value; if the random number is less than or equal to the probability value, the edge is retained in the target boundary set. Furthermore, to obtain a distribution that better conforms to natural growth patterns, the sampling process can also introduce edge adjacency constraints, so that when multiple edges have been continuously retained in a certain region, the probability of the next adjacent edge being retained is moderately reduced, thereby forming a more natural random break pattern in spatial distribution. It should be understood that the sampling results do not necessarily correspond strictly to the probability values. In actual implementation, the distribution of the sampling function can be adjusted according to the needs of the artistic style. This disclosure is not limited to this.
[0140] According to one embodiment of the present disclosure, a structure generation apparatus, such as Figure 11 As shown, the device may include: The acquisition module is used to acquire the input 3D mesh model and perform preprocessing on the 3D mesh model to obtain the target model; A building module is used to construct a density field based on the surface curvature information of the target model; The remeshing module is used to perform adaptive remeshing on the target model based on the density field to obtain a remeshed model. The transformation module is used to perform a topological dual transformation on the heavy mesh model to obtain a dual mesh model. The generation module is used to determine the target region from the dual mesh model based on the curvature characteristics of each region on the surface of the dual mesh model, and to perform selective extrapolation on the target region to generate the surface structure.
[0141] In this way, by constructing a density field based on the surface curvature information of the target model and performing adaptive remeshing, the sampling distribution can be adjusted according to local morphological features, which helps to reduce the processing load caused by redundant mesh data. After forming irregular cell boundaries through topological dual transformation, a path topology basis that tends to be naturally curved can be obtained. Then, based on the curvature features, the target region is determined from the dual mesh and selective extrapolation is performed, which helps to concentrate the thickness generation operation in the region with significant morphological changes, reduce the risk of meaningless protrusions and self-intersections, and thus reduce the computational cost of subsequent geometric correction. By combining the above processing, a geometric structure with real thickness and clear topological boundaries can be generated on the model surface, improving the processing efficiency of procedural modeling.
[0142] The specific details of each part of the above-mentioned device have been described in detail in the method section of the implementation plan. For any undisclosed details, please refer to the implementation plan of the method section, and therefore will not be repeated here.
[0143] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0144] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure.
[0145] The following is a detailed reference. Figure 12 The diagram illustrates a structural schematic suitable for implementing an electronic device according to embodiments of the present disclosure. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 1201, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1202 or a program loaded from memory 1208 into random access memory (RAM) 1203. The RAM 1203 also stores various programs and data required for the operation of the electronic device. The processor 1201, ROM 1202, and RAM 1203 are interconnected via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.
[0146] Typically, the following devices can be connected to I / O interface 1205: input devices 1206 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 1207 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 1208 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1209. Communication device 1209 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 12 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0147] In particular, according to one embodiment of this disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, one embodiment of this disclosure includes a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication device 1209, or installed from memory 1208, or installed from ROM 1202. When the computer program is executed by processor 1201, it performs the functions defined in the methods described above in various embodiments of this disclosure.
[0148] Figure 12 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0149] This disclosure also provides a computer-readable storage medium in which the methods described in this disclosure can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium after being downloaded over a network. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium may also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0150] A portion of this disclosure can be applied to computer program products, such as computer program instructions, which, when executed by a computer, can invoke or provide methods and / or technical solutions according to this disclosure through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, and installation package files. Accordingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions; the computer compiling the instructions and then executing the corresponding compiled program; the computer reading and executing the instructions; or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0151] Although embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A structure generation method, the method comprising: Obtain the input 3D mesh model and perform preprocessing on the 3D mesh model to obtain the target model; Based on the surface curvature information of the target model, a density field is constructed; Adaptive remeshing is performed on the target model based on the density field to obtain a remeshed model; Perform a topological dual transformation on the heavy mesh model to obtain a dual mesh model; Based on the curvature characteristics of each region on the surface of the dual mesh model, a target region is determined from the dual mesh model, and a selective extrapolation process is performed on the target region to generate a surface structure.
2. The method according to claim 1, wherein, The preprocessing of the three-dimensional mesh model includes: The three-dimensional mesh model is subjected to scale normalization to obtain a standardized three-dimensional mesh model; The standardized three-dimensional mesh model is subjected to surface deformation processing to obtain a deformed model; The deformation model is subjected to remeshing and smoothing iteration to obtain the target model.
3. The method according to claim 2, wherein, The surface deformation processing performed on the standardized three-dimensional mesh model includes: Obtain the preset noise generation function and control parameters; Based on the noise generation function and the control parameters, the vertices of the standardized three-dimensional mesh model are displaced along the normal direction to obtain the deformation model.
4. The method according to claim 2, wherein, The remeshing and smoothing iteration process performed on the deformation model includes: Perform the first round of remeshing, setting the target side length to the initial side length threshold; Smoothing is performed on the result of the first round of remeshing; Perform at least one round of subsequent remeshing, wherein the target side length of the subsequent remeshing is smaller than the target side length of the previous round.
5. The method according to claim 1, wherein, The construction of the density field based on the surface curvature information of the target model includes: Calculate the local curvature values of each region of the target model; The local curvature value is mapped to a preset target side length range to obtain the density attribute value; Write the density attribute value into the scalar attribute field of the corresponding vertex of the target model.
6. The method according to claim 1, wherein, Performing a topological dual transformation on the regrid model includes: Traverse each triangular face of the remesh model and determine the geometric center of each triangular face; For each original vertex, connect the geometric centers of its adjacent triangle faces in a wrapping order to generate a new polygon face; The original vertex is transformed into the center of the new polygonal face, and the edges of the original triangular face are transformed into new edges connecting adjacent geometric centers.
7. The method according to claim 6, wherein, After generating the new polygonal face, the process also includes: Perform convexity processing on the new polygonal surface; The number of sides of the new polygonal face is limited to a preset maximum number of sides threshold.
8. The method according to claim 1, wherein, The selective extrapolation process performed on the target region includes: Calculate the curvature value of each face in the dual mesh model. For each vertex, calculate the average curvature value of its adjacent faces and use the average value as the vertex curvature value. Based on a preset curvature threshold, a set of target boundaries is selected from the edges of the dual mesh model. Perform a vertex-level separation operation on the target boundary set to obtain the separated target face group; Extrapolation is performed on the target surface group to generate the surface structure.
9. The method according to claim 8, wherein, The step of filtering the target boundary set from the edges of the dual mesh model based on a preset curvature threshold includes: For each edge, read the vertex curvature values of the two vertices corresponding to the two endpoints of the edge. The larger of the two vertex curvature values is compared with the curvature threshold. If the larger one is greater than or equal to the curvature threshold, then the edge is included in the target boundary set.
10. The method according to claim 8, wherein, The extrapolation process performed on the target surface group includes: The target surface group is subjected to a first extrapolation, with the extrapolation distance being a base distance threshold, to generate a geometric structure with a base thickness distance, the geometric structure including a top surface and side surfaces; A second extrapolation is performed on the target surface group after the first extrapolation, and the extrapolation distance is a transition distance threshold, which is less than the base distance threshold.
11. The method according to claim 10, wherein, Before performing the extrapolation process on the target surface group, the method further includes: Detect whether the target surface group produces self-intersection after moving along a preset extrapolation direction; If the self-intersection occurs, the extrapolation distance is limited to a safe distance threshold, or the extrapolation operation for the target surface group is skipped.
12. The method according to claim 1, wherein, Following the generation of the surface structure, the process further includes: A subdivision smoothing process is performed on the model containing the surface structure to obtain a smooth surface; Color gradient attributes are generated based on the curvature values of each region, and the final model is output.
13. The method according to claim 1, wherein, The step of constructing the density field also includes: Obtain the preset weighted masking area; Local modulation of the density attribute value is performed based on the weighted masking region, so that the sampling density within the weighted masking region is different from that in other regions.
14. The method according to claim 8, wherein, The step of filtering the target boundary set from the edges of the dual mesh model based on a preset curvature threshold also includes: For each edge, the two vertices corresponding to the two endpoints are read, and the vertex curvature values of the two vertices are calculated, and the probability value of the edge being included in the target boundary set is calculated. Based on the probability value, determine whether the edge should be included in the target boundary set according to the random sampling rule corresponding to the probability value.