Method and device for realizing spider web effect, computer device and storage medium

CN116451289BActive Publication Date: 2026-10-30NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310412985.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-13
Publication Date
2026-10-30
Estimated Expiration
2043-04-13

AI Technical Summary

Technical Problem

[0003]但是,贴花制作出的网状物体会出现拉伸,而且整个网状物体较为平坦,做不出凸出来的立体感

Benefits of technology

[0017]本申请实施例中,计算机设备通过获取第一网状模型,第一网状模型包括多个顶点;确定第一网状模型所要贴附的目标物体的表面形状信息;根据目标物体的表面形状信息确定多个顶点中每一顶点的目标位置信息;根据每一顶点的目标位置信息确定出第二网状模型,并将第二网状模型贴附在目标物体的表面上。从而实现网状模型能够根据所要贴附的目标物体的表面形状而发生改变,从而使得网状模型贴附在目标物体上更加自然。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116451289B_ABST
    Figure CN116451289B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a spider web effect implementation method and device, computer equipment and a storage medium. The method comprises the following steps: a computer equipment acquires a first net model, the first net model comprises a plurality of vertices; surface shape information of a target object to be attached by the first net model is determined; target position information of each vertex in the plurality of vertices is determined according to the surface shape information of the target object; a second net model is determined according to the target position information of each vertex, and the second net model is attached to the surface of the target object. Thus, the net model can change according to the surface shape of the target object to be attached, so that the net model is more natural when attached to the target object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a method, apparatus, computer device, and storage medium for achieving a spider web effect. Background Technology

[0002] In related technologies, to achieve the effect of pasting a mesh-like object on a wall, floor, or corner of a wall, the mesh-like object is usually made by creating a decal, and then the decal-made mesh-like object is set on the corresponding attachment.

[0003] However, decal-made mesh objects tend to stretch and are relatively flat, failing to create a raised, three-dimensional effect. Furthermore, when encountering wall corners, the mesh objects made with decals adhere very poorly, failing to adapt to the shape of the surface of the object they are attached to. Summary of the Invention

[0004] This application provides a method, apparatus, computer device, and storage medium for achieving a spider web effect. The method enables the spider web model to change according to the surface shape of the target object to which it is to be attached, resulting in a more natural attachment of the spider web model to the target object.

[0005] In a first aspect, embodiments of this application provide a method for achieving a spider web effect, including:

[0006] Obtain the first mesh model, which includes multiple vertices;

[0007] Determine the surface shape information of the target object to which the first mesh model is to be attached;

[0008] Determine the target position information of each vertex among multiple vertices based on the surface shape information of the target object;

[0009] The second mesh model is determined based on the target position information of each vertex, and then the second mesh model is attached to the surface of the target object.

[0010] Secondly, embodiments of this application provide an apparatus for achieving a spider web effect, comprising:

[0011] The acquisition module is used to acquire the first mesh model, which includes multiple vertices;

[0012] The first determining module is used to determine the surface shape information of the target object to which the first mesh model is to be attached;

[0013] The second determining module is used to determine the target position information of each vertex among multiple vertices based on the surface shape information of the target object.

[0014] The setup module is used to determine the second mesh model based on the target position information of each vertex, and then attach the second mesh model to the surface of the target object.

[0015] Thirdly, embodiments of this application provide a computer-readable storage medium storing multiple instructions adapted for loading by a processor to execute the spider web effect implementation method provided in embodiments of this application.

[0016] Fourthly, embodiments of this application provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the method for achieving the spider web effect provided in embodiments of this application.

[0017] In this embodiment, the computer device acquires a first mesh model, which includes multiple vertices; determines the surface shape information of the target object to which the first mesh model is to be attached; determines the target position information of each vertex among the multiple vertices based on the surface shape information of the target object; determines a second mesh model based on the target position information of each vertex, and attaches the second mesh model to the surface of the target object. This allows the mesh model to change according to the surface shape of the target object to which it is to be attached, resulting in a more natural attachment of the mesh model to the target object. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating a method for implementing a spider web effect according to an optional embodiment of this application.

[0020] Figure 2 This is a schematic diagram of a mesh model provided in an optional embodiment of this application.

[0021] Figure 3 This is a flowchart illustrating a method for achieving the spider web effect provided in an optional embodiment of this application.

[0022] Figure 4 This is a schematic diagram of the first coordinate system provided in an optional embodiment of this application.

[0023] Figure 5 This is a flowchart illustrating a method for implementing a spider web effect according to an optional embodiment of this application.

[0024] Figure 6 This is a scene diagram of the first mesh model provided in an optional embodiment of this application.

[0025] Figure 7 This is a schematic diagram of an optional embodiment of the present application providing a modified first mesh model.

[0026] Figure 8 This is a schematic diagram of an adjusted first mesh model provided in an optional embodiment of this application.

[0027] Figure 9 This is a flowchart illustrating a method for implementing a spider web effect according to an optional embodiment of this application.

[0028] Figure 10 This is a scene diagram of the first mesh model provided in an optional embodiment of this application.

[0029] Figure 11 This is a schematic diagram of the adjusted first mesh model provided in an optional embodiment of this application.

[0030] Figure 12 This is a schematic diagram of the adjusted first mesh model provided in an optional embodiment of this application.

[0031] Figure 13 This is a schematic diagram of the structure of the device for achieving the spider web effect provided in the embodiments of this application.

[0032] Figure 14 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation

[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0034] In related technologies, to achieve the effect of pasting a mesh-like object on a wall, floor, or corner of a wall, the mesh-like object is usually made by creating a decal, and then the decal-made mesh-like object is set on the corresponding attachment.

[0035] However, decal-made mesh objects tend to stretch and are relatively flat, failing to create a raised, three-dimensional effect. Furthermore, when encountering wall corners, the mesh objects made with decals adhere very poorly, failing to adapt to the shape of the surface of the object they are attached to.

[0036] To address the aforementioned technical problems, embodiments of this application provide a method, apparatus, computer device, and storage medium for achieving a spider web effect. This method enables the spider web model to adapt to the surface shape of the target object to which it is to be attached, resulting in a more natural attachment of the web model to the target object.

[0037] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for implementing a spider web effect according to an optional embodiment of this application. The method for implementing the spider web effect may include the following steps:

[0038] 110. Obtain the first mesh model, which includes multiple vertices.

[0039] In some implementations, the first mesh model can be a spider web-like mesh model, such as a polygonal mesh model, like a hexagonal mesh model or an octagonal mesh model. The first mesh model contains multiple sequentially enclosed polygonal regions, with the vertices of the previous polygon connected to the vertices of the next polygon, thus forming a mesh model.

[0040] Please refer to the following: Figure 2 , Figure 2 This is a schematic diagram of a mesh model provided in an optional embodiment of this application.

[0041] like Figure 2 As shown, the first mesh model can be a mesh model similar to an octagonal spider web. In the top view of the first mesh model, there are multiple octagons, with each octagon containing the previous one. The vertices of the previous octagon connect to the vertices of the next octagon, and there is a top center point in the innermost octagon, which is point A in the figure.

[0042] The first mesh model can be a three-dimensional mesh model, such as... Figure 2 As shown, in the top view of the first mesh model, there is a center point H on the bottom surface of the first mesh model. In the side view of the first mesh model, it can be seen that the different octagons are not in the same plane; for example, the octagon corresponding to vertex C is above the octagon corresponding to vertex E. That is to say, the first mesh model is a three-dimensional mesh model. Furthermore, this first mesh model contains multiple vertices.

[0043] 120. Determine the surface shape information of the target object to which the first mesh model is to be attached.

[0044] In some implementations, when the first mesh model is placed on the target object, the surface of the target object often exhibits three main types. The first surface type is a plane, where the first mesh model can be directly placed on the surface of the target object. The second surface type is an inner corner surface; when the first mesh model is placed on an inner corner surface of the target object, because the inner corner surface is not planar, the first mesh model and the target object will intersect. The third surface type is an outer corner plane; because the outer corner surface is not planar, at least a portion of the first mesh model cannot adhere to the surface of the target object.

[0045] Therefore, before setting the first mesh model on the target object, it is necessary to determine the surface shape information of the target object in order to determine whether the vertices of the first mesh model need to be adjusted.

[0046] 130. Determine the target position information of each vertex among multiple vertices based on the surface shape information of the target object.

[0047] In some implementations, if the surface shape information of the target object is planar, then a first coordinate system of the first mesh model is determined; and the position information of each vertex among the multiple vertices in the first coordinate system is determined as the target position information of each vertex.

[0048] For example, if the computer device determines that the surface of the target object is a relatively flat surface, the first mesh model can be directly set on the surface of the target object. In this case, the computer device directly establishes a first coordinate system for the first mesh model, thereby determining the position information of each vertex in the first mesh model, and determining the position information of each vertex among multiple vertices in the first coordinate system as the target position information of each vertex.

[0049] In some implementations, if the surface shape information of the target object is an inner corner surface, the first mesh model cannot be directly set on the inner corner surface of the target object. Otherwise, the first mesh model will intersect with the target object, resulting in the presented mesh model looking rather awkward.

[0050] The computer device can determine the first target model region where the first mesh model intersects with the surface of the target object; determine the first vertex related to the first target model region among multiple vertices; adjust the position of the first vertex to obtain the adjusted position information of the first vertex; establish a second coordinate system based on the adjusted position information of the first vertex, and determine the target position information of each vertex in the second coordinate system.

[0051] For example, a computer device can identify a first target model region that intersects with the surface of a target object. Then, it can identify a first vertex within this first target model region that intersects with the target object. The position of this first vertex is then adjusted to the first surface of the target object, which is the surface of the target object facing and intersecting with the first mesh model. This avoids the first vertex intersecting with the first surface of the target object.

[0052] The computer device can calculate the position information of the adjusted first vertex, then take the center point of the bottom surface of the first mesh model as the origin, and then determine the first coordinate axis based on the adjusted first vertex and the center point of the bottom surface, and then determine the second coordinate axis perpendicular to the first coordinate axis, thereby establishing the second coordinate system.

[0053] Within the second coordinate system, the computer device can determine the position information of each vertex and use the position information of each vertex within the second coordinate system as the target position information of each vertex.

[0054] In some implementations, if the surface shape information of the target object is an outer corner surface, if the first mesh model is set on the outer corner surface, the first mesh model cannot be completely attached to the target object.

[0055] The computer device can determine the first coordinate system of the first mesh model; identify the second vertex among multiple vertices that emits rays along the coordinate axis of the first coordinate system and fails to collide with the surface of the target object; adjust the position of the second vertex to obtain the adjusted position information of the second vertex; and determine the target position information of each vertex based on the adjusted position information of the second vertex and the position information of the other vertices among the multiple vertices excluding the second vertex.

[0056] For example, a computer device can establish a first coordinate system for a first mesh model. Among the multiple vertices of the first mesh model, some vertices emit rays along the coordinate axes of the first coordinate system, but the rays from some vertices cannot reach the surface of the target object. These vertices are then designated as second vertices. In other words, the model area of ​​the first mesh model corresponding to the second vertex cannot be set on the surface of the target object, which ultimately results in a poor adhesion effect of the first mesh model on the target object.

[0057] Therefore, the position of the second vertex needs to be adjusted to obtain the adjusted position information of the second vertex. Then, based on the adjusted position information of the second vertex and the position information of the other vertices among the multiple vertices, the target position information of each vertex is determined.

[0058] 140. Determine the second mesh model based on the target position information of each vertex, and attach the second mesh model to the surface of the target object.

[0059] In some implementations, if the surface shape information of the target object is planar, and the target position information of each vertex of the first mesh model has not changed, that is, each vertex of the first mesh model does not need to be adjusted, then the second mesh model is actually the first mesh model based on the target position information of each vertex. At this time, the second mesh model can be directly attached to the surface of the target object.

[0060] In some implementations, if the surface shape information of the target object is an inner corner surface, after adjusting the position of the first vertex, the vertex of the first mesh model can be at least partially adjusted by using the target position information of each vertex in the second coordinate system, thereby changing the model shape of the first mesh model and obtaining a second mesh model. The vertices of the second mesh model will not intersect the surface of the target object. The second mesh model can be set on the inner corner surface of the target object, thereby achieving a more natural mesh model attachment effect.

[0061] In some implementations, if the surface shape information of the target object is an outer corner surface, the position of the second vertex is adjusted to obtain the target position information of each vertex, thereby changing the model shape of the first mesh model to obtain a second mesh model. The second mesh model can be better attached to the outer corner surface of the target object, thereby achieving a more natural mesh model attachment effect.

[0062] In this embodiment, the computer device acquires a first mesh model, which includes multiple vertices; determines the surface shape information of the target object to which the first mesh model is to be attached; determines the target position information of each vertex among the multiple vertices based on the surface shape information of the target object; determines a second mesh model based on the target position information of each vertex, and attaches the second mesh model to the surface of the target object. This allows the mesh model to change according to the surface shape of the target object to which it is to be attached, resulting in a more natural attachment of the mesh model to the target object.

[0063] To gain a more detailed understanding of the method for achieving the spider web effect provided in the embodiments of this application, please continue reading. Figure 3 , Figure 3 This is a flowchart illustrating a method for implementing a spider web effect according to an optional embodiment of this application. The method for implementing the spider web effect may include the following steps:

[0064] 201. Obtain the first mesh model, which includes multiple vertices.

[0065] like Figure 2As shown, the first mesh model can be a mesh model similar to an octagonal spider web. In the top view of the first mesh model, there are multiple octagons, with each octagon containing the previous one. The vertices of the previous octagon connect to the vertices of the next octagon, and there is a top center point in the innermost octagon, which is point A in the figure.

[0066] The first mesh model can be a three-dimensional mesh model, such as... Figure 2 As shown, in the top view of the first mesh model, there is a center point H on the bottom surface of the first mesh model. In the side view of the first mesh model, it can be seen that the different octagons are not in the same plane; for example, the octagon corresponding to vertex C is above the octagon corresponding to vertex E. That is to say, the first mesh model is a three-dimensional mesh model. Furthermore, this first mesh model contains multiple vertices.

[0067] 202. Determine the outermost vertices of the first mesh model, and perform ray collision detection on the surface of the target object through the outermost vertices to determine the surface shape information of the target object.

[0068] like Figure 2 As shown, among the multiple vertices of the first mesh model, the outermost vertices are the vertices of the mesh model that are closest to the outside. For example, vertices F and G are the outermost vertices. The computer device can control the outermost vertices to perform ray collision detection on the surface of the object, thereby determining the surface shape information of the target object.

[0069] In some implementations, the computer device can establish a first coordinate system for the first mesh model; control each outermost vertex to emit rays along different coordinate axes of the first coordinate system to perform ray collision detection on the surface of the target object and determine the surface shape information of the target object.

[0070] Please refer to the following: Figure 4 , Figure 4 This is a schematic diagram of the first coordinate system provided in an optional embodiment of this application.

[0071] like Figure 4 As shown, a first coordinate system is established with the direction between the center point H of the bottom surface of the first mesh model and the outermost vertex G as the X-axis, the direction between the center point H of the bottom surface of the first mesh model and the center point A of the top surface as the Z-axis, and the center point H of the bottom surface as the origin.

[0072] The outermost vertex G can emit rays in the direction of the X-axis or Z-axis to achieve collision detection with the target object and obtain the surface shape information of the target object.

[0073] 203. If the surface shape information of the target object is a plane, determine the position information of each vertex among multiple vertices in the first coordinate system as the target position information of each vertex.

[0074] like Figure 4 As shown, when the ray emitted from the outermost vertex G toward the X-axis does not contact the surface of the target object, but the ray emitted from the outermost vertex G toward the negative Z-axis contacts the surface of the target object, it indicates that the surface shape information of the target object is planar, and the first mesh model can be directly set on the surface of the target object.

[0075] If the surface shape information of the target object is planar, and each vertex of the first mesh model does not need to be adjusted, then the position information of each vertex among the multiple vertices in the first coordinate system is determined as the target position information of each vertex.

[0076] 204. Determine the second mesh model based on the target position information of each vertex, and attach the second mesh model to the surface of the target object.

[0077] The target position information of each vertex of the first mesh model has not changed, that is, each vertex of the first mesh model does not need to be adjusted. Therefore, based on the target position information of each vertex, it is determined that the second mesh model is actually the first mesh model. At this time, the second mesh model can be directly attached to the surface of the target object.

[0078] At this point, since the second mesh model is a three-dimensional model, rather than a two-dimensional model made of decals, it has a more natural visual effect when attached to the target object.

[0079] Please see Figure 5 , Figure 5 This is a flowchart illustrating a method for implementing a spider web effect according to an optional embodiment of this application. The method for implementing the spider web effect may further include the following steps:

[0080] 301. Obtain the first mesh model, which includes multiple vertices.

[0081] like Figure 2 As shown, the first mesh model can be a mesh model similar to an octagonal spider web. In the top view of the first mesh model, there are multiple octagons, with each octagon containing the previous one. The vertices of the previous octagon connect to the vertices of the next octagon, and there is a top center point in the innermost octagon, which is point A in the figure.

[0082] The first mesh model can be a three-dimensional mesh model, such as... Figure 2As shown, in the top view of the first mesh model, there is a center point H on the bottom surface of the first mesh model. In the side view of the first mesh model, it can be seen that the different octagons are not in the same plane; for example, the octagon corresponding to vertex C is above the octagon corresponding to vertex E. That is to say, the first mesh model is a three-dimensional mesh model. Furthermore, this first mesh model contains multiple vertices.

[0083] 302. Determine the outermost vertices of the first mesh model, and perform ray collision detection on the surface of the target object through the outermost vertices to determine the surface shape information of the target object.

[0084] like Figure 2 As shown, among the multiple vertices of the first mesh model, vertices F and G are the outermost vertices. The computer device can control the outermost vertices to perform ray collision detection on the surface of the object, thereby determining the surface shape information of the target object.

[0085] In some implementations, the computer device can establish a first coordinate system for the first mesh model; control each outermost vertex to emit rays along different coordinate axes of the first coordinate system to perform ray collision detection on the surface of the target object and determine the surface shape information of the target object.

[0086] like Figure 4 As shown, a first coordinate system is established with the direction between the center point H of the bottom surface of the first mesh model and the outermost vertex G as the X-axis, the direction between the center point H of the bottom surface of the first mesh model and the center point A of the top surface as the Z-axis, and the center point H of the bottom surface as the origin.

[0087] The outermost vertex G can emit rays in the direction of the X-axis or Z-axis to achieve collision detection with the target object and obtain the surface shape information of the target object.

[0088] 303. If the surface shape information of the target object is an inner corner surface, then determine the first target model region where the first mesh model intersects with the surface of the target object.

[0089] Please refer to the following: Figure 6 , Figure 6 This is a scene diagram of the first mesh model provided in an optional embodiment of this application.

[0090] In this context, the target objects are walls and the ground. Taking the outermost vertex G as an example, ray collision detection is performed through the outermost vertex G. The outermost vertex G collides with the surface of the target object, and the first mesh model intersects with the target object. This indicates that the surface shape information of the target object at this time is an inner corner surface.

[0091] Computer equipment can determine the region of the first target model where the first mesh model intersects with the surface of the target object. For example... Figure 6 As shown, the region closest to the outermost vertex G is the first target model region.

[0092] It should be noted that, in Figure 6 In the case of the inner corner surface shown, the outermost vertex of the first mesh model may not only be the outermost vertex G that intersects the target object; there may be other vertices that intersect the target object. In this embodiment, only the outermost vertex G is used as an example for illustration, and this application is not intended to be limiting.

[0093] 304. Identify the first vertex related to the first target model region among multiple vertices.

[0094] In some implementations, the vertex that intersects with the target object within the first target model region can be defined as the first vertex, for example, the outermost vertex G.

[0095] 305. Adjust the position of the first vertex to obtain the adjusted position information of the first vertex.

[0096] In some implementations, the computer device can determine the target distance between the center point of the bottom surface of the first mesh model and the first vertex; adjust the position of the first vertex to the first surface of the target object according to the target distance to obtain the adjusted position information of the first vertex, wherein the first surface is the surface of the target object facing the first mesh model and intersecting with the first mesh model.

[0097] Please refer to the following: Figure 7 , Figure 7 This is a schematic diagram of an optional embodiment of the present application providing a modified first mesh model.

[0098] Among them, computer equipment can be obtained from Figure 6 The target distance, i.e., the length HG, between the center point of the bottom surface of the first mesh model and the first vertex is determined in the first coordinate system. The length HG is the target distance.

[0099] The computer then needs to adjust the first vertex G onto the first surface of the target object, obtaining point G' on the first surface. The length of HG' is the same as the length of HG. Then, the position information corresponding to G' is determined.

[0100] In some implementations, the computer device can determine a first collision point between the first mesh model and the first surface, as well as the position information of the first collision point; determine the vertical distance between the center point of the bottom surface of the first mesh model and the first surface; and determine the position information of the adjusted first vertex based on the position information of the first collision point, the vertical distance, the target distance between the adjusted first vertex and the center point of the bottom surface.

[0101] Please refer to the following: Figure 8 , Figure 8 This is a schematic diagram of an adjusted first mesh model provided in an optional embodiment of this application.

[0102] Here, point M is the first collision point between point H and the wall when point H moves towards point G, and point N is the foot of the perpendicular from point H to the wall plane. This allows us to determine the position of the first collision point M and the vertical distance HN between point N and point H.

[0103] By the Pythagorean theorem, NG'*NG' + HN*HN = HG'*HG', where the length of HN is known (i.e., the perpendicular distance). The length of HG' is also known (i.e., the target distance). Therefore, the length of NG' can be calculated, and thus the length of MG' can be determined.

[0104] Then the computer equipment can determine the direction of MG', such as Figure 8 As shown, if the angle between the ground and the wall is exactly 90 degrees, then the direction of MG' is exactly the direction of the Z-axis of the first mesh model (i.e., the HA direction). If the angle is less than 90 degrees, then the direction of MG' is the direction of MN. If the angle is greater than 90 degrees, then the direction of MG' is the opposite direction of MN.

[0105] Once the direction and length of MG' are determined, and the coordinates of point M are known, the coordinates of point G' can be calculated. In other words, the position of the first vertex G after adjustment to G' can be calculated.

[0106] 306. Establish a second coordinate system based on the adjusted position information of the first vertex, and determine the target position information of each vertex in the second coordinate system.

[0107] like Figure 8 As shown, the computer device can establish a second coordinate system by using HG' as the X-axis of the second coordinate system, with the center point H of the bottom surface as the origin, and setting the Z-axis perpendicular to HG'.

[0108] Then, the target position information of each vertex in the second coordinate system is calculated.

[0109] 307. Determine the second mesh model based on the target position information of each vertex, and attach the second mesh model to the surface of the target object.

[0110] In some implementations, if the surface shape information of the target object is an inner corner surface, after adjusting the position of the first vertex, the vertex of the first mesh model can be at least partially adjusted by using the target position information of each vertex in the second coordinate system, thereby changing the model shape of the first mesh model and obtaining a second mesh model. The vertices of the second mesh model will not intersect the surface of the target object. The second mesh model can be set on the inner corner surface of the target object, thereby achieving a more natural mesh model attachment effect.

[0111] Please see Figure 9 , Figure 9 This is a flowchart illustrating a method for implementing a spider web effect according to an optional embodiment of this application. The method for implementing the spider web effect may include the following steps:

[0112] 401. Obtain the first mesh model, which includes multiple vertices.

[0113] like Figure 2 As shown, the first mesh model can be a mesh model similar to an octagonal spider web. In the top view of the first mesh model, there are multiple octagons, with each octagon containing the previous one. The vertices of the previous octagon connect to the vertices of the next octagon, and there is a top center point in the innermost octagon, which is point A in the figure.

[0114] The first mesh model can be a three-dimensional mesh model, such as... Figure 2 As shown, in the top view of the first mesh model, there is a center point H on the bottom surface of the first mesh model. In the side view of the first mesh model, it can be seen that the different octagons are not in the same plane; for example, the octagon corresponding to vertex C is above the octagon corresponding to vertex E. That is to say, the first mesh model is a three-dimensional mesh model. Furthermore, this first mesh model contains multiple vertices.

[0115] 402. Determine the outermost vertices of the first mesh model, and perform ray collision detection on the surface of the target object through the outermost vertices to determine the surface shape information of the target object.

[0116] like Figure 2 As shown, among the multiple vertices of the first mesh model, vertices F and G are the outermost vertices. The computer device can control the outermost vertices to perform ray collision detection on the surface of the object, thereby determining the surface shape information of the target object.

[0117] In some implementations, the computer device can establish a first coordinate system for the first mesh model; control each outermost vertex to emit rays along different coordinate axes of the first coordinate system to perform ray collision detection on the surface of the target object and determine the surface shape information of the target object.

[0118] like Figure 4 As shown, a first coordinate system is established with the direction between the center point H of the bottom surface of the first mesh model and the outermost vertex G as the X-axis, the direction between the center point H of the bottom surface of the first mesh model and the center point A of the top surface as the Z-axis, and the center point H of the bottom surface as the origin.

[0119] The outermost vertex G can emit rays in the direction of the X-axis or Z-axis to achieve collision detection with the target object and obtain the surface shape information of the target object.

[0120] 403. If the surface shape information of the target object is an outer corner surface, determine the second vertex among multiple vertices that emits rays along the coordinate axis direction of the first coordinate system and fails to collide with the surface of the target object.

[0121] Please refer to the following: Figure 10 , Figure 10 This is a scene diagram of the first mesh model provided in an optional embodiment of this application.

[0122] Among them, such as Figure 10 As shown, if the outermost vertex G emits rays toward the X-axis and the Z-axis of the first coordinate system, and neither ray can be detected to collide with the target object, then the surface shape information of the target object is the outer corner surface.

[0123] At this point, the outermost vertex G can be determined as the second vertex.

[0124] 404. Adjust the position of the second vertex to obtain the adjusted position information of the second vertex.

[0125] In some implementations, the computer device can determine the corner point corresponding to the outer corner of the target object on the horizontal axis of the first coordinate system, as well as the position information of the corner point; adjust the position of the second vertex according to the position information of the corner point to obtain the adjusted position information of the second vertex.

[0126] Please refer to the following: Figure 11 , Figure 11 This is a schematic diagram of the adjusted first mesh model provided in an optional embodiment of this application.

[0127] Combination Figure 10 and Figure 11 The computer equipment can identify vertices G, E, and C that extend beyond the wall surface. However, the second vertex that actually needs adjustment only includes vertices E and G. This is because point C is the first point that extends horizontally beyond the wall. Point C cannot be adjusted. If point C is also adjusted, the adjusted first mesh model may intersect into the wall.

[0128] Therefore, it is necessary to determine the second vertex as vertex E and vertex G.

[0129] In some implementations, the computer device can first determine the corner point corresponding to the outer corner of the target object on the horizontal axis of the first coordinate system. The computer device can determine a mapping point of the second vertex at a preset distance along the negative half-axis of the vertical axis in the first coordinate system; connect the mapping point and the center point of the bottom surface of the first mesh model to determine the second collision point with the second surface of the target object, and the position information of the second collision point, where the second surface is the surface of the target object facing the mapping point; determine the perpendicular foot point of the second collision point on the horizontal axis of the first coordinate system, and the position information of the perpendicular foot point; and determine the corner point corresponding to the outer corner of the target object on the horizontal axis of the first coordinate system, and the position information of the corner point, based on the position information of the second collision point and the position information of the perpendicular foot point.

[0130] Please refer to the following: Figure 12 , Figure 12 This is a schematic diagram of the adjusted first mesh model provided in an optional embodiment of this application.

[0131] Where E, C, and G are vertices, H is the center point of the bottom surface, A is the center point of the top surface, the outer corner of the target object is the corner point P4 on the horizontal axis of the first coordinate system, K is the mapping point, M is the second collision point, and N is the perpendicular foot point of the collision point on the horizontal axis of the first coordinate system.

[0132] First, the computer device determines the mapping point K of the second vertex G in the negative half-axis of the vertical axis in the first coordinate system at a preset distance, that is, the length between G and K is the preset distance.

[0133] Then connect KH to determine the second collision point M with the second surface of the target object, as well as the position information of the second collision point M. The second surface is the surface of the target object facing the mapping point K.

[0134] The foot point N of the second collision point M on the horizontal axis (X-axis) of the first coordinate system is determined, along with the position information of the foot point N.

[0135] Point P4 is on the edge of HG, so the direction of HP4 is the direction of HG.

[0136] Calculate the value of NP4: NP4 = MN / tan∠GOM, where ∠GOM is the angle between the GK detection direction and the normal MO of the new wall. When the angle between the two walls is 90 degrees (i.e., ∠GOM is 90 degrees), tan∠GOM = infinity, and NP4 = 0, with points N and P4 coinciding. When the angle between the two walls is less than 90 degrees (i.e., ∠GOM is less than 90 degrees), ∠GOM = ∠MP4N, tan∠GOM is positive, and the calculated value of NP4 is greater than 0. When the angle between the two walls is greater than 90 degrees (i.e., ∠GOM is greater than 90 degrees), ∠GOM is the supplementary angle of ∠MP4N, tan∠GOM is negative, and the calculated value of NP4 is less than 0.

[0137] Wherein, the length of HP4 = the length of HN + the value of NP4. When the angle between the two walls is 90 degrees, the value of NP4 is 0. When the angle between the two walls is acute, the value of NP4 is positive. When the angle between the two walls is obtuse, the value of NP4 is negative.

[0138] Since the location of point H is known, and the direction and length of HP4 have been calculated, the location of point P4 can be easily calculated.

[0139] In some implementations, the computer device can determine the first horizontal axis distance and the first vertical axis distance of the second vertex in the first coordinate system; determine the second horizontal axis distance of the corner point in the first coordinate system; determine a standard point on the second surface based on the first horizontal axis distance and the second horizontal axis distance; determine a target position on the standard point that is perpendicular to the second surface and at a distance from the first vertical axis distance of the standard point; adjust the second vertex to the target position; and obtain the adjusted position information of the second vertex.

[0140] For example, please combine Figure 10 and Figure 11 Taking the adjustment of the second vertex E as an example, the distance of the second vertex E along the first horizontal axis in the first coordinate system is EP2, and the distance along the first vertical axis is HP2. The distance of the corner point P4 along the second horizontal axis in the first coordinate system is HP4. This makes EP2 = HP4 + P4P5, where P5 is a standard point on the second surface. Knowing the distances along the first horizontal axis (EP2), the distance along the second horizontal axis (HP4), and the position information of P4, the position of P5 on the second surface can be determined.

[0141] Then, determine the target position perpendicular to P5 and at a distance of HP2 from the first vertical axis of the standard point, which is the adjusted position information of the second vertex E'.

[0142] Similarly, the adjusted positions of other second vertices can be determined using the above method. Ultimately, this achieves the goal of adjusting the positions of all second vertices.

[0143] 405. Based on the adjusted position information of the second vertex and the position information of the other vertices among the multiple vertices excluding the second vertex, determine the target position information of each vertex.

[0144] In some implementations, the computer device can determine the target position information of each vertex of the adjusted first mesh model.

[0145] 406. Determine the second mesh model based on the target position information of each vertex, and attach the second mesh model to the surface of the target object.

[0146] In some implementations, if the surface shape information of the target object is an outer corner surface, the position of the second vertex is adjusted to obtain the target position information of each vertex, thereby changing the model shape of the first mesh model to obtain a second mesh model. The second mesh model can be better attached to the outer corner surface of the target object, thereby achieving a more natural mesh model attachment effect.

[0147] In this embodiment of the application, the computer device can determine whether the vertex position of the first mesh model needs to be adjusted based on the surface shape information of the target object, thereby obtaining the second mesh model. Ultimately, the second mesh model can be more naturally attached to the surface of the target object, thereby forming a visually more harmonious fitting effect.

[0148] Please see Figure 13 , Figure 13 This is a schematic diagram of the structure of the device for implementing the spider web effect provided in this application embodiment. The device 500 for implementing the spider web effect may include:

[0149] The acquisition module 510 is used to acquire the first mesh model, which includes multiple vertices.

[0150] The first determining module 520 is used to determine the surface shape information of the target object to which the first mesh model is to be attached.

[0151] The second determining module 530 is used to determine the target position information of each vertex among multiple vertices based on the surface shape information of the target object.

[0152] The setting module 540 is used to determine the second mesh model based on the target position information of each vertex and attach the second mesh model to the surface of the target object.

[0153] In some implementations, the first determining module 520 is further used to determine the outermost vertices of the first mesh model; and to perform ray collision detection on the surface of the target object through the outermost vertices to determine the surface shape information of the target object.

[0154] The first determining module 520 is also used to establish a first coordinate system for the first mesh model;

[0155] Each outermost vertex is controlled to emit rays along different coordinate axes of the first coordinate system to perform ray collision detection on the surface of the target object and determine the surface shape information of the target object.

[0156] In some implementations, the second determining module 530 is further configured to determine the first coordinate system of the first mesh model if the surface shape information of the target object is planar;

[0157] The position information of each vertex in the first coordinate system is determined as the target position information of each vertex.

[0158] In some embodiments, the second determining module 530 is further configured to determine a first target model region in which the first mesh model intersects with the surface of the target object if the surface shape information of the target object is an inner corner surface;

[0159] Identify the first vertex related to the first target model region from among multiple vertices;

[0160] Adjust the position of the first vertex to obtain the adjusted position information of the first vertex;

[0161] A second coordinate system is established based on the adjusted position information of the first vertex, and the target position information of each vertex is determined in the second coordinate system.

[0162] The second determining module 530 is also used to determine the target distance between the center point of the bottom surface of the first mesh model and the first vertex;

[0163] The position of the first vertex is adjusted to the first surface of the target object based on the target distance, and the adjusted position information of the first vertex is obtained. The first surface is the surface of the target object facing the first mesh model and intersecting with the first mesh model.

[0164] The second determining module 530 is also used to determine the first collision point between the first mesh model and the first surface, as well as the position information of the first collision point;

[0165] Determine the vertical distance between the center point of the bottom surface of the first mesh model and the first surface;

[0166] Based on the position information of the first collision point, the vertical distance, and the target distance between the adjusted first vertex and the center point of the bottom surface, the position information of the adjusted first vertex is determined.

[0167] In some implementations, the second determining module 530 is further configured to determine the first coordinate system of the first mesh model if the surface shape information of the target object is an outer corner surface;

[0168] Among multiple vertices, identify the second vertex that emits a ray along the coordinate axis of the first coordinate system and fails to collide with the surface of the target object;

[0169] Adjust the position of the second vertex to obtain the adjusted position information of the second vertex;

[0170] Based on the adjusted position information of the second vertex and the position information of the other vertices among the multiple vertices excluding the second vertex, the target position information of each vertex is determined.

[0171] The second determining module 530 is also used to determine the corner point corresponding to the outer corner of the target object on the horizontal axis of the first coordinate system, and the position information of the corner point;

[0172] Adjust the position of the second vertex based on the position information of the corner point to obtain the adjusted position information of the second vertex.

[0173] The second determining module 530 is also used to determine the mapping point of the second vertex at a preset distance in the direction of the negative half axis of the vertical axis in the first coordinate system;

[0174] Connect the mapping point and the center point of the bottom surface of the first mesh model to determine the second collision point with the second surface of the target object, as well as the position information of the second collision point. The second surface is the surface of the target object facing the mapping point.

[0175] Determine the foot of the second collision point on the horizontal axis of the first coordinate system, as well as the position information of the foot of the perpendicular point;

[0176] Based on the position information of the second collision point and the position information of the perpendicular point, the corner point corresponding to the outer corner of the target object on the horizontal axis of the first coordinate system is determined, as well as the position information of the corner point.

[0177] The second determining module 530 is also used to determine the first horizontal axis distance and the first vertical axis distance of the second vertex in the first coordinate system;

[0178] Determine the distance of the corner point along the second horizontal axis in the first coordinate system;

[0179] The standard points on the second surface are determined based on the first horizontal axis distance and the second horizontal axis distance;

[0180] Determine the target position on the standard point that is perpendicular to the second surface and at a distance from the first vertical axis of the standard point. Adjust the second vertex to the target position to obtain the position information of the adjusted second vertex.

[0181] In this embodiment, the mesh model is set by acquiring a first mesh model, which includes multiple vertices; determining the surface shape information of the target object to which the first mesh model is to be attached; determining the target position information of each vertex among the multiple vertices based on the surface shape information of the target object; determining a second mesh model based on the target position information of each vertex; and attaching the second mesh model to the surface of the target object. This allows the mesh model to change according to the surface shape of the target object to which it is to be attached, resulting in a more natural attachment of the mesh model to the target object.

[0182] Accordingly, this application also provides a computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer (PC), personal digital assistant (PDA), or other terminal device. Figure 14 As shown, Figure 14 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device 600 includes a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, and a computer program stored in the memory 602 and executable on the processor. The processor 601 and the memory 602 are electrically connected. Those skilled in the art will understand that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0183] The processor 601 is the control center of the computer device 600. It connects various parts of the computer device 600 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 602, and calling data stored in the memory 602, it performs various functions of the computer device 600 and processes data, thereby monitoring the computer device 600 as a whole.

[0184] In this embodiment, the processor 601 in the computer device 600 loads the instructions corresponding to the processes of one or more applications into the memory 602 according to the following steps, and the processor 601 runs the applications stored in the memory 602 to achieve various functions:

[0185] Obtain the first mesh model, which includes multiple vertices;

[0186] Determine the surface shape information of the target object to which the first mesh model is to be attached;

[0187] Determine the target position information of each vertex among multiple vertices based on the surface shape information of the target object;

[0188] The second mesh model is determined based on the target position information of each vertex, and then the second mesh model is attached to the surface of the target object.

[0189] Processor 601 is also used to implement the following functions:

[0190] The outermost vertices of the first mesh model are determined;

[0191] Ray collision detection is performed on the surface of the target object by the outermost vertex to determine the surface shape information of the target object.

[0192] Processor 601 is also used to implement the following functions:

[0193] Establish a first coordinate system for the first network model;

[0194] Each outermost vertex is controlled to emit rays along different coordinate axes of the first coordinate system to perform ray collision detection on the surface of the target object and determine the surface shape information of the target object.

[0195] Processor 601 is also used to implement the following functions:

[0196] If the surface shape information of the target object is planar, then the first coordinate system of the first mesh model is determined;

[0197] The position information of each vertex in the first coordinate system is determined as the target position information of each vertex.

[0198] Processor 601 is also used to implement the following functions:

[0199] If the surface shape information of the target object is an inner corner surface, then the first target model region where the first mesh model intersects with the surface of the target object is determined;

[0200] Identify the first vertex related to the first target model region from among multiple vertices;

[0201] Adjust the position of the first vertex to obtain the adjusted position information of the first vertex;

[0202] A second coordinate system is established based on the adjusted position information of the first vertex, and the target position information of each vertex is determined in the second coordinate system.

[0203] Processor 601 is also used to implement the following functions:

[0204] Determine the target distance between the center point of the bottom surface of the first mesh model and the first vertex;

[0205] The position of the first vertex is adjusted to the first surface of the target object based on the target distance, and the adjusted position information of the first vertex is obtained. The first surface is the surface of the target object facing the first mesh model and intersecting with the first mesh model.

[0206] Processor 601 is also used to implement the following functions:

[0207] The first collision point between the first mesh model and the first surface, as well as the location information of the first collision point, are determined.

[0208] Determine the vertical distance between the center point of the bottom surface of the first mesh model and the first surface;

[0209] Based on the position information of the first collision point, the vertical distance, and the target distance between the adjusted first vertex and the center point of the bottom surface, the position information of the adjusted first vertex is determined.

[0210] Processor 601 is also used to implement the following functions:

[0211] If the surface shape information of the target object is an outer corner surface, then the first coordinate system of the first mesh model is determined;

[0212] Among multiple vertices, identify the second vertex that emits a ray along the coordinate axis of the first coordinate system and fails to collide with the surface of the target object;

[0213] Adjust the position of the second vertex to obtain the adjusted position information of the second vertex;

[0214] Based on the adjusted position information of the second vertex and the position information of the other vertices among the multiple vertices excluding the second vertex, the target position information of each vertex is determined.

[0215] Processor 601 is also used to implement the following functions:

[0216] Determine the corner point corresponding to the outer corner of the target object on the horizontal axis of the first coordinate system, and the position information of the corner point;

[0217] Adjust the position of the second vertex based on the position information of the corner point to obtain the adjusted position information of the second vertex.

[0218] Processor 601 is also used to implement the following functions:

[0219] Determine the mapping point of the second vertex at a preset distance along the negative half-axis of the vertical axis in the first coordinate system;

[0220] Connect the mapping point and the center point of the bottom surface of the first mesh model to determine the second collision point with the second surface of the target object, as well as the position information of the second collision point. The second surface is the surface of the target object facing the mapping point.

[0221] Determine the foot of the second collision point on the horizontal axis of the first coordinate system, as well as the position information of the foot of the perpendicular point;

[0222] Based on the position information of the second collision point and the position information of the perpendicular point, the corner point corresponding to the outer corner of the target object on the horizontal axis of the first coordinate system is determined, as well as the position information of the corner point.

[0223] Processor 601 is also used to implement the following functions:

[0224] Determine the first horizontal axis distance and the first vertical axis distance of the second vertex in the first coordinate system;

[0225] Determine the distance of the corner point along the second horizontal axis in the first coordinate system;

[0226] The standard points on the second surface are determined based on the first horizontal axis distance and the second horizontal axis distance;

[0227] Determine the target position on the standard point that is perpendicular to the second surface and at a distance from the first vertical axis of the standard point. Adjust the second vertex to the target position to obtain the position information of the adjusted second vertex.

[0228] In this embodiment, the computer device acquires a first mesh model, which includes multiple vertices; determines the surface shape information of the target object to which the first mesh model is to be attached; determines the target position information of each vertex among the multiple vertices based on the surface shape information of the target object; determines a second mesh model based on the target position information of each vertex, and attaches the second mesh model to the surface of the target object. This allows the mesh model to change according to the surface shape of the target object to which it is to be attached, resulting in a more natural attachment of the mesh model to the target object.

[0229] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0230] Optional, such as Figure 14 As shown, the computer device 600 also includes: a touch screen display 603, a radio frequency circuit 604, an audio circuit 605, an input unit 606, and a power supply 607. The processor 601 is electrically connected to the touch screen display 603, the radio frequency circuit 604, the audio circuit 605, the input unit 606, and the power supply 607. Those skilled in the art will understand that... Figure 14 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0231] The touch display screen 603 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 603 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 601. It can also receive and execute commands from the processor 601. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 601 to determine the type of touch event. Subsequently, the processor 601 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 603 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 603 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 603 can also be used as part of the input unit 606 to achieve input functions.

[0232] In this embodiment, a processor 601 executes an application to generate a graphical user interface (GUI) on a touch display screen 603. The touch display screen 603 is used to present the GUI and receive user commands generated by the GUI.

[0233] The radio frequency circuit 604 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.

[0234] Audio circuitry 605 can be used to provide an audio interface between a user and a computer device via a speaker and a microphone. Audio circuitry 605 can convert received audio data into electrical signals and transmit them to the speaker, where the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 605, converted back into audio data, and then processed by processor 601 before being transmitted via radio frequency circuitry 604 to, for example, another computer device, or output to memory 602 for further processing. Audio circuitry 605 may also include an earphone jack to facilitate communication between peripheral headphones and computer devices.

[0235] The input unit 606 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0236] Power supply 607 is used to supply power to various components of computer device 600. Optionally, power supply 607 can be logically connected to processor 601 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 607 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0237] although Figure 14 As not shown in the diagram, computer device 600 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.

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

[0239] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0240] Therefore, embodiments of this application provide a computer-readable storage medium storing multiple computer programs that can be loaded by a processor to execute steps in any of the spiderweb effect implementation methods provided in embodiments of this application. For example, the computer program can execute the following steps:

[0241] Obtain the first mesh model, which includes multiple vertices;

[0242] Determine the surface shape information of the target object to which the first mesh model is to be attached;

[0243] Determine the target position information of each vertex among multiple vertices based on the surface shape information of the target object;

[0244] The second mesh model is determined based on the target position information of each vertex, and then the second mesh model is attached to the surface of the target object.

[0245] Computer programs can also execute:

[0246] The outermost vertices of the first mesh model are determined;

[0247] Ray collision detection is performed on the surface of the target object by the outermost vertex to determine the surface shape information of the target object.

[0248] Computer programs can also execute:

[0249] Establish a first coordinate system for the first network model;

[0250] Each outermost vertex is controlled to emit rays along different coordinate axes of the first coordinate system to perform ray collision detection on the surface of the target object and determine the surface shape information of the target object.

[0251] Computer programs can also execute:

[0252] If the surface shape information of the target object is planar, then the first coordinate system of the first mesh model is determined;

[0253] The position information of each vertex in the first coordinate system is determined as the target position information of each vertex.

[0254] Computer programs can also execute:

[0255] If the surface shape information of the target object is an inner corner surface, then the first target model region where the first mesh model intersects with the surface of the target object is determined;

[0256] Identify the first vertex related to the first target model region from among multiple vertices;

[0257] Adjust the position of the first vertex to obtain the adjusted position information of the first vertex;

[0258] A second coordinate system is established based on the adjusted position information of the first vertex, and the target position information of each vertex is determined in the second coordinate system.

[0259] Computer programs can also execute:

[0260] Determine the target distance between the center point of the bottom surface of the first mesh model and the first vertex;

[0261] The position of the first vertex is adjusted to the first surface of the target object based on the target distance, and the adjusted position information of the first vertex is obtained. The first surface is the surface of the target object facing the first mesh model and intersecting with the first mesh model.

[0262] Computer programs can also execute:

[0263] The first collision point between the first mesh model and the first surface, as well as the location information of the first collision point, are determined.

[0264] Determine the vertical distance between the center point of the bottom surface of the first mesh model and the first surface;

[0265] Based on the position information of the first collision point, the vertical distance, and the target distance between the adjusted first vertex and the center point of the bottom surface, the position information of the adjusted first vertex is determined.

[0266] Computer programs can also execute:

[0267] If the surface shape information of the target object is an outer corner surface, then the first coordinate system of the first mesh model is determined;

[0268] Among multiple vertices, identify the second vertex that emits a ray along the coordinate axis of the first coordinate system and fails to collide with the surface of the target object;

[0269] Adjust the position of the second vertex to obtain the adjusted position information of the second vertex;

[0270] Based on the adjusted position information of the second vertex and the position information of the other vertices among the multiple vertices excluding the second vertex, the target position information of each vertex is determined.

[0271] Computer programs can also execute:

[0272] Determine the corner point corresponding to the outer corner of the target object on the horizontal axis of the first coordinate system, and the position information of the corner point;

[0273] Adjust the position of the second vertex based on the position information of the corner point to obtain the adjusted position information of the second vertex.

[0274] Computer programs can also execute:

[0275] Determine the mapping point of the second vertex at a preset distance along the negative half-axis of the vertical axis in the first coordinate system;

[0276] Connect the mapping point and the center point of the bottom surface of the first mesh model to determine the second collision point with the second surface of the target object, as well as the position information of the second collision point. The second surface is the surface of the target object facing the mapping point.

[0277] Determine the foot of the second collision point on the horizontal axis of the first coordinate system, as well as the position information of the foot of the perpendicular point;

[0278] Based on the position information of the second collision point and the position information of the perpendicular point, the corner point corresponding to the outer corner of the target object on the horizontal axis of the first coordinate system is determined, as well as the position information of the corner point.

[0279] Computer programs can also execute:

[0280] Determine the first horizontal axis distance and the first vertical axis distance of the second vertex in the first coordinate system;

[0281] Determine the distance of the corner point along the second horizontal axis in the first coordinate system;

[0282] The standard points on the second surface are determined based on the first horizontal axis distance and the second horizontal axis distance;

[0283] Determine the target position on the standard point that is perpendicular to the second surface and at a distance from the first vertical axis of the standard point. Adjust the second vertex to the target position to obtain the position information of the adjusted second vertex.

[0284] In this embodiment, the computer device acquires a first mesh model, which includes multiple vertices; determines the surface shape information of the target object to which the first mesh model is to be attached; determines the target position information of each vertex among the multiple vertices based on the surface shape information of the target object; determines a second mesh model based on the target position information of each vertex, and attaches the second mesh model to the surface of the target object. This allows the mesh model to change according to the surface shape of the target object to which it is to be attached, resulting in a more natural attachment of the mesh model to the target object.

[0285] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0286] Since the computer program stored in the storage medium can execute the steps in any of the spider web effect implementation methods provided in the embodiments of this application, it can achieve the beneficial effects that any of the spider web effect implementation methods provided in the embodiments of this application can achieve, as detailed in the preceding embodiments, and will not be repeated here.

[0287] The foregoing has provided a detailed description of a method, apparatus, computer device, and storage medium for achieving a spider web effect according to embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for achieving a spider web effect, characterized in that, include: Obtain a first mesh model, which includes multiple vertices; Determine the surface shape information of the target object to which the first mesh model is to be attached; Determine the target position information of each of the plurality of vertices based on the surface shape information of the target object; A second mesh model is determined based on the target position information of each vertex, and the second mesh model is attached to the surface of the target object. The step of determining the surface shape information of the target object to which the first mesh model is to be attached includes: The outermost vertices of the first mesh model are determined; Ray collision detection is performed on the surface of the target object using the outermost vertex to determine the surface shape information of the target object.

2. The method for achieving the spider web effect according to claim 1, characterized in that, The step of performing ray collision detection on the surface of the target object through the outermost vertex to determine the surface shape information of the target object includes: Establish a first coordinate system for the first mesh model; Each outermost vertex is controlled to emit rays along different coordinate axes of the first coordinate system to perform ray collision detection on the surface of the target object and determine the surface shape information of the target object.

3. The method for achieving the spider web effect according to claim 1, characterized in that, Determining the target position information of each of the plurality of vertices based on the surface shape information of the target object includes: If the surface shape information of the target object is planar, then the first coordinate system of the first mesh model is determined; The position information of each vertex in the plurality of vertices in the first coordinate system is determined as the target position information of each vertex.

4. The method for achieving the spider web effect according to claim 1, characterized in that, Determining the target position information of each of the plurality of vertices based on the surface shape information of the target object includes: If the surface shape information of the target object is an inner corner surface, then the first target model region where the first mesh model intersects with the surface of the target object is determined; The first vertex related to the first target model region is determined from the plurality of vertices; Adjust the position of the first vertex to obtain the adjusted position information of the first vertex; A second coordinate system is established based on the adjusted position information of the first vertex, and the target position information of each vertex is determined in the second coordinate system.

5. The method for achieving the spider web effect according to claim 4, characterized in that, The step of adjusting the position of the first vertex to obtain the adjusted position information of the first vertex includes: Determine the target distance between the center point of the bottom surface of the first mesh model and the first vertex; The position of the first vertex is adjusted to the first surface of the target object according to the target distance to obtain the adjusted position information of the first vertex. The first surface is the surface of the target object facing the first mesh model and intersecting with the first mesh model.

6. The method for achieving the spider web effect according to claim 5, characterized in that, The step of adjusting the position of the first vertex to the first surface of the target object based on the target distance to obtain the adjusted position information of the first vertex includes: The first collision point between the first mesh model and the first surface, as well as the position information of the first collision point, are determined. Determine the vertical distance between the center point of the bottom surface of the first mesh model and the first surface; The position information of the adjusted first vertex is determined based on the position information of the first collision point, the vertical distance, the target distance between the adjusted first vertex and the center point of the bottom surface.

7. The method for achieving the spider web effect according to claim 1, characterized in that, Determining the target position information of each of the plurality of vertices based on the surface shape information of the target object includes: If the surface shape information of the target object is an outer corner surface, then the first coordinate system of the first mesh model is determined; Among the plurality of vertices, a second vertex is identified that emits a ray along the coordinate axis of the first coordinate system and fails to collide with the surface of the target object. Adjust the position of the second vertex to obtain the adjusted position information of the second vertex; Based on the adjusted position information of the second vertex and the position information of the other vertices among the plurality of vertices excluding the second vertex, the target position information of each vertex is determined.

8. The method for achieving the spider web effect according to claim 7, characterized in that, The step of adjusting the position of the second vertex to obtain the adjusted position information of the second vertex includes: Determine the corner point of the outer corner of the target object on the horizontal axis of the first coordinate system, and the position information of the corner point; The position of the second vertex is adjusted based on the position information of the corner point to obtain the adjusted position information of the second vertex.

9. The method for achieving the spider web effect according to claim 8, characterized in that, The determination of the corner point corresponding to the outer corner of the target object on the horizontal axis of the first coordinate system, and the position information of the corner point, includes: Determine the mapping point of the second vertex at a preset distance along the negative half-axis of the vertical axis in the first coordinate system; Connect the mapping point and the center point of the bottom surface of the first mesh model to determine the second collision point with the second surface of the target object, and the position information of the second collision point, wherein the second surface is the surface of the target object facing the mapping point; Determine the perpendicular point of the second collision point on the horizontal axis of the first coordinate system, and the position information of the perpendicular point; Based on the position information of the second collision point and the position information of the perpendicular point, the corner point corresponding to the outer corner of the target object on the horizontal axis of the first coordinate system is determined, as well as the position information of the corner point.

10. The method for achieving the spider web effect according to claim 9, characterized in that, The step of adjusting the position of the second vertex based on the position information of the corner point to obtain the adjusted position information of the second vertex includes: Determine the first horizontal axis distance and the first vertical axis distance of the second vertex in the first coordinate system; Determine the distance of the corner point along the second horizontal axis in the first coordinate system; The standard points on the second surface are determined based on the first horizontal axis distance and the second horizontal axis distance; A target position is determined on the standard point that is perpendicular to the second surface and at a distance from the first vertical axis of the standard point. The second vertex is then adjusted to the target position to obtain the position information of the adjusted second vertex.

11. A device for achieving a spider web effect, characterized in that, include: The acquisition module is used to acquire a first mesh model, which includes multiple vertices; The first determining module is used to determine the outermost vertices of the first mesh model, and to perform ray collision detection on the surface of the target object through the outermost vertices to determine the surface shape information of the target object to which the first mesh model is to be attached. The second determining module is used to determine the target position information of each of the plurality of vertices based on the surface shape information of the target object; The setting module is used to determine the second mesh model based on the target position information of each vertex, and attach the second mesh model to the surface of the target object.

12. A computer device, characterized in that, include: A memory storing executable program code, and a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the method for implementing the spider web effect as described in any one of claims 1 to 10.

13. A storage medium, characterized in that, The storage medium stores a plurality of instructions adapted for loading by a processor to execute the method for implementing the spider web effect as described in any one of claims 1 to 10.