Configuration generation method and related device of three-dimensional distortion model in geometry engine
By obtaining and adjusting the surface control point positions of the three-dimensional distortion model in the geometry engine, the problem of insufficient surface distortion accuracy of the three-dimensional distortion model in the prior art is solved, and a three-dimensional model generation with higher accuracy and efficiency is achieved.
Patent Information
- Application Number
- CN202411709905.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-11-27
AI Technical Summary
The surface distortion change accuracy of the three-dimensional distortion model in existing geometric engines is insufficient and cannot meet the high-precision requirements in the fields of automobiles, aircraft, mechanical parts, etc.
By obtaining the initial position information of the initial surface and surface control points, setting the rotation axis and surface rotation angle, calculating the changing position information of the surface control points, and adjusting the surface control points to the new position, to achieve accurate morphological adjustment of the three-dimensional distortion model.
It improves the accuracy of the three-dimensional distortion model, enhances the accuracy and efficiency of surface adjustment, and can meet high-precision design requirements while reducing labor costs.
Smart Images

Figure CN119206151B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of three-dimensional geometric model generation, and in particular, to a configuration generation method of a three-dimensional distortion model in a geometric engine, a configuration generation device of a three-dimensional distortion model in a geometric engine, an electronic device, and a computer-readable medium. Background Art
[0002] In the process of product design, three-dimensional (3D) modeling software is generally used, such as CAD, Revit, uBuilder and other modeling tools. The underlying core technology of such modeling tools is the geometry engine and constraint engine. The core functions of the geometry engine include sketch contour expression, part modeling parameter expression, assembly constraints and collision checks, etc., which help users quickly determine design intent, check interference and simulate motion, thereby improving production efficiency.
[0003] The models obtained by this type of 3D modeling software require some basic 3D models to be changed in order to obtain the desired 3D solid model. However, the current accuracy of the distortion of the curved surfaces of different models in the geometry engine does not meet the accuracy requirements of industrial products in the fields of automobiles, aircraft, and mechanical parts. Therefore, how to accurately adjust the 3D distortion model in the geometry engine to improve the accuracy of the generated 3D distortion model is an urgent problem to be solved. Summary of the invention
[0004] The embodiments of the present application provide a configuration generation method of a three-dimensional distortion model in a geometry engine, a configuration generation device of a three-dimensional distortion model in a geometry engine, an electronic device, a computer-readable storage medium and a computer program product, which can realize precise adjustment of the three-dimensional distortion model in the geometry engine to improve the accuracy of the generated three-dimensional distortion model.
[0005] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0006] According to one aspect of an embodiment of the present application, an embodiment of the present application provides a configuration generation method of a three-dimensional distortion model in a geometry engine, the method comprising:
[0007] Acquire an initial surface included in a three-dimensional distortion model in a geometry engine, and initial position information corresponding to surface control points for controlling the shape of the initial surface in the geometry engine;
[0008] Obtaining the rotation axis and surface rotation angle set for the initial surface;
[0009] Based on the initial position information, the axis position information of the rotation axis and the surface rotation angle, obtaining the change position information corresponding to the surface control point;
[0010] The surface control point is adjusted to the position represented by the change position information to adjust the shape of the initial surface included in the three-dimensional warped model to obtain a new three-dimensional warped model, and the new three-dimensional warped model is output.
[0011] According to one aspect of an embodiment of the present application, an embodiment of the present application provides a configuration generation device for a three-dimensional distortion model in a geometry engine, the device comprising a first acquisition unit, a second acquisition unit, a processing unit, and an adjustment unit, wherein:
[0012] The first acquisition unit is used to acquire an initial surface included in the three-dimensional distortion model in the geometry engine, and initial position information corresponding to the surface control points for controlling the shape of the initial surface in the geometry engine;
[0013] The second acquisition unit is used to acquire the rotation axis and the surface rotation angle set for the initial surface;
[0014] The processing unit is used to obtain the change position information corresponding to the surface control point based on the initial position information, the axis position information of the rotation axis and the surface rotation angle;
[0015] The adjustment unit is used to adjust the surface control point to the position represented by the change position information to perform morphological adjustment on the initial surface included in the three-dimensional warped model to obtain a new three-dimensional warped model, and output the new three-dimensional warped model.
[0016] In one embodiment, based on the aforementioned scheme, when the processing unit obtains the change position information corresponding to the surface control point based on the initial position information, the axis position information of the rotation axis and the surface rotation angle, it can be specifically used to: obtain the projection point of the surface control point to the rotation axis based on the initial position information and the axis position information; adjust the surface rotation angle according to the projection position information of the projection point and the axis position information to obtain the control rotation angle corresponding to the surface control point; obtain the change position information corresponding to the surface control point based on the initial position information, the axis position information and the control rotation angle.
[0017] In one embodiment, based on the aforementioned scheme, when the processing unit obtains the change position information corresponding to the surface control point based on the initial position information, the axis position information and the control rotation angle, it can be specifically used to: obtain the point unit vector of the surface control point according to the initial position information; obtain the axis vector of the rotation axis according to the axis starting point position information and the axis end point position information contained in the axis position information; obtain the projection vector corresponding to the surface control point based on the projection position information and the initial position information; obtain the change position information corresponding to the surface control point based on the point unit vector, the axis vector, the projection vector and the control rotation angle.
[0018] In one embodiment, based on the aforementioned scheme, when the processing unit adjusts the surface rotation angle according to the projection position information of the projection point and the axis position information to obtain the control rotation angle corresponding to the surface control point, it can be specifically used to: obtain the rotation period length set for the initial surface; obtain the axis vector of the rotation axis based on the axis starting position information and the axis ending position information contained in the axis position information; obtain the angle influence factor based on the projection position information, the axis starting position information and the axis vector; adjust and update the surface rotation angle according to the rotation period length and the angle influence factor to obtain the control rotation angle corresponding to the surface control point.
[0019] In one embodiment, the number of the surface control points includes multiple; based on the aforementioned scheme, when the processing unit adjusts the surface rotation angle according to the projection position information of the projection point and the axis position information to obtain the control rotation angle corresponding to the surface control point, it can be specifically used to: obtain the projection point of each surface control point projected to the rotation axis, and obtain the angle influence factor of each surface control point based on the projection position information and the axis position information of each projection point; obtain the rotation period length of the initial surface according to the maximum and minimum values of the multiple angle influence factors; adjust and update the surface rotation angle according to the rotation period length and the angle influence factors of each surface control point to obtain the control rotation angle corresponding to each surface control point.
[0020] In one embodiment, based on the aforementioned scheme, when the processing unit obtains the change position information corresponding to the surface control point based on the initial position information, the axis position information of the rotation axis and the surface rotation angle, it can be specifically used to: obtain a vertical change function set for the initial surface; wherein the vertical change function is used to control the morphological change of the initial surface in the vertical direction of the rotation axis; assign a distance parameter in the vertical change function through the distance between the projection point of the surface control point projected onto the rotation axis and the surface control point to obtain a correction angle; based on the initial position information, the axis position information, the surface rotation angle and the correction angle, obtain the change position information corresponding to the surface control point.
[0021] In one embodiment, based on the aforementioned scheme, when the processing unit obtains the change position information corresponding to the surface control point based on the initial position information, the axis position information, the surface rotation angle and the correction angle, it can be specifically used to: obtain the control rotation angle corresponding to the surface control point according to the initial position information, the surface rotation angle and the axis position information; correct the control rotation angle by the correction angle to obtain the target rotation angle corresponding to each surface control point; obtain the change position information corresponding to the surface control point based on the initial position information, the axis position information and the target rotation angle.
[0022] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising one or more processors; a storage device for storing one or more computer programs, wherein when the one or more computer programs are executed by the one or more processors, the electronic device implements the configuration generation method of the three-dimensional distortion model in the geometric engine as described above.
[0023] According to one aspect of an embodiment of the present application, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor of an electronic device, the electronic device executes the configuration generation method of the three-dimensional distortion model in the geometric engine as described above.
[0024] According to one aspect of an embodiment of the present application, an embodiment of the present application provides a computer program product, including a computer program, wherein the computer program is stored in a computer-readable storage medium, and a processor of an electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device executes the configuration generation method of the three-dimensional distortion model in the geometric engine as described above.
[0025] In the technical solution provided in the embodiment of the present application, the change position information corresponding to the surface control point can be obtained based on the initial position information corresponding to the surface control of the initial surface, the axis position information of the rotation axis, and the surface rotation angle, so as to achieve the morphological adjustment of the surface by adjusting the position of the surface control point. In this way, the embodiment of the present application only needs to set the rotation axis and the surface rotation angle used to characterize the design intent, and the surface can be adjusted at the control point level; this method can improve the accuracy of the surface adjustment in the three-dimensional distortion model on the one hand, and on the other hand, it can reduce labor costs and improve the adjustment efficiency of the surface while obtaining a model that meets the design intent. Therefore, the embodiment of the present application can realize the precise adjustment of the surface in the three-dimensional distortion model while ensuring that the surface adjustment meets the design intent, thereby improving the accuracy of the generated three-dimensional distortion model; at the same time, it can also improve the adjustment efficiency of the surface, thereby improving the generation efficiency of high-precision three-dimensional distortion models.
[0026] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0028] Figure 1 It is a structural schematic diagram of a configuration generation system of a three-dimensional distortion model in a geometry engine provided by an embodiment of the present application;
[0029] Figure 2 It is a flowchart of a method for generating a configuration of a three-dimensional distortion model in a geometry engine provided by an embodiment of the present application;
[0030] Figure 3 is a schematic diagram of a rotating shaft provided in an embodiment of the present application;
[0031] Figure 4 is a schematic diagram of a curved surface rotation angle provided in an embodiment of the present application;
[0032] Figure 5 It is a flowchart of another configuration generation method of a three-dimensional distortion model in a geometry engine provided by an embodiment of the present application;
[0033] Figure 6 is a schematic diagram of a change of an initial curved surface in a direction perpendicular to the rotation axis provided in an embodiment of the present application;
[0034] Figure 7 It is a schematic diagram of the effects of two curved surface adjustment methods provided in the embodiments of the present application;
[0035] Figure 8 is a schematic diagram of a curved surface adjustment process provided by an embodiment of the present application;
[0036] Fig. 9 is a structural block diagram of a configuration generation device of a three-dimensional distortion model in a geometry engine shown in an exemplary embodiment of the present application;
[0037] Fig.10 It is a structural diagram of a computer system suitable for implementing an electronic device of an embodiment of the present application. DETAILED DESCRIPTION
[0038] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0039] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0040] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all contents and operations, nor must they be executed in the order described. For example, some operations may be decomposed, while some operations may be combined or partially combined, so the actual execution order may change according to actual conditions.
[0041] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0042] It should also be noted that the "multiple" mentioned in this application refers to two or more than two. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship.
[0043] In the process of product design, three-dimensional (3D) modeling software is generally used, such as CAD, Revit, uBuilder and other modeling tools. The underlying core technology of such modeling tools is the geometry engine and constraint engine. The core functions of the geometry engine include sketch contour expression, part modeling parameter expression, assembly constraints and collision checks, etc., which help users quickly determine design intent, check interference and simulate motion, thereby improving production efficiency.
[0044] The models obtained through this type of 3D modeling software need to change some basic 3D models to get the desired 3D model, or check the effect after the change for subsequent design updates. Among them, the basic 3D model contains surfaces, and the model products obtained after distorting the surfaces in the model are often used in various fields such as rail transportation, hydraulic structures, and machinery.
[0045] For example, in the field of rail transit, the curved ceilings, escalators, navigation signs, etc. of rail transit stations are all built based on three-dimensional models containing curved surfaces. In the field of hydraulic engineering, the cross-section of the water flow control part is generally rectangular, while the cross-section of the irrigation channel is generally trapezoidal. In order to make the water flow smooth and reduce the head loss, a twisted surface transition section is often used to connect the rectangular section to the trapezoidal section. The inner and outer surfaces of the transition section are twisted curved surfaces; therefore, in the product design stage, a three-dimensional model of the irrigation channel section can be designed. In the field of machinery, the blades and propellers of the engine are also cast based on three-dimensional models.
[0046] In addition, the twisting and rotation of surfaces has important applications in material mechanics. For example, when two equal and opposite force couples act on the two ends of a rod and the action plane is perpendicular to the axis of the rod, any two cross sections of the rod will rotate relative to each other around the axis, which is torsional deformation. In this case, simulating the torsion surface through the 3D model in the geometry engine can help understand and calculate the effect of torsional deformation.
[0047] In related technologies, designers mainly use manual drawing, adjustment on computer equipment, etc. to distort and rotate the surface of the three-dimensional model in the geometry engine to achieve the desired effect. Although this method has certain flexibility, it is very inefficient and has large errors. It is not suitable for fields such as automobiles, aircraft, construction, and mechanical parts that require high product precision.
[0048] Based on this, the embodiment of the present application provides a configuration generation scheme for a three-dimensional warped model in a geometric engine. After obtaining the initial surface contained in the three-dimensional warped model in the geometric engine, the scheme only needs to obtain the rotation axis and surface rotation angle set for the initial surface, and can determine the change position information to which the surface control points of the initial surface should be adjusted from the initial position information of the surface control points based on the axis position information of the rotation axis and the surface rotation angle; finally, the surface control points are adjusted to the positions represented by the change position information, and the morphological adjustment of the initial surface in the three-dimensional warped model can be completed to obtain a new three-dimensional warped model. Among them, the surface control points are used to control the morphology of the initial surface.
[0049] It can be seen that in this solution, it is only necessary to set the rotation axis and surface rotation angle used to characterize the design intent. Based on the initial position information corresponding to the surface control points that have been clarified in the initial surface, the axis position information of the rotation axis and the surface rotation angle, the change position information of the surface control points can be determined, thereby completing the morphological adjustment of the surface by adjusting the position of the surface control points. This surface morphological adjustment method at the surface control point level can achieve precise adjustment of the surface; at the same time, the position adjustment of the surface control points is based on the rotation axis and the surface rotation angle, which can fully reflect the design intent. Therefore, this solution can achieve precise adjustment of the three-dimensional distortion model in the geometry engine on the premise of ensuring that the surface adjustment meets the design intent, so as to improve the accuracy of the generated three-dimensional distortion model.
[0050] Based on the configuration generation scheme of the three-dimensional distortion model in the above-mentioned geometry engine, the embodiment of the present application provides a configuration generation system of the three-dimensional distortion model in the geometry engine, which can be seen in Figure 1 , Figure 1The configuration generation system of the three-dimensional distortion model in the geometric engine shown may include a terminal device 101 and a server 102, the number of the terminal devices 101 may include one or more, and the number of the servers 102 may include one or more. Wherein, a communication connection is established between any terminal device and any server. For example, the terminal device 101 may include any one or more of a smart phone, a tablet computer, a laptop computer, a desktop computer, an intelligent voice interaction device, a smart home appliance, a vehicle terminal, an aircraft, and an intelligent wearable device. The terminal device 101 may be installed with a client such as Bentley (a BIM (Building Information Modeling, Building Information Modeling) design software), Computer Aided Design (CAD, computer-aided design), uBuilder (a space rapid modeling software) client for assisting product design. The server 102 may be a server or server cluster that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. Any terminal device 101 and any server 102 may be directly or indirectly connected to each other via wired or wireless communication, and this application does not impose any limitation on this.
[0051] In some embodiments, the configuration generation method of the three-dimensional distortion model in the above-mentioned geometry engine can be only Figure 1 The configuration generation system of the three-dimensional warped model in the geometric engine shown is executed by the terminal device 101, and the specific execution process is as follows: the terminal device 101 can first obtain the initial surface contained in the three-dimensional warped model in the geometric engine, and the initial position information corresponding to the surface control points used to control the initial surface shape in the geometric engine. Then, the terminal device 101 can obtain the rotation axis and surface rotation angle set for the initial surface; thereafter, the terminal device 101 can obtain the change position information corresponding to the surface control points based on the initial position information, the axis position information of the rotation axis, and the surface rotation angle. The terminal device 101 can adjust the surface control points to the position represented by the change position information to adjust the shape of the initial surface contained in the three-dimensional warped model to obtain a new three-dimensional warped model; finally, the terminal device 101 can output the new three-dimensional warped model.
[0052] In other embodiments, the configuration generation method of the three-dimensional distortion model in the above-mentioned geometry engine can also be performed by Figure 1The configuration generation system of the three-dimensional warped model in the geometric engine shown in the figure is executed by the terminal device 101 and the server 102. The specific execution process may include: the terminal device 101 may first obtain the initial surface contained in the three-dimensional warped model in the geometric engine, and the initial position information corresponding to the surface control points used to control the initial surface morphology in the geometric engine. Then, the terminal device 101 may obtain the rotation axis and the surface rotation angle set for the initial surface. After that, the terminal device 101 may send the initial position information, the axis position information of the rotation axis, and the surface rotation angle to the server 102, and the server 102 obtains the change position information corresponding to the surface control points based on the initial position information, the axis position information of the rotation axis, and the surface rotation angle. Finally, the server 102 sends the change position information to the terminal device 101, and the terminal device 101 may adjust the surface control points to the position represented by the change position information, so as to adjust the morphology of the initial surface contained in the three-dimensional warped model, obtain a new three-dimensional warped model, and output the new three-dimensional warped model.
[0053] It should be noted that the embodiments of the present application can be applied to various application scenarios that require distortion design of surfaces in three-dimensional models, including but not limited to games, smart cities, rail transit, construction, machinery and other application scenarios, without limitation to this.
[0054] It should be noted that in the specific implementation of the present application, if the three-dimensional distortion model and other related data or information are related to the object, when the embodiment of the present application is applied to a specific product or technology, it is necessary to obtain the object's permission or consent, and the collection, use and processing of the relevant data or information need to comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0055] The following is a detailed description of various implementation details of the technical solution of the embodiment of the present application:
[0056] like Figure 2 As shown, Figure 2 is a flow chart of a method for generating a configuration of a three-dimensional distortion model in a geometry engine according to an embodiment of the present application. The method can be applied to Figure 1 The configuration generation system of the three-dimensional distortion model in the geometry engine shown in the figure can be executed by the terminal device or the server, or can be executed by the terminal device and the server together. In the embodiment of the present application, the method is executed by the terminal device as an example for explanation, wherein the configuration generation method of the three-dimensional distortion model in the geometry engine may include S201 to S204, which are described in detail as follows:
[0057] S201, obtaining an initial surface included in a three-dimensional distortion model in a geometry engine, and initial position information corresponding to surface control points for controlling the shape of the initial surface in the geometry engine.
[0058] In the embodiment of the present application, the geometry engine is the underlying core technology of three-dimensional modeling tools such as Solid Work, CAD, Revit, and uBuilder. The geometry engine may also include various basic three-dimensional models and design parameters of the three-dimensional models. For example, the design parameters may include the distance between three-dimensional models, the length, width, curvature, etc. of the three-dimensional models, which are not limited here.
[0059] In addition, the 3D warped model may be a 3D stereoscopic model including one or more basic 3D models. For example, the 3D warped model may only include the initial surface, or may include the initial surface and other basic 3D models. The initial surface in the 3D warped model may be manually set, or may be a basic 3D model provided by the geometry engine, which is not limited here.
[0060] The number of surface control points of the initial surface may include one or more; and the initial position information corresponding to the surface control point may specifically include the coordinates of the surface control point in the control of the geometry engine space, and the parameters of the surface control point (specifically, the parameter value of the surface control point in the length dimension and the parameter value of the surface control point in the width dimension). The same is true for other position information, which will not be described in detail later.
[0061] Specifically, designers can draw the initial surface in the space supported by the geometry engine by interacting with the terminal device; they can also obtain the initial surface by setting parameters such as surface size and shape. In practical applications, the initial surface can be a basic surface primitive (i.e., quadratic surface), a non-uniform rational B-spline surface (NURBS surface), etc.
[0062] S202: Obtain the rotation axis and surface rotation angle set for the initial surface.
[0063] In an embodiment of the present application, a surface adjustment operation on an initial surface can be performed to obtain a rotation axis and a surface rotation angle. The surface adjustment operation can specifically include a rotation axis setting operation and an angle selection setting operation. The rotation axis set for the initial surface can be manually set, or it can be selected by a designer from a basic three-dimensional model provided by a geometry engine, which is not limited here. Specifically, the designer can set the rotation axis by drawing a line in the geometry engine, or by setting two points and connecting them into a line to set the rotation axis, which is not limited here.
[0064] In addition, the surface rotation angle set for the initial surface can be manually set or selected by the designer from the basic 3D model provided by the geometry engine, which is not limited here. Specifically, the designer can set two points in the geometry engine to form a vector, and then use the angle between the vector and the rotation axis as the surface rotation angle; or directly set an angle as the surface rotation angle.
[0065] S203 , obtaining the change position information corresponding to the surface control point based on the initial position information, the axis position information of the rotation axis and the surface rotation angle.
[0066] In an embodiment of the present application, the process of obtaining the changed position information may specifically include: based on the initial position information and the axis position information, obtaining the projection point of the surface control point projected to the rotation axis; then, according to the projection position information and the axis position information of the projection point, adjusting the surface rotation angle to obtain the control rotation angle corresponding to the surface control point; finally, based on the initial position information, the axis position information and the control rotation angle, obtaining the changed position information corresponding to the surface control point.
[0067] Optionally, a plane passing through the surface control point and perpendicular to the rotation axis can be found based on the initial position information of the surface control point and the axis position information of the rotation axis, and the intersection of the plane and the rotation axis is the projection point; further, the coordinates of the projection point can be obtained as projection position information.
[0068] Optionally, the specific process of obtaining the changed position information corresponding to the surface control point based on the initial position information, the axis position information and the controlled rotation angle may include: obtaining the point unit vector of the surface control point according to the initial position information; obtaining the axis vector of the rotation axis according to the axis starting point position information and the axis ending point position information contained in the axis position information; and, obtaining the projection vector corresponding to the surface control point based on the projection position information and the initial position information; finally, obtaining the changed position information corresponding to the surface control point based on the point unit vector, the axis vector, the projection vector and the controlled rotation angle.
[0069] In one embodiment, the distortion of the surface can be changed periodically, and the morphological changes of the surface with different rotation period lengths will be different, and the position changes of the surface control points corresponding to rotation periods of different lengths will also be different; therefore, in order to increase the flexibility and accuracy of the surface design, the rotation period length can be set for the initial surface, thereby providing a periodic torsional change for the surface, and at the same time, the surface torsion can be achieved while ensuring that the distortion of the farthest end of the surface remains unchanged.
[0070] Then, the process of obtaining the control rotation angle can specifically include: first obtaining the rotation cycle length set for the initial surface; then, based on the axis starting position information and the axis ending position information contained in the axis position information, obtaining the axis vector of the rotation axis; then, based on the projection position information, the axis starting position information and the axis vector, obtaining the angle influence factor; finally, according to the rotation cycle length and the angle influence factor, the surface rotation angle is adjusted and updated to obtain the control rotation angle corresponding to the surface control point.
[0071] In another embodiment, it is considered that the designer may not set the rotation period length during the design process; therefore, in order to further improve the intelligence and flexibility of the surface design, the rotation period length can be determined based on the existing information, and the surface rotation angle can be adjusted accordingly.
[0072] Then, the process of obtaining the control rotation angle can specifically include: obtaining the projection points of each surface control point projected to the rotation axis, and obtaining the angle influence factor of each surface control point based on the projection position information and axis position information of each projection point; then, according to the maximum and minimum values of multiple angle influence factors, obtaining the rotation cycle length of the initial surface; finally, according to the rotation cycle length and the angle influence factors of each surface control point, the surface rotation angle is adjusted and updated to obtain the control rotation angle corresponding to each surface control point.
[0073] S204 , adjusting the surface control point to the position represented by the change position information, so as to adjust the shape of the initial surface included in the three-dimensional warped model, obtain a new three-dimensional warped model, and output the new three-dimensional warped model.
[0074] In the embodiment of the present application, the position change of the surface control point will cause the shape of the surface portion controlled by the surface control point to change, so the shape of the initial surface can be adjusted by adjusting the surface control point.
[0075] Specifically, the number of surface control points mentioned in step S202 may include multiple ones, and in the process of adjusting the surface control points, each surface control point may be adjusted from the position represented by the initial position information to the position represented by the changed position information. Optionally, a control point matrix may be formed based on multiple surface control points, and there is a one-to-one correspondence between the elements in the control point matrix and the surface control points, and each element is used to represent the initial position information of the corresponding surface control point; then, the corresponding elements in the control point matrix are updated according to the changed position information of each surface control point, thereby obtaining an updated control point matrix; finally, the initial surface in the three-dimensional distortion model is morphologically adjusted based on the updated control point matrix to obtain a new three-dimensional distortion model.
[0076] In the specific implementation, the process of obtaining the change position information corresponding to the surface control point is as follows:
[0077] 1) Get the initial surface. If the initial surface is not a NURBS surface, you can convert the initial surface into a NURBS surface. In this way, the surface function of the initial surface can be , its parameter form is shown in formula (1-1):
[0078]
[0079] in, , is the surface parameter. and are all B-spline basis functions, Represents the node vector elements, Represents the node vector elements, the node vector is an increasing sequence. and Characterizes the degree of the basis function. Characterizes the total number of surface control points corresponding to the initial surface, . Used to characterize surface control points. The weights used to characterize the surface control points.
[0080] 2) Set the rotation axis and surface rotation angle.
[0081] The specific process of setting the rotation axis may include: the designer can click two points in the space within the geometry engine to obtain the points and ,in, is the starting point of the rotation axis, is the end point of the rotation axis. The terminal device can then construct a straight line function of the rotation axis .in, Used to characterize the parameter information of each point in the rotation axis.
[0082] In actual application, please refer to the attached Figure 3 , shows a schematic diagram of a rotating shaft. Figure 3 As shown, the geometry engine already contains the surface 301 of the three-dimensional distortion model. At this time, the designer clicks two points in the space in the geometry engine to obtain the point and , thereby obtaining the rotation axis 302 for the curved surface 301.
[0083] The process of setting the axis of rotation can include: the designer can manually enter the surface rotation angle. Alternatively, the designer can select a point in space within the geometry engine. ,calculate To the rotation axis The vertical foot ; and selecting points in space within the geometry engine ,calculate To the rotation axis The vertical foot Finally, we calculate the vector , exist Angle of normal plane , as the surface rotation angle.
[0084] In actual application, please refer to the attached Figure 4 , which shows a schematic diagram of the surface rotation angle. Figure 4 As shown, and Considered as a point M, the vector , exist Angle of normal plane It is equivalent to .
[0085] 3) Twist and update the control point matrix.
[0086] Rotation formula for surface control points As shown in formula (1-2):
[0087]
[0088] in, Characterize the initial position information of the surface control points; Point unit vectors representing surface control points; is the surface rotation angle, To control the rotation angle, . is the axis vector of the rotation axis. , for arrive The foot of the perpendicular (i.e. the projection point).
[0089] ① For the case where the rotation period length d is set, is the angle influence factor, .
[0090] ② In the case where the rotation period length d is not set, the process of obtaining the rotation period length d specifically includes: first, according to each surface control point On the rotating axis The projection position information of the projection point on the surface is used to calculate each surface control point Corresponding angle influence factor ; Surface control points arrive The foot of the perpendicular (i.e. the projection point). Then, according to The value range of , calculate the rotation period length .and .
[0091] Finally, get each surface control point Substitute into the rotation formula After that, each surface control point The corresponding calculation results (i.e. each surface control point corresponding change position information), and according to each surface control point The corresponding calculation results get the new control point matrix , thereby substituting the new control point matrix into the NURBS surface to obtain a new surface, and thus a new three-dimensional distortion model.
[0092] In an embodiment of the present application, the change position information corresponding to the surface control point can be obtained based on the initial position information corresponding to the surface control of the initial surface, the axis position information of the rotation axis, and the surface rotation angle, so as to achieve the morphological adjustment of the surface by adjusting the position of the surface control point. In this way, the embodiment of the present application only needs to set the rotation axis and the surface rotation angle used to characterize the design intent, and the surface can be adjusted at the control point level; this method can improve the adjustment accuracy of the surface in the three-dimensional distortion model on the one hand, and on the other hand, it can also reduce labor costs and improve work efficiency while obtaining a surface that meets the design intent. Therefore, the embodiment of the present application can realize the precise adjustment of the three-dimensional distortion model in the geometry engine on the premise of ensuring that the surface adjustment meets the design intent, thereby improving the accuracy of the generated three-dimensional distortion model; at the same time, it can also improve the adjustment efficiency of the surface, thereby improving the generation efficiency of the three-dimensional distortion model.
[0093] In one embodiment of the present application, another configuration generation method of a three-dimensional distortion model in a geometry engine is provided, which can be applied to Figure 1 The configuration generation system of the three-dimensional distortion model in the geometric engine shown in the figure can be executed by the terminal device or the server, or by the terminal device and the server together. In the embodiment of the present application, the method is executed by the terminal device as an example for explanation. Figure 5 FIG. 1 is a flow chart showing another method for generating a configuration of a three-dimensional warped model in a geometric engine. The method for generating a configuration of a three-dimensional warped model in a geometric engine is Figure 2 This paper expands on the method shown in .
[0094] Among them, the detailed introduction of S501 to S506 is as follows:
[0095] S501, obtaining an initial surface included in a three-dimensional distortion model in a geometry engine, and initial position information corresponding to surface control points for controlling the shape of the initial surface in the geometry engine.
[0096] In the embodiment of the present application, the specific implementation of S501 can refer to the specific implementation of S201, which will not be described in detail here.
[0097] S502: Obtain the rotation axis and surface rotation angle set for the initial surface.
[0098] In the embodiment of the present application, the specific implementation of S502 can refer to the specific implementation of S202, which will not be repeated here.
[0099] S503, obtaining a vertical variation function set for the initial curved surface; wherein the vertical variation function is used to control the morphological change of the initial curved surface in a direction perpendicular to the rotation axis.
[0100] In the embodiment of the present application, the vertical variation function may be a radian function such as an exponential function or a power function, which is not limited here. The dependent variable of the vertical variation function is used to characterize the variation angle of the initial curved surface in the vertical direction of the rotation axis.
[0101] For specific implementation, please refer to the attached Figure 6 , shows a schematic diagram of the change of the initial surface in the direction perpendicular to the rotation axis. Figure 6 As shown, the curved surface 601 can not only be morphologically distorted around the rotation axis 602 , but also be morphologically distorted in a direction 603 perpendicular to the rotation axis 602 , as shown in distortion example 604 .
[0102] S504, assigning a distance parameter in the vertical variation function based on the distance between the projection point of the surface control point onto the rotation axis and the surface control point to obtain a correction angle.
[0103] In the embodiment of the present application, the distance parameter in the vertical change function is also the independent variable in the vertical change function. It should be noted that, since the change angles of different surface control points in the vertical direction of the rotation axis may be different, different surface control points may correspond to different correction angles.
[0104] In the specific implementation, the designer can draw and provide a radian function (i.e. vertical variation function), where is the distance parameter. Then, get the surface control point To the rotation axis Distance ,Will Substitution , you can get the surface control points Corresponding correction angle .
[0105] S505 , obtaining the change position information corresponding to the surface control point based on the initial position information, the axis position information, the surface rotation angle and the correction angle.
[0106] In an embodiment of the present application, the process of obtaining the change position information may specifically include: first, according to the initial position information, the surface rotation angle and the axis position information, the control rotation angle corresponding to the surface control point is obtained; then, the control rotation angle is corrected by the correction angle to obtain the target rotation angle corresponding to each surface control point; based on the initial position information, the axis position information and the target rotation angle, the change position information corresponding to the surface control point is obtained.
[0107] Among them, the specific process of obtaining the control rotation angle can refer to the specific implementation method of the control rotation angle mentioned in step S202, which will not be repeated here. Similarly, the specific process of obtaining the change position information corresponding to the surface control point based on the initial position information, the axis position information and the target rotation angle can refer to the specific implementation process of obtaining the change position information corresponding to the surface control point based on the initial position information, the axis position information and the control rotation angle in step S202, which will not be repeated here.
[0108] In practical applications, following the example in step S503 and step 3 in the example in step S204), for case ① and case ② in step 3), the control rotation angle of each surface control point can be calculated by the following formula (2-1): Make corrections to obtain the corrected control rotation angle (ie target rotation angle):
[0109]
[0110] Correspondingly, the rotation formula about the surface control point is It can be adjusted as shown in formula (2-2):
[0111]
[0112] S506: Adjust the surface control point to the position represented by the change position information to adjust the shape of the initial surface included in the three-dimensional warped model to obtain a new three-dimensional warped model, and output the new three-dimensional warped model.
[0113] In the embodiment of the present application, the specific implementation of S506 can refer to the specific implementation of S204, which will not be described in detail here.
[0114] For specific implementation, please refer to the attached Figure 7 , shows the effect diagram of two surface adjustment methods. Figure 7 The 701 in the figure represents a surface adjustment method that adjusts the shape of the surface only around the rotation axis. Figure 7 702 in the figure is the result after adjusting 701. Figure 7 The 703 in the figure represents a surface adjustment method for adjusting the shape of the surface around the rotation axis and in the direction perpendicular to the rotation axis. Figure 7 704 in the figure is the result of adjusting 703. It is not difficult to see that compared with Figure 7 702 of them, Figure 7 The curved edges of the 703 are sharper and more stylish.
[0115] In general, combined with the actual examples in S204 and S505, see the attached Figure 8 , which shows a schematic diagram of the process of surface adjustment. Figure 8 As shown, after obtaining the non-uniform rational B-spline surface (i.e., the initial surface) in the three-dimensional distortion model, the set rotation axis and surface rotation angle are obtained. After that, the surface twisting method can be selected, where the longitudinal twisting scheme includes two types, namely, case ① and case ② in step 3), and the lateral twisting scheme corresponds to the scheme of the vertical variation function. Finally, according to the selected longitudinal twisting scheme, or the selected longitudinal twisting scheme and lateral twisting scheme, the change position information of the surface control point is calculated to adjust the position of the control point, thereby completing the morphological adjustment of the surface.
[0116] In the embodiment of the present application, by setting a vertical variation function, the surface in the product design image can be distorted not only around the rotation axis, but also in the direction perpendicular to the rotation axis. In this way, a more stylized distortion form can be provided without much human involvement, so that while improving the design efficiency and adjustment accuracy of the surface in the three-dimensional distortion model, designers can also express their design intentions more flexibly and freely, thereby obtaining richer distortion effects on the normal plane of the rotation axis, such as making the edge sharper or smoother.
[0117] Here, an apparatus embodiment of the present application is introduced, which can be used to execute the configuration generation method of the three-dimensional warped model in the geometry engine in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the embodiment of the configuration generation method of the three-dimensional warped model in the geometry engine in the above-mentioned embodiment of the present application.
[0118] The embodiment of the present application provides a configuration generation device for a three-dimensional distortion model in a geometry engine, such as Fig. 9As shown, the device includes a first acquisition unit 901, a second acquisition unit 902, a processing unit 903 and an adjustment unit 904, wherein:
[0119] The first acquisition unit 901 is used to acquire the initial surface included in the three-dimensional distortion model in the geometry engine, and the initial position information corresponding to the surface control points used to control the shape of the initial surface in the geometry engine;
[0120] The second acquisition unit 902 is used to acquire the rotation axis and the surface rotation angle set for the initial surface;
[0121] The processing unit 903 is used to obtain the change position information corresponding to the surface control point based on the initial position information, the axis position information of the rotation axis and the surface rotation angle;
[0122] The adjustment unit 904 is used to adjust the surface control point to the position represented by the change position information to adjust the shape of the initial surface included in the 3D warped model to obtain a new 3D warped model, and output the new 3D warped model.
[0123] In one embodiment of the present application, based on the aforementioned scheme, when the processing unit 903 obtains the change position information corresponding to the surface control point based on the initial position information, the axis position information of the rotation axis and the surface rotation angle, it can be specifically used to: obtain the projection point of the surface control point to the rotation axis based on the initial position information and the axis position information; adjust the surface rotation angle according to the projection position information and the axis position information of the projection point to obtain the control rotation angle corresponding to the surface control point; obtain the change position information corresponding to the surface control point based on the initial position information, the axis position information and the control rotation angle.
[0124] In one embodiment of the present application, based on the aforementioned scheme, when the processing unit 903 obtains the change position information corresponding to the surface control point based on the initial position information, the axis position information and the control rotation angle, it can be specifically used to: obtain the point unit vector of the surface control point according to the initial position information; obtain the axis vector of the rotation axis according to the axis starting point position information and the axis end point position information contained in the axis position information; obtain the projection vector corresponding to the surface control point based on the projection position information and the initial position information; obtain the change position information corresponding to the surface control point based on the point unit vector, the axis vector, the projection vector and the control rotation angle.
[0125] In one embodiment of the present application, based on the aforementioned scheme, when the processing unit 903 adjusts the surface rotation angle according to the projection position information and the axis position information of the projection point to obtain the control rotation angle corresponding to the surface control point, it can be specifically used to: obtain the rotation cycle length set for the initial surface; obtain the axis vector of the rotation axis based on the axis starting position information and the axis ending position information contained in the axis position information; obtain the angle influence factor based on the projection position information, the axis starting position information and the axis vector; adjust and update the surface rotation angle according to the rotation cycle length and the angle influence factor to obtain the control rotation angle corresponding to the surface control point.
[0126] In one embodiment of the present application, the number of surface control points includes multiple; based on the aforementioned scheme, when the processing unit 903 adjusts the surface rotation angle according to the projection position information and the axis position information of the projection point to obtain the control rotation angle corresponding to the surface control point, it can be specifically used to: obtain the projection point of each surface control point projected to the rotation axis, and obtain the angle influence factor of each surface control point based on the projection position information and the axis position information of each projection point; obtain the rotation cycle length of the initial surface according to the maximum and minimum values of the multiple angle influence factors; adjust and update the surface rotation angle according to the rotation cycle length and the angle influence factors of each surface control point to obtain the control rotation angle corresponding to each surface control point.
[0127] In one embodiment of the present application, based on the aforementioned scheme, when the processing unit 903 obtains the change position information corresponding to the surface control point based on the initial position information, the axis position information of the rotation axis and the surface rotation angle, it can be specifically used to: obtain a vertical change function set for the initial surface; wherein the vertical change function is used to control the morphological change of the initial surface in the vertical direction of the rotation axis; assign a distance parameter in the vertical change function by the distance between the projection point of the surface control point to the rotation axis and the surface control point to obtain a correction angle; based on the initial position information, the axis position information, the surface rotation angle and the correction angle, obtain the change position information corresponding to the surface control point.
[0128] In one embodiment of the present application, based on the aforementioned scheme, when the processing unit 903 obtains the change position information corresponding to the surface control point based on the initial position information, the axis position information, the surface rotation angle and the correction angle, it can be specifically used to: obtain the control rotation angle corresponding to the surface control point according to the initial position information, the surface rotation angle and the axis position information; correct the control rotation angle by the correction angle to obtain the target rotation angle corresponding to each surface control point; obtain the change position information corresponding to the surface control point based on the initial position information, the axis position information and the target rotation angle.
[0129] It should be noted that the device provided in the above embodiment and the method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here.
[0130] The device provided in the above-mentioned embodiment can be arranged in a terminal device or in a server. The device provided in the embodiment of the present application can obtain the change position information corresponding to the surface control point based on the initial position information corresponding to the surface control of the initial surface, the axis position information of the rotation axis, and the surface rotation angle, so as to adjust the shape of the surface by adjusting the position of the surface control point. In this way, the embodiment of the present application only needs to set the rotation axis and the surface rotation angle used to characterize the design intent, and the surface can be adjusted at the control point level; this method can improve the accuracy of the surface adjustment in the three-dimensional distortion model on the one hand, and on the other hand, it can also reduce labor costs and improve work efficiency while obtaining a model that meets the design intent. Therefore, the embodiment of the present application can achieve precise adjustment of the surface in the three-dimensional distortion model on the premise of ensuring that the surface adjustment meets the design intent, thereby improving the accuracy of the generated three-dimensional distortion model.
[0131] An embodiment of the present application also provides an electronic device, comprising one or more processors and a storage device, wherein the storage device is used to store one or more computer programs, and when the one or more computer programs are executed by one or more processors, the electronic device implements the configuration generation method of the three-dimensional distortion model in the geometric engine as described above.
[0132] Fig.10 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0133] It should be noted that Fig.10 The computer system 1000 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0134] like Fig.10As shown, the computer system 1000 includes a processor (Central Processing Unit, CPU) 1001, which can perform various appropriate actions and processes according to the program stored in the read-only memory (Read-Only Memory, ROM) 1002 or the program loaded from the storage part 1008 to the random access memory (Random Access Memory, RAM) 1003, such as executing the method in the above embodiment. Various programs and data required for system operation are also stored in the RAM 1003. The CPU 1001, ROM 1002 and RAM 1003 are connected to each other through a bus 1004. The input / output (Input / Output, I / O) interface 1005 is also connected to the bus 1004.
[0135] In some embodiments, the following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0136] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 1009, and / or installed from a removable medium 1011. When the computer program is executed by the processor (CPU) 1001, various functions defined in the system of the present application are executed.
[0137] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (Erasable Programmable Read Only Memory), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier, which carries a computer-readable computer program. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0138] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the devices, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and a computer program.
[0139] The units or modules involved in the embodiments described in this application may be implemented by software or hardware, and the units or modules described may also be set in a processor. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves.
[0140] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the configuration generation method of the three-dimensional distortion model in the geometric engine as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0141] Another aspect of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of an electronic device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the electronic device executes the configuration generation method of the three-dimensional distortion model in the geometry engine as described above in the above-mentioned various embodiments.
[0142] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0143] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0144] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person of ordinary skill in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.
Claims
1. A method for generating a configuration of a three-dimensional distortion model in a geometry engine, characterized in that: include: Acquire an initial surface included in a three-dimensional distortion model in a geometry engine, and initial position information corresponding to surface control points for controlling the shape of the initial surface in the geometry engine; Obtaining the rotation axis and surface rotation angle set for the initial surface; Based on the initial position information, the axis position information of the rotation axis and the surface rotation angle, obtaining the change position information corresponding to the surface control point; The curved surface control point is adjusted to the position represented by the change position information to adjust the shape of the initial curved surface included in the three-dimensional warped model to obtain a new three-dimensional warped model, and the new three-dimensional warped model is output; The obtaining, based on the initial position information, the axis position information of the rotation axis and the surface rotation angle, the change position information corresponding to the surface control point includes: Based on the initial position information and the axis position information, obtaining a projection point of the surface control point projected onto the rotation axis; According to the projection position information of the projection point and the axis position information, the surface rotation angle is adjusted to obtain the control rotation angle corresponding to the surface control point; Based on the initial position information, the axis position information and the control rotation angle, the change position information corresponding to the surface control point is obtained.
2. The method according to claim 1, characterized in that The obtaining, based on the initial position information, the axis position information and the control rotation angle, the change position information corresponding to the surface control point comprises: Obtaining a point unit vector of the surface control point according to the initial position information; Obtaining an axis vector of the rotation axis according to the axis starting point position information and the axis end point position information included in the axis position information; Based on the projection position information and the initial position information, obtaining a projection vector corresponding to the surface control point; Based on the point unit vector, the axis vector, the projection vector and the control rotation angle, the change position information corresponding to the surface control point is obtained.
3. The method according to claim 1, characterized in that The adjusting the surface rotation angle according to the projection position information of the projection point and the axis position information to obtain the control rotation angle corresponding to the surface control point includes: Obtaining the rotation period length set for the initial curved surface; Based on the axis starting point position information and the axis end point position information included in the axis position information, obtaining the axis vector of the rotation axis; Obtaining an angle influence factor based on the projection position information, the axis starting point position information and the axis vector; The surface rotation angle is adjusted and updated according to the rotation period length and the angle influencing factor to obtain a control rotation angle corresponding to the surface control point.
4. The method according to claim 1, characterized in that: The number of the surface control points includes a plurality; the angle adjustment of the surface rotation angle according to the projection position information of the projection point and the axis position information to obtain the control rotation angle corresponding to the surface control point includes: Obtaining projection points of each curved surface control point projected onto the rotation axis, and obtaining angle influence factors of each curved surface control point based on projection position information of each projection point and the axis position information; Obtaining the rotation period length of the initial curved surface according to the maximum value and the minimum value of the multiple angle influencing factors; The surface rotation angle is adjusted and updated according to the rotation period length and the angle influence factor of each surface control point to obtain the control rotation angle corresponding to each surface control point.
5. The method according to any one of claims 1 to 4, characterized in that The obtaining, based on the initial position information, the axis position information and the control rotation angle, the change position information corresponding to the surface control point comprises: Acquire a vertical variation function set for the initial curved surface; wherein the vertical variation function is used to control the initial curved surface to undergo a morphological change in a direction vertical to the rotation axis; The distance parameter in the vertical variation function is assigned a value by the distance between the projection point of the surface control point onto the rotation axis and the surface control point to obtain a correction angle; Correcting the control rotation angle by using the correction angle to obtain the target rotation angle corresponding to each surface control point; Based on the initial position information, the axis position information and the target rotation angle, the change position information corresponding to the surface control point is obtained.
6. A configuration generation device for a three-dimensional distortion model in a geometry engine, characterized in that: The device comprises a first acquisition unit, a second acquisition unit, a processing unit and an adjustment unit, wherein: The first acquisition unit is used to acquire an initial surface included in the three-dimensional warped model in the geometry engine, and initial position information corresponding to the surface control points for controlling the shape of the initial surface in the geometry engine; The second acquisition unit is used to acquire the rotation axis and the surface rotation angle set for the initial surface; The processing unit is used to obtain the change position information corresponding to the surface control point based on the initial position information, the axis position information of the rotation axis and the surface rotation angle; The adjustment unit is used to adjust the surface control point to the position represented by the change position information, so as to perform morphological adjustment on the initial surface included in the three-dimensional warped model, obtain a new three-dimensional warped model, and output the new three-dimensional warped model; When the processing unit obtains the change position information corresponding to the surface control point based on the initial position information, the axis position information of the rotation axis and the surface rotation angle, it is used to obtain the projection point of the surface control point to the rotation axis based on the initial position information and the axis position information; adjust the surface rotation angle according to the projection position information of the projection point and the axis position information to obtain the control rotation angle corresponding to the surface control point; and obtain the change position information corresponding to the surface control point based on the initial position information, the axis position information and the control rotation angle.
7. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for generating a configuration of a three-dimensional distortion model in a geometry engine according to any one of claims 1 to 5 is implemented.
8. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the configuration generation method of a three-dimensional distortion model in a geometric engine as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Distortion modeling three-dimensional entity modeling method and device, medium and electronic equipment
CN115797566A
Image processing method and device, equipment and readable medium
CN118916942A