A hybrid modeling method, apparatus and device
Patent Information
- Application Number
- CN202510546534.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2045-04-28
AI Technical Summary
[0005]有鉴于此,本发明提供了一种混合建模方法、装置及设备,以解决现有的混合建模过程中融合效果差且计算资源消耗大的问题
[0038]本发明实施例提供的混合建模方法,通过将所有部件的三维模型的模型参数存储在一个混合数据结构中,可以方便地管理和操作不同类型的三维模型,根据混合数据结构中的信息,对所有部件的三维模型进行必要的几何处理,使其更好地进行融合,使用融合算法,基于混合数据结构中存储的信息,对所有部件处理后的三维模型的边界进行几何匹配,形成一个无缝的整体,消除可见的缝隙或不连续性,同时保证融合后的第一混合模型中的网格模型与曲面模型的法向量保持一致,提升了最终模型的质量和可靠性。
Smart Images

Figure CN120495573B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D modeling technology, and more specifically to a hybrid modeling method, apparatus, and equipment. Background Technology
[0002] In many fields such as aerospace, automotive manufacturing, architectural design, and medical imaging, high-precision 3D modeling and rendering of complex structures are often required. These fields demand that models not only possess extremely high geometric accuracy but also realistically reflect material properties, surface textures, and lighting effects to meet the needs of design, analysis, and visualization.
[0003] Depending on the different characteristics of the structure, either a mesh model or a surface model can typically be constructed. Mesh models are suitable for representing complex, irregular structures, while surface models are better suited for accurately describing irregular, streamlined geometries. To combine the advantages of both, a hybrid model is often constructed, which combines mesh and surface models to achieve more refined and flexible modeling.
[0004] However, in the current process of constructing hybrid models, the fusion of mesh models and surface models may have gaps or overlaps, resulting in poor fusion effects and making the hybrid model unable to accurately reflect the actual structure. Furthermore, adding high-resolution textures to the hybrid model in 3D space consumes significant computational resources. Summary of the Invention
[0005] In view of this, the present invention provides a hybrid modeling method, apparatus and device to solve the problems of poor fusion effect and high computational resource consumption in the existing hybrid modeling process.
[0006] In a first aspect, the present invention provides a hybrid modeling method, the method comprising:
[0007] In modeling software, for any component of the target structure, a three-dimensional model of the component is constructed. The three-dimensional model can be a mesh model or a surface model.
[0008] Under geometric constraints, the three-dimensional models of all components are fused to obtain the first hybrid model of the target structure;
[0009] Flatten the first hybrid model in a two-dimensional plane to obtain the corresponding two-dimensional coordinates;
[0010] Image textures are superimposed on two-dimensional coordinates, and data compression is performed to obtain texture coordinates;
[0011] By mapping texture coordinates to three-dimensional space, a second hybrid model is obtained;
[0012] The second hybrid model is customized, and the third hybrid model of the target structure is exported through rendering.
[0013] The hybrid modeling method provided in this invention constructs suitable 3D models for components in modeling software, merges the 3D models of all components under geometric constraints to generate a first hybrid model, ensuring smooth transitions between components and avoiding cracks or abrupt changes. Then, the 3D model is flattened onto a 2D plane to obtain the corresponding 2D coordinates, reducing computational resource consumption and facilitating subsequent texture mapping. Image textures are then superimposed on the 2D coordinates and data compression is performed to generate efficient texture coordinates, giving the model rich surface details, improving visual effects, reducing file size, and improving rendering and storage efficiency. The 2D texture coordinates are remapped back to 3D space to form a textured second hybrid model. Finally, personalized settings are made, and a third hybrid model of the target structure is exported after rendering. By integrating multiple steps such as geometric modeling, seamless fusion, flattening, texture superposition, and rendering, a systematic hybrid modeling process is formed, improving work efficiency, ensuring that the final output model has high precision and high visual effects, and reducing storage and computational resource consumption.
[0014] In one alternative implementation, for any component of the target structure, before constructing a three-dimensional model of the component, the method further includes:
[0015] For any component, construct an initial model of the component, which can be a mesh model or a surface model;
[0016] Determine whether to convert the initial model of the component;
[0017] In the case of converting the initial model of a component, the initial model is converted to obtain a three-dimensional model of the component; or,
[0018] Without converting the initial model of the part, the initial model is used as the three-dimensional model of the part.
[0019] The hybrid modeling method provided in this embodiment of the invention creates an initial model of a component, determines whether the initial model needs to be converted, and if conversion is required, converts the initial model into a 3D model that is more suitable for the final application; if no conversion is required, the initial model is used directly as the 3D model. Through selective conversion, it ensures that the model of each component is highly matched with the design requirements, which helps to improve the model quality.
[0020] In one alternative implementation, the initial model is a mesh model;
[0021] The initial model is transformed to obtain a 3D model of the component, including:
[0022] Simplify all meshes in the initial model;
[0023] Curve fitting is performed on the vertices of all simplified meshes in the initial model to obtain the curved structure skeleton.
[0024] Multiple surfaces are generated based on the curve structure skeleton;
[0025] By smoothing, splicing, and repairing multiple surfaces, a surface model is obtained, which is then used as the 3D model of the component.
[0026] The hybrid modeling method provided in this invention simplifies the initial mesh model, reduces unnecessary vertices and faces, retains the main structural features, and reduces the amount of computation. It uses the simplified mesh vertices to perform curve fitting to generate a curved structural skeleton that can represent the shape of the component. Based on the curved structural skeleton, multiple surface segments are generated. The generated multiple surfaces are smoothed, spliced, and repaired to ensure a smooth transition between the surfaces, and finally a complete surface model is formed. The initial mesh model is converted into a surface model, which can meet the design requirements and ensure that the model can maintain the original geometric features.
[0027] In one alternative implementation, the initial model is a surface model;
[0028] The initial model is transformed to obtain a 3D model of the component, including:
[0029] The initial model of the component is sampled to generate multiple mesh points;
[0030] Multiple quadrilateral grids are generated based on consecutive grid points in a set of grid points.
[0031] Multiple mesh patches are generated based on discrete mesh points from a plurality of mesh points;
[0032] A mesh model is obtained based on multiple quadrilateral meshes and multiple mesh patches. The mesh model is used as the three-dimensional model of the component, and the normal vector of the three-dimensional model is consistent with the normal vector of the initial model.
[0033] The hybrid modeling method provided in this invention sample the initial surface model to generate multiple discrete mesh points on the surface. Multiple quadrilateral meshes are generated using continuous mesh points to form structured mesh segments. Multiple irregular mesh patches are generated using discrete mesh points to fill blank areas on the surface. The generated quadrilateral meshes and mesh patches are combined to form the final mesh model. This method converts the initial surface model into a mesh model, meeting design requirements while ensuring that the normal vectors of the newly generated mesh model are consistent with those of the initial surface model, thus preserving the original geometric features.
[0034] In one alternative implementation, the three-dimensional models of all components are fused under geometric constraints to obtain a first hybrid model of the target structure, including:
[0035] The model parameters of the 3D models of all components are stored in a hybrid data structure;
[0036] Based on the hybrid data structure, the 3D models of all components are geometrically processed to obtain the processed 3D model;
[0037] A fusion algorithm is adopted, based on a hybrid data structure, to perform geometric matching on the boundaries of the 3D model after processing all components, resulting in a first hybrid model. The normal vectors of the mesh model in the first hybrid model are consistent with the normal vectors of the surface model.
[0038] The hybrid modeling method provided in this invention stores the model parameters of the 3D models of all components in a hybrid data structure, which facilitates the management and operation of different types of 3D models. Based on the information in the hybrid data structure, necessary geometric processing is performed on the 3D models of all components to better integrate them. Using a fusion algorithm, based on the information stored in the hybrid data structure, the boundaries of the processed 3D models of all components are geometrically matched to form a seamless whole, eliminating visible gaps or discontinuities. At the same time, it ensures that the normal vectors of the mesh model and the surface model in the first hybrid model after fusion are consistent, thereby improving the quality and reliability of the final model.
[0039] In one optional implementation, the three-dimensional models of all components are geometrically processed to obtain a processed three-dimensional model, including:
[0040] For any component, if the component's 3D model is a mesh model, the mesh model is simplified, smoothed, and its topology is reconstructed to obtain the processed 3D model.
[0041] When the 3D model of a component is a curved surface model, the curved surface model is fitted, subdivided, and subjected to Boolean operations to obtain the processed 3D model.
[0042] The hybrid modeling method provided in this invention improves processing efficiency and flexibility, reduces unnecessary computational burden, and enhances overall performance by employing different geometric processing methods for different types of 3D models. Furthermore, the processed 3D models possess higher quality, providing a foundation for subsequent fusion.
[0043] In one optional implementation, the first hybrid model is flattened in a two-dimensional plane to obtain the corresponding two-dimensional coordinates, including:
[0044] The first hybrid model is parameterized to obtain the initial two-dimensional coordinates of all three-dimensional vertices in the first hybrid model in the two-dimensional plane;
[0045] Seamlessly stitching is performed based on the initial two-dimensional coordinates to obtain stitched two-dimensional coordinates;
[0046] Optimization is performed based on spliced two-dimensional coordinates to obtain two-dimensional coordinates.
[0047] The hybrid modeling method provided in this invention parameterizes the first hybrid model by mapping all its three-dimensional vertices onto a two-dimensional plane to obtain initial two-dimensional coordinates. It then seamlessly stitches together the boundaries between different components to obtain stitched two-dimensional coordinates. Based on the stitched two-dimensional coordinates, it performs optimization processing to obtain the final two-dimensional coordinates. This method can better preserve the geometry and topology of the three-dimensional model on a two-dimensional plane, transforming a three-dimensional problem into a two-dimensional problem. This facilitates subsequent geometric processing and optimization, and reduces computational complexity.
[0048] In one optional implementation, an image texture is superimposed on two-dimensional coordinates and data compression is performed to obtain texture coordinates, including:
[0049] Generate two-dimensional parameters based on two-dimensional coordinates;
[0050] Overlay two-dimensional parameters with image texture;
[0051] The texture coordinates are obtained by simplifying the mesh and compressing the texture after the two-dimensional parameters of the texture overlay are processed.
[0052] The hybrid modeling method provided in this invention transforms complex 3D models and texture processing into efficient 2D operations by generating 2D parameters, overlaying image textures, and performing data compression. This reduces unnecessary computational burden, simplifies the processing flow, and ensures that the final model accurately reflects the real effect of the texture through reasonable mesh simplification and texture compression algorithms.
[0053] In a second aspect, the present invention provides a hybrid modeling apparatus, the apparatus comprising:
[0054] The first modeling module is used in the modeling software to construct a three-dimensional model of any component of the target structure. The three-dimensional model can be a mesh model or a surface model.
[0055] The fusion module is used to fuse the 3D models of all components under geometric constraints to obtain the first hybrid model of the target structure.
[0056] The flattening module is used to flatten the first hybrid model in a two-dimensional plane to obtain the corresponding two-dimensional coordinates;
[0057] The compression module is used to overlay image textures on two-dimensional coordinates and compress the data to obtain texture coordinates;
[0058] The recovery module is used to map texture coordinates to three-dimensional space to obtain a second hybrid model;
[0059] The export module is used to personalize the second hybrid model and export the third hybrid model of the target structure through rendering.
[0060] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the hybrid modeling method of the first aspect or any corresponding embodiment described above.
[0061] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the hybrid modeling method of the first aspect or any corresponding embodiment thereof.
[0062] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the hybrid modeling method of the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0063] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0064] Figure 1 This is a flowchart of a hybrid modeling method according to an embodiment of the present invention;
[0065] Figure 2 This is a schematic diagram of model transformation according to an embodiment of the present invention;
[0066] Figure 3 This is a structural block diagram of a hybrid modeling apparatus according to an embodiment of the present invention;
[0067] Figure 4 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0069] Currently, in the process of constructing hybrid models, gaps or overlaps may exist in the fusion of mesh models and surface models, resulting in poor fusion effects and making it impossible for the hybrid model to accurately reflect the actual structure. Furthermore, adding high-resolution textures to the hybrid model in 3D space consumes significant computational resources. The hybrid modeling method provided in this invention integrates multiple steps such as geometric modeling, seamless fusion, flattening, texture overlay, and rendering, forming a systematic hybrid modeling workflow. This improves work efficiency, ensures that the final output model has high precision and high visual quality, and reduces the consumption of storage and computational resources.
[0070] According to an embodiment of the present invention, a hybrid modeling method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0071] This embodiment provides a hybrid modeling method that can be used on a terminal, such as a computer, where modeling software is installed. Figure 1 This is a flowchart of a hybrid modeling method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0072] Step S101: In the modeling software, for any component of the target structure, construct a three-dimensional model of the component. The three-dimensional model can be a mesh model or a surface model.
[0073] Specifically, this modeling software supports the construction of mesh models and surface models, sharing a common editing system and settings options under both modeling algorithms. These include editing operations such as global selection, movement, rotation, scaling, undo / return mechanisms, show / hide mechanisms, system snapping, and group ungrouping mechanisms. These operations can be applied not only to basic elements like points, edges, and faces in mesh models but also to related components in surface models, such as curves, surfaces, control vertices, edit points, surface lines, and natural edges. Since the target structure typically comprises multiple parts with different design requirements, corresponding mesh or surface models can be constructed for each part. The geometric representations of mesh models and surface models differ. Mesh models typically use a mesh representation, described using data structures such as vertices, edges, and faces. Each edge consists of a set of vertices, and each face consists of a set of edges. Surface models are represented by parametric surfaces, whose shapes are precisely defined by mathematical equations. For example, when constructing complex, irregularly shaped building models, the glass curtain wall structure, with its smooth, hyperboloidal ring shape, is typically modeled using curved surfaces to better represent its fluid, continuous surface. Conversely, the saddle-shaped roof and entrance hall, which connect to the curtain wall, have relatively simpler geometry, making mesh models more efficient. Similarly, when constructing complete car models, rapid prototyping or handling complex structures like grilles and wheel hubs is crucial. Mesh models offer speed, accuracy, and ease of modification. However, when pursuing high-precision surface quality or requiring complex curved surfaces, such as streamlined car bodies, surface modeling becomes the preferred method, generating smooth, high-precision models suitable for manufacturing. By creating corresponding mesh or surface models for each component of the target structure, support is provided for constructing hybrid models.
[0074] Step S102: Under geometric constraints, the three-dimensional models of all components are fused to obtain the first hybrid model of the target structure.
[0075] Specifically, since each component is modeled as a separate 3D model during modeling, all component 3D models need to be merged to obtain a complete 3D model of the target structure. During merging, 3D models of the same type generally do not exhibit gaps, while gaps or overlaps between different types of 3D models need to be considered. This invention, by introducing geometric constraints when merging mesh models and surface models, helps to achieve seamless merging, thereby improving the merging effect and obtaining an accurate hybrid model.
[0076] Step S103: Flatten the first hybrid model in a two-dimensional plane to obtain the corresponding two-dimensional coordinates.
[0077] Specifically, after modeling, textures are typically added to the model to simulate realistic effects. Related technologies directly add textures to the hybrid model in 3D space, which results in enormous computational resource consumption. However, this invention first flattens the first hybrid model in a 2D plane without altering the topology of the 3D model during the flattening process, thereby superimposing textures in the 2D plane to reduce resource consumption.
[0078] Step S104: Overlay the image texture on the two-dimensional coordinates and compress the data to obtain the texture coordinates.
[0079] Specifically, image textures are superimposed on the two-dimensional coordinates obtained by flattening the three-dimensional model. However, two-dimensional image textures usually occupy a large amount of storage space. Therefore, data compression is used to reduce the amount of data so as to reduce storage space and transmission bandwidth while maintaining visual quality.
[0080] Step S105: Map the texture coordinates to three-dimensional space to obtain the second hybrid model.
[0081] Specifically, the texture coordinates with image texture are remapped back to three-dimensional space to obtain a second hybrid model containing texture information, ensuring that the texture can be correctly attached to the three-dimensional model.
[0082] Step S106: Personalize the second hybrid model and export the third hybrid model of the target structure through rendering.
[0083] Specifically, the second hybrid model is customized, such as setting material properties and lighting conditions for the second hybrid model, and then the final rendering is performed to export a high-quality third hybrid model of the target structure, which can accurately simulate the real effect of the target structure.
[0084] The hybrid modeling method provided in this invention constructs suitable 3D models for components in modeling software, merges the 3D models of all components under geometric constraints to generate a first hybrid model, ensuring smooth transitions between components and avoiding cracks or abrupt changes. Then, the 3D model is flattened onto a 2D plane to obtain the corresponding 2D coordinates, reducing computational resource consumption and facilitating subsequent texture mapping. Image textures are then superimposed on the 2D coordinates and data compression is performed to generate efficient texture coordinates, giving the model rich surface details, improving visual effects, reducing file size, and improving rendering and storage efficiency. The 2D texture coordinates are remapped back to 3D space to form a textured second hybrid model. Finally, personalized settings are made, and a third hybrid model of the target structure is exported after rendering. By integrating multiple steps such as geometric modeling, seamless fusion, flattening, texture superposition, and rendering, a systematic hybrid modeling process is formed, improving work efficiency, ensuring that the final output model has high precision and high visual effects, and reducing storage and computational resource consumption.
[0085] This embodiment provides a hybrid modeling method that can be used in the aforementioned terminal. The method specifically includes the following steps:
[0086] Step S201: For any component, construct the initial model of the component. The initial model is either a mesh model or a surface model.
[0087] Specifically, an initial model is created for the component based on its design requirements. This initial model can be a mesh model or a surface model.
[0088] Step S202: Determine whether to convert the initial model of the component.
[0089] Specifically, based on performance, accuracy, or other design considerations, it is determined whether the current initial model needs to be converted into another type of model, that is, from a mesh model to a surface model or from a surface model to a mesh model.
[0090] Step S203: In the case of converting the initial model of the component, convert the initial model to obtain the three-dimensional model of the component.
[0091] Specifically, step S203 above, which converts the initial model to obtain a three-dimensional model of the component, includes:
[0092] Step S2031: The initial model is a mesh model, and all meshes in the initial model are simplified.
[0093] Specifically, when the initial model is a mesh model, the mesh model is converted into a surface model in the modeling software through steps S2031 to S2034. Mesh models often contain a large number of redundant vertices and faces, such as data obtained by reverse scanning. Therefore, to improve conversion efficiency, the mesh is first simplified by dividing the mesh faces, retaining key geometric features, deleting features that do not affect the overall shape, and ensuring that the model has no broken or duplicate faces to guarantee the accuracy of subsequent fitting.
[0094] Step S2032: Perform curve fitting based on the vertices of all simplified meshes in the initial model to obtain the curved structure skeleton.
[0095] Specifically, by analyzing the distribution of simplified mesh vertices, key shape features are identified, and a smooth line that roughly matches the shape of the mesh is fitted. The fitting process can employ methods such as least squares fitting and B-spline fitting, thereby forming a structural skeleton based on NURBS (Non-Uniform Rational B-Splines) curves.
[0096] Step S2033: Generate multiple surfaces based on the curve structure skeleton.
[0097] Specifically, multiple corresponding NURBS surfaces are generated through a curved structure skeleton.
[0098] Step S2034: Smooth, stitch and repair multiple surfaces to obtain a surface model, and use the surface model as the three-dimensional model of the component.
[0099] Specifically, by smoothing, splicing, or repairing multiple NURBS surfaces to eliminate discontinuities or redundant control points, and when processing local areas, algorithms such as spline curve interpolation and Laplacian smoothing are used to gradually approximate the entire model by splicing small fragment surfaces, thereby obtaining a surface model, which replaces the initial model as the three-dimensional model of the component.
[0100] Step S2035: The initial model is a curved surface model. The initial model of the component is sampled to generate multiple mesh points.
[0101] Specifically, when the initial model is a surface model, the surface model is converted into a mesh model in the modeling software through steps S2035 to S2038. The NURBS surface of the surface model is defined by a set of control points, weights, and parametric parameters. The internal shape of the surface can be represented by isoparametric lines in two directions (curves traveling along the U and V directions of the surface). At this time, uniform sampling is performed through the intersection of the isoparametric lines to generate regular mesh points. The sampling density can be adjusted by the designer according to the requirements. Denseer sampling will generate more vertices and faces, thus producing a finer mesh, while sparser sampling will generate a coarser mesh.
[0102] Step S2036: Generate multiple quadrilateral grids based on consecutive grid points among multiple grid points.
[0103] Specifically, consecutive grid points from multiple sampled grid points are connected to form grid edges, and the surfaces enclosed by these grid edges form multiple quadrilateral grids.
[0104] Step S2037: Generate multiple mesh patches based on discrete mesh points among multiple mesh points.
[0105] Specifically, for discrete grid points among multiple grid points, a triangulation algorithm can be used to generate a reasonable triangular grid structure, i.e., a grid patch, while ensuring grid quality.
[0106] Step S2038: Based on multiple quadrilateral meshes and multiple mesh patches, a mesh model is obtained. The mesh model is used as the three-dimensional model of the component, and the normal vector of the three-dimensional model is consistent with the normal vector of the initial model.
[0107] Specifically, all generated quadrilateral meshes and mesh patches are integrated to form a complete mesh model, which then replaces the initial model as the 3D model of the component. The normal vectors of the resulting mesh model are consistent with those of the initial model, preserving the directional characteristics of the original surface.
[0108] In some alternative implementations, Figure 2 This is a schematic diagram of model transformation according to an embodiment of the present invention, such as... Figure 2 As shown, the left side is a curved surface model, and the right side is a mesh model. Steps S2031 to S2034 can convert the curved surface model on the left side into the mesh model on the right side, and steps S2035 to S2038 can convert the mesh model on the right side into the curved surface model on the left side.
[0109] Alternatively, in step S204, the initial model is used as the three-dimensional model of the part without converting the initial model of the part.
[0110] Specifically, if the designers believe that the initial model of the component can meet the design requirements, that is, no conversion is needed, the initial model can be directly used as the three-dimensional model of the component.
[0111] Step S205: In the modeling software, for any component of the target structure, construct a 3D model of the component. The 3D model can be a mesh model or a surface model. For details, please refer to [link to relevant documentation]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.
[0112] Step S206: Under geometric constraints, the three-dimensional models of all components are fused to obtain the first hybrid model of the target structure.
[0113] Specifically, step S206 includes:
[0114] Step S2061: Store the model parameters of the 3D models of all components in a hybrid data structure.
[0115] Specifically, mesh models and surface models differ in their underlying data structures. Therefore, modeling software incorporates a hybrid data structure to support different geometric representations. This hybrid data structure includes basic elements such as vertices, edges, faces, and control points; vertices, edges, faces, normals, and topological information for the mesh model; and NURBS control points, weights, and parametric data for the surface model. This hybrid data structure not only supports seamless switching between different geometric types but also allows for updating only the affected geometric data when local areas of the model change, without requiring a complete recalculation of the entire model.
[0116] Step S2062: Based on the hybrid data structure, perform geometric processing on the 3D models of all components to obtain the processed 3D model.
[0117] In some optional implementations, step S2062 above includes:
[0118] Step a1: For any component, if the component's 3D model is a mesh model, simplify, smooth, and reconstruct the topology of the mesh model to obtain the processed 3D model.
[0119] Specifically, if the 3D model of the component is a mesh model, methods such as edge folding or vertex merging are used to reduce the number of meshes in the mesh model to improve processing speed. Then, smoothing methods in the modeling software are used to remove noise from the mesh, making it smoother. For non-manifold or porous meshes, topology reconstruction algorithms are used to repair their geometry.
[0120] Step a2: If the 3D model of the component is a surface model, the surface model is fitted, subdivided, and Boolean operated to obtain the processed 3D model.
[0121] Specifically, if the 3D model of a component is a curved surface, a smooth surface is calculated using methods such as least squares fitting or Newton's iteration method. Then, the surface is subdivided to generate a more refined geometric structure. Finally, Boolean operations on the surface are performed, including intersection, union, and difference, to achieve the free construction of complex geometric shapes.
[0122] Step S2063: Using a fusion algorithm based on a hybrid data structure, the boundaries of the 3D models after processing all components are geometrically matched to obtain a first hybrid model. The normal vector of the mesh model in the first hybrid model is consistent with the normal vector of the surface model.
[0123] Specifically, seamless fusion between mesh models and surface models is a core technology in hybrid modeling. The goal of seamless fusion is to combine different 3D models without creating obvious visual creases or geometric breaks. To achieve seamless fusion, the common boundary between the mesh model and the surface model must first be found. By geometrically matching the common boundary, the mesh model and the surface model are ensured to be positioned consistently in space. Techniques such as nearest-neighbor search or curvature matching can be used to find the most suitable matching points. These matching points are then calibrated, and interpolation methods, such as bilinear interpolation and cubic spline interpolation, are used to fine-tune their positions, ensuring they precisely fall on the surface boundary. The distribution of matching points is then locally smoothed to avoid abrupt changes or discontinuities between them. Simultaneously, a transition zone is generated at the common boundary, gradually transforming the mesh into a smooth surface. This transition zone can be generated using interpolation algorithms such as linear or bilinear interpolation. Seamless fusion is achieved through geometric matching and setting transition zones, resulting in the first hybrid model composed of all components. Furthermore, the normal vectors of the mesh vertices of the mesh model are consistent with the normal vectors of the surface control points of the surface model, indicating that a smooth transition is achieved and sharp creases at the geometric joints are eliminated.
[0124] Step S207: Flatten the first hybrid model in a two-dimensional plane to obtain the corresponding two-dimensional coordinates.
[0125] Specifically, step S207 includes:
[0126] Step S2071: Parameterize the first hybrid model to obtain the initial two-dimensional coordinates of all three-dimensional vertices in the first hybrid model in the two-dimensional plane.
[0127] Specifically, modeling software includes a flattening editing module that can flatten a 3D model into a 2D space without altering its topology. The key to flattening is maintaining the topological invariance of the 3D model, meaning that the connections between vertices, edges, and faces must remain unchanged during any geometric transformation. First, the first hybrid model needs to be parameterized. This requires finding a flattening method that is non-overlapping and minimizes deformation, ensuring that the 3D vertices are accurately represented in the 2D plane. This process can employ progressive parameterization, Laplacian (Laplace Operator) parameterization, or disk parameterization within the modeling software. Progressive parameterization iteratively flattens the 3D model, minimizing deformation during parameterization. Laplacian parameterization, based on the Laplace equation, flattens by maintaining the stability of the relative positions of mesh vertices, avoiding extreme distortion and preserving the original 3D model's geometric properties. Disk parameterization is suitable for models with circular boundaries, flattening complex 3D surfaces by mapping the model to a 2D disk. The common goal of the above parameterization methods is to minimize the stretching and compression during the flattening process, avoid changes in the structure, and rely on the shortest path algorithm and matrix optimization algorithm in graph theory to calculate the coordinates of each vertex in the three-dimensional model in the two-dimensional plane, so as to obtain the initial two-dimensional coordinates.
[0128] Step S2072: Seamlessly stitch together the initial two-dimensional coordinates to obtain stitched two-dimensional coordinates.
[0129] Specifically, since three-dimensional surfaces are inherently non-planar, fragmentation is inevitable during the flattening process. Therefore, complex surfaces can be divided into multiple sub-regions, each flattened separately. First, by interpolating the boundaries of the fragmented regions during fusion, the flattened boundaries are aligned as smoothly as possible in the two-dimensional plane, reducing visual differences. Then, the flattened regions adjacent to the fragmented regions are recombined, correcting the flattening structure at the fragmentation points, so that these regions can be seamlessly stitched together in the two-dimensional plane, thus obtaining the stitched two-dimensional coordinates.
[0130] Step S2073: Optimize based on spliced two-dimensional coordinates to obtain two-dimensional coordinates.
[0131] Specifically, the flattened 2D coordinates need to preserve the key geometric features of the 3D model, such as local details and curvature. During the flattening process, to avoid excessive deformation of geometric information, multiple iterative optimizations are necessary to ensure that the flattened 2D coordinates accurately retain the important features of the 3D model. This iterative optimization process can be achieved by minimizing the distortion function in modeling software. By defining a distortion metric function, such as area distortion or angular distortion, and continuously optimizing it during the flattening process, the value of the distortion metric function is minimized. Simultaneously, multi-resolution processing is introduced during the flattening process. First, the low-resolution model is flattened, and then high-resolution details are gradually introduced to ensure that both large-scale and small-scale geometric features are accurately represented.
[0132] Step S208: Overlay the image texture on the two-dimensional coordinates and compress the data to obtain the texture coordinates.
[0133] Specifically, after flattening, each flattened vertex has a corresponding coordinate (X, Y) in a two-dimensional plane. These two-dimensional coordinates are typically normalized to the range [0, 1] to facilitate mapping image textures of arbitrary resolution. Overlaying image textures refers to applying image textures to the surface of an existing 3D model. This usually involves mixing the model's surface color, normals, and lighting information to generate a more realistic appearance. Since the 3D model has been flattened into two-dimensional coordinates, the image texture can be smoothly overlaid onto the surface of the 3D model by matching the pixel values in the image texture with the corresponding two-dimensional vertices and using techniques such as bilinear interpolation. After overlaying the image texture, various editing functions within the modeling software for flattened data can be used, such as switching modes for flattening points, flattening edges, and flattening planes, element selection, movement, rotation, scaling, alignment, flipping, unfolding, optimization, cutting, and blending. In cases of stretching, compression, or overlap, the texture can be automatically unfolded or manually precisely adjusted. After achieving high-quality texture overlay, two-dimensional image textures typically occupy a large amount of storage space; therefore, texture compression techniques are needed to reduce the data volume. Modeling software uses discrete cosine transform to convert texture data into frequency information, and then quantizes the high-frequency components to obtain texture coordinates, thereby achieving compression for more efficient rendering and storage.
[0134] Step S209: Map the texture coordinates to 3D space to obtain the second blending model. See details below. Figure 1 Step S105 of the illustrated embodiment will not be described again here.
[0135] Step S2010: Personalize the second hybrid model and export the third hybrid model of the target structure through rendering.
[0136] Specifically, the modeling software includes a material editor, allowing designers to customize material properties for the second hybrid model, such as color, texture, reflectivity, and transparency, to achieve rich material representation effects. Simultaneously, the software includes a lighting editor, enabling designers to freely arrange and adjust lighting parameters to simulate real-world lighting. After designers have set up the materials and lighting, the modeling software's rendering engine allows them to adjust rendering parameters such as rendering quality, speed, and export format as needed. It also supports a render preview function, allowing designers to instantly view the rendering effects and export the third hybrid model of the target structure.
[0137] The hybrid modeling method provided in this invention constructs suitable 3D models for components in modeling software, merges the 3D models of all components under geometric constraints to generate a first hybrid model, ensuring smooth transitions between components and avoiding cracks or abrupt changes. Then, the 3D model is flattened onto a 2D plane to obtain the corresponding 2D coordinates, reducing computational resource consumption and facilitating subsequent texture mapping. Image textures are then superimposed on the 2D coordinates and data compression is performed to generate efficient texture coordinates, giving the model rich surface details, improving visual effects, reducing file size, and improving rendering and storage efficiency. The 2D texture coordinates are remapped back to 3D space to form a textured second hybrid model. Finally, personalized settings are made, and a third hybrid model of the target structure is exported after rendering. By integrating multiple steps such as geometric modeling, seamless fusion, flattening, texture superposition, and rendering, a systematic hybrid modeling process is formed, improving work efficiency, ensuring that the final output model has high precision and high visual effects, and reducing storage and computational resource consumption.
[0138] This embodiment also provides a hybrid modeling apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0139] This embodiment provides a hybrid modeling device, such as Figure 3 As shown, it includes:
[0140] The first modeling module 301 is used in the modeling software to construct a three-dimensional model of any component of the target structure. The three-dimensional model can be a mesh model or a surface model.
[0141] The fusion module 302 is used to fuse the three-dimensional models of all components under geometric constraints to obtain the first hybrid model of the target structure.
[0142] The flattening module 303 is used to flatten the first hybrid model in a two-dimensional plane to obtain the corresponding two-dimensional coordinates.
[0143] Compression module 304 is used to overlay image textures on two-dimensional coordinates and perform data compression to obtain texture coordinates.
[0144] Recovery module 305 is used to map texture coordinates to three-dimensional space to obtain a second hybrid model.
[0145] Export module 306 is used to personalize the second hybrid model and export the third hybrid model of the target structure through rendering.
[0146] In some alternative implementations, prior to the first modeling module 301, the apparatus further includes:
[0147] The second modeling module is used to construct an initial model of any component, which can be a mesh model or a surface model.
[0148] The decision module is used to determine whether to convert the initial model of the component.
[0149] The conversion module is used to convert the initial model of a component to obtain a 3D model of the component.
[0150] Alternatively, a module can be defined to use the initial model as a 3D model of the part without converting the initial model of the part.
[0151] In some alternative implementations, the initial model is a mesh model;
[0152] The conversion module includes:
[0153] Simplified cells are used to simplify all meshes in the initial model.
[0154] The fitting unit is used to perform curve fitting based on the vertices of all simplified meshes in the initial model to obtain the curve structure skeleton.
[0155] The first generation unit is used to generate multiple surfaces based on the curve structure skeleton.
[0156] The first defining unit is used to smooth, splice, and repair multiple surfaces to obtain a surface model, which is then used as the three-dimensional model of the component.
[0157] In some alternative implementations, the initial model is a surface model;
[0158] The conversion module includes:
[0159] The sampling unit is used to sample the initial model of the component and generate multiple mesh points.
[0160] The second generation unit is used to generate multiple quadrilateral grids based on consecutive grid points among multiple grid points.
[0161] The third generation unit is used to generate multiple mesh patches based on discrete mesh points among multiple mesh points.
[0162] The second determining element is used to obtain a mesh model based on multiple quadrilateral meshes and multiple mesh patches. The mesh model is used as the three-dimensional model of the component, and the normal vector of the three-dimensional model is consistent with the normal vector of the initial model.
[0163] In some alternative implementations, the fusion module 302 includes:
[0164] The storage unit is used to store the model parameters of the 3D models of all components in a hybrid data structure.
[0165] The processing unit is used to perform geometric processing on the 3D models of all components based on a hybrid data structure, so as to obtain the processed 3D model.
[0166] The fusion unit is used to perform geometric matching of the boundaries of the 3D model after processing all components using a fusion algorithm based on a hybrid data structure to obtain a first hybrid model. The normal vector of the mesh model in the first hybrid model is consistent with the normal vector of the surface model.
[0167] In some optional implementations, the processing unit includes:
[0168] The first processing subunit is used to simplify, smooth, and reconstruct the topology of any component when the component's 3D model is a mesh model, so as to obtain the processed 3D model.
[0169] The second processing subunit is used to fit, subdivide, and perform Boolean operations on the surface model when the 3D model of the component is a surface model, so as to obtain the processed 3D model.
[0170] In some alternative implementations, the flattening module 303 includes:
[0171] The parameterization unit is used to parameterize the first hybrid model to obtain the initial two-dimensional coordinates of all three-dimensional vertices in the first hybrid model in the two-dimensional plane.
[0172] The splicing unit is used to seamlessly splice the initial two-dimensional coordinates to obtain the spliced two-dimensional coordinates.
[0173] The optimization unit is used to optimize based on the stitched two-dimensional coordinates to obtain two-dimensional coordinates.
[0174] In some alternative implementations, compression module 304 includes:
[0175] The fourth generation unit is used to generate two-dimensional parameters based on two-dimensional coordinates.
[0176] Texture overlay unit, used to overlay two-dimensional parameters with image texture.
[0177] Compression units are used to simplify the mesh and compress the textures after the two-dimensional parameters are superimposed to obtain texture coordinates.
[0178] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0179] In this embodiment, the hybrid modeling device is presented in the form of functional units. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0180] This invention also provides a computer device having the above-described features. Figure 3 The hybrid modeling apparatus shown.
[0181] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 4 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 4 Take a processor 10 as an example.
[0182] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GPA), or any combination thereof.
[0183] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0184] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0185] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0186] The computer device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 can be connected via a bus or other means. Figure 4 Taking the example of a connection between China and Israel via a bus.
[0187] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.
[0188] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. 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 can 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.
[0189] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention 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, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or 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.
[0190] Although embodiments of the invention 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 invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A hybrid modeling method, characterized in that, The method includes: In modeling software, for any component of the target structure, a three-dimensional model of the component is constructed, which can be a mesh model or a surface model. Under geometric constraints, the three-dimensional models of all components are fused to obtain the first hybrid model of the target structure; Flatten the first hybrid model in a two-dimensional plane to obtain the corresponding two-dimensional coordinates; An image texture is superimposed on the two-dimensional coordinates, and data compression is performed to obtain texture coordinates; The texture coordinates are mapped to three-dimensional space to obtain the second hybrid model; The second hybrid model is customized, and a third hybrid model of the target structure is exported by rendering; The process of fusing the three-dimensional models of all components under geometric constraints to obtain the first hybrid model of the target structure includes: The model parameters of the 3D models of all components are stored in a hybrid data structure, which includes basic elements, vertices, edges, faces, normals and topological information of the mesh model, and NURBS control points, weights and parameterized data of the surface model. Based on the hybrid data structure, geometric processing is performed on the 3D models of all components to obtain the processed 3D model; Using a fusion algorithm based on the hybrid data structure, the boundaries of the 3D models after processing all components are geometrically matched to obtain the first hybrid model. The normal vectors of the mesh model and the surface model in the first hybrid model are consistent. This includes: finding the common boundary between the mesh model and the surface model in the 3D models after processing all components; finding the most suitable matching point on the common boundary using nearest-neighbor search or curvature matching; calibrating the matching point; fine-tuning the position of the matching point using an interpolation method to make it fall on the boundary of the surface; and locally smoothing the distribution of the matching point; generating a transition zone on the common boundary; and converting the mesh into a smooth surface in the transition zone using an interpolation algorithm; and obtaining the first hybrid model through boundary geometric matching and transition zone generation.
2. The method according to claim 1, characterized in that, Before constructing a three-dimensional model of any component of the target structure, the method further includes: For any component, construct an initial model of the component, which may be a mesh model or a surface model; Determine whether to convert the initial model of the component; In the case of converting the initial model of the component, the initial model is converted to obtain a three-dimensional model of the component; or, Without converting the initial model of the component, the initial model is used as the three-dimensional model of the component.
3. The method according to claim 2, characterized in that, The initial model is a mesh model; The process of transforming the initial model to obtain the three-dimensional model of the component includes: Simplify all meshes in the initial model; Curve fitting is performed on the vertices of all simplified meshes in the initial model to obtain the curved structure skeleton. Multiple surfaces are generated based on the aforementioned curve structure skeleton; By smoothing, splicing, and repairing the multiple surfaces, a surface model is obtained, which is then used as the three-dimensional model of the component.
4. The method according to claim 2, characterized in that, The initial model is a curved surface model; The process of transforming the initial model to obtain the three-dimensional model of the component includes: The initial model of the component is sampled to generate multiple grid points; Multiple quadrilateral grids are generated based on consecutive grid points among the multiple grid points; Based on the discrete grid points among the multiple grid points, multiple grid patches are generated; Based on the plurality of quadrilateral meshes and the plurality of mesh patches, a mesh model is obtained, and the mesh model is used as the three-dimensional model of the component. The normal vector of the three-dimensional model is consistent with the normal vector of the initial model.
5. The method according to claim 1, characterized in that, The geometric processing of the 3D models of all components to obtain the processed 3D model includes: For any component, if the 3D model of the component is a mesh model, the mesh model is simplified, smoothed, and its topology is reconstructed to obtain the processed 3D model. When the three-dimensional model of the component is a curved surface model, the curved surface model is fitted, subdivided, and subjected to Boolean operations to obtain the processed three-dimensional model.
6. The method according to claim 1, characterized in that, The step of flattening the first hybrid model in a two-dimensional plane to obtain the corresponding two-dimensional coordinates includes: The first hybrid model is parameterized to obtain the initial two-dimensional coordinates of all three-dimensional vertices in the first hybrid model in the two-dimensional plane; Seamlessly stitching is performed based on the initial two-dimensional coordinates to obtain stitched two-dimensional coordinates; The two-dimensional coordinates are obtained by optimizing the spliced two-dimensional coordinates.
7. The method according to claim 1, characterized in that, The process of superimposing image textures on the two-dimensional coordinates and performing data compression to obtain texture coordinates includes: Two-dimensional parameters are generated based on the two-dimensional coordinates; The two-dimensional parameters are superimposed on the image texture; The texture coordinates are obtained by simplifying the mesh and compressing the texture after the two-dimensional parameters of the texture overlay are processed.
8. A hybrid modeling apparatus, characterized in that, The device includes: The first modeling module is used in modeling software to construct a three-dimensional model of any component of the target structure, wherein the three-dimensional model is a mesh model or a surface model. The fusion module is used to fuse the three-dimensional models of all components under geometric constraints to obtain the first hybrid model of the target structure. The flattening module is used to flatten the first hybrid model in a two-dimensional plane to obtain the corresponding two-dimensional coordinates; A compression module is used to overlay image textures onto the two-dimensional coordinates and perform data compression to obtain texture coordinates; The recovery module is used to map the texture coordinates to three-dimensional space to obtain a second hybrid model; The export module is used to personalize the second hybrid model and export the third hybrid model of the target structure through rendering. The fusion module includes: The storage unit is used to store the model parameters of the three-dimensional model of all components in a hybrid data structure, which includes basic elements, vertices, edges, faces, normals and topological information of the mesh model, and NURBS control points, weights and parameterized data of the surface model. The processing unit is used to perform geometric processing on the three-dimensional models of all components based on the hybrid data structure to obtain the processed three-dimensional model. A fusion unit is used to perform geometric matching of the boundaries of the 3D model after processing all components, based on the hybrid data structure, using a fusion algorithm to obtain the first hybrid model. The normal vectors of the mesh model and the surface model in the first hybrid model are consistent. The fusion unit includes: extracting the common boundary between the mesh model and the surface model in the 3D model after processing all components; determining matching points on the common boundary; fine-tuning the position of the matching points using an interpolation method and locally smoothing the distribution of the matching points; generating a transition zone on the common boundary, which is used to convert the mesh into a surface; and using the 3D model after completing the boundary geometric matching and transition zone generation as the first hybrid model.
9. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the hybrid modeling method of any one of claims 1 to 7.
Citation Information
Patent Citations
Model expansion method and device, storage medium and computer program product
CN114445564A
Grid-parameter hybrid model modeling method and system
CN114611359A
User-transparent building structure model data exchange method, equipment and medium
CN115577438A
