Virtual model adjustment method, device, storage medium and electronic device

By automating block segmentation and texture identification processing, the problems of low efficiency and distortion in virtual model deformation adjustment are solved, achieving more efficient and coordinated deformation adjustment.

CN115511936BActive Publication Date: 2025-10-28NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211009650.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-22
Publication Date
2025-10-28
Estimated Expiration
2042-08-22

AI Technical Summary

Technical Problem

Existing technologies for virtual model deformation adjustment are inefficient and can easily lead to distortion of some models, while manual operation yields poor results.

Method used

By acquiring the blocks of the model to be adjusted, determining the texture identifiers of the master order edges and master order points, determining the deformation adjustment mode based on the texture identifiers, and performing deformation adjustment on the texture points outside the master order edges, manual operation is avoided.

Benefits of technology

It improves the efficiency of virtual model deformation adjustment, reduces model distortion, and enhances the effect of deformation adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115511936B_ABST
    Figure CN115511936B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, storage medium, and electronic device for adjusting a virtual model. The method includes: acquiring a block to be adjusted, where the block to be adjusted is any one of multiple texture blocks obtained by unfolding the model in texture space; determining the texture identifier of the current master-order point on the master-order edge to obtain a first texture identifier, where the master-order edge is any one of multiple consecutive edges in the block to be adjusted, and the current master-order point is a texture point on the master-order edge; determining a deformation adjustment mode for texture points contained in a second texture set based on the first texture identifier, where the second texture point set consists of texture points in the block to be adjusted excluding the master-order point on the master-order edge; and deforming and adjusting the texture points contained in the second texture set based on the deformation adjustment mode to obtain an adjusted virtual model. This disclosure solves the technical problem in related technologies where some parts of the virtual model are distorted during deformation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computers, and more specifically, to a method, apparatus, storage medium, and electronic device for adjusting a virtual model. Background Technology

[0002] Currently, when rendering virtual models, in order to better match the square texture map and avoid jagged edges, it is necessary to deform and adjust the mapping of the virtual model in texture space (e.g., straighten it).

[0003] In related technologies, during the deformation and adjustment of a virtual model, the texture points to be adjusted are usually manually selected from the virtual model and moved or rotated to arrange them into a straight line. Then, the texture points to be deformed and adjusted are selected row by row, and the scaling or alignment tools are used to uniformly deform and adjust the texture points along a certain axis.

[0004] The aforementioned method of deforming and adjusting virtual models manually is inefficient, ineffective, and unsuitable for complex models. Furthermore, this method can cause distortion in certain areas of the model, resulting in poor performance in virtual model deformation and adjustment.

[0005] There is currently no effective solution to the above problems. Summary of the Invention

[0006] This disclosure provides at least some embodiments of a method, apparatus, storage medium, and electronic device for adjusting a virtual model, in order to at least solve the technical problem in the related art where some parts of the virtual model are distorted when the virtual model is deformed.

[0007] According to one embodiment of this disclosure, a method for adjusting a virtual model is provided, comprising: obtaining at least one block to be adjusted constituting the model to be adjusted, wherein the block to be adjusted is any one of a plurality of texture blocks obtained by expanding the model to be adjusted in texture space; determining the master order edge located on the block to be adjusted, and identifying the texture identifier of the current master order point on the master order edge to obtain a first texture identifier, wherein the master order edge is any one of a plurality of continuous edges in the block to be adjusted, and the current master order point is a texture point on the master order edge; determining a deformation adjustment mode of texture points contained in a second texture set based on the first texture identifier, wherein the second texture point set consists of texture points in the block to be adjusted other than the master order point on the master order edge; and deforming and adjusting the texture points contained in the second texture set based on the deformation adjustment mode to obtain an adjusted virtual model.

[0008] According to one embodiment of this disclosure, an adjustment device for a virtual model is also provided, comprising: an acquisition module, configured to acquire at least one adjustable block constituting the model to be adjusted, wherein the adjustable block is any one of a plurality of texture blocks obtained by unfolding the model to be adjusted in texture space; an identification module, configured to determine the master order edge located on the adjustable block and identify the texture identifier of the current master order point on the master order edge to obtain a first texture identifier, wherein the master order edge is any one of a plurality of continuous edges in the adjustable block, and the current master order point is a texture point on the master order edge; a determination module, configured to determine the deformation adjustment mode of the texture points contained in a second texture set based on the first texture identifier, wherein the second texture point set consists of texture points in the adjustable block other than the master order point on the master order edge; and an adjustment module, configured to deform and adjust the texture points contained in the second texture set based on the deformation adjustment mode to obtain an adjusted virtual model.

[0009] According to one embodiment of this disclosure, a non-volatile storage medium is also provided, wherein a computer program is stored in the non-volatile storage medium, and the computer program is configured to execute the above-described adjustment method for the virtual model when running.

[0010] According to one embodiment of this disclosure, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the above-described method for adjusting the virtual model.

[0011] In at least some embodiments of this disclosure, a method is adopted whereby the main order edges of the block to be adjusted are deformed and adjusted simultaneously with the texture points outside the main order edges. After obtaining at least one block to be adjusted constituting the model to be adjusted, the main order edges located on the block to be adjusted are determined, and the texture identifiers of the current main order points on the main order edges are identified to obtain a first texture identifier. Then, based on the first texture identifier, the deformation adjustment mode of the texture points contained in the second texture set is determined. Finally, the texture points contained in the second texture set are deformed and adjusted based on the deformation adjustment mode to obtain the adjusted virtual model. The second texture point set consists of texture points in the block to be adjusted, excluding the main order points on the main order edges.

[0012] As shown above, the deformation and adjustment of the virtual model eliminates the need for manual operation, thus avoiding the inefficiency of manual deformation and adjustment and improving the overall efficiency. Furthermore, during the deformation and adjustment of the main edges of the model, all texture points except those on the main edges are adjusted simultaneously. This avoids the problem of partial model distortion caused by adjusting only the main edges in related technologies, reducing the occurrence of inconsistencies in virtual model deformation and improving the overall effect of virtual model deformation and adjustment.

[0013] Therefore, the solution provided in this disclosure achieves the purpose of deforming and adjusting the virtual model, thereby improving the effect of deforming and adjusting the virtual model and solving the technical problem of distortion of some models when deforming virtual models in related technologies. Attached Figure Description

[0014] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this application, illustrate exemplary embodiments of this disclosure and are used to explain this disclosure, but do not constitute an undue limitation of this disclosure. In the drawings:

[0015] Figure 1 This is a hardware structure block diagram of a mobile terminal for a virtual model adjustment method according to an embodiment of this disclosure.

[0016] Figure 2 This is a flowchart of a method for adjusting a virtual model according to one embodiment of the present disclosure;

[0017] Figure 3 This is a schematic diagram of the blocks to be adjusted according to one embodiment of the present disclosure;

[0018] Figure 4 This is a schematic diagram of linear texture segmentation according to one embodiment of the present disclosure;

[0019] Figure 5 This is a schematic diagram of adjacent sides according to one embodiment of the present disclosure;

[0020] Figure 6 This is a schematic diagram of the rotated block to be adjusted according to one embodiment of the present disclosure;

[0021] Figure 7 This is a schematic diagram of a first reference coordinate system according to one embodiment of the present disclosure;

[0022] Figure 8 This is a schematic diagram of a second reference coordinate system according to one embodiment of the present disclosure;

[0023] Figure 9This is a schematic diagram from a first angle according to one embodiment of the present disclosure;

[0024] Figure 10 This is a schematic diagram of a first reference coordinate system according to one embodiment of the present disclosure;

[0025] Figure 11 This is a schematic diagram of a first reference coordinate system according to one embodiment of the present disclosure;

[0026] Figure 12 This is a structural block diagram of a virtual model adjustment device according to one embodiment of the present disclosure;

[0027] Figure 13 This is a schematic diagram of an electronic device according to one alternative embodiment of the present disclosure. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present disclosure, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present disclosure, and not all embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present disclosure.

[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0030] According to one embodiment of this disclosure, an embodiment of a method for adjusting a virtual model is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0031] This method embodiment can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smartphone (such as an Android phone, iOS phone, etc.), tablet computer, PDA, mobile Internet Device (MID), PAD, game console, and other terminal devices. Figure 1 This is a hardware structure block diagram of a mobile terminal for a virtual model adjustment method according to an embodiment of this disclosure. For example... Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a central processing unit (CPU), graphics processing unit (GPU), digital signal processing (DSP) chip, microprocessor (MCU), programmable logic device (FPGA), neural network processor (NPU), tensor processor (TPU), artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data are also shown. Optionally, the mobile terminal may further include a transmission device 106 for communication functions, an input / output device 108, and a display device 110. Those skilled in the art will understand that... Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0032] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the virtual model adjustment method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the aforementioned virtual model adjustment method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0033] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0034] The inputs in input / output device 108 can come from multiple human interface devices (HIDs). Examples include keyboards and mice, gamepads, and other dedicated game controllers (such as steering wheels, fishing rods, dance mats, and remote controls). Some HIDs, in addition to providing input functions, can also provide output functions, such as force feedback and vibration from gamepads, and audio output from controllers.

[0035] Display device 110 may be, for example, a head-up display (HUD), a touchscreen liquid crystal display (LCD), and a touch display (also referred to as a "touchscreen" or "touch display"). The LCD allows a user to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), which allows the user to interact with the GUI by touching and / or gesturing on a touch-sensitive surface. Optional human-computer interaction functions include: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, a call interface, playing digital video, playing digital music, and / or web browsing, etc. Executable instructions for performing the above human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.

[0036] In one embodiment of this disclosure, the virtual model adjustment method can run on a local terminal device or a server. When the virtual model adjustment method runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and client devices.

[0037] In one possible implementation, this disclosure provides a method for adjusting a virtual model. The terminal device executing the method can be either the aforementioned local terminal device or a client device in the aforementioned cloud interaction system. Figure 2 This is a flowchart of a virtual model adjustment method according to one embodiment of the present disclosure, such as... Figure 2As shown, the method includes the following steps:

[0038] Step S202: Obtain at least one adjustment block constituting the model to be adjusted, wherein the adjustment block is any one of the multiple texture blocks obtained by expanding the model to be adjusted in the texture space.

[0039] In step S202, the model to be adjusted is a virtual model, such as a virtual character, tree, cloud, or rock in a game. The block to be adjusted is the mapping of the virtual model in texture space, that is, the block to be adjusted is the texture block obtained after the virtual model is unfolded in texture space. The block to be adjusted can be the texture block obtained after the entire model to be adjusted is unfolded in texture space, or it can be the texture block obtained after a part of the model to be adjusted is unfolded in texture space. For example, for a virtual character model, the block to be adjusted can be the texture block obtained after the finger part is unfolded in texture space.

[0040] Furthermore, the shape of the blocks to be adjusted can be linear, C-shaped, S-shaped, O-shaped, P-shaped, etc. In this disclosure, [the shape of the blocks is to be adjusted]. Figure 3 The following example illustrates how to adjust the deformation of a texture block to a straight line.

[0041] In one alternative embodiment, after obtaining the model to be adjusted, the terminal device maps the model to be adjusted into a texture space to obtain multiple texture blocks. Then, in response to the user's selection operation, it determines at least one texture block to be adjusted from the multiple texture blocks.

[0042] In another alternative embodiment, the terminal device can divide the model to be adjusted into multiple model blocks and, in response to a user's selection, select a target model block from the multiple model blocks. Then, the target model block is mapped into texture space to obtain the block to be adjusted.

[0043] Step S204: Determine the master order edge located on the block to be adjusted, and identify the texture identifier of the current master order point on the master order edge to obtain the first texture identifier.

[0044] In step S204, the master-order edge is any one of the multiple continuous edges in the block to be adjusted, and the current master-order point is a texture point on the master-order edge. A continuous edge is a combination of edges in the block to be adjusted that are connected end-to-end without breaks or branches. The master-order edge is also a type of continuous edge, used as a reference for the deformation adjustment of the block to be adjusted. The master-order point is a point on the master-order edge, that is, each continuous edge consists of multiple texture points, and the texture point located on the master-order edge is the master-order point. Each master-order point or texture point has an identifier, namely a texture identifier.

[0045] In one alternative embodiment, the terminal device may, in response to a user's selection operation, determine the main order edge from a plurality of consecutive edges contained in the block to be adjusted, such as... Figure 3 As shown, the user selected a continuous middle edge as the main sequence edge. After determining the main sequence edge, the terminal device uses one endpoint of the main sequence edge as the starting point and sequentially numbers the texture points on the main sequence edge to obtain the aforementioned first texture identifier. That is, in this embodiment, the first texture identifier represents the position information of the main sequence point on the main sequence edge.

[0046] Step S206: Determine the deformation adjustment mode of the texture points contained in the second texture set based on the first texture identifier.

[0047] In step S206, the second texture point set consists of texture points in the block to be adjusted, excluding the master order points on the master order edges.

[0048] It should be noted that each master sequence point corresponds to a second texture set. For the current master sequence point, the terminal device can determine the row number range of the texture points contained in the second texture set in the preset control table through the first texture identifier of the current master sequence point, and determine the deformation adjustment mode corresponding to the second texture set according to different row number ranges. The preset control table stores relevant information about the master sequence point (e.g., master sequence point identifier) ​​and relevant information about the texture points associated with the master sequence point (e.g., texture point identifier).

[0049] Furthermore, it should be noted that deforming and adjusting the texture points in the second texture set mainly involves rotating the texture points within the second texture set. Using different deformation adjustment modes to deform and adjust the texture points in the second texture set can reduce the occurrence of inconsistent distortions in the adjusted blocks.

[0050] Step S208: Based on the deformation adjustment mode, the texture points contained in the second texture set are deformed and adjusted to obtain the adjusted virtual model.

[0051] It should be noted that, since the texture points in the second texture set in step S206 are not texture points on the main order edges, in this disclosure, during the deformation adjustment of the main order edges in the model to be adjusted, the texture points in the model to be adjusted, excluding the main order points on the main order edges, are adjusted simultaneously. This avoids the problem in related technologies where only the main order edges are adjusted, leading to partial model distortion and deformation. It reduces the occurrence of inconsistencies in virtual model deformation adjustment and improves the effect of virtual model deformation adjustment. For example, for... Figure 3 After the blocks to be adjusted are deformed and adjusted as shown, the desired result can be obtained. Figure 4 The linear texture blocks shown are composed of... Figure 4As shown in the schematic diagram of the texture blocks, there is no problem of model distortion or deformation in the adjusted texture blocks.

[0052] Based on the scheme defined in steps S202 to S208 above, it can be understood that, in at least some embodiments of this disclosure, a method is adopted whereby the main sequence edges of the block to be adjusted are deformed and adjusted simultaneously with the texture points outside the main sequence edges. After obtaining at least one block to be adjusted constituting the model to be adjusted, the main sequence edges located on the block to be adjusted are determined, and the texture identifier of the current main sequence point on the main sequence edge is identified to obtain a first texture identifier. Then, based on the first texture identifier, the deformation adjustment mode of the texture points contained in the second texture set is determined. Finally, the texture points contained in the second texture set are deformed and adjusted based on the deformation adjustment mode to obtain the adjusted virtual model. The second texture point set consists of texture points in the block to be adjusted other than the main sequence points on the main sequence edges.

[0053] It is noteworthy that the deformation and adjustment of the virtual model requires no manual operation, thus avoiding the inefficiency of manual deformation and adjustment, and thereby improving the efficiency of virtual model deformation and adjustment. Furthermore, during the deformation and adjustment of the main edges of the model to be adjusted, all texture points in the model except those on the main edges are adjusted simultaneously. This avoids the problem in related technologies where adjusting only the main edges leads to partial model distortion, reducing the occurrence of inconsistencies in virtual model deformation and adjustment, and improving the overall effect of virtual model deformation and adjustment.

[0054] Therefore, the solution provided in this disclosure achieves the purpose of deforming and adjusting the virtual model, thereby improving the effect of deforming and adjusting the virtual model and solving the technical problem of distortion of some models when deforming virtual models in related technologies.

[0055] In one optional embodiment, after obtaining the block to be adjusted, the terminal device can store the relevant information of the master sequence points on the master sequence edges in a preset control table. Specifically, the terminal device first determines the starting position of the master sequence edges, then sorts the first texture point set based on the starting position to obtain a sorting result. Finally, according to the sorting result, the texture identifiers of the master sequence points contained in the first texture point set are stored in the target column of the preset control table. The first texture point set consists of all the master sequence points on the master sequence edges.

[0056] Optionally, after determining the master-order edges, the terminal device acquires all texture points on the master-order edges to obtain the master-order points, denoted as the master-order point set (i.e., the first texture point set) M. uvAnd starting from one end of the main sequence edge, sort the main sequence points on the main sequence edge, and store the relevant information of the main sequence points in the first column of the main sequence point control table (i.e., the preset control table) in order. For example, in Figure 3 In the process, the endpoints of the main sequence edge are A1 and B. The terminal device sorts the main sequence points on the main sequence edge starting from A1 and stores the relevant information of the main sequence points in the first column of the preset control table. The order of the main sequence points corresponds to their row number in the preset control table.

[0057] It should be noted that, in addition to storing information about the master sequence point, the preset control table also stores information about texture points on other continuous edges related to the master sequence point.

[0058] Specifically, the terminal device traverses the second texture point set, determines the current texture point, and identifies the adjacent edges corresponding to the current texture point from the blocks to be adjusted. Then, it obtains the neighboring points corresponding to the adjacent edges to get the third texture point set, and detects the number of texture points in the third texture point set that belong to the first texture point set. Finally, it updates the preset control table based on the number of texture points.

[0059] It should be noted that the aforementioned adjacent edges include at least the line segment containing the current texture point, and the adjacent point is the endpoint of the adjacent edge. Optionally, the terminal device can detect the number of line segments passing through the current texture point, and determine the number of adjacent edges based on this line segment data, with the endpoints corresponding to the adjacent edges being the adjacent points. For example, in Figure 5 In the adjacent edge diagram shown, the current texture point is C. There are four line segments passing through the current texture point C: C1C, CC2, C3C, and CC4. The endpoints corresponding to the adjacent edges, besides the current texture point C, also include endpoints C1, C2, C3, and C4. Therefore, the third texture point set corresponding to the current texture point C consists of C1, C2, C3, and C4. After determining the adjacent points, the terminal device detects the number of endpoints (i.e., the number of texture points) among the above four endpoints that are primary sequence points, and then updates the preset control table based on the number of texture points.

[0060] In one optional embodiment, the terminal device determines whether a neighboring point is a master point by detecting whether its position coincides with the master point position in the first texture point set. If none of the neighboring points corresponding to the current texture point are master points, then the number of texture points is zero. If the number of texture points is zero, then all neighboring points are recorded as the current texture point, for example, using... Figure 5For example, if there is no master order point among the neighboring points C1, C2, C3, and C4, then the neighboring points C1, C2, C3, and C4 are recorded as the current texture point. Then, the above steps are repeated, that is, the second texture point set is traversed to determine the current texture point, and the neighboring edge corresponding to the current texture point and the neighboring point corresponding to the neighboring edge are determined from the block to be adjusted. Then, the number of texture points belonging to the first texture point set among the neighboring points is detected until the obtained neighboring points contain one or more master order points.

[0061] Furthermore, after determining the number of texture points, the terminal device can update the preset control table based on the number of texture points. Specifically, when the number of texture points is a preset threshold, the target master sequence point corresponding to the current texture point is determined, and the texture identifier of the current texture point is added to the first target row of the preset control table, where the first target row is the row where the target master sequence point is located in the preset control table. Optionally, the aforementioned preset threshold is 1, that is, when the number of texture points is 1, it indicates that among the neighbors of the current texture point, it belongs to M. uv If there is only one texture point, the terminal device will find the row of the master sequence point corresponding to the current texture point in the preset control table and record the texture identifier of the current texture point into a new column corresponding to that row in the preset control table.

[0062] When the number of texture points exceeds a preset threshold, determine the multiple master sequence points corresponding to the current texture point, calculate the average row number of the multiple master sequence points in the preset control table, determine the second target row based on the average, and then add the texture identifier of the current texture point to the second target row. That is, when it belongs to M... uv When there are more than one texture point, the average value of the row numbers of the multiple master sequence points corresponding to the current texture point in the preset control table is obtained, and the row of the texture identifier of the current texture point in the preset control table is determined based on the average value.

[0063] Optionally, when the average value is an integer, the row number that is the average value is determined to be the second target row. For example, if the row numbers of the main sequence points corresponding to the current texture point are 12 and 14, then the average value is 13. The terminal device stores the texture identifier corresponding to the current texture point in a new column of row 13 of the preset control table.

[0064] Optionally, when the average value is not an integer, the two integers adjacent to the average value are obtained, and the rows corresponding to the two integers are determined to be the second target row. For example, if the main sequence point corresponding to the current texture point is row number 13, 14, and 20 in the preset control table, the terminal device will simultaneously record the relevant information corresponding to the current texture point into rows 15 and 16 of the preset control table.

[0065] In one alternative embodiment, before determining the texture coordinates of the current master sequence point located on the master sequence edge and obtaining the first texture coordinates, the terminal device also performs an overall rotation on the block to be adjusted.

[0066] Specifically, the terminal device determines the first master sequence point and the next master sequence point from the master sequence edges according to the sorting result. Then, it determines the sub-master sequence edge between the first master sequence point and the next master sequence point, and determines the angle between the sub-master sequence edge and the first direction to obtain the first angle. Finally, based on the first angle, it performs a rotation operation on the block to be adjusted with the first master sequence point as the axis to obtain the rotated block to be adjusted.

[0067] It should be noted that the first master sequence point mentioned above is the first texture point of the master sequence edge, that is, the first texture point in the preset control table according to the order of master sequence points. The next master sequence point is the second texture point in the preset control table. The first direction mentioned above can be the positive direction of the X-axis in the world coordinate system.

[0068] Optional, with Figure 3 Taking the schematic diagram of the block to be adjusted as an example, the first master sequence point is A1, the next master sequence point is A2, and the sub-master sequence edge between the first master sequence point and the next master sequence point is A1A2. The angle α between this sub-master sequence edge A1A2 and the positive direction of the X-axis in the world coordinate system (i.e., the first angle) is determined. Using the first master sequence point as the axis, the entire block to be adjusted is rotated 180°-α, thus obtaining... Figure 6 The rotated blocks to be adjusted are shown.

[0069] It should be noted that the first included angle mentioned above can be defined as the angle through which one side rotates counterclockwise around the axis point to another side. The included angle can be the angle between the sub-main ordered edge and the positive direction of the X-axis in the world coordinate system, or it can be the angle between the sub-main ordered edge and any axis in the world coordinate system. In practical applications, it can be selected according to actual needs, and no specific limitation is made here.

[0070] Furthermore, after rotating the blocks to be adjusted as a whole, the terminal device executes step S206, which is to determine the deformation adjustment mode of the texture points contained in the second texture set based on the first texture identifier.

[0071] Specifically, the terminal device first obtains the range influence factor, then determines the current target row number of the current master sequence point in the preset control table based on the first texture identifier, and determines multiple row number ranges based on the range influence factor and the current target row number. Finally, it determines the deformation adjustment mode of the texture points contained in the second texture set based on the row number range of the texture points contained in the second texture set. Texture points in different row number ranges in the preset control table correspond to different deformation adjustment modes.

[0072] It should be noted that the aforementioned range influence factor can be determined based on practical experience. For example, the range influence factor can be 5. Setting the aforementioned range influence factor can reduce the number of texture points that need to be calculated in each iteration, thereby improving the system's computational performance. It can also avoid the problem that when calculating texture points at one end of the C-shaped virtual model, the texture points at the other end are affected, thus improving the deformation adjustment effect of the virtual model.

[0073] Optionally, after obtaining the range influence factor, the terminal device calculates the difference between the current target row number and the range influence factor to obtain the first row number, and calculates the sum of the current target row number and the range influence factor to obtain the second row number. Then, based on the first row number and the second row number, the range of the first row number, the range of the second row number, and the range of the third row number are determined. The maximum row number in the range of the first row number is less than the first row number, the minimum row number in the range of the second row number is the first row number, the maximum row number in the range of the second row number is the second row number, and the minimum row number in the range of the third row number is greater than the second row number.

[0074] For example, if the range influence factor is R and the current target row number is i, then the first row number is iR, the second row number is i+R, the range of the first row number is less than iR; the range of the second row number is greater than or equal to iR, and less than or equal to i+R; the range of the third row number is greater than i+R.

[0075] Optionally, adjusting the current texture point is prohibited if the row number corresponding to the current texture point is within the range of the first row number. That is, if the row number of the current texture point in the preset control table is less than iR, the current texture point does not need to be deformed and adjusted.

[0076] It should be noted that when the row number corresponding to the current texture point is within the range of the third row number, directly rotating the texture point according to the first angle γ can not only save the system's calculation time, but also avoid the problem of distortion in the texture block after deformation adjustment caused by calculating one end of the C-shaped block and using the relevant information of the texture point at the other end.

[0077] Optionally, when the row number corresponding to the current texture point is within the range of the second row number, a texture weight value is generated based on the first reference coordinate system and the second reference coordinate system, and the target rotation angle of the current texture point is determined based on the texture weight value. Here, the positive direction of the first axis in the first reference coordinate system is different from the positive direction of the first axis in the second reference coordinate system.

[0078] It should be noted that this scenario can be further divided into six sub-scenes, each with a different method for calculating texture weight values. After obtaining the texture weight values, the product of the texture weight values ​​and the preset angle is calculated to obtain the target rotation angle corresponding to the current texture point.

[0079] Optionally, when the row number corresponding to the current texture point is within the range of the third row number, the current texture point is rotated by a first angle with the origin of the first reference coordinate system as the axis.

[0080] In this scenario, the terminal device obtains all texture points recorded in rows with row numbers greater than i+R and all main sequence points with row numbers greater than i from the preset control table, and rotates by an angle γ (i.e. the first angle mentioned above) with the origin of the first reference coordinate system as the axis. When γ>0, it rotates counterclockwise; when γ<0, it rotates clockwise.

[0081] The terminal device can calculate the aforementioned first angle in the first reference coordinate system.

[0082] Specifically, after obtaining the third texture coordinates of the previous master sequence point and the fourth texture coordinates of the next master sequence point, the terminal device determines a first vector based on the third and first texture coordinates, and determines a second vector based on the fourth and first texture coordinates. Then, it calculates the angle between the first and second vectors to obtain the first angle. Here, the current master sequence point has a row number greater than 1 in the preset control table, the first vector points to the third texture coordinate, and the second vector points to the fourth texture coordinate.

[0083] In addition, the terminal device can create a first reference coordinate system and a second reference coordinate system with the first texture coordinate as the origin. In the first reference coordinate system, the positive direction of the first axis is the direction pointed to by the first vector, and in the second reference coordinate system, the positive direction of the first axis is the direction pointed to by the second vector.

[0084] Optionally, the terminal device starts from the second master sequence point in the preset control table and records the current master sequence point as M. uvi A first reference coordinate system and a second reference coordinate system are created using this as the origin, wherein the positive X-axis of the first reference coordinate system points to the previous principal sequence point M. uv(i-1) ,like Figure 7 As shown; the positive X-axis of the second reference coordinate system points to the next principal sequence point M. uv(i+1) ,like Figure 8 As shown. Figure 9 As shown, obtain and The angle between them can be used to obtain α. Let γ = 180 - α to obtain the first angle γ.

[0085] In one optional embodiment, when the row number corresponding to the current texture point is within the range of the second row number, the terminal device determines the target angle interval corresponding to the current texture point among multiple preset angle intervals; then, based on the target angle interval, it determines the target calculation mode corresponding to the texture weight value, and determines the weight value corresponding to the target calculation mode to obtain the texture weight value. The multiple preset angle intervals are determined based on the second angle between the line connecting the current texture point and the origin of the first reference coordinate system and the first direction of the first reference coordinate system.

[0086] In the above process, the second angle is the angle between the line connecting the texture point and the origin of the first reference coordinate system and the positive X-axis of the first reference coordinate system. Multiple preset angle intervals can be determined based on the first angle γ. Among them, four segmentation angles can be calculated based on the first angle, and the coordinate system with the current texture point as the origin can be divided into 6 intervals (i.e., the preset angle intervals mentioned above) based on these four segmentation angles. For different preset angle intervals, the corresponding texture weight values ​​are calculated in different ways.

[0087] Before determining the target angle interval corresponding to the current texture point among multiple preset angle intervals, the terminal device generates a first parameter value and a second parameter value based on a first angle. Then, it generates multiple preset angles based on the first parameter value, the second parameter value, and the first angle, and generates multiple preset angle intervals based on the multiple preset angles. The sum of the first parameter value and the second parameter value is a fixed value.

[0088] Optionally, the terminal device obtains all texture points with row numbers greater than iR and less than i+R from the preset control table, records the angle between the line connecting each texture point to the origin and the positive X-axis of the first reference coordinate system as β, and then divides the current texture point into 6 sets (i.e. the preset angle interval mentioned above) based on the relationship between the angle of β and the 4 segmentation angles.

[0089] Let the first parameter value Second parameter value When γ > 0, ξ = 1, τ = 0; when γ < 0, ξ = 0, τ = 1, meaning that regardless of whether γ is greater than 0 or less than 0, the sum of the first parameter value and the second parameter value is 1. The aforementioned preset angles (i.e., segmentation angles) can be denoted as θ1, θ2, θ3, and θ4, where θ1, θ2, θ3, and θ4 respectively satisfy the following equation:

[0090] θ1=(270-180*ξ-γ*ξ)

[0091] θ2=(270-180*ξ-γ*τ)

[0092] θ3=(270-180*τ-γ(ξ)

[0093] θ4=(270-180*ξ-γ*τ)

[0094] The first preset angle interval is [(θ2*τ), (θ1*ξ+360τ)], and the texture points within this angle interval are denoted as set 1; the second preset angle interval is (θ1, θ2), and the texture points within this angle interval are denoted as set 2; the third preset angle interval is [(ξ*θ2+τ*α), (ξ*α+τ*θ1)], and the texture points within this angle interval are denoted as set 3; the fourth preset angle interval is ((ξ*α+τ*θ4), (ξ*θ3+τ*α)], and the texture points within this angle interval are denoted as set 4; the fifth preset angle interval is (θ3, θ4), and the texture points within this angle interval are denoted as set 5; the sixth preset angle interval is [θ4, (θ2*τ)], and the texture points within this angle interval are denoted as set 6.

[0095] It should be noted that by setting the first parameter value ξ and the second parameter value τ, the problem of sets 1, 2, and 3 being located on different sides of the X-axis of the first reference frame due to γ ​​being greater than 0 or less than 0 can be avoided, thus ensuring that the texture points of sets 1, 2, and 3 are aligned with M. uv(i+1) Located on the same side of the X-axis in the first reference coordinate system. For example... Figure 10 A schematic diagram of the first reference coordinate system shown, where γ > 0, and as shown below. Figure 11 The diagram shows the first reference coordinate system where γ < 0, and the texture points of sets 1, 2, and 3 are related to M. uv(i+1) Located on the same side of the X-axis in the first reference coordinate system. Wherein, Figure 10 and 11 Intervals 1 to 6 in the above-mentioned first preset angle interval to sixth preset angle interval respectively.

[0096] It should be noted that, given the texture weight value, the terminal device can obtain the target rotation angle by calculating the product of the texture weight value and the first angle. That is, the target rotation angle δ satisfies the following formula:

[0097] δ=γ*s

[0098] In the above formula, γ is the first angle; s is the texture weight value.

[0099] The calculation method for the texture weight value varies depending on the preset angle range in which the current texture point is located. Before explaining the calculation method for the texture weight value corresponding to different preset angle ranges, the following limitations need to be made:

[0100] Main sequence point M uv(i+1) The X-coordinate value in the second reference coordinate system is denoted as X. (i+1) ; Main sequence point M uv(i-1)The X-coordinate value in the first reference coordinate system is denoted as X. (i-1) ; Main sequence point M uvi Weighting of the X-coordinates of a point in the first and second reference coordinate systems

[0101] Additionally, the X-coordinate of the current texture point P in the second reference coordinate system is denoted as D. (i+1) The X-coordinate of the current texture point P in the first reference coordinate system is denoted as D. (i-1) Then the first weight value Second weight value Where r1 represents the influence weight of the subsequent sub-major order edge on the current texture point P, and r2 represents the influence weight of the previous sub-major order edge on the current texture point P. p This represents the proportional coefficients of the weights of r1 and r2 on the current texture point P.

[0102] Scenario 1: If the current texture point P belongs to set 1, then δ is represented by the following formula:

[0103] δ=s*γ=r2*ψ*γ

[0104] In the above formula, the texture weight value s = r² * ψ. In this formula, the closer the X-coordinate of the current texture point P is to M... uv(i-1) The closer the weighting is to 0, the better; if the X-coordinate of the current texture point P is closer to M... uvi The closer the weighting is to ψ, the better.

[0105] Scenario 2: If the current texture point P belongs to the second set, then δ is represented by the following formula:

[0106] δ=s*γ={[(1-ψ)*r1+ψ]*r p +[r2*ψ*(1-r p )]}*γ,

[0107] In the above formula, the texture weight value s = [(1-ψ)*r1+ψ]*r p +[r2*ψ*(1-r p )]. Where, when γ > 0, δ ∈ [0, γ]; when γ < 0, δ ∈ [γ, 0].

[0108] It should be noted that since the X-coordinates of the texture points in the second set are located on the positive X-axis of both the first and second reference coordinate systems, the texture weight values ​​can be calculated by combining the weight calculation methods of Scene 1 and Scene 3, and expressed as r. pThe weight ratios obtained from the two algorithms are adjusted. Specifically, the closer β is to the first preset angle range, the greater the weight calculated using the weight calculation method of Scene 1; the closer β is to the third preset angle range, the greater the weight calculated using the weight calculation method of Scene 3. Finally, the terminal device combines the weights from both methods to obtain the added weight for the current texture point P. If the calculated value of δ exceeds the master order point rotation angle, δ is limited to within the master order point rotation angle range.

[0109] Scenario 3: If the current texture point P belongs to the 3rd set, then δ is represented by the following formula:

[0110] δ=s*γ=[(1-ψ)*r1+ψ]*γ

[0111] In the above formula, the texture weight value s = (1-ψ)*r1+ψ. In this formula, the closer the X-coordinate of the current texture point P in the second reference coordinate system is to M... uv(i+1) The closer the weighting is to 1, the better; if the X-coordinate of the current texture point P is closer to M... uvi The closer the weighting is to ψ, the better.

[0112] Scenario 4: If the current texture point P belongs to set 4, then δ is represented by the following formula:

[0113]

[0114] In the above formula, the texture weight value

[0115] It should be noted that since the X-coordinates of the texture points in the fifth preset angle interval are all negative in both reference coordinate systems, if the linear algorithm of the first and third preset angle intervals is continued, the texture points in the fifth preset angle interval will intersect with the texture points in the fourth and sixth preset angle intervals after rotation. Therefore, in this embodiment, the weight of the fifth preset angle interval is calculated based on the overall angle change. The total angle of the four, fifth, and sixth preset angle intervals (180+|γ|) is compressed to 180 degrees. Therefore, the weights at the boundaries of the fifth preset angle interval and two adjacent angle intervals are calculated according to the proportions of the three angle intervals, and these weights are used as the weights at the boundaries of the fourth and sixth preset angle intervals. Thus, the weight of the boundary between the fourth and fifth preset angle intervals is... The weights of the boundaries between the fifth and sixth preset angle intervals are: After calculating the boundary weights, the linear relationship between the X-coordinates of the second parameter coordinate system and the weights continues within the fourth preset angle interval, starting from the boundary. Linear transition to D (i+1) =X(i+1) One is sufficient.

[0116] Scenario 5: If the current texture point P belongs to set 5, then δ is represented by the following formula:

[0117]

[0118] In the above formula, the texture weight value In this formula, the weight of the change is calculated directly based on the angle proportion. The closer the weight is to the boundary between the fourth and fifth preset angle intervals, the closer its weight is to the boundary between the fourth and fifth preset angle intervals. The closer it is to the boundary of the fifth preset angle interval and the sixth preset angle interval, the closer its weight is to...

[0119] Scenario 6: If the current texture point P belongs to set 6, then δ is represented by the following formula:

[0120]

[0121] In the above formula, the texture weight value Similar to the fourth preset angle interval, the sixth preset angle interval continues to use the linear relationship between the coordinate X value and the weight in the first parameter coordinate system, starting from the boundary D. (i-1) =0 Linear transition to D (i-1) =X (i-1) 0 is sufficient.

[0122] The design principles of the algorithms for each preset angle range can reduce the deformation that exists after straightening the texture blocks, and make the texture points on both sides of the main sequence edge maintain their relative stability with the main sequence edge after the main sequence edge is straightened.

[0123] In addition, in order to keep the X-coordinate values ​​relatively close to the preceding and following master sequence points M uv(i-u) and M uv(i+1) However, regarding the positional relationship between texture points that are relatively far from the main edge and the main edge, in this embodiment, the β angle is not directly used as the basis for weight calculation within the first preset angle interval, the third preset angle interval, the fourth preset angle interval, and the sixth preset angle interval. Instead, the coordinate X values ​​of the first reference coordinate system and the second reference coordinate system are used.

[0124] It should be noted that by iterating through the master order points in the first texture set and repeatedly executing the texture point deformation and adjustment method described above, until the operation on the second-to-last master order point is completed, the result will be as follows. Figure 4 The virtual model shown is after deformation and adjustment.

[0125] Furthermore, the solution provided in this embodiment is applicable to all texture blocks. Regardless of how the selected main sequence edge is distorted, the texture points on both sides of each edge can be rotated appropriately and synchronously while the main sequence edge is gradually rotated and straightened. The solution using the partitioning algorithm ensures that the texture points will not become excessively dense or sparse in local areas after rotation, or significantly change their distance from the main sequence edge, thereby ensuring the deformation adjustment effect of the texture module.

[0126] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.

[0127] This embodiment also provides a virtual model adjustment device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0128] Figure 12 This is a structural block diagram of a virtual model adjustment device according to one embodiment of the present disclosure, such as... Figure 12 As shown, the device includes: an acquisition module 1201, an identification module 1203, a determination module 1205, and an adjustment module 1207.

[0129] The module 1201 is used to acquire at least one adjustable block constituting the model to be adjusted, wherein the adjustable block is any one of the multiple texture blocks obtained by unfolding the model to be adjusted in texture space; the identification module 1203 is used to determine the main sequence edge located on the adjustable block and identify the texture identifier of the current main sequence point on the main sequence edge to obtain a first texture identifier, wherein the main sequence edge is any one of the multiple continuous edges in the adjustable block, and the current main sequence point is a texture point on the main sequence edge; the determination module 1205 is used to determine the deformation adjustment mode of the texture points contained in the second texture set based on the first texture identifier, wherein the second texture point set consists of texture points in the adjustable block other than the main sequence point on the main sequence edge; and the adjustment module 1207 is used to deform and adjust the texture points contained in the second texture set based on the deformation adjustment mode to obtain the adjusted virtual model.

[0130] Optionally, the virtual model adjustment device further includes: a first determining module, a sorting module, and a storage module. The first determining module is used to determine the starting position of the master order edge after obtaining the block to be adjusted; the sorting module is used to sort the first texture point set based on the starting position to obtain a sorting result, wherein the first texture point set consists of all master order points on the master order edge; the storage module is used to store the texture identifiers of the master order points contained in the first texture point set into the target column of a preset control table according to the sorting result.

[0131] Optionally, the virtual model adjustment device further includes: a traversal module, a second determination module, a first acquisition module, a detection module, and a first update module. The traversal module is used to traverse the second texture point set and determine the current texture point; the second determination module is used to determine the adjacent edges corresponding to the current texture point from the blocks to be adjusted, wherein the adjacent edges include at least the line segment where the current texture point is located; the first acquisition module is used to acquire the adjacent points corresponding to the adjacent edges to obtain a third texture point set, wherein the adjacent points are the endpoints of the adjacent edges; the detection module is used to detect the number of texture points in the third texture point set that belong to the first texture point set; and the first update module is used to update a preset control table based on the number of texture points.

[0132] Optionally, the first update module includes: a third determination module, a fourth determination module, and a fifth determination module. The third determination module is used to determine the target master sequence point corresponding to the current texture point when the number of texture points is a preset threshold, and add the texture identifier of the current texture point to the first target row of a preset control table, where the first target row is the row where the target master sequence point is located in the preset control table. The fourth determination module is used to determine multiple master sequence points corresponding to the current texture point when the number of texture points is greater than the preset threshold, calculate the average of the row numbers of the multiple master sequence points in the preset control table, determine the second target row based on the average, and then add the texture identifier of the current texture point to the second target row. The fifth determination module is used to traverse the second texture set when the number of texture points is less than the preset threshold, determine the current texture point, and determine the third texture point set based on the current texture point, until the number of texture points is greater than or equal to the preset threshold.

[0133] Optionally, the fourth determining module includes a sixth determining module and a seventh determining module. The sixth determining module is used to determine that the row number corresponding to the average value is the second target row when the average value is an integer; the seventh determining module is used to obtain two integers adjacent to the average value when the average value is not an integer, and determine that the row corresponding to the two integers is the second target row.

[0134] Optionally, the virtual model adjustment device further includes: an eighth determining module, a ninth determining module, a tenth determining module, and a rotation module. The eighth determining module is used to determine the first master sequence point and the next master sequence point from the master sequence edges according to the sorting result before determining the texture coordinates of the current master sequence point located on the master sequence edge to obtain the first texture coordinates. The first master sequence point is the first texture point of the master sequence edge. The ninth determining module is used to determine the sub-master sequence edge between the first master sequence point and the next master sequence point. The tenth determining module is used to determine the angle between the sub-master sequence edge and the first direction to obtain the first angle. The rotation module is used to perform a rotation operation on the block to be adjusted based on the first angle and with the first master sequence point as the axis to obtain the rotated block to be adjusted.

[0135] Optionally, the determining module includes: a second acquisition module, an eleventh determining module, a twelfth determining module, and a thirteenth determining module. The second acquisition module is used to acquire the range influence factor; the eleventh determining module is used to determine the current target row number of the current master sequence point in a preset control table based on the first texture identifier; the twelfth determining module is used to determine multiple row number ranges based on the range influence factor and the current target row number, wherein texture points in different row number ranges in the preset control table correspond to different deformation adjustment modes; and the thirteenth determining module is used to determine the deformation adjustment mode of the texture points contained in the second texture set based on the row number range of the texture points contained in the second texture set.

[0136] Optionally, the twelfth determining module includes a first calculation module and a fourteenth determining module. The first calculation module is used to calculate the difference between the current target row number and the range influence factor to obtain the first row number, and to calculate the sum of the current target row number and the range influence factor to obtain the second row number. The fourteenth determining module is used to determine the range of the first row number, the range of the second row number, and the range of the third row number based on the first row number and the second row number, wherein the maximum row number in the range of the first row number is less than the first row number, the minimum row number in the range of the second row number is the first row number, the maximum row number in the range of the second row number is the second row number, and the minimum row number in the range of the third row number is greater than the second row number.

[0137] Optionally, the thirteenth determining module includes: a first processing module, a second processing module, and a third processing module. The first processing module is used to prohibit adjustment of the current texture point when the row number corresponding to the current texture point is within the range of the first row number. The second processing module is used to generate texture weight values ​​based on the first and second reference coordinate systems when the row number corresponding to the current texture point is within the range of the second row number, and to determine the target rotation angle of the current texture point based on the texture weight values, wherein the positive direction of the first axis in the first reference coordinate system is different from the positive direction of the first axis in the second reference coordinate system. The third processing module is used to rotate the current texture point by a first angle with the origin of the first reference coordinate system as the axis when the row number corresponding to the current texture point is within the range of the third row number.

[0138] Optionally, the virtual model adjustment device further includes: a third acquisition module, a fifteenth determination module, a sixteenth determination module, and a second calculation module. The third acquisition module is used to acquire the third texture coordinates of the previous master sequence point and the fourth texture coordinates of the next master sequence point, wherein the row number of the current master sequence point in the preset control table is greater than 1; the fifteenth determination module is used to determine a first vector based on the third texture coordinates and the first texture coordinates, wherein the first vector points to the third texture coordinates; the sixteenth determination module is used to determine a second vector based on the fourth texture coordinates and the first texture coordinates, wherein the second vector points to the fourth texture coordinates; the second calculation module is used to calculate the angle between the first vector and the second vector to obtain a first angle.

[0139] Optionally, the virtual model adjustment device further includes: a creation module for creating a first reference coordinate system and a second reference coordinate system with the first texture coordinate as the origin, wherein the positive direction of the first axis in the first reference coordinate system is the direction pointed to by the first vector, and the positive direction of the first axis in the second reference coordinate system is the direction pointed to by the second vector.

[0140] Optionally, the second processing module includes: a seventeenth determining module, an eighteenth determining module, and a nineteenth determining module. The seventeenth determining module is used to determine the target angle interval corresponding to the current texture point within multiple preset angle intervals, wherein the multiple preset angle intervals are determined based on the second angle between the line connecting the current texture point and the origin of the first reference coordinate system and the first direction of the first reference coordinate system; the eighteenth determining module is used to determine the target calculation mode corresponding to the texture weight value based on the target angle interval; the nineteenth determining module is used to determine the weight value corresponding to the target calculation mode, thereby obtaining the texture weight value.

[0141] Optionally, the second processing module includes a third calculation module for calculating the product of the texture weight value and the first angle to obtain the target rotation angle.

[0142] Optionally, the virtual model adjustment device further includes: a first generation module, a second generation module, and a third generation module. The first generation module is used to generate a first parameter value and a second parameter value based on a first angle before determining the target angle interval corresponding to the current texture point within a plurality of preset angle intervals, wherein the sum of the first parameter value and the second parameter value is a fixed value; the second generation module is used to generate a plurality of preset angles based on the first parameter value, the second parameter value, and the first angle; and the third generation module is used to generate a plurality of preset angle intervals based on the plurality of preset angles.

[0143] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0144] Embodiments of this disclosure also provide a computer-readable storage medium storing a computer program configured to perform the steps in any of the above method embodiments when executed.

[0145] Optionally, in this embodiment, the aforementioned non-volatile storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0146] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0147] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0148] In exemplary embodiments of this application, a computer-readable storage medium stores a program product capable of implementing the methods described above in this embodiment. In some possible implementations, various aspects of the embodiments of this disclosure may also be implemented as a program product including program code, which, when the program product is run on a terminal device, causes the terminal device to perform the steps according to various exemplary embodiments of this disclosure described in the "Exemplary Methods" section above.

[0149] The program product for implementing the above-described method according to embodiments of the present disclosure may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the embodiments of the present disclosure is not limited thereto. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0150] The aforementioned program product may take the form of any combination of one or more computer-readable media. Such computer-readable storage media may be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (not exhaustive) of computer-readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0151] It should be noted that the program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0152] Embodiments of this disclosure also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0153] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0154] Figure 13 This is a schematic diagram of an electronic device according to an embodiment of the present disclosure. Figure 13 As shown, the electronic device 1300 is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0155] like Figure 13 As shown, the electronic device 1300 is presented in the form of a general-purpose computing device. The components of the electronic device 1300 may include, but are not limited to: at least one processor 1310, at least one memory 1320, a bus 1330 connecting different system components (including memory 1320 and processor 1310), and a display 1340.

[0156] The memory 1320 stores program code that can be executed by the processor 1310, causing the processor 1310 to perform the steps described in the method section of the embodiments of this application according to various exemplary implementations of this disclosure.

[0157] The memory 1320 may include a readable medium in the form of volatile memory cells, such as random access memory (RAM) 13201 and / or cache memory 13202, and may further include read-only memory (ROM) 13203, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.

[0158] In some instances, memory 1320 may also include programs / utilities 13204 having a set (at least one) of program modules 13205, including but not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Memory 1320 may further include memory remotely located relative to processor 1310, which can be connected to electronic device 1300 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0159] Bus 1330 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, peripheral bus, graphics acceleration port, processor 1310, or a local bus using any of the various bus structures.

[0160] The display 1340 may be, for example, a touch screen liquid crystal display (LCD) that allows a user to interact with the user interface of the electronic device 1300.

[0161] Optionally, the electronic device 1300 can also communicate with one or more external devices 1400 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1300, and / or any device that enables the electronic device 1300 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via the input / output (I / O) interface 1350. Furthermore, the electronic device 1300 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via the network adapter 1360. Figure 13 As shown, network adapter 1360 communicates with other modules of electronic device 1300 via bus 1330. It should be understood that, although... Figure 13 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 1300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0162] The aforementioned electronic device 1300 may further include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply, and / or a camera.

[0163] Those skilled in the art will understand that Figure 13 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 1300 may also include components that are more... Figure 13 The more or fewer components shown, or having the same Figure 13 Different configurations are shown. The memory 1320 can be used to store computer programs and corresponding data, such as the computer program and corresponding data corresponding to the virtual model adjustment method in this embodiment. The processor 1310 executes various functional applications and data processing by running the computer program stored in the memory 1320, thereby implementing the aforementioned virtual model adjustment method.

[0164] The sequence numbers of the embodiments disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0165] In the above embodiments of this disclosure, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0166] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0167] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0168] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0169] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0170] The above description is only a preferred embodiment of this disclosure. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principles of this disclosure, and these improvements and modifications should also be considered within the scope of protection of this disclosure.

Claims

1. A method for adjusting a virtual model, characterized in that, The method comprises: Obtain at least one adjustment block constituting the model to be adjusted, wherein the adjustment block is any one of the multiple texture blocks obtained by unfolding the model to be adjusted in texture space; Determine the main sequence edge located on the block to be adjusted, and identify the texture identifier of the current main sequence point on the main sequence edge to obtain the first texture identifier, wherein the main sequence edge is any one of the multiple continuous edges in the block to be adjusted, and the current main sequence point is the texture point on the main sequence edge; Based on the first texture identifier, the deformation adjustment mode of the texture points contained in the second texture point set is determined, wherein the second texture point set is composed of texture points in the block to be adjusted, excluding the main sequence points on the main sequence edge; Based on the deformation adjustment mode, the texture points contained in the second texture point set are deformed and adjusted to obtain the adjusted virtual model.

2. The method according to claim 1, characterized in that, After obtaining the blocks to be adjusted, the method further includes: Determine the starting position of the main sequence edge; The first texture point set is sorted based on the starting position to obtain the sorting result, wherein the first texture point set consists of all the main order points on the main order edge; According to the sorting result, the texture identifiers of the master order points contained in the first texture point set are stored in the target column of the preset control table.

3. The method according to claim 2, characterized in that, The method further includes: Traverse the second set of texture points to determine the current texture point; The adjacent edges corresponding to the current texture point are determined from the blocks to be adjusted, wherein the adjacent edges include at least the line segment where the current texture point is located; Obtain the neighboring points corresponding to the neighboring edge to obtain the third texture point set, wherein the neighboring points are the endpoints of the neighboring edge; Detect the number of texture points in the third texture point set that belong to the texture points in the first texture point set; The preset control table is updated based on the number of texture points.

4. The method according to claim 3, characterized in that, The preset control table is updated based on the number of texture points, including: When the number of texture points is a preset threshold, the target master sequence point corresponding to the current texture point is determined, and the texture identifier of the current texture point is added to the first target row of the preset control table, wherein the first target row is the row where the target master sequence point is located in the preset control table; When the number of texture points is greater than the preset threshold, multiple master sequence points corresponding to the current texture point are determined, and the average value of the row number of the multiple master sequence points in the preset control table is calculated. A second target row is determined based on the average value, and then the texture identifier of the current texture point is added to the second target row. When the number of texture points is less than the preset threshold, the second texture point set is traversed to determine the current texture point, and the third texture point set is determined based on the current texture point, until the number of texture points is greater than or equal to the preset threshold.

5. The method according to claim 4, characterized in that, Determining the second target row based on the average value includes: When the average value is an integer, the row number corresponding to the average value is determined to be the second target row; When the average value is not an integer, obtain the two integers adjacent to the average value, and determine the row corresponding to the two integers as the second target row.

6. The method according to claim 3, characterized in that, The method further includes: According to the sorting result, a first master order point and the next master order point of the first master order point are determined from the master order edges, wherein the first master order point is the first texture point of the master order edge; Determine the sub-main-order edge between the first main-order point and the next main-order point; Determine the angle between the sub-main sequence edge and the first direction to obtain the first angle; Based on the first included angle, and with the first master sequence point as the axis, the block to be adjusted is rotated to obtain the rotated block to be adjusted.

7. The method according to claim 6, characterized in that, Determining the deformation adjustment mode of the texture points contained in the second texture point set based on the first texture identifier includes: Obtain the scope impact factor; The current target row number of the current master sequence point in the preset control table is determined based on the first texture identifier; Multiple row number ranges are determined based on the range influence factor and the current target row number, wherein texture points in different row number ranges in the preset control table correspond to different deformation adjustment modes; The deformation adjustment mode of the texture points contained in the second texture point set is determined based on the row number range of the texture points contained in the second texture point set.

8. The method according to claim 7, characterized in that, Multiple row number ranges are determined based on the range influence factor and the current target row number, including: Calculate the difference between the current target row number and the range influence factor to obtain the first row number, and calculate the sum of the current target row number and the range influence factor to obtain the second row number; Based on the first row number and the second row number, a first row number range, a second row number range, and a third row number range are determined, wherein the maximum row number in the first row number range is less than the first row number, the minimum row number in the second row number range is the first row number, the maximum row number in the second row number range is the second row number, and the minimum row number in the third row number range is greater than the second row number.

9. The method according to claim 8, characterized in that, The deformation adjustment mode of the texture points contained in the second texture point set is determined based on the row number range of the texture points contained in the second texture point set, including: When the row number corresponding to the current texture point is within the range of the first row number, adjusting the current texture point is prohibited; When the row number corresponding to the current texture point is within the range of the second row number, a texture weight value is generated based on the first reference coordinate system and the second reference coordinate system, and the target rotation angle of the current texture point is determined based on the texture weight value, wherein the positive direction of the first axis in the first reference coordinate system is different from the positive direction of the first axis in the second reference coordinate system; When the row number corresponding to the current texture point is within the range of the third row number, the current texture point is rotated by a first angle with the origin of the first reference coordinate system as the axis.

10. The method according to claim 9, characterized in that, The method further includes: Determine the texture coordinates of the current master order point located on the master order edge to obtain the first texture coordinates; Obtain the third texture coordinates of the previous master sequence point of the current master sequence point, and the fourth texture coordinates of the next master sequence point of the current master sequence point, wherein the row number of the current master sequence point in the preset control table is greater than 1; A first vector is determined based on the third texture coordinates and the first texture coordinates, wherein the first vector points to the third texture coordinates; A second vector is determined based on the fourth texture coordinates and the first texture coordinates, wherein the second vector points to the fourth texture coordinates; Calculate the angle between the first vector and the second vector to obtain the first angle.

11. The method according to claim 10, characterized in that, The method further includes: A first reference coordinate system and a second reference coordinate system are created with the first texture coordinates as the origin. In the first reference coordinate system, the positive direction of the first axis is the direction pointed to by the first vector, and in the second reference coordinate system, the positive direction of the first axis is the direction pointed to by the second vector.

12. The method according to claim 10, characterized in that, Texture weight values ​​are generated based on the first reference coordinate system and the second reference coordinate system, including: The target angle interval corresponding to the current texture point is determined among multiple preset angle intervals, wherein the multiple preset angle intervals are determined based on the second angle between the line connecting the current texture point and the origin of the first reference coordinate system and the first direction of the first reference coordinate system; The target calculation mode corresponding to the texture weight value is determined based on the target angle range; The weight value corresponding to the target calculation mode is determined to obtain the texture weight value.

13. The method according to claim 12, characterized in that, Determining the target rotation angle of the current texture point based on the texture weight value includes: The target rotation angle is obtained by multiplying the texture weight value by the first angle.

14. The method according to claim 12, characterized in that, Before determining the target angle interval corresponding to the current texture point among multiple preset angle intervals, the method further includes: A first parameter value and a second parameter value are generated based on the first angle, wherein the sum of the first parameter value and the second parameter value is a fixed value; Multiple preset angles are generated based on the first parameter value, the second parameter value, and the first angle; The multiple preset angle ranges are generated based on the multiple preset angles.

15. An adjustment device for a virtual model, characterized in that, The device comprises: The acquisition module is used to acquire at least one adjustment block constituting the model to be adjusted, wherein the adjustment block is any one of the multiple texture blocks obtained by unfolding the model to be adjusted in texture space. The identification module is used to determine the main sequence edge located on the block to be adjusted, and to identify the texture identifier of the current main sequence point on the main sequence edge to obtain a first texture identifier, wherein the main sequence edge is any one of the multiple continuous edges in the block to be adjusted, and the current main sequence point is the texture point on the main sequence edge; The determining module is used to determine the deformation adjustment mode of the texture points contained in the second texture point set based on the first texture identifier, wherein the second texture point set consists of texture points in the block to be adjusted, excluding the master order points on the master order edge; The adjustment module is used to perform deformation adjustment on the texture points contained in the second texture point set based on the deformation adjustment mode to obtain the adjusted virtual model.

16. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program, wherein the computer program is configured to execute, when run by a processor, the method for adjusting the virtual model as described in any one of claims 1 to 14.

17. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the adjustment method of the virtual model as described in any one of claims 1 to 14.

Citation Information

Patent Citations

  • Three-dimensional model adjustment method and device, equipment and storage medium

    CN114092676A

  • Three-dimensional surface texturing

    US20170024925A1