Three-dimensional model generation method and device, storage medium and electronic equipment
By dividing the voxel space of the three-dimensional model and computing in parallel, the problem of low rendering efficiency of the three-dimensional model in the prior art is solved, and a more efficient rendering process and better computing performance are achieved.
Patent Information
- Application Number
- CN202510314406.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-04-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When rendering a three-dimensional model, the calculation amount is large, resulting in low rendering efficiency. Especially when the resolution requirements are high, the number of voxels increases and the calculation amount increases dramatically, affecting the rendering efficiency.
By receiving model construction requests, obtaining modeling data, determining the voxel space where the three-dimensional model is located, and dividing the voxel space into several discriminant areas according to the specified number of areas. According to the spatial relationship between the discriminating region and the three-dimensional model, it is determined whether the voxel value determination condition is met. If it is met, the voxel value will be determined. Otherwise, the partition will continue until the termination condition is met.
Through parallel computing and recursive division, the rendering efficiency of the three-dimensional model is significantly improved, unnecessary computing steps are reduced, and computing speed and memory usage efficiency are improved.
Smart Images

Figure CN119850873A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a three-dimensional model generation method, device, storage medium and electronic device. Background Art
[0002] As an innovative modeling method, implicit modeling has shown significant advantages in many fields. The core of this modeling method is to implicitly derive the model from the data through mathematical functions instead of relying on manual drawings or predefined categories.
[0003] However, the three-dimensional model of a structure is usually composed of several voxels (grid units). When rendering the three-dimensional model using existing methods, the voxel value of each voxel needs to be calculated separately. As the requirements for model resolution increase, the number of voxels increases accordingly, and the amount of calculation in this process also gradually increases, which seriously affects the rendering efficiency of the three-dimensional model.
[0004] Therefore, how to improve the efficiency of rendering three-dimensional models based on implicit modeling data is an urgent problem to be solved. Summary of the invention
[0005] This specification provides a three-dimensional model generation method, device, storage medium and electronic device to partially solve the above-mentioned problems existing in the prior art.
[0006] This manual adopts the following technical solutions: This specification provides a three-dimensional model generation method, including: Receiving a model building request for a target object, and acquiring modeling data of the target object according to the model building request; Determining, based on the modeling data, a voxel space where the three-dimensional model of the target object is located; Dividing the voxel space into a plurality of discrimination regions according to a specified number of region divisions, and determining a spatial relationship between each discrimination region and the three-dimensional model; For each discrimination region, judging whether the discrimination region satisfies the voxel value determination condition according to the spatial relationship between the discrimination region and the three-dimensional model; if so, determining the voxel value corresponding to each voxel contained in the discrimination region according to the spatial relationship between the discrimination region and the three-dimensional model; otherwise, continuing to divide the discrimination region according to the number of region divisions until the divided discrimination region satisfies the termination condition of region division; The three-dimensional model of the target object is rendered according to the voxel value corresponding to each voxel in the voxel space.
[0007] Optionally, the target object is a point-rod structure, and for each point-rod structural unit included in the point-rod structure, the modeling data of the point-rod structural unit includes vertex coordinates, radius and boundary data of the point-rod structural unit.
[0008] Optionally, determining the spatial relationship between each discrimination region and the three-dimensional model specifically includes: Determine the distance field SDF range corresponding to each discrimination area according to the modeling data; For each discrimination region, a spatial relationship between the discrimination region and the three-dimensional model is determined according to an SDF range corresponding to the discrimination region.
[0009] Optionally, for each discrimination region, determining a spatial relationship between the discrimination region and the three-dimensional model according to an SDF range corresponding to the discrimination region specifically includes: For each discrimination region, if the minimum value of the SDF corresponding to the discrimination region is greater than the reference value, it is determined that the discrimination region is entirely located outside the three-dimensional model; If the maximum value of the SDF corresponding to the discrimination region is not greater than the reference value, it is determined that the discrimination region is entirely located inside the three-dimensional model.
[0010] Optionally, judging whether the determination area satisfies a determination condition of a voxel value according to a spatial relationship between the determination area and the three-dimensional model specifically includes: For each determination region, if the determination region is entirely located inside the three-dimensional model, or entirely located inside the three-dimensional model, it is determined that the determination region satisfies the determination condition; otherwise, the determination condition is not satisfied.
[0011] Optionally, the termination condition of the region division includes: the divided determination region meets the determination condition, and / or the deviation between the size of the divided determination region and the size of the voxel is less than a preset threshold.
[0012] Optionally, the method further comprises: For each voxel, judging whether the voxel intersects with a reference plane of the three-dimensional model according to an SDF value corresponding to each vertex of the voxel; If yes, determine the edge where the voxel intersects with the reference plane, and determine the vertex coordinates of the triangular face according to the vertex position of the edge where the voxel intersects with the reference plane and the SDF value corresponding to the voxel; A triangular facet is generated on the outer surface of the three-dimensional model according to the determined vertex coordinates of each triangular facet.
[0013] This specification provides a three-dimensional model generation device, including: A receiving module, configured to receive a model building request for a target object, and obtain modeling data of the target object according to the model building request; A determination module, used for determining the voxel space where the three-dimensional model of the target object is located according to the modeling data; A division module, used to divide the voxel space into a plurality of discrimination regions according to a specified number of region divisions, and determine a spatial relationship between each discrimination region and the three-dimensional model; a judgment module, for judging, for each judgment region, whether the judgment region satisfies a voxel value determination condition according to a spatial relationship between the judgment region and the three-dimensional model; if so, determining a voxel value corresponding to each voxel contained in the judgment region according to the spatial relationship between the judgment region and the three-dimensional model; otherwise, continuing to divide the judgment region according to the number of region divisions until the divided judgment region satisfies a termination condition for region division; A rendering module is used to render the three-dimensional model of the target object according to the voxel value corresponding to each voxel in the voxel space.
[0014] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned three-dimensional model generation method is implemented.
[0015] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned three-dimensional model generation method when executing the program.
[0016] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects: In the three-dimensional model generation method provided in the present specification, the voxel space where the three-dimensional model of the target object is located is determined; the voxel space is divided into a number of judgment areas according to a specified number of area divisions; for each judgment area, based on the spatial relationship between the judgment area and the three-dimensional model, it is determined whether the judgment area meets the determination condition of the voxel value; if so, the voxel value corresponding to each voxel contained in the judgment area is determined based on the spatial relationship between the judgment area and the three-dimensional model; otherwise, the judgment area is continued to be divided according to the number of area divisions until the divided judgment area meets the termination condition of the area division; the three-dimensional model of the target object is rendered according to the voxel value corresponding to each voxel in the voxel space.
[0017] It can be seen from the above method that this scheme can divide the voxel space into several regions based on the modeling data of the target object. In this way, not only can the divided regions be calculated and processed in parallel at the same time, but also for each region, as long as the region meets the voxel value determination conditions, the voxel values corresponding to all voxels in the judgment area can be determined, and there is no need to calculate each voxel one by one. In addition, when the judgment area does not meet the voxel value determination conditions, the judgment area can continue to be divided until the voxel value of each voxel is determined and the rendering of the three-dimensional model is completed, which greatly improves the rendering efficiency of the three-dimensional model. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings: Figure 1 A schematic diagram of a process for generating a three-dimensional model provided in this specification; Figure 2 A schematic diagram of a process for determining a voxel value provided in this specification; Figure 3 A schematic diagram of a three-dimensional model of a point-rod structure provided in this specification; Figure 4 A schematic diagram of a three-dimensional model generating device provided in this specification; Figure 5 A method corresponding to the Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0020] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0021] Figure 1 A schematic diagram of a three-dimensional model generation method provided in this specification includes the following steps: S101: receiving a model building request for a target object, and acquiring modeling data of the target object according to the model building request.
[0022] Implicit modeling technology is an important method in the field of computer graphics and CAD / CAM. It implicitly defines geometric shapes through mathematical functions instead of explicitly describing their boundaries or surfaces. This technology is particularly suitable for the field of additive manufacturing, in which the design and application of porous microstructures is an important research direction. Porous structures can not only reduce the weight of the structure, but also maintain the required strength and stiffness. Commonly used porous structures include triplyperiodic minimal surface (TPMS), point-rod structure and plate-shell structure, each of which has its unique advantages and application scenarios.
[0023] In additive manufacturing, precise control of material topology can optimize structural performance and achieve lightweight and functionalization. Implicit modeling methods are favored due to their advantages in precise control of porous structure topology and performance advantages over explicit modeling methods in filling operations, rendering and slicing. Nevertheless, current research on implicit modeling expression mainly focuses on the mathematical function construction of porous structures such as TPMS, while there is little research on the expression and calculation of complex topological structures such as traditional point-rod structures, plates and shells.
[0024] Based on this, this specification provides a three-dimensional model generation method, which determines the voxel value of each voxel unit by judging the spatial relationship between the pixel area and the three-dimensional model, that is, judging whether the pixel area is completely inside or outside the entity, skipping unnecessary calculation steps and achieving rendering acceleration.
[0025] In this specification, the execution entity used to implement a three-dimensional model generation method can be a client installed on a terminal device such as a desktop computer, a laptop computer, and a tablet computer. Of course, it can also be a server. For the sake of ease of description, the following will only take the server as the execution entity as an example to illustrate a three-dimensional model generation method provided in this specification.
[0026] After receiving the model building request for the target object, the server can obtain the modeling data of the target object according to the model building request. In practical applications, the target object may include components used for fixing, connecting, supporting and transmitting force and power to realize mechanical structure, such as fasteners, connectors, hinges, springs, etc. Of course, it can also be other structural parts, which are not specifically limited in this specification.
[0027] In this specification, the target object may be a point-rod structure. For each point-rod structure unit in the point-rod structure, the modeling data of the point-rod structure unit includes vertex coordinates, radius, and boundary data of the point-rod structure.
[0028] Specifically, for each point-rod structural unit, the modeling data of the point-rod structural unit includes the coordinates of two vertices [P1, P2] and the radius R of its axis, as well as the upper and lower bound vertices lower and upper of the point-rod structural unit, which the server can represent in space and use as a bounding box.
[0029] S102: Determine, according to the modeling data, a voxel space where the three-dimensional model of the target object is located; S103: Divide the voxel space into a plurality of determination regions according to the specified region division number, and determine the spatial relationship between each determination region and the three-dimensional model.
[0030] The server can determine the boundaries of the voxel space based on the maximum and minimum values of the coordinate points of the modeling data in each direction in the three-dimensional space, and then construct the voxel space according to the boundaries so that each voxel of the three-dimensional model can be located inside the voxel space.
[0031] In addition, the server may determine the voxel size of each voxel in the voxel space according to a preset resolution, wherein a voxel represents a minimum grid unit in the voxel space, and each voxel corresponds to a minimum cube in the voxel space.
[0032] Furthermore, the server may divide the voxel space into a number of smaller regions according to a specified number of region divisions as respective determination regions, and then determine the spatial relationship between each determination region and the three-dimensional model according to the above modeling data.
[0033] Specifically, the server can determine the distance field (Signed Distance Field, SDF) corresponding to each divided discrimination area based on the modeling data. In practical applications, SDF can map each point in the voxel space to a value, indicating the shortest distance from the point to the nearest surface. For the SDF value of any point P in the voxel space, that is, the distance from point P to the axis of the point-rod structure unit, this can be achieved by calculating the modulus of the vector cross product from P to P1 and P2, and then dividing it by the modulus of the distance between P1 and P2 to obtain the vertical distance D. Then, according to the radius R of the point-rod structure unit, the distance field of the point is obtained, that is, SDF_C = DR.
[0034] For any discrimination area, the discrimination area is equivalent to a bounding box of a cube. The server can calculate the distance from each face of the discrimination area (bounding box) to the three-dimensional model based on the modeling data. If the distances from all faces to the three-dimensional model are greater than 0, it means that the discrimination area does not intersect with the three-dimensional model. At this time, it can be determined that the corresponding SDF range is (1, 100), indicating that the discrimination area is completely outside the three-dimensional model.
[0035] In addition, the server can determine whether the eight vertices of the judgment area are all located inside the three-dimensional model based on the modeling data. Since the point-rod structure unit is a convex shape, when all vertices are located inside the three-dimensional model, the judgment area is completely located inside the three-dimensional model. At this time, the corresponding SDF range can be determined to be (-100, -1), indicating that the judgment area is completely located inside the three-dimensional model.
[0036] If the above two conditions are not met, it means that the judgment area is in an intersection relationship with the three-dimensional model, that is, it is not completely inside the three-dimensional model or not completely outside the three-dimensional model. At this time, the corresponding SDF range can be determined to be (-1, 1).
[0037] In this specification, the server may determine the distance field SDF range corresponding to each discrimination region according to the above modeling data, and further determine the spatial relationship between each discrimination region and the three-dimensional model according to the SDF range corresponding to each discrimination region.
[0038] In practical applications, for complex point-rod structures, the server can differentiate them into multiple point-rod structure units to calculate the SDF. The operations involved include: Implementing the Union Operation Boolean Operation Method: The union operation is used to merge the SDF distance fields of two geometries to generate a new geometry that contains all parts of both geometries. The union operation is implemented by calculating the point-by-point maximum of the two SDF distance fields.
[0039] A method for calculating the SDF value of a complex topological structure is provided. A complex topological point-rod structure is composed of multiple independent point-rod models combined by a union Boolean operation. Calculating the SDF value of a complex topological point-rod structure is to calculate the SDF values of multiple independent point-rod models, and then use a Boolean union operation on each of them to finally obtain the SDF value.
[0040] S104: For each discrimination region, determine whether the discrimination region satisfies the voxel value determination condition according to the spatial relationship between the discrimination region and the three-dimensional model; if so, determine the voxel value corresponding to each voxel contained in the discrimination region according to the spatial relationship between the discrimination region and the three-dimensional model; otherwise, continue to divide the discrimination region according to the number of region divisions until the divided discrimination region satisfies the termination condition of region division.
[0041] For each divided determination area, the server may determine whether the determination area satisfies the voxel value determination condition according to the spatial relationship between the determination area and the three-dimensional model.
[0042] When the determination area is completely located inside the three-dimensional model, or completely located inside the three-dimensional model, it is determined that the determination area meets the voxel value determination condition. At this time, the server can further determine the voxel value corresponding to each voxel in the determination area.
[0043] Specifically, for any discrimination region, if the minimum value of the SDF range corresponding to the discrimination region is greater than the reference value, it means that the discrimination region is completely outside the three-dimensional model, and the voxel values corresponding to each voxel in the region are all the first voxel values.
[0044] If the maximum value of the SDF range corresponding to the judgment area is less than or equal to the reference value, it means that the judgment area is completely located inside the three-dimensional model, and the voxel value corresponding to each voxel in the judgment area is the second voxel value.
[0045] In this specification, the above-mentioned reference value can be set to 0. When the judgment area is completely outside the three-dimensional model, the voxel value (first voxel value) corresponding to all voxels in the judgment area is 0. When the judgment area is completely outside the three-dimensional model, the voxel value (second voxel value) corresponding to all voxels in the judgment area is 1.
[0046] Of course, the above-mentioned reference value can also be set according to actual conditions, and this specification does not make specific restrictions on this. In addition, in an embodiment provided in this specification, the server may not determine the SDF range corresponding to each discrimination area based on the modeling data, but calculate the spatial relationship between the discrimination area and the three-dimensional model based on the modeling data to determine the voxel value of each voxel.
[0047] When the minimum value of the SDF range corresponding to the judgment area is less than the reference value, and / or the maximum value of the SDF range is greater than the reference value, it means that the judgment area is not completely located inside the three-dimensional model, or is not completely located inside the three-dimensional model. Since it is impossible to determine which voxels in the judgment area are outside the model and which voxels are outside the model, the judgment area does not meet the voxel value determination conditions. At this time, the server can continue to divide the judgment area according to the number of area divisions until the divided judgment area meets the termination conditions of the area division.
[0048] Among them, the number of the above-mentioned area divisions can be set according to actual conditions. In one embodiment provided in the present specification, the number of the above-mentioned area divisions can be 8, that is, the voxel space is divided into 8 smaller judgment areas, and the 8 judgment areas are processed in parallel at the same time. For each judgment area, if the judgment area meets the above-mentioned determination conditions, the voxel value corresponding to each voxel in the judgment area can be directly determined, and there is no need to divide the judgment area subsequently; if the judgment area does not meet the above-mentioned determination conditions, it is necessary to continue to divide the 8 areas into smaller judgment areas until the final termination conditions are met.
[0049] In the present specification, the termination conditions for region division may include two types. First, when the determination region satisfies the voxel value determination condition (i.e., it is completely located inside or outside the three-dimensional model), the determination region also satisfies the termination conditions for region division. Second, when the size of the determination region and the size of the voxel are less than a preset threshold, it is determined that the termination conditions for region division are met. At this time, the spatial relationship between the determination region and the three-dimensional model can be determined based on the spatial relationship between the voxel or the center point of the determination region and the three-dimensional model. Among them, the above-mentioned preset threshold can be set according to actual conditions, and this specification does not make specific restrictions on this. For example, the preset threshold can be set to 0, at which time the size of the determination region is equal to the voxel. For ease of understanding, this specification provides a schematic diagram of the voxel value determination process, such as Figure 2 shown.
[0050] Figure 2 A schematic diagram of a process for determining a voxel value provided in this specification.
[0051] Among them, after constructing the voxel space, the server can divide the voxel space into several judgment areas. For each judgment area, if the judgment area meets the voxel value determination condition, the voxel value of each voxel contained therein is determined, and if the judgment condition does not meet the voxel value determination condition, it continues to be divided until the divided voxel area is smaller than the size of a single voxel or meets the voxel value determination condition, then the division of the voxel area is terminated.
[0052] S105: Rendering the three-dimensional model of the target object according to the voxel value corresponding to each voxel in the voxel space.
[0053] After determining the voxel value corresponding to each voxel in the voxel space, the server can render the three-dimensional model of the target object.
[0054] Furthermore, for each voxel, the server can determine whether the voxel intersects with the reference plane of the three-dimensional model based on the SDF value corresponding to each vertex of the voxel. If so, the server can determine the edge where the voxel intersects with the reference plane, and determine the vertex coordinates of the triangle according to the vertex positions of the edge where the voxel intersects with the reference plane and the SDF value corresponding to the voxel, and then generate a triangle on the outer surface of the three-dimensional model based on the determined vertex coordinates of each triangle.
[0055] In this specification, the reference surface can be an isosurface. For each voxel, the server can determine the relationship between the SDF value of its vertex and the isosurface, find the edge intersecting the isosurface, and for each intersecting edge, calculate the vertex position of the triangular face through linear interpolation according to the SDF value and the position of the vertex of the edge, and generate the triangular face. For ease of understanding, this specification provides a schematic diagram of a three-dimensional model of a point-rod structure, such as Figure 3 shown.
[0056] Figure 3 This is a schematic diagram of a three-dimensional model of a point-rod structure provided in this specification.
[0057] in, Figure 3 (a) is a schematic diagram of the unit cell structure of the point-rod structure. Figure 3 (b) is a schematic diagram of filling the dot-rod structure array into a cylindrical shape, where the voxel value of each voxel inside the dot-rod structure is 1, and the voxel value of each voxel outside the dot-rod structure is 0.
[0058] From the above method, it can be seen that this solution significantly improves the calculation efficiency because it uses a tree structure algorithm to recursively divide the three-dimensional space and realizes parallel processing. The test results show that compared with the traditional point-by-point calculation method, this solution increases the calculation speed by more than 50% when processing large-scale three-dimensional models.
[0059] Due to the implementation of accurate distance field calculation methods, especially for the calculation of single-point SDF values and interval SDF values of the rod structure base model, this solution can perform Boolean operations on 3D models more accurately. The accuracy of the model is maintained when merging geometries.
[0060] This solution can effectively split a complex topological point-rod structure into multiple rod structures for SDF calculation. This technical solution enables the present invention to have higher flexibility and accuracy when processing complex geometric bodies.
[0061] This solution uses interval operations to accelerate the calculation of the voxel matrix, and the present invention can determine the voxel grid value more quickly when constructing the voxel matrix. Test data shows that compared with the traditional method, the time consumption of the voxelization processing stage of this solution is reduced by 30%.
[0062] This scheme uses interval operations in voxelization, reducing unnecessary recursive processes and data storage, thereby reducing memory consumption. When processing high-resolution models, this scheme reduces memory usage by 20% compared to traditional methods.
[0063] The above are one or more implementations of the three-dimensional model generation method of this specification. Based on the same idea, this specification also provides a corresponding three-dimensional model generation device, such as Figure 4 shown.
[0064] Figure 4 A schematic diagram of a three-dimensional model generation device provided in this specification includes: The receiving module 401 is used to receive a model building request for a target object, and obtain modeling data of the target object according to the model building request; A determination module 402 is used to determine the voxel space where the three-dimensional model of the target object is located according to the modeling data; A division module 403 is used to divide the voxel space into a plurality of discrimination regions according to a specified number of region divisions, and determine a spatial relationship between each discrimination region and the three-dimensional model; The judging module 404 is used to judge, for each judging region, whether the judging region satisfies the voxel value determination condition according to the spatial relationship between the judging region and the three-dimensional model; if so, the voxel value corresponding to each voxel contained in the judging region is determined according to the spatial relationship between the judging region and the three-dimensional model; otherwise, the judging region is continuously divided according to the number of region divisions until the divided judging region satisfies the termination condition of region division; The rendering module 405 is used to render the three-dimensional model of the target object according to the voxel value corresponding to each voxel in the voxel space.
[0065] Optionally, the target object is a point-rod structure, and for each point-rod structural unit included in the point-rod structure, the modeling data of the point-rod structural unit includes vertex coordinates, radius and boundary data of the point-rod structural unit.
[0066] Optionally, the division module 403 is specifically used to determine the distance field SDF range corresponding to each discrimination area according to the modeling data; for each discrimination area, determine the spatial relationship between the discrimination area and the three-dimensional model according to the SDF range corresponding to the discrimination area.
[0067] Optionally, the determination module 402 is specifically used to, for each judgment area, if the minimum value of the SDF corresponding to the judgment area is greater than a reference value, determine that the judgment area is entirely outside the three-dimensional model; if the maximum value of the SDF corresponding to the judgment area is not greater than the reference value, determine that the judgment area is entirely inside the three-dimensional model.
[0068] Optionally, the judgment module 404 is specifically configured to, for each judgment region, determine that if the judgment region is entirely located inside the three-dimensional model, or entirely located inside the three-dimensional model, the judgment region satisfies the determination condition; otherwise, the determination condition is not satisfied.
[0069] Optionally, the termination condition of the region division includes: the divided determination region meets the determination condition, and / or the deviation between the size of the divided determination region and the size of the voxel is less than a preset threshold.
[0070] Optionally, the rendering module 405 is also used to determine, for each voxel, whether the voxel intersects with the reference plane of the three-dimensional model based on the SDF value corresponding to each vertex of the voxel; if so, determine the edge at which the voxel intersects with the reference plane, and determine the vertex coordinates of the triangular facet based on the vertex positions of the edge at which the voxel intersects with the reference plane and the SDF value corresponding to the voxel; and generate a triangular facet on the outer surface of the three-dimensional model based on the determined vertex coordinates of each triangular facet.
[0071] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 A three-dimensional model generation method is provided.
[0072] This manual also provides Figure 5 The one shown corresponds to Figure 1 A schematic diagram of the electronic device. Figure 5 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0073] For the improvement of a technology, it can be clearly distinguished whether it is a hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or a software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0074] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0075] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0076] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0077] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0078] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0079] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0080] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0081] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0082] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0083] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0084] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0085] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0086] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0087] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0088] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A three-dimensional model generation method, characterized in that: include: Receiving a model building request for a target object, and acquiring modeling data of the target object according to the model building request; Determining, based on the modeling data, a voxel space where the three-dimensional model of the target object is located; Dividing the voxel space into a plurality of discrimination regions according to a specified number of region divisions, and determining a spatial relationship between each discrimination region and the three-dimensional model; For each discrimination region, judging whether the discrimination region satisfies the voxel value determination condition according to the spatial relationship between the discrimination region and the three-dimensional model; if so, determining the voxel value corresponding to each voxel contained in the discrimination region according to the spatial relationship between the discrimination region and the three-dimensional model; otherwise, continuing to divide the discrimination region according to the number of region divisions until the divided discrimination region satisfies the termination condition of region division; The three-dimensional model of the target object is rendered according to the voxel value corresponding to each voxel in the voxel space.
2. The method according to claim 1, characterized in that The target object is a point-rod structure, and for each point-rod structural unit contained in the point-rod structure, the modeling data of the point-rod structural unit includes the vertex coordinates, radius and boundary data of the point-rod structural unit.
3. The method according to claim 1, characterized in that Determining the spatial relationship between each discrimination region and the three-dimensional model specifically includes: Determine the distance field SDF range corresponding to each discrimination area according to the modeling data; For each discrimination region, a spatial relationship between the discrimination region and the three-dimensional model is determined according to an SDF range corresponding to the discrimination region.
4. The method according to claim 3, characterized in that For each discrimination region, according to the SDF range corresponding to the discrimination region, determining the spatial relationship between the discrimination region and the three-dimensional model specifically includes: For each discrimination region, if the minimum value of the SDF corresponding to the discrimination region is greater than the reference value, it is determined that the discrimination region is entirely located outside the three-dimensional model; If the maximum value of the SDF corresponding to the discrimination region is not greater than the reference value, it is determined that the discrimination region is entirely located inside the three-dimensional model.
5. The method according to claim 1, characterized in that Judging whether the determination area satisfies a voxel value determination condition according to a spatial relationship between the determination area and the three-dimensional model, specifically includes: For each determination region, if the determination region is entirely located inside the three-dimensional model, or entirely located inside the three-dimensional model, it is determined that the determination region satisfies the determination condition; otherwise, the determination condition is not satisfied.
6. The method according to claim 1, characterized in that The termination condition of the region division includes: the divided discrimination region meets the determination condition, and / or the deviation between the size of the divided discrimination region and the size of the voxel is less than a preset threshold.
7. The method according to claim 1, characterized in that The method further comprises: For each voxel, judging whether the voxel intersects with a reference plane of the three-dimensional model according to an SDF value corresponding to each vertex of the voxel; If yes, determine the edge where the voxel intersects with the reference plane, and determine the vertex coordinates of the triangular face according to the vertex position of the edge where the voxel intersects with the reference plane and the SDF value corresponding to the voxel; A triangular facet is generated on the outer surface of the three-dimensional model according to the determined vertex coordinates of each triangular facet.
8. A three-dimensional model generating device, characterized in that: include: A receiving module, configured to receive a model building request for a target object, and obtain modeling data of the target object according to the model building request; A determination module, used for determining the voxel space where the three-dimensional model of the target object is located according to the modeling data; A division module, used to divide the voxel space into a plurality of discrimination regions according to a specified number of region divisions, and determine a spatial relationship between each discrimination region and the three-dimensional model; a judgment module, for judging, for each judgment region, whether the judgment region satisfies a voxel value determination condition according to a spatial relationship between the judgment region and the three-dimensional model; if so, determining a voxel value corresponding to each voxel contained in the judgment region according to the spatial relationship between the judgment region and the three-dimensional model; otherwise, continuing to divide the judgment region according to the number of region divisions until the divided judgment region satisfies a termination condition for region division; A rendering module is used to render the three-dimensional model of the target object according to the voxel value corresponding to each voxel in the voxel space.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Conditional generative adversarial-based three-dimensional model fuzzy texture feature saliency method
CN114119924A
Explicit and implicit model fusion rendering method for digital twin scene and application
CN116883565A
Reconstruction method, device and equipment of three-dimensional entity model, medium and program product
CN117409144A
Three-dimensional model rendering method and device, storage medium and electronic equipment
CN119478194A
Cited By
Three-dimensional modeling method and system based on lattice structure
CN120689546A