Three-dimensional model processor and processing device
By initializing and region division in a three-dimensional scene, automatically adjusting the replacement model to a calibration model, the problem of a large number of manual adjustments in the existing technology is solved, and an efficient and automatic three-dimensional model replacement process is realized.
Patent Information
- Application Number
- CN202411461287.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art requires a lot of manual adjustments during the three-dimensional model replacement process, resulting in large workload and low efficiency, and it is impossible to realize one-time automatic replacement of multiple three-dimensional models.
By initializing the three-dimensional space in the three-dimensional scene, dividing the area based on the replacement elements, and adjusting the replacement model to the calibration model according to the replacement elements, the automatic calibration of the replacement model and direct replacement of the original model are realized.
The manual adjustment steps are reduced, the efficiency of 3D model replacement is improved, and the size and distribution of the replacement model can be automatically calculated and adjusted, so that it can be directly integrated into the 3D scene.
Smart Images

Figure CN119625233A_ABST
Abstract
Description
[0001] The original basis of this divisional application is a patent application with application number (202311822550.7), application date December 27, 2023, and invention name “A graphics processing method and system for a three-dimensional model”. Technical Field
[0002] The present invention relates to the field of game scene technology, and in particular to a processor and a processing device for a three-dimensional model. Background Art
[0003] The current processing of 3D scenes includes editing and replacement. However, editing and replacement generally need to be processed manually and cannot be processed automatically by the system. For example, current CAD / CAM technology is widely used in the editing and replacement of 3D models. CAD / CAM technology can be used to implement parametric modification and replacement operations on 3D models. Existing 3D modeling software also includes 3ds Max, Maya and other software, which manually select 3D model nodes, align them for deletion / hiding operations, and then insert the new 3D model into the required scene.
[0004] The common shortcomings of the above-mentioned three-dimensional model processing system include: the need to manually adjust and replace the three-dimensional model. For example, some graphics processing software does not support the modification of the three-dimensional model. When the three-dimensional model needs to be modified, the three-dimensional model needs to be deleted from the current scene first, then imported into a third-party graphics processing system for modification, and the size of the three-dimensional model is adjusted by scaling again, and then imported into the current scene to view the modification result of the three-dimensional model. For another example, even if some graphics processing software supports the modification of the three-dimensional model, its adjustment steps are relatively cumbersome. After the three-dimensional model is replaced, it is also necessary to use a modification tool to perform adjustment steps such as scaling and changing the position of the three-dimensional model. Obviously, the manual processing steps of the three-dimensional model require a lot of time and energy. The current image processing software for three-dimensional models only involves the replacement function of the three-dimensional model, ignoring the user's requirements for the boundaries and timeliness of the operation.
[0005] For example, a patent application document with publication number CN115457202A discloses a method for updating a three-dimensional model, which includes obtaining an aerial image of a specified area, determining a target object to be replaced in a preset aerial image and a target object to be updated in the aerial image based on the aerial image and the preset aerial image, determining a monomer model of the target object to be replaced from the three-dimensional model of the specified area, determining three-dimensional vector data of the target object to be updated based on the aerial image, determining a monomer model to be updated of the target object to be updated based on the three-dimensional vector data, replacing the monomer model of the target object to be replaced with the corresponding monomer model to be updated, and obtaining the updated three-dimensional model of the specified area. Although the patent can match the size of the three-dimensional model, it can only process models with the same shooting angle. For three-dimensional models with different shooting angles and different spacings, manual processing is still required to adjust the spacing of each model. In addition, the patent can only be used for replacing a single model one by one, and cannot be used for replacing and updating a three-dimensional model combination composed of several three-dimensional models.
[0006] For another example, the patent application with publication number CN107690673A discloses an image processing method. The method includes: determining a target sub-image included in a target image sent by a terminal; determining a target three-dimensional model that matches a target object corresponding to the target sub-image from a three-dimensional model library; performing image replacement on the target sub-image in the target image based on the target three-dimensional model; and sending the target image after image replacement to the terminal. This patent also performs a one-to-one replacement of three-dimensional models, and cannot automatically adjust and replace a whole set of three-dimensional model combinations consisting of several three-dimensional models at one time.
[0007] Therefore, how to automatically replace multiple 3D models at one time, reduce the steps of manual adjustment, and solve the problem that the spacing between the 3D models cannot meet the requirements during the replacement process is something that current image processing systems or image processing software cannot solve.
[0008] The present invention aims to improve the current three-dimensional model replacement method or system, and provide a three-dimensional model graphics processing system and method that reduces the manual adjustment steps.
[0009] In addition, on the one hand, there are differences in understanding among those skilled in the art; on the other hand, the applicant studied a large number of documents and patents when making the present invention, but due to space limitations, not all details and contents are listed in detail. However, this does not mean that the present invention does not have the characteristics of these prior arts. On the contrary, the present invention already has all the characteristics of the prior art, and the applicant reserves the right to add relevant prior art to the background technology. Summary of the invention
[0010] When a 3D model needs to be replaced, the 3D model processing systems currently on the market generally need to manually adjust the replacement model, such as adjusting the scale, size, spacing, etc. of the replacement model. A large number of manual operations have significantly increased the workload of the staff who process 3D graphics and reduced their work efficiency. For example, when a 3D model in a 3D scene needs to be replaced, the replacement model needs to be imported into a third-party system for modification, and then imported into the original 3D scene after the modification is completed. Alternatively, the size, spacing, orientation and other parameters of the replacement model are manually adjusted, and the adjustments are repeated until the replacement model is suitable, which consumes a lot of time and work energy.
[0011] The prior art has already presented a technical solution for automatically replacing part of the three-dimensional model based on the mesh division of the three-dimensional model. For example, the patent document with the publication number CN115861549A discloses a method and device for automatically replacing the tree model in the real scene three-dimensional data. After obtaining the first three-dimensional mesh data and the corresponding texture data in the OSGB data corresponding to the remote sensing image to be processed, the method meshes the first three-dimensional mesh data and the corresponding texture data to obtain the tree mesh data and non-tree mesh data with color values; after removing the current tree model, the hole mesh data after the tree model is removed is filled based on the first three-dimensional mesh data of the ground part and the texture data of the ground part in the non-tree mesh data; based on the tree mesh data, the translation vector and scaling size of each tree model are calculated; according to the translation vector and scaling size, the corresponding tree model is transformed into three-dimensional coordinates to replace the tree model after the coordinate transformation in the real scene of the target area of the remote sensing image to be processed. However, in this technical solution, the hole grid data after removing the tree model is used as the basis for generating the calibration model. The model elements of different calibration models are determined according to the hole grid data at different positions, which is equivalent to matching the calibration model with the local three-dimensional space. It is impossible to realize the calibration model replacement process based on the global three-dimensional space of the present invention.
[0012] In view of the deficiencies in the prior art, the present invention provides a three-dimensional model graphics processing method from a first aspect, the method comprising: initializing a three-dimensional space within a three-dimensional scene; dividing the three-dimensional space into regions based on replacement elements; adjusting the replacement model to a calibration model according to the replacement elements, and using the calibration model to replace the original model.
[0013] Compared with the above-mentioned prior art, the present invention can use the replacement elements as the adjustment scale of the replacement model, and as a calibration connection bridge between different replacement models and the three-dimensional space. Based on the above-mentioned distinguishing technical features, the problems to be solved by the present invention may include: how to adjust the replacement model with different initial model parameters into a calibration model that is convenient for direct replacement, so as to reduce the operation steps of model replacement and improve the efficiency of model replacement. Specifically, the present invention can predetermine the replacement elements of the original model in the area by dividing the original model in the three-dimensional scene into regions. When the replacement model is selected, the replacement model can be automatically adjusted according to the replacement elements, reducing the steps of manually inputting the replacement elements, and realizing the automatic calibration of the replacement model. The advantage of the present invention is that there is no need to use a third-party system, reducing the steps of manual adjustment, and the calibrated replacement model can directly replace the original model and can be directly integrated into the three-dimensional scene.
[0014] According to a preferred embodiment, the replacement elements include: center position, mutual spacing, absolute spacing and combinations thereof. Compared with the above-mentioned prior art, the present invention can jointly calculate and adjust the replacement model through different replacement elements. Based on the above-mentioned distinguishing technical features, the problems to be solved by the present invention may include: how to improve the replacement efficiency of the three-dimensional model. In response to the targetless manual adjustment method in the prior art, the present invention automatically adjusts the replacement model based on the replacement elements such as the center position, mutual spacing, absolute spacing and the like of the original model, so that the calibrated calibration model can be directly integrated into the three-dimensional scene without adjusting the spacing between the calibration model and the surrounding original models in the three-dimensional scene.
[0015] According to a preferred embodiment, the method of adjusting the replacement model to the calibration model includes: adjusting the replacement model to the calibration model based on the center position and orientation characteristics of the original model; and / or adjusting the replacement model to the calibration model based on the relative geometric position relationship of the original model in the three-dimensional space. Compared with the above-mentioned prior art, the present invention can adjust the replacement model based on different replacement elements of the original model. Based on the above-mentioned distinguishing technical features, the problems to be solved by the present invention may include: how to improve the efficiency and accuracy of the replacement model adjustment. Specifically, for different replacement elements, the adjustment method and calculation steps of the replacement model are also different. The advantage of adjusting the replacement model by the center position and orientation characteristics is that the displacement of the replacement model can be avoided, and the manual operation steps of the orientation of the replacement model can also be reduced. The advantage of adjusting the replacement model by the relative geometric position relationship is that the distance between the replacement model and the surrounding original models can be made consistent with the original three-dimensional scene or proportionally changed, avoiding the situation where the distance between the replacement model and the surrounding original models is inappropriate and repeatedly adjusted.
[0016] According to a preferred embodiment, the method of adjusting the replacement model to the calibration model includes: determining the center position and orientation characteristics of the selected replacement model based on the center position and orientation characteristics of the original model; adjusting the replacement model based on the proportional relationship between the original model and the replacement model, so that the replacement model is adjusted to the calibration model. The replacement model is adjusted by the proportional relationship so that the size of the replacement model is consistent with that of the original model, and the geometric center of the replacement model is consistent with that of the original model, so as to avoid uneven distribution of the replacement model, three-dimensional shape deviation, etc.
[0017] According to a preferred embodiment, the method of adjusting the replacement model to the calibration model also includes: calculating a first mutual spacing ratio between the original models; adjusting a second mutual spacing ratio between the replacement models based on the first mutual spacing ratio to form a calibration model; in the process of replacing the calibration model with the original model, determining the position of the calibration model based on the second mutual spacing ratio, wherein the orientation feature of the calibration model is consistent with the orientation feature of the original model. Compared with the above-mentioned prior art, the present invention can adjust the spacing ratio relationship between the replacement models according to the spacing ratio relationship between the original models, and use it to form the calibration model. Based on the above-mentioned distinguishing technical features, the problems to be solved by the present invention may include: how to prevent the replaced model from interfering with the original model or the replacement model ratio relationship from being inconsistent with the original model. Specifically, in many cases, the spacing between the replacement model and the surrounding original models is inconsistent with the original three-dimensional scene, and the defects caused by this include: the replacement model collides or is not harmonious with the surrounding original models; the spacing between several sub-three-dimensional models in the replacement model is not coordinated. The present invention adjusts the replacement model by pre-setting the mutual spacing, so that the adjusted calibration model can be directly coordinated with the surrounding original models, or the spacing inside several sub-three-dimensional models in the calibration model can be changed in proportion to avoid some replacement models from being crowded together.
[0018] According to a preferred embodiment, the method further includes: calculating the absolute distance between the fixed three-dimensional model outside the three-dimensional scene and the original model, adjusting the replacement model to the calibration model based on the absolute distance and the first mutual distance ratio between the original models, and determining the position of the calibration model. Based on different situations in the three-dimensional scene, the original model needs to maintain an absolute distance with the specified fixed three-dimensional model, so the replacement model also needs to maintain an absolute distance with the fixed three-dimensional model, so that manual adjustment of the distance can be avoided after replacement, so that the calibration model can be adjusted to the appropriate size and scaling ratio at one time, reducing the number of manual operations.
[0019] According to a preferred embodiment, the method further comprises: when the absolute spacing between the two original models needs to be set in an unchanged manner, adjusting the mutual spacing between at least two replacement models and / or between the replacement model and the fixed model in a manner that retains the absolute spacing. This arrangement enables the calibration model to automatically maintain the absolute spacing after being placed in the three-dimensional scene, thereby reducing the difference between the replacement model and the original model in arrangement.
[0020] The present invention also provides a three-dimensional model graphics processing system from a second aspect, including a processor. The processor is configured to: initialize a three-dimensional space within a three-dimensional scene; divide the three-dimensional space into regions based on replacement elements; adjust the replacement model to a calibration model based on the replacement elements, and use the calibration model to replace the original model. The advantage of the graphics processing system of the present invention is that it can automatically calculate and adjust the replacement model to a calibration model of appropriate size and distribution during the process of replacing the original model, so that the calibration model can directly replace the original model without manual operation again, thereby reducing the number of manual operations of the three-dimensional model and improving the efficiency of three-dimensional model replacement.
[0021] According to a preferred embodiment, the processor is further configured to: adjust the replacement model to the calibration model based on the center position and orientation characteristics of the original model; and / or adjust the replacement model to the calibration model based on the relative geometric position relationship of the original model in three-dimensional space. The advantages of the system of the present invention also include: adjusting the replacement model through the center position and the relative geometric position relationship can avoid the structural deviation of the replacement model as a whole, and can also make the orientation of the replacement model automatically consistent with the original model without manual adjustment.
[0022] According to a preferred embodiment, the processor is further configured to: calculate the absolute distance between the fixed three-dimensional model outside the three-dimensional scene and the original model, adjust the replacement model to the calibration model based on the absolute distance and the first mutual distance ratio between the original models, and determine the position of the calibration model. Such adjustment also has the advantages of: avoiding the occurrence of unreasonable distances between the replacement model and other surrounding original models in the three-dimensional scene, and reducing the number of times the replacement model is adjusted. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a logical schematic diagram of the three-dimensional model replacement process provided by the present invention;
[0024] Figure 2 It is a schematic diagram of the steps of the graphics processing method of the three-dimensional model provided by the present invention;
[0025] Figure 3 It is a structural schematic diagram of a three-dimensional model graphics processing system provided by the present invention;
[0026] Figure 4is a schematic diagram of steps of a graphics processing method according to an embodiment of the present invention;
[0027] Figure 5 It is a structural schematic diagram of the display interface provided by the present invention.
[0028] Reference numerals list
[0029] 100: original model; 200: replacement model; 300: calibration model; 400: three-dimensional scene; 500: graphics processing system; 501: display interface; 502: display component; 503: interaction component; 504: storage component; 505: processor; 506: communication component; 507: third-party database. DETAILED DESCRIPTION
[0030] The following is a detailed description with reference to the accompanying drawings.
[0031] Original model 100: a 3D model that exists in the 3D scene 400 and needs to be replaced. The original model 100 is not limited to a single 3D model, but can also refer to a set of 3D model assemblies formed by combining several sub-3D models according to certain distribution characteristics. In the 3D model assembly, there can be multiple set combination modes.
[0032] Replacement model 200: A three-dimensional model used to replace the original model 100. The replacement model 200 can be stored in a database or a local storage device. The replacement model 200 is not limited to a single three-dimensional model, but can also refer to a set of three-dimensional model assemblies formed by combining several sub-three-dimensional models according to certain distribution characteristics. In the three-dimensional model assembly, there can also be multiple set combination modes. The layout features of the replacement model 200 and the several sub-three-dimensional models in the replaced original model 100 can be the same or different.
[0033] The calibration model 300 is a three-dimensional model formed by replacing the model 200 after adjusting coefficients, modifying, scaling, etc. The calibration model 300 can directly replace the original model 100 .
[0034] The three-dimensional scene 400 refers to a three-dimensional space including all objects. When in an unreplaced state, the three-dimensional scene 400 also includes the original model 100 .
[0035] Center position: When the 3D model is a single solid model, the center position refers to the geometric center position of the 3D model. When the 3D model is a combined model, the center position refers to the geometric center position of the overall structure of the combined model.
[0036] Orientation features: refers to the directional features of a 3D model. Direction features can include the 3D size, main direction, and other features of the 3D model.
[0037] When performing a replacement operation of a 3D model, the graphics processing system in the prior art always fails to meet the expected effect. After the 3D model is replaced, the replacement model 200 and the surrounding 3D models may interfere with each other (for example, a collision occurs, or the spacing between the 3D models does not meet the expectations). In this case, a large number of manual operations are required to adjust the replacement model 200 to achieve the expected effect.
[0038] In view of the deficiencies of the prior art, the present invention hopes to provide a three-dimensional model graphics processing method and system. The present invention can also be a three-dimensional model replacement method and system. The present invention can also be a three-dimensional scene automatic adjustment system and method. When applied to the field of game technology, the present invention can also be a game scene processing device and method. When applied to the field of digital twin technology, the present invention can also be a digital twin system, or a digital twin scene adaptive adjustment system and method.
[0039] The present invention hopes to improve the replacement method of the three-dimensional model so that the distance between the three-dimensional model and the surrounding scene before and after the replacement can be adaptively adjusted to reduce the workload of manual processing.
[0040] Example 1
[0041] In the current 3D model processing systems on the market, when a 3D model needs to be replaced, it is generally necessary to manually adjust the replacement model 200, such as adjusting the scale, size, spacing, etc. of the replacement model 200. A large number of manual operations significantly increase the workload of the staff who process the 3D graphics and reduce their work efficiency.
[0042] For example, the steps for replacing an existing 3D model include:
[0043] S101: Manually select and delete nodes of the original model 100. In this process, it is necessary to select features such as vertices and lines of the original model 100. In the selection process, the data volume of the original model 100 is large, and some vertices and lines may be omitted, resulting in partial structures of the original model 100 not being completely deleted.
[0044] S102: Importing the replacement model 200 into the position of the original model 100.
[0045] S103: Manually adjust the position, size and scaling of the replacement model 200 according to the position of the original model 100. In the process of adjusting the replacement model 200, it is also necessary to manually filter the required model nodes in the directory tree. Since the replacement models 200 in the same area are not structured in the directory tree, it is necessary to manually select multiple structures or use tools to filter the required structures. Most three-dimensional model processing systems cannot support the screening of the structure of the replacement model 200, resulting in low adjustment efficiency of the replacement model 200.
[0046] Moreover, the above three-dimensional model processing system only allows one-to-one replacement of the original model 100 and the replacement model 200, and cannot realize the replacement of combined models. For example, the existing three-dimensional model processing system cannot replace a living room model containing several furniture with a kitchen model containing several tablewares at one time.
[0047] In view of the shortcomings of the prior art, the present invention provides a three-dimensional model graphics processing method from a first aspect, such as Figure 2 As shown, the method includes:
[0048] S210: Initialize the three-dimensional space in the three-dimensional scene 400.
[0049] Initializing the three-dimensional space within the three-dimensional scene 400 can eliminate the modified data of the original model 100 and reduce the amount of data processing.
[0050] S220: Divide the three-dimensional space into regions based on the replacement elements.
[0051] Specifically, the replacement elements include: center position, mutual spacing, absolute spacing and combinations thereof. There is a mutual spacing or an unchangeable absolute spacing between the original model 100 and the surrounding original models 100 .
[0052] In the three-dimensional scene 400, some original models 100 can be completely replaced. Some original models 100 contain irreplaceable sub-models. There is a certain distribution pattern or absolute spacing between some original models 100 and the original models 100 around them. Therefore, the adjustment methods of the replacement models 200 of different categories of original models 100 are different. If the three-dimensional space of the three-dimensional scene 400 is not divided, then the various types of original models 100 will be mixed together. In the process of replacing the three-dimensional model, the adjustment of the replacement model 200 is prone to errors.
[0053] To address this defect, the present invention divides the three-dimensional scene 400 into areas according to the set replacement elements, and can predetermine the parameters that cannot be changed. Therefore, when the original model 100 in the corresponding area is replaced, the corresponding replacement model 200 can be quickly calculated and adjusted based on the unchangeable factors of the original model 100 and its own structural characteristics, thereby reducing the amount of calculation for subsequent adjustments and reducing the number of times the replacement model 200 is repeatedly adjusted.
[0054] Preferably, the present invention can represent different three-dimensional space areas based on lines, colors, shadows, logos, patterns, text information and combinations thereof. Thus, when the original model 100 in the area is selected, the staff does not need to manually input the replacement adjustment method of the original model 100 one by one, but only needs to adjust the replacement model 200 according to the type of the area.
[0055] S230 : adjusting the replacement model 200 to the calibration model 300 according to the replacement elements, and replacing the original model 100 with the calibration model 300 .
[0056] Specifically, the step of selecting the original model 100 includes: setting a plane projection of all vertices and lines of the original model 100. Setting the extension length of the plane projection along the normal of the plane projection. After the extension length is determined, the three-dimensional space formed based on the plane projection and the extension length is the selected replacement space, and the complete replaceable three-dimensional model located in the replacement space is the original model 100. Preferably, some irreplaceable three-dimensional models can be located in the replacement space in whole or in part. Alternatively, some irreplaceable three-dimensional models are located outside the replacement space. Preferably, in the case where there is an unchangeable absolute spacing between the original model 100 and other original models 100 in the three-dimensional scene 400 or outside the visible range, the replacement model 200 also needs to be adjusted according to the absolute spacing when adjusting.
[0057] Preferably, when selecting the replacement model 200, the replacement model 200 may be selected according to a replacement list for replacement. The replacement list is used to manually determine the correspondence between the replacement model 200 and the original model 100. In response to the replacement instruction, the processor 505 performs the replacement.
[0058] For different replacement elements, the adjustment method and calculation steps of the replacement model 200 are also different. The present invention can predetermine the replacement elements of the original model 100 in the area by dividing the original model 100 in the three-dimensional scene 400 into regions. When the replacement model 200 is selected, the replacement model 200 can be automatically adjusted according to the replacement elements, reducing the steps of manually inputting the replacement elements and realizing automatic calibration of the replacement model 200. The advantage of the present invention is that there is no need to use a third-party system, reducing the steps of manual adjustment, and the calibrated replacement model 200 can directly replace the original model 100 and can be directly integrated into the three-dimensional scene 400.
[0059] Preferably, the manner of adjusting the replacement model 200 to the calibration model 300 includes: adjusting the replacement model 200 to the calibration model 300 based on the center position and orientation features of the original model 100. Adjusting the replacement model 200 to the calibration model 300 based on the relative geometric position relationship of the original model 100 in three-dimensional space. These two manners can be used to adjust the replacement model 200 separately, or can be used to adjust the same replacement model 200 at the same time.
[0060] Specifically, the center position and orientation features of the selected replacement model 200 are determined based on the center position and orientation features of the original model 100. The replacement model is adjusted based on the proportional relationship between the original model 100 and the replacement model 200, so that the replacement model 200 is adjusted to the calibration model 300. The replacement model 200 is adjusted by the proportional relationship so that the size of the replacement model is consistent with that of the original model 100, and the geometric center of the replacement model 200 is consistent with that of the original model 100, so as to avoid the replacement model 200 from being evenly distributed, shifted in three-dimensional shape, etc.
[0061] For example: Figure 1 and Figure 4 One of the replacement processes implemented based on the center position and orientation characteristics is shown.
[0062] S301: Figure 1 As shown, the original model 100 to be replaced is selected. Generally, there are several ways to select the model: First, obtain it from the tree node of the three-dimensional scene 400: determine the original model 100 to be replaced by selecting the node. Second, select directly in the three-dimensional scene 400: the original model 100 to be replaced can be determined by selecting the model in the three-dimensional space.
[0063] S302: Figure 1 As shown, all the models selected in the current 3D scene 400, that is, all the original models 100, are jointly calculated to form a bounding box of the original model 100 as a whole, and the dimensions of the length, width and height of the bounding box are identified. The length, width and height are recorded as x1, y1 and z1 respectively.
[0064] S303: As shown in Figure 1 , select a model file in the database or locally as the replacement model 200, and perform the replacement operation. Calculate the dimensions of the replacement model 200 in the three directions of the length, width, and height of the bounding box. The length, width, and height of the bounding box of the replacement model 200 are denoted as x2, y2, and z2 respectively.
[0065] S304: Taking the corresponding x, y, and z directions as references, by default, arrange the replacement model 200 in the same direction as the original model 100. Taking the largest absolute value among the absolute values of the differences in the three directions as a reference, and then obtaining the ratio. For example, if the largest difference is 丨x1 - x2丨, the ratio is x1 / x2. Automatically adjust the size of the replacement model 200, and scale the replacement model 200 proportionally to adjust it to the calibration model 300, and the adjustment coefficient is the ratio. Finally, multiply the ratio successively by the adjustment coefficient to obtain the dimensions x3, y3, and z3 of the calibration model 300, as shown in Figure 1 .
[0066]
[0067] S305: If there is still a deviation in the calibration model 300, the calibration model 300 can be manually fine-tuned to adjust the size or position of the calibration model 300.
[0068] The advantage of adjusting the replacement model 200 through the center position and orientation features is that it can avoid the deviation of the replacement model 200 and also reduce the manual operation steps for the orientation of the replacement model 200. The advantage of adjusting the replacement model 200 through the relative geometric position relationship is that it can make the distance between the replacement model 200 and the surrounding original models 100 in the original three-dimensional scene 400 consistent or change proportionally, avoiding the situation where the distance between the replacement model 200 and the surrounding original models 100 is inappropriate and requires repeated adjustment.
[0069] Preferably, when analyzing and determining the center position and orientation of the replacement model 200 and the original model 100, it can be replaced by determining the center position and orientation of the bounding boxes of the replacement model 200 and the original model 100. Compared with each model, since the bounding box is a more regular geometric body, the amount of calculation required for calculating the center position coordinates and orientation vectors is smaller, and it can achieve a one-time rapid pasting and replacement of a significantly larger number of three-dimensional models.
[0070] Preferably, as shown in Figure 4 , the present invention can also adjust the replacement model 200 according to the relative geometric position relationship between the original models 100 in the three-dimensional scene 400.
[0071] S231: Calculate the first mutual distance ratio between the original models 100.
[0072] S232: adjusting the second mutual spacing ratio between the replacement models 200 based on the first mutual spacing ratio to form the calibration model 300. In the process of replacing the original model 100 with the calibration model 300, the second mutual spacing ratio between the replacement models 200 is calculated. The second mutual spacing ratio is adjusted according to the first mutual spacing ratio.
[0073] For example, the first spacing ratio between the three original models 100 is 1:2. The second spacing ratio between the three replacement models 200 is 2:3. Then the second spacing ratio is adjusted to 1:2 according to the first spacing ratio. For another example, the second mutual spacing is reduced or enlarged year by year in the same three-dimensional space to meet the size difference brought by the replacement models 200.
[0074] Since the amount of calculation required for the same-year scaling is calculated jointly with all the replacement models 200 in the three-dimensional space, it does not need to analyze each vertex and line separately (which may include the calculation of traversing a large number of nodes and contain a large amount of memory consumption), so the replacement method of the present invention does not need to traverse each node, and can meet the needs of replacing a large number of three-dimensional models at one time. The replacement method brought by the same-year scaling also requires very little work for later manual adjustment.
[0075] S233 : Determine the position of the calibration model 300 based on the second mutual spacing ratio. The orientation feature of the calibration model 300 is consistent with the orientation feature of the original model 100 .
[0076] In most cases, the spacing between the replacement model 200 and the surrounding original models 100 is inconsistent with that in the original three-dimensional scene 400, which causes defects including: the replacement model 200 collides or is not harmonious with the surrounding original models 100; the spacing between several sub-three-dimensional models in the replacement model 200 is not coordinated. The present invention adjusts the replacement model 200 by pre-setting the mutual spacing, so that the adjusted calibration model 300 can be directly coordinated with the surrounding original models 100, or the spacing within several sub-three-dimensional models in the calibration model 300 can be changed in proportion, so as to avoid some replacement models 200 from being crowded together.
[0077] Preferably, after the replacement space is set, there is a three-dimensional model segment that runs through or is partially embedded in the replacement space and should also be replaced, which is referred to as a replacement three-dimensional model segment for short.
[0078] When the original model 100 in the replacement space is selected, if the replacement 3D model segment exists, the point or line where the replacement 3D model segment intersects with the envelope of the replacement space is determined as the vertex and / or the outermost line of the replacement 3D model segment. At this time, the complete original model 100 in the replacement space is the first original model 100. The replacement 3D model segment is the second original model 100.
[0079] Preferably, after setting the replacement space, there is still a 3D model segment that runs through or is partially embedded in the replacement space and should not be replaced (ie should be retained), referred to as a fixed 3D model. At least one vertex or line of the fixed 3D model is located outside the replacement space.
[0080] When replacing, the center position and orientation of the fixed three-dimensional model are not analyzed and determined, or the results of the analysis and determination are not retained. There is no replacement model 200 corresponding to the fixed three-dimensional model and used to replace it.
[0081] In the case where there is a fixed distance requirement between the fixed three-dimensional model and the original model 100 due to regulations or objective conditions, the distance between the fixed three-dimensional model and the original model 100 is an absolute distance.
[0082] Preferably, if Figure 4 As shown, the method of the present invention also includes:
[0083] S241: Calculate the absolute distance between the fixed 3D model outside the 3D scene 400 or outside the replacement space and the original model 100. Here, outside the 3D scene 400 refers to outside the visible scene range.
[0084] S242: Adjust the replacement model 200 to the calibration model 300 based on the absolute distance and the first mutual distance ratio between the original models 100, and determine the position of the calibration model 300. Preferably, when adjusting the second mutual distance, the calculation of the absolute distance between the replacement model 200 and the fixed 3D model needs to be retained.
[0085] Based on the different situations in the three-dimensional scene 400, the original model 100 needs to maintain an absolute distance from the specified fixed three-dimensional model, so the replacement model 200 also needs to maintain an absolute distance from the fixed three-dimensional model, so that manual adjustment of the distance can be avoided after replacement, so that the calibration model 300 can be adjusted to the appropriate size and scaling at one time, reducing the number of manual operations. In this way, the replaced three-dimensional model can also meet regulations or objective conditions.
[0086] Preferably, the method of the present invention further comprises: when the absolute spacing between the two original models 100 needs to be set in an unchanged manner, adjusting the mutual spacing between at least two replacement models 200 and / or between the replacement model 200 and the fixed model in a manner of retaining the absolute spacing. In this way, the calibration model 300 can automatically maintain the absolute spacing after being placed in the three-dimensional scene 400, thereby reducing the difference between the replacement model 200 and the original model 100 in arrangement.
[0087] Preferably, when the replacement model 200 is a combined model, that is, the replacement model 200 includes several sub-models, the center position, orientation characteristics, first mutual distance and absolute distance between the selected original model 100 and the surrounding original models 100 are calculated first.
[0088] Secondly, the overall center position and orientation characteristics of the replacement model 200 are determined based on the manually selected replacement model 200. The second mutual spacing ratio between the plurality of sub-three-dimensional models in the replacement model 200 is collected. In the process of adjusting the replacement model 200 according to the first mutual spacing ratio, the second mutual spacing ratio is enlarged or reduced year-on-year to achieve the effect that the mutual spacing between the plurality of sub-three-dimensional models in the replacement model 200 is variable in size but unchanged in ratio. In the process of calculating the replacement model 200, the position of the overall edge line of the replacement model 200 is calculated based on the absolute spacing at the same time, so that the formed calibration model 300 can also meet the set regulations or objective conditions after replacing the original model 100.
[0089] The present invention adjusts the replacement model 200 by jointly calculating replacement elements such as center position, mutual spacing and absolute spacing, so that the adjusted calibration model 300 can directly replace the original model 100 without repeated adjustment, thereby achieving efficient replacement of the three-dimensional model.
[0090] Example 2
[0091] This embodiment is a further improvement on Embodiment 1, and the repeated contents will not be repeated here.
[0092] The present invention further provides a three-dimensional model graphics processing system from a second aspect, comprising a processor 505. The processor 505 is a dedicated integrated chip, server or server group capable of executing the coding program of the three-dimensional model graphics processing of the present invention.
[0093] like Figure 3 As shown, the processor 505 can be arranged in a graphics processing system 500 for performing three-dimensional modeling.
[0094] like Figure 3As shown, the graphics processing system 500 for a three-dimensional model includes a display interface 501, a storage component 504, and a processor 505. The display interface 501 is connected to the processor 505. The processor 505 is connected to the storage component 504. The display interface 501 is used to display the three-dimensional scene 400. Figure 5 As shown, the display interface 501 includes a display component 502 and an interaction component 503. The display component 502 is, for example, a liquid crystal display screen. The interaction component 503 is, for example, a mouse, a keyboard, a touch-controllable display screen, a touch pen, and the like.
[0095] Preferably, when the processor 505 needs to retrieve the replacement model 200 from the third-party database 507, the graphics processing system 500 further includes a communication component 506. The processor 505 is connected to the third-party database 507 via the communication component 506 to transmit instructions or information. The storage component 504 is, for example, hardware with storage function such as a memory chip, a microprocessor, or a disk medium.
[0096] The processor 505 is configured to: initialize the three-dimensional space within the three-dimensional scene 400 ; divide the three-dimensional space into regions based on the replacement elements; adjust the replacement model 200 to the calibration model 300 according to the replacement elements, and replace the original model 100 with the calibration model 300 .
[0097] The advantage of the graphics processing system of the present invention is that it can automatically calculate and adjust the replacement model 200 to a calibration model 300 of appropriate size and distribution during the process of replacing the original model 100, so that the calibration model 300 can directly replace the original model 100 without the need for manual operation again, thereby reducing the number of manual operations on the three-dimensional model and improving the efficiency of three-dimensional model replacement.
[0098] According to a preferred embodiment, the processor 505 is further configured to: adjust the replacement model 200 to the calibration model 300 based on the center position and orientation characteristics of the original model 100; and / or adjust the replacement model 200 to the calibration model 300 based on the relative geometric position relationship of the original model 100 in the three-dimensional space. The advantages of the system of the present invention also include: adjusting the replacement model 200 through the center position and the relative geometric position relationship can avoid the overall structural deviation of the replacement model 200, and can also make the orientation of the replacement model 200 automatically consistent with the original model 100, without the need for manual adjustment.
[0099] According to a preferred embodiment, the processor 505 is further configured to: calculate the absolute distance between the fixed three-dimensional model located outside the three-dimensional scene 400 and the original model 100, adjust the replacement model 200 to the calibration model 300 based on the absolute distance and the first mutual distance ratio between the original models 100, and determine the position of the calibration model 300. The advantages of such adjustment also include: avoiding the occurrence of unreasonable distances between the replacement model 200 and other surrounding original models 100 in the three-dimensional scene 400, and reducing the number of times the replacement model 200 is adjusted.
[0100] The specific implementation examples of the above steps are as described in Example 1 and will not be repeated here.
[0101] It should be noted that the above-mentioned specific embodiments are exemplary, and those skilled in the art can come up with various solutions inspired by the disclosure of the present invention, and these solutions also belong to the disclosure scope of the present invention and fall within the protection scope of the present invention. Those skilled in the art should understand that the present invention specification and its drawings are illustrative and do not constitute a limitation on the claims. The scope of protection of the present invention is defined by the claims and their equivalents. The present invention specification contains multiple inventive concepts, such as "preferably" and "according to a preferred embodiment", which means that the corresponding paragraph discloses an independent concept, and the applicant reserves the right to file a divisional application based on each inventive concept.
Claims
1. A three-dimensional model processor, characterized in that: The processor (505) is configured to: Determine the original model (100) that needs to be replaced by selecting a model in the three-dimensional space and determine the parameters that cannot be changed; Identifying the bounding box size of the original model (100) and the bounding box size of the replacement model (200); When the replacement model (200) is arranged in the same direction as the original model (100), the ratio is obtained by taking the largest absolute value of the absolute value of the difference between the bounding box size of the original model (100) and the bounding box size of the replacement model (200) in three directions as a reference; Scaling the replacement model (200) to a calibration model (300); The calibration model (300) is used to replace the original model (100).
2. The three-dimensional model processor according to claim 1, characterized in that: The processor (505) determines the parameters that cannot be changed in the following manner: determining replacement elements of the original model (100); Divide the three-dimensional space into regions based on the replacement elements and form three-dimensional space regions; and representing different three-dimensional space regions as different types of lines, colors, shadows, logos, patterns, text information and combinations thereof according to the region division results; When the original model (100) in the three-dimensional space region is selected, adjusting the replacement model (200) according to the type of the three-dimensional space region; The replacement elements include center position, mutual spacing, absolute spacing and combinations thereof.
3. The three-dimensional model processor according to claim 2, characterized in that: The processor (505) divides the three-dimensional space into regions based on the replacement elements and forms three-dimensional space regions, including: Setting a plane projection of all vertices and lines of the original model (100); Setting an extension length of the plane projection along the normal direction of the plane projection; After the extension length is determined, the three-dimensional space formed based on the plane projection and the extension length is the selected replacement space, and the complete replaceable three-dimensional model located in the replacement space is the original model (100); Wherein, all or part of the non-replaceable three-dimensional model is located in the replacement space; or, the non-replaceable three-dimensional model is located outside the replacement space.
4. The three-dimensional model processor according to claim 3, characterized in that: The processor (505) adjusts the replacement model (200) according to the type of the three-dimensional space region, including: In the case where there is an unchangeable absolute distance between the original model (100) and the original model (100) within the three-dimensional scene (400) or outside the visible range, the replacement model (200) is adjusted according to the absolute distance.
5. The three-dimensional model processor according to claim 3, characterized in that: The processor (505) adjusts the replacement model (200) to the calibration model (300) in a manner comprising: adjusting the replacement model (200) to the calibration model (300) based on the center position and orientation characteristics of the original model (100); or Based on the proportional relationship between the original model (100) and the replacement model (200), the replacement model (200) is adjusted to have the same size as the original model (100), and the geometric center of the replacement model (200) is consistent with that of the original model (100).
6. The three-dimensional model processor according to any one of claims 1 to 5, characterized in that: The processor (505) adjusts the replacement model (200) to the calibration model (300) further comprising: A second mutual distance ratio between at least two replacement models (200) is adjusted based on a first mutual distance ratio between at least two original models (100), and a position of a calibration model (300) is determined based on the second mutual distance ratio.
7. The three-dimensional model processor according to any one of claims 1 to 5, characterized in that: The processor (505) adjusts the replacement model (200) to the calibration model (300) in a manner comprising: In case the absolute distance between two original models (100) needs to be set in an unchanged manner, the mutual distance between at least two replacement models (200) and / or between the replacement model (200) and the fixed model is adjusted in such a way that the absolute distance is preserved.
8. A three-dimensional model processing device, comprising a processor (505) and a display interface (501) connected thereto, characterized in that: The processor (505) is configured to: the display interface (501) is used to display a three-dimensional scene (400); The processor (505) is configured to: Determine the original model (100) that needs to be replaced by selecting a model in the three-dimensional space and determine the parameters that cannot be changed; Identifying the bounding box size of the original model (100) and the bounding box size of the replacement model (200); When the replacement model (200) is arranged in the same direction as the original model (100), the ratio is obtained by taking the largest absolute value of the absolute value of the difference between the bounding box size of the original model (100) and the bounding box size of the replacement model (200) in three directions as a reference; Scaling the replacement model (200) to a calibration model (300); The calibration model (300) is used to replace the original model (100).
9. The three-dimensional model processing device according to claim 8, characterized in that: The processor (505) determines the parameters that cannot be changed in the following manner: determining replacement elements of the original model (100); Divide the three-dimensional space into regions based on the replacement elements and form three-dimensional space regions; and representing different three-dimensional space regions as different types of lines, colors, shadows, logos, patterns, text information and combinations thereof according to the region division results; When the original model (100) in the three-dimensional space region is selected, adjusting the replacement model (200) according to the type of the three-dimensional space region; The replacement elements include center position, mutual spacing, absolute spacing and combinations thereof.
10. The three-dimensional model processing device according to claim 8 or 9, characterized in that: The processor (505) adjusts the replacement model (200) according to the type of the three-dimensional space region, including: In the case where there is an unchangeable absolute distance between the original model (100) and the original model (100) within the three-dimensional scene (400) or outside the visible range, the replacement model (200) is adjusted according to the absolute distance.
Citation Information
Patent Citations
Image processing method, apparatus and server
CN107690673A
Three-dimensional model updating method and device and storage medium
CN115457202A
Method and device for automatically replacing tree model in live-action three-dimensional data
CN115861549A