Flow animation generation method and device, electronic equipment and readable storage medium
By acquiring a mesh-like planar model and a mucus flow direction curve, and combining the target height and offset value, the flow animation of the mucus model is automatically generated, solving the problem of low generation efficiency in existing technologies and achieving more efficient flow animation generation.
Patent Information
- Application Number
- CN202211578874.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-05
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-12-05
AI Technical Summary
The existing technology for generating flow animations of 3D slime models is inefficient, mainly because slime models with different shapes and flow directions have different requirements, and relying on manual simulation results in excessive time consumption.
By acquiring the mesh-like planar model, the slime flow direction curve, the target height value, and the target offset value, the flow animation is generated by controlling the vertices to offset along the flow direction curve. The game engine is used to automatically process the structure and flow of the slime model.
It improves the efficiency of generating fluid animations, simplifies the design process of slime models, reduces manual intervention, and enhances generation speed and accuracy.
Smart Images

Figure CN115880402B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game technology, specifically to a method, apparatus, electronic device, and computer-readable storage medium for generating flowing animation. Background Technology
[0002] With the rise of the internet, entertainment has become increasingly important in people's lives. In order to meet the needs of slime effects in some entertainment projects (such as animated films and games), the slime effects need to be presented as a flowing animation composed of three-dimensional slime models in at least one frame of the image.
[0003] The generation of existing 3D slime models requires manual simulation through fluid calculations to create slime models that meet the needs of relevant personnel. However, since the shape, flow direction, and other aspects of slime models vary depending on the specific needs, relying solely on manual simulation would undoubtedly consume a significant amount of time, resulting in low efficiency in generating flow animations. Summary of the Invention
[0004] This application provides a method, apparatus, electronic device, and computer-readable storage medium for generating flowing animations, which can improve the efficiency of generating flowing animations.
[0005] In a first aspect, embodiments of this application provide a method for generating a flowing animation, the method comprising:
[0006] Obtain a mesh-like planar model of the slime model to be generated, wherein the mesh on the mesh-like planar model is divided by at least two annular mesh lines and at least two cutting mesh lines that intersect the annular mesh lines, and the intersection of the annular mesh lines and the cutting mesh lines is the vertex of the slime model;
[0007] Obtain the mucus flow direction curve;
[0008] Obtain the target height and target offset values corresponding to the above vertices;
[0009] Based on the target height value and the target offset value, the vertex is controlled to offset along the flow direction curve of the slime to generate the flow animation of the slime model.
[0010] Secondly, embodiments of this application also provide a motion animation generation apparatus, the apparatus comprising:
[0011] The model acquisition module is used to acquire the mesh-like planar model of the slime model to be generated, wherein the mesh on the mesh-like planar model is divided by at least two annular mesh lines and at least two cutting mesh lines that intersect with the annular mesh lines, and the intersection of the annular mesh lines and the cutting mesh lines is the vertex of the slime model.
[0012] The curve acquisition module is used to acquire the flow direction curve of the mucus;
[0013] The information acquisition module is used to acquire the target height value and target offset value corresponding to the above-mentioned vertices;
[0014] The model generation module is used to control the vertex to offset along the flow direction curve of the slime according to the target height value and the target offset value, so as to generate the flow animation of the slime model.
[0015] Thirdly, embodiments of this application also provide an electronic device, including a memory storing multiple instructions; the processor loads instructions from the memory to execute steps in any of the motion animation generation methods provided in embodiments of this application.
[0016] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the motion animation generation methods provided in embodiments of this application.
[0017] In this embodiment, a mesh-like planar model of the slime model to be generated is obtained. The mesh on this model is divided by at least two annular mesh lines and at least two intersecting mesh lines. The intersection points of the annular and intersecting mesh lines are the vertices of the slime model. This allows the planar structure of the slime model to be determined based on the mesh-like planar model. Then, a slime flow direction curve is obtained to determine the flow direction of the slime model. Next, the target height and target offset values corresponding to the vertices are obtained. Based on these values, the positions of the vertices on the annular mesh lines within the slime model are determined. By controlling the vertices to shift along the slime flow direction curve according to the target height and target offset values, a flow animation of the slime model is generated, thereby improving the efficiency of the flow animation generation. 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 schematic diagram of the motion animation generation system provided in an embodiment of this application;
[0020] Figure 2 This is a schematic flowchart of one embodiment of the motion animation generation method provided in this application.
[0021] Figure 3a This is a schematic diagram of the grid-like planar model provided in the embodiments of this application;
[0022] Figure 3b This is a schematic diagram of the assigned mesh-like planar model provided in the embodiments of this application;
[0023] Figure 4 This is a schematic diagram of the mucus flow direction curve provided in the embodiments of this application;
[0024] Figure 5a This is a schematic diagram of the mapped mucus flow direction curve provided in the embodiments of this application;
[0025] Figure 5b This is a schematic diagram of the mapped mesh-like planar model provided in the embodiments of this application;
[0026] Figure 6a This is a schematic diagram of the mucus height curve provided in the embodiments of this application;
[0027] Figure 6b This is a schematic diagram of the mucus displacement curve provided in the embodiments of this application;
[0028] Figure 7 This is a schematic diagram of a mucus model provided in an embodiment of this application;
[0029] Figure 8a This is a schematic diagram of the tangent lines at various points on the mucus flow direction curve provided in the embodiments of this application;
[0030] Figure 8b This is a schematic diagram of the normals of the vertices after rotational transformation provided in an embodiment of this application;
[0031] Figure 9 This is a schematic diagram of the texture storing the animation information provided in the embodiments of this application;
[0032] Figure 10 This is another schematic diagram of the mucus model provided in the embodiments of this application;
[0033] Figure 11 This is a schematic diagram of the structure of the motion animation generation device provided in the embodiments of this application;
[0034] Figure 12 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0035] 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.
[0036] Before providing a detailed explanation of the embodiments of this application, some terms involved in the embodiments of this application will be explained.
[0037] In the description of the embodiments of this application, the terms "first," "second," etc., may be used herein to describe various concepts, but unless specifically stated otherwise, these concepts are not limited by these terms. These terms are used only to distinguish one concept from another. 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 device that includes 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 these processes, methods, products, or devices.
[0038] This application provides a method, apparatus, electronic device, and computer-readable storage medium for generating flowing animation. Specifically, the method for generating flowing animation in this application can be executed by a game engine installed in an electronic device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, touchscreen, game console, personal computer (PC), personal digital assistant (PDA), or other terminal device. The terminal can also include a client, which can be a game application client, a browser client carrying a game program, or an instant messaging client. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0039] For example, such as Figure 1As shown, taking the application of a game engine in an electronic device as an example, the game engine can obtain a mesh-like planar model of the slime model to be generated. The mesh on the mesh-like planar model is divided by at least two circular mesh lines and at least two dividing mesh lines that intersect with the circular mesh lines. The intersection of the circular mesh lines and the dividing mesh lines is the vertex of the slime model. The engine can obtain the slime flow direction curve, obtain the target height value and target offset value corresponding to the vertex, and control the vertex to offset along the slime flow direction curve according to the target height value and the target offset value to generate the flow animation of the slime model.
[0040] To address the aforementioned issues, this application provides a method, apparatus, electronic device, and computer-readable storage medium for generating flowing animations, which can improve the efficiency of generating flowing animations.
[0041] The following is a detailed description in conjunction with the accompanying drawings. It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments. Although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than that shown in the drawings.
[0042] In this embodiment, a game engine is used as the execution subject for illustration. This embodiment provides a method for generating flowing animations, such as... Figure 2 As shown, the specific process of this motion animation generation method can be summarized as follows:
[0043] 201. Obtain the mesh-like planar model of the slime model to be generated, wherein the mesh on the mesh-like planar model is divided by at least two annular mesh lines and at least two cutting mesh lines that intersect with the annular mesh lines, and the intersection of the annular mesh lines and the cutting mesh lines is the vertex of the slime model.
[0044] The aforementioned slime model to be generated can be applied to virtual game scenes. For example, slime models can be designed and generated for slime effects in virtual game scenes. Since slime effects in virtual game scenes include static effects and dynamic effects, and different slime effects require different numbers of frames in the image frames of the flowing animation, each image frame corresponds to a slime model of a specific shape. Thus, the slime model in at least one image frame is used to generate the flowing animation that can present the slime effect.
[0045] For example, if a dynamic slime effect is required to be presented in the current virtual game scene, and the dynamic slime effect is to be presented by a flowing animation composed of 10 image frames, then a corresponding slime model needs to be designed in each of the 10 image frames, so as to generate the flowing animation corresponding to the above-mentioned dynamic slime effect through the slime model of the 10 image frames.
[0046] The aforementioned mesh-like planar model can serve as the structural basis for generating the slime model to be generated. By processing this model, the slime model can be generated. The mesh-like planar model includes, but is not limited to, circles, rectangles, or triangles, depending on the requirements. The aforementioned mesh-like planar model contains multiple meshes, which are used to indicate the specific topological structure of the slime model when displayed on a plane.
[0047] It is understandable that different shapes of the mesh-like planar model correspond to different shapes of the slime model. For example, if the mesh-like planar model is circular, the generated slime model will have a rounded effect; if the mesh-like planar model is rectangular, the generated slime model will have a sharp and angular effect.
[0048] In this mesh-like planar model, the annular grid lines and the dividing grid lines intersect, and the intersection points are the points that make up the grid. The annular grid lines are used to divide a planar model into nested annular structures; for example, if the planar model is circular, then the annular structure is a ring. The dividing grid lines are used to further divide the annular structure so that multiple grids exist on the planar model, thus obtaining a mesh-like planar model.
[0049] For example, if the planar model is set to be circular, multiple meshes can be divided on the planar model using annular mesh lines and dividing mesh lines, such as... Figure 3a As shown, it can be understood that in this example, the game engine uses an optimization strategy to perform edge processing on the circular planar model, retaining only the mesh used to indicate the structure of the slime model, that is, only retaining... Figure 3a The mesh shown is used instead of retaining the mesh containing the smoothed edges in the divided planar model, thus ensuring the display effect of the generated slime model.
[0050] It is understandable that, since the mesh on the mesh-like planar model is used to indicate the structure of the slime model when it is displayed on the plane, and the mesh on the mesh-like planar model is divided by ring mesh lines and dividing mesh lines, that is, the points that make up the mesh on the mesh-like planar model are the intersections of the aforementioned ring mesh lines and dividing mesh lines, which are also the vertices of the aforementioned slime model, in this embodiment, the game engine can determine the vertices on the mesh-like planar model by obtaining the mesh-like planar model, so as to adjust the structural attribute parameters of the slime model, such as the height value of a certain point of the slime model, by controlling the vertices, thereby generating a slime model of the corresponding image frame that meets the needs of the relevant staff, so as to ultimately generate a flowing animation that meets the needs of the relevant staff.
[0051] In some embodiments, the aforementioned mesh-like planar model can be pre-designed. When the game engine receives a slime model design instruction, the slime model design instruction includes model requirement information of relevant staff for the mesh-like planar model. The game engine can directly obtain a mesh-like planar model that meets the requirements of relevant staff from a preset model set based on the model requirement information of relevant staff carried in the slime model design instruction. The model set includes at least one type of mesh-like planar model, such as a circular mesh-like planar model or a rectangular mesh-like planar model.
[0052] In some embodiments, the aforementioned mesh-like planar model can also be generated in real time. That is, when the game engine receives a slime model design instruction, the game engine can directly divide a planar model with ring-shaped mesh lines and dividing mesh lines in real time based on the model requirement information of the relevant personnel carried in the slime model design instruction, thereby obtaining a mesh-like planar model that meets the requirements of the relevant personnel. The model requirement information includes, but is not limited to, mesh size, mesh style, or mesh relative relationships, where the mesh relative relationship is used to indicate whether the mesh is divided equally.
[0053] In some embodiments, the game engine can set the number of rings and segments to divide a planar model into a mesh, resulting in a mesh-like planar model. The number of rings indicates the number of ring-shaped mesh lines, specifying how many ring structures need to be divided on the planar model; while the number of segments indicates the number of dividing mesh lines. It is understood that the number of ring-shaped mesh lines and dividing mesh lines can be set according to requirements, and the more ring-shaped mesh lines and dividing mesh lines there are, the finer the mesh will be, resulting in a better display effect for the generated slime model.
[0054] The game engine can determine the division distances corresponding to the number of rings and segments based on the size of the planar model. For example, if the planar model is a circle, the distance between each ring grid line can be determined based on the radius of the circle and the number of rings. In addition, the distance between a segment of the dividing grid line and an adjacent segment of an adjacent dividing grid line can be determined based on the circumference of the circle and the number of segments.
[0055] Specifically, the game engine can use the polyextrude method to mesh the planar model to obtain a mesh-like planar model. During the loop, the game engine can record the number of layers of the ring mesh in which the vertex is located in the vertex's attribute hierarchy.
[0056] In some embodiments, to facilitate control of vertices on the mesh-like planar model, values can be assigned to the vertices on the mesh-like planar model. Specifically, values are assigned to vertices on each loop mesh line based on the layer number of each loop mesh line in the aforementioned mesh-like planar model, wherein all vertices on each loop mesh line have the same value, and there is a one-to-one correspondence between the layer number of the loop mesh line and the value of the vertex on the loop mesh line.
[0057] Understandably, based on the characteristics of the slime model, in this embodiment, the game engine generates the corresponding slime model by uniformly controlling all vertices on each ring-shaped mesh line, thereby accelerating the generation speed of the slime model and ultimately improving the generation efficiency of the flowing animation. Furthermore, to facilitate the generation of the same flowing animation in another game engine, it is necessary to store the slime attribute information of each vertex required to generate at least one image frame of the slime model. However, if uniform control is applied to all vertices on each ring-shaped mesh line, then each ring-shaped mesh line only needs to correspond to one set of slime attribute information. That is, all vertices on the ring-shaped mesh line can generate the slime model based on this slime attribute information. Therefore, in this embodiment, by assigning values to vertices on the ring-shaped mesh line based on its layer number in the mesh-like planar model, the association between vertices and the layer number of the ring-shaped mesh line in which the vertex is located is realized. This facilitates later retrieval of corresponding data based on the layer number of the ring-shaped mesh line and the corresponding processing of the vertices on that ring-shaped mesh line.
[0058] For example, such as Figure 3b As shown, Figure 3b There are 9 circular grid lines. Vertices on the first-layer circular grid line are assigned a value of 0 (i.e., the value of a vertex on the first-layer circular grid line is 0); vertices on the second-layer circular grid line are assigned a value of 1 (i.e., the value of a vertex on the second-layer circular grid line is 1); vertices on the third-layer circular grid line are assigned a value of 2 (i.e., the value of a vertex on the third-layer circular grid line is 2); vertices on the fourth-layer circular grid line are assigned a value of 3 (i.e., the value of a vertex on the fourth-layer circular grid line is 3); and vertices on the fifth-layer circular grid line are assigned a value of 3. The value is assigned to 4, meaning the vertex on the fifth layer of the ring grid has a value of 4; the value is assigned to 5, meaning the vertex on the sixth layer of the ring grid has a value of 5; the value is assigned to 6, meaning the vertex on the seventh layer of the ring grid has a value of 6; the value is assigned to 7, meaning the vertex on the eighth layer of the ring grid has a value of 7; and the value is assigned to 8, meaning the vertex on the ninth layer of the ring grid has a value of 8.
[0059] 202. Obtain the mucus flow direction curve.
[0060] The aforementioned slime flow direction curve is used to indicate the direction and path of the slime model's flow in each image frame of the animation. For example, if the animation presents a slime rising effect, the slime flow direction curve indicates the upward path of the slime model; if the animation presents a slime horizontal flow effect, the slime flow direction curve indicates the horizontal flow path of the slime model. In this embodiment, the game engine can use the slime flow direction curve to stretch a mesh-like planar model to obtain the slime model required by relevant personnel, such as... Figure 4 As shown, Figure 4 This is a schematic diagram of the mucus flow direction curve. Figure 4 (0,0,0) in the diagram represents the starting point of the mucus flow direction curve, which corresponds to the position of the grid-like planar model.
[0061] In some embodiments, the aforementioned slime flow direction curve can be pre-designed. When the game engine receives a slime model design instruction, the slime model design instruction also includes relevant staff's slime flow requirements for the slime model. The game engine can directly obtain a slime flow direction curve that meets the requirements of the relevant staff from a preset set of flow direction curves based on the slime flow requirements information of the relevant staff carried in the slime model design instruction. The model set includes at least one type of slime flow direction curve, such as a slime flow direction curve with an upward direction and a slime flow direction curve with a downward direction.
[0062] In some embodiments, the above-mentioned mucus flow direction curve can also be generated in real time. The mucus flow direction curve can be generated automatically by the game engine or drawn by relevant personnel to generate the mucus flow direction curve required by the relevant personnel. No limitation is made here.
[0063] Specifically, if the game engine automatically generates the slime flow direction curve, then when the game engine receives a slime model design instruction, it can directly generate a slime flow direction curve that meets the slime flow requirements of the relevant personnel, based on the slime flow requirement information carried in the slime model design instruction. This slime flow requirement information includes, but is not limited to, the slime flow direction, the slope of the slime flow direction curve, and the height of the slime flow direction curve.
[0064] Specifically, if the relevant personnel draw the slime flow direction curve themselves, the game engine can provide a direction curve drawing page and display it, allowing the relevant personnel to draw the slime flow direction curve based on this page. For example, a direction curve drawing control can be set in the direction curve drawing interface. This direction curve drawing control is equivalent to a node, and the relevant personnel can generate the corresponding slime flow direction curve by dragging the direction curve drawing control on the direction curve drawing page.
[0065] In some embodiments, since the mesh-like planar model needs to be processed into a three-dimensional slime model based on the slime flow direction curve, the game engine can set a preset number of curve points in the slime flow direction curve. That is, the preset number of curve points constitute the slime flow direction curve, and the preset number of curve points represent the slime flow direction curve. This allows the game engine to process the mesh-like planar model by controlling the preset number of curve points accordingly, thereby generating the slime model required by the relevant personnel.
[0066] It is understood that in this embodiment, a preset number of curve points need to be recorded so that the mesh-like planar model can be processed accordingly using these preset number of curve points later. Therefore, the game engine can base its analysis on the starting point of the slime flow direction curve, i.e. Figure 4 The value (0,0,0) is used to assign values to a preset number of curve points according to their arrangement. That is, the first curve point has a value of 0 and its coordinates in 3D space are (0,0,0), the second curve point has a value of 1, the third curve point has a value of 2, and so on, until the last curve point has a value of the preset number minus 1.
[0067] Furthermore, since the corresponding slime model needs to be generated based on the slime flow direction curve and the mesh-like planar model, and the game engine can process the vertices on each annular mesh line according to the number of layers, in the process of generating the slime model, to facilitate the processing of the number of layers of each annular mesh line and the point values of the slime flow direction curve, the number of layers of each annular mesh line and the point values of the slime flow direction curve can be mapped to values in the same space.
[0068] Specifically, the game engine can map the number of layers in each ring grid and the point values of the curve points of the slime flow direction curve to numerical values in two-dimensional space.
[0069] The game engine can use UV unwrapping to map the slime flow direction curve in two-dimensional space, and based on the point values of the curve points, map the point values to a preset numerical range, such as 0 to 1. The game engine can then record the mapped point values using a UV file.
[0070] For example, such as Figure 5a As shown, if the current mucus flow direction curve has 11 curve points, the value of each curve point is sequentially from 0 to 10, and the preset value range is set to 0 to 1. Figure 5a The vertical axis of the mucus flow direction curve is 0, and the coordinates of each curve point on the horizontal axis are determined based on the point value of the curve point, i.e., 0, 0.1, 0.2, ..., 1.
[0071] The game engine can use UV unwrapping to map the number of layers of each ring-shaped mesh line in two-dimensional space, and based on the number of layers of each ring-shaped mesh line, map the number of layers of each ring-shaped mesh line to a preset numerical range, for example, the preset numerical range can be 0 to 1. The game engine can use another UV file to record the mapped value of the number of layers of each ring-shaped mesh line. This recording method can be similar to... Figure 5a The values can be recorded using coordinate axes or by color to represent the numerical values mapped to different ring grid layers.
[0072] For example, such as Figure 5b As shown, Figure 5b The colors of the annular grid lines or the grids divided by the annular grid lines in the grid-like planar model represent the numerical values mapped from the annular grid lines in different layers.
[0073] 203. Obtain the target height and target offset values corresponding to the above vertices.
[0074] To obtain the target height, since the vertices on each ring mesh line need to be stretched to generate the corresponding slime model, it is necessary to determine the target height value corresponding to each vertex. Based on the target height value, the vertices on each ring mesh line are stretched to obtain the three-dimensional structure of the slime model.
[0075] Specifically, the target height value can be the distance between the center point of the annular grid line where the vertex is located on the slime flow direction curve and the starting point of the slime flow direction curve; the target height value can also be the height of the vertex relative to the bottom of the slime model, that is, the height between the vertex and the position of the grid-like planar model. This is not limited here, and the specific setting depends on the actual needs of the slime model. It is understandable that different reference points corresponding to the target height value will lead to different methods of controlling vertex movement based on that target height value.
[0076] In some embodiments, the game engine can obtain a slime height curve. One axis of this curve indicates the layer number of the looping mesh line within the mesh-like planar model, while the other axis indicates the height of a vertex on the looping mesh line. Thus, the game engine can obtain the target height value corresponding to a vertex on each looping mesh line from the slime height curve based on the layer number of each looping mesh line within the mesh-like planar model. This allows for convenient adjustment of the height of different vertices in the slime model, thereby changing the model's shape. The two axes of the slime height curve are the horizontal and vertical axes.
[0077] In some embodiments, the slime height curve containing the correspondence between the number of layers of the ring grid lines and the height of the vertices on the ring grid lines can be pre-designed. That is, when the game engine receives a slime model design instruction, the slime model setting instruction includes the height requirement information of the relevant staff for the slime model. The game engine can directly obtain a slime height curve that meets the requirements of the relevant staff from a preset height mapping set based on the height requirement information of the relevant staff carried in the slime model setting instruction.
[0078] In some embodiments, the slime height curve containing the correspondence between the number of layers of the annular grid lines and the height of the vertices on the annular grid lines can be generated in real time. The slime height curve can be generated automatically by a game engine or drawn by relevant personnel to generate the slime height curve required by the relevant personnel. No limitation is made here.
[0079] Specifically, if the game engine automatically generates the slime height curve, then when the game engine receives a slime model design instruction, it can directly generate a slime height curve that meets the needs of the relevant personnel based on the height requirement information of the relevant personnel carried in the slime model design instruction. This height requirement information includes, but is not limited to, the slope of the slime height curve, the speed of slime flow, and the style requirements of the slime model.
[0080] Specifically, if the relevant personnel draw the slime height curve themselves, the game engine can provide a slime adjustment panel. This panel includes an adjustable slime height curve. By displaying this panel, the game engine allows personnel to draw or adjust the slime height curve, improving their control over the slime model. Figure 6aAs shown, relevant personnel adjust the slime height curve accordingly, such as dragging a certain position on the slime height curve upwards or downwards, so that the game engine can obtain the operation information of the slime height curve, and then control the change of the slime height curve according to the operation information to obtain the changed slime height curve.
[0081] Understandable Figure 6a The values displayed on the horizontal axis represent the mapped values corresponding to the number of layers in each ring grid line, ranging from 0 to 1. Furthermore, the game engine can... Figure 6a The height of the vertical axis is also set to the range of 0 to 1, thereby determining the point values of the mapped slime curve points on the slime flow direction curve within the range of 0 to 1. Figure 6a The position of the height corresponding to the vertex of a certain layer on the curve of the direction of mucus flow.
[0082] In some embodiments, the above-described mucus adjustment panel further includes a height curve template control corresponding to the mucus height curve, such as... Figure 6a As shown, a slime height curve is obtained by triggering the height curve template control. The slime height curve corresponding to the triggered height curve template is displayed in the curve display area of the slime adjustment panel. The curve corresponding to the slime height curve template is adjusted to obtain the changed slime height curve.
[0083] In some embodiments, the above-mentioned mucus adjustment template further includes a height setting control corresponding to the mucus height curve. This height setting control includes, but is not limited to, a position input control and a height adjustment control, such as... Figure 6a As shown, the game engine can determine the position of the curve to be adjusted on the slime height curve through the position input control, and then drag the curve position up or down, or control the height adjustment control based on the position to adjust the height of the position, thereby changing the slime height curve and obtaining the changed slime height curve.
[0084] Regarding the obtained target offset value, since the slime model has a stringy effect, the diameter of the cut surface corresponding to different positions of the slime model is different. By introducing a target offset value in this embodiment, the diameter of the cut surface corresponding to different positions of the slime model is different. The target offset value is used to indicate the relative distance between the vertex of each ring grid line and the center point of the ring grid line on the slime flow direction curve.
[0085] Specifically, the aforementioned target offset value can be either the offset value of a vertex on each ring-shaped grid line moving towards the center point of the mucus flow direction curve, or the offset value of the center point of the mucus flow direction curve moving towards a vertex on each ring-shaped grid line; neither is limited here. It is understood that different directions of the aforementioned target offset value will lead to different methods of controlling vertex movement based on that target offset value. For example, it could be controlling the vertex to move from the edge of the ring-shaped grid line towards the center point, or controlling the vertex to move from the center point towards its position on the edge of the ring-shaped grid line.
[0086] In some embodiments, the game engine can obtain a slime offset curve. One axis of this curve indicates the layer number of the looping mesh line within the mesh-like planar model, while the other axis indicates the offset value corresponding to a vertex on the looping mesh line. Thus, the game engine can obtain the target offset value corresponding to a vertex on each looping mesh line from the slime offset curve based on the layer number of each looping mesh line within the mesh-like planar model. This allows for convenient adjustment of the offset values of different vertices in the slime model to change its shape. The two axes of the slime offset curve are the horizontal and vertical axes.
[0087] In some embodiments, the slime offset curve, which includes the correspondence between the number of layers of the ring grid lines and the offset values corresponding to the vertices on the ring grid lines, can be pre-designed. That is, when the game engine receives a slime model design instruction, the slime model setting instruction includes the offset value requirements of the relevant staff for the slime model. The game engine can directly obtain a slime offset curve that meets the requirements of the relevant staff from a preset offset value mapping set based on the offset value requirements of the relevant staff carried in the slime model setting instruction.
[0088] In some embodiments, the slime offset curve, which includes the correspondence between the number of layers of the annular grid lines and the offset values corresponding to the vertices on the annular grid lines, can be generated in real time.
[0089] The lines can be generated automatically by the game engine or drawn by relevant staff, thus generating the slime offset curves required by the relevant staff. No limitation is made here.
[0090] Specifically, if the slime offset curve is automatically generated by the game engine, then when the game engine receives the slime model design instruction, the game engine can directly generate a slime offset curve that meets the requirements of the relevant staff based on the offset value requirement information of the relevant staff carried in the slime model design instruction.
[0091] The aforementioned offset value requirements include, but are not limited to, the slope of the slime offset curve, the zero velocity of slime flow, and the style requirements of the slime model.
[0092] Specifically, if the slime offset curve is drawn by the relevant personnel themselves, the game engine can provide a slime adjustment panel. This slime adjustment panel includes an adjustable slime offset curve. The game engine displays this slime adjustment panel to allow the relevant personnel to adjust the slime offset curve accordingly.
[0093] The ability to plot or adjust mucus offset curves in the system improves the ease with which staff can control the mucus model. For example, 5 Figure 6b As shown, relevant personnel made corresponding adjustments to the mucus displacement curve, such as adjusting the mucus...
[0094] Dragging a certain position on the slime offset curve upwards or downwards causes the game engine to obtain operation information for that slime offset curve, and then controls the change of the slime offset curve according to the operation information to obtain the changed slime offset curve.
[0095] Understandable Figure 6b The values displayed on the horizontal axis are the mapped values corresponding to the layer 0 number of each annular grid line when mapped to a range of 0 to 1. For easier viewing, [the values are shown in the original text]. Figure 6b The text does not provide an illustration; please refer to the provided text for details. Figure 6a As shown. Furthermore, the game engine can... Figure 6b The offset value of the vertical axis is also set to the range of 0 to 1, thereby determining the mapped point value of the mucus curve points on the mucus flow direction curve within the range of 0 to 1. Figure 6b The offset value corresponding to a vertex of a certain layer is located on the curve representing the direction of mucus flow. Figure 6b The positive and negative values of the vertical axis are used to indicate direction.
[0096] 5. In some embodiments, the above-mentioned mucus adjustment panel further includes an offset value corresponding to the mucus offset curve.
[0097] Curve template control, such as Figure 6b As shown, by triggering the offset value curve template control, a slime offset curve is obtained. The slime offset curve corresponding to the triggered offset value curve template is displayed in the curve display area of the slime adjustment panel. The curve corresponding to the slime offset curve template is adjusted to obtain the changed slime offset curve.
[0098] In some embodiments, the above-mentioned mucus adjustment template further includes an offset value setting control corresponding to the mucus offset curve. This offset value setting control includes, but is not limited to, a position input control and an offset value adjustment control, such as... Figure 6bAs shown, the game engine can determine the position of the curve to be adjusted on the slime offset curve through the position input control, and then drag the curve position up or down, or control the offset value adjustment control based on the position to adjust the offset value at the position, thereby changing the slime offset curve and obtaining the changed slime offset curve.
[0099] In some embodiments, the above-mentioned slime adjustment panel may simultaneously include a slime height curve and a slime offset curve to enable simultaneous operation on both the slime height curve and the slime offset curve; the above-mentioned slime adjustment panel may also not simultaneously include a slime height curve and a slime offset curve, that is, the slime adjustment panel may include either the slime height curve or the slime offset curve, for example, displaying the slime height curve first and then displaying the slime offset curve; or displaying the slime offset curve first and then displaying the slime height curve.
[0100] Furthermore, during the process of controlling the changes in the slime height curve and / or slime offset curve, the game engine can display the corresponding slime model display effect for each change in the slime height curve and / or slime offset curve in real time, so that relevant personnel can make further adjustments based on the display effect of the slime model.
[0101] 204. Based on the target height value and the target offset value, control the vertex to offset along the flow direction curve of the slime to generate the flow animation of the slime model.
[0102] In this embodiment, the game engine uses the determined target height and target offset values as constraints to control the vertices on the annular mesh line to offset along the slime flow direction curve until the target height and target offset values corresponding to the vertices are met, thereby generating the three-dimensional slime model required by the relevant personnel. Figure 7 As shown, this improves the efficiency of generating flowing animations.
[0103] In some embodiments, since the mucus flow curve has different directions at different locations, when a vertex on a grid-like planar model is offset along the mucus flow direction curve, the coordinates of the vertex need to be rotated based on the tangent direction of the center point of the annular grid line where the vertex is located on the mucus flow direction curve. This is to make the normal of the vertex fit the tangent direction of the center point. Then, the rotated vertex is offset to achieve the offset of the vertex on the planar model along the mucus flow direction curve, thereby generating the mucus model required by the relevant personnel.
[0104] Specifically, the above-mentioned control of the vertex to offset along the mucus flow direction curve based on the target height value and the target offset value to generate the flow animation of the mucus model may include: 5. Determining the target height value of each ring grid line based on the target height value corresponding to the vertex on the above-mentioned target height value.
[0105] The center point on the curve indicating the direction of mucus flow is determined, and the direction of the tangent to the curve at that center point is also determined, such as... Figure 8a As shown, Figure 8a The tangent direction is defined at each point on the mucus flow direction curve. Based on the tangent direction of the curve at the center point corresponding to each annular grid line, a rotation transformation is performed on the vertices of each annular grid line.
[0106] Obtain the vertices after rotation transformation. Based on the center point corresponding to each ring grid line and the vertices 0 after rotation transformation, determine the offset direction of the vertices on each ring grid line; control the rotation on the aforementioned ring grid lines.
[0107] The transformed vertex moves along the aforementioned slime flow direction curve to the aforementioned center point, and according to the aforementioned target offset value, the transformed vertex is controlled to offset along the aforementioned offset direction to generate the aforementioned slime model's flow animation, such as... Figure 8b As shown, Figure 8b The diagram shown is a schematic representation of the normals of each vertex after rotation transformation.
[0108] 5. Understandably, after generating the slime model, the normals of each vertex on the slime model need to be adjusted.
[0109] For example, the normals of vertices on the model can be adjusted by using the adjacent faces of each vertex, so that the slime model with adjusted normals can be applied to real-world scenarios.
[0110] Wherein, if the offset direction of the vertex is that the vertex moves from the edge position of the ring grid line to the center point, then the target offset value is less than or equal to the distance of the vertex from the edge position of the ring grid line to the center point. For example, if the ring grid line is circular, then the target offset value is less than or equal to the radius of the circle formed by the ring grid line.
[0111] Specifically, when determining the target height and target offset values, the number of layers in each annular grid line and the point values of the slime flow direction curve are mapped to numerical values in the same space, as in the example above.
[0112] The mapping is a value in the range of 0 to 1. Therefore, the game engine can use the uvsample method to obtain the coordinates of the center point on the slime flow direction curve and the tangent direction of the curve at that center point, based on the target height value corresponding to the 5 vertices on each ring grid line.
[0113] In some embodiments, the above-mentioned rotation transformation of vertices on each annular mesh line based on the tangent direction of the curve corresponding to the center point of each annular mesh line to obtain the rotated vertices may specifically include: obtaining the normal direction of the vertex on each annular mesh line, which is the plane normal direction of the vertex on the above-mentioned mesh-like planar model; based on the above-mentioned tangent direction of the curve corresponding to the center point of each annular mesh line...
[0114] 5. Based on the normal direction and the tangent direction of the curve mentioned above, determine the quaternion corresponding to the vertex on each ring grid line; 6. Based on the quaternion corresponding to the vertex on each ring grid line, perform a rotation transformation on the vertex on each ring grid line to obtain the rotated vertex.
[0115] Understandably, since the rotation of the vertices is intended to make the normal of the vertex align with the tangent direction of the center point on the corresponding mucus flow direction curve, this can be based on the vertices on the mesh-like planar model.
[0116] The plane normal direction, i.e., the aforementioned normal direction, the vector of this direction (0,1,0), and the tangent direction 0 at the center point determine the rotation vector of the vertex, i.e., determine the aforementioned quaternion, and perform rotation transformation on the vertex based on the aforementioned quaternion. The rotation transformation using quaternions is to facilitate the storage of vertex rotation data, i.e., to store the quaternion so that another game engine can directly perform rotation transformation on the vertex based on the quaternion. For example, in the shader of the game engine, the corresponding vertex can be rotated using quaternions.
[0117] 5. In some embodiments, the game engine can also directly perform rotation transformations on vertices using the qrotate method.
[0118] In some embodiments, since the generated slime model is used to display slime effects, and a slime effect corresponds to a flowing animation containing at least one image frame, and each image frame corresponds to a slime model,
[0119] Therefore, to create the slime effect, at least one slime model needs to be generated. Furthermore, to enable the slime effect to be displayed on different game engines, in this embodiment, the flow animation information used to generate a flowing animation can be stored. This flow animation information includes slime attribute information on each ring-shaped grid line used to generate the slime model corresponding to at least one image frame, so that other game engines can obtain this flow animation information and use it to display the flow animation, for example, by recreating the flow animation in the shader of another game engine based on this flow animation information.
[0120] 5. In this embodiment, to reduce the resources required to store data, the terminal can introduce textures to...
[0121] The motion animation information is saved to a texture, allowing the recording of motion animation information to be achieved with a limited number of textures. It's understood that since the slime attribute information at each vertex on each ring-shaped mesh line is identical, only one set of slime attribute information needs to be saved for each ring-shaped mesh line. Specifically, in the texture's two coordinate axes, one axis indicates the frame number of the motion animation, and the other axis indicates the number of layers of the ring-shaped mesh lines in the mesh-like planar model. These two axes are horizontal and vertical coordinates, and the pixel values corresponding to the horizontal and vertical coordinates in the texture represent the saved slime attribute information. This achieves compression of the motion animation information, improving performance, reducing bandwidth pressure, saving bandwidth overhead, and overall enhancing the display effect of the slime effects corresponding to the motion animation.
[0122] Specifically, when generating the slime model corresponding to each image frame, the slime attribute information of each ring mesh line in each slime model can be pre-recorded on the vertex attribute corresponding to the vertex. After obtaining all the slime models required for the flow animation, the slime attribute information of each ring mesh line in all slime models is saved to the texture. Alternatively, when generating the slime model corresponding to each image frame, the slime attribute information of each ring mesh line in the slime model is saved to the texture.
[0123] In some embodiments, since the vertices on each loop mesh line need to be rotated when generating the slime model, the slime attribute information on each loop mesh line includes quaternions, so that another terminal can rotate the vertices on each loop mesh line by reading the quaternions in the texture.
[0124] Specifically, after determining the quaternion corresponding to the vertex of each ring grid line, the process may further include: obtaining a first texture for storing the flow animation information, wherein one coordinate axis of the first texture indicates the frame number of the flow animation, and the other coordinate axis indicates the layer number of the ring grid lines in the mesh-like planar model; determining the first pixel position of the slime attribute information of each ring grid line in the first texture for storing the current image frame based on the layer number of each ring grid line in the mesh-like planar model and the frame number of the image frame currently being processed in the flow animation; baking the quaternion corresponding to each ring grid line to the first pixel position in the first texture, wherein the baked first texture is used to provide quaternions for the slime model of the current image frame in the flow animation.
[0125] It is understandable that, since the pixel value of a pixel is rgba, the quaternion corresponding to a certain ring grid line when generating a slime model in a certain frame can be determined by reading the rgba of a pixel in the baked first texture.
[0126] In some embodiments, since the vertices on each annular grid line need to be offset when generating the slime model, the slime attribute information on each annular grid line also includes the position of the center point of each annular grid line on the slime flow direction curve, as well as the target offset value of the vertex, so that another terminal can offset the vertices on each annular grid line by reading the position of the center point and the target offset value of the vertex in the texture.
[0127] Specifically, after obtaining the target height value corresponding to the vertex of each annular grid line on the aforementioned mesh-like planar model, the process may further include: determining the position of the center point of each annular grid line on the aforementioned slime flow direction curve based on the target height value corresponding to the vertex of each annular grid line; obtaining a second texture for storing flow animation information, wherein one coordinate axis of the second texture indicates the frame number of the flow animation, and the other coordinate axis indicates the layer number of the annular grid lines in the aforementioned mesh-like planar model; determining the second pixel position of the slime attribute information of each annular grid line in the aforementioned second texture for storing the current image frame based on the layer number of each annular grid line in the aforementioned mesh-like planar model and the frame number of the image frame currently being processed by the flow animation; baking the position of the aforementioned center point and the aforementioned target offset value corresponding to each annular grid line to the second pixel position in the aforementioned second texture, wherein the baked second texture is used to provide the position of the center point and the target offset value for the slime model of the current image frame in the flow animation.
[0128] It is understandable that, since the pixel value of a pixel is RGBA, the position of the center point corresponding to a certain ring grid line when generating a slime model in a certain image frame can be determined by reading the RGB value of a pixel in the baked second texture; the target offset value corresponding to a certain ring grid line when generating a slime model in a certain image frame can be determined by reading the 'a' value of a pixel in the baked second texture.
[0129] In some embodiments, since the normals of the vertices of each annular mesh line on the slime model need to be adjusted when generating the slime model, the slime attribute information of each annular mesh line also includes the projection length of the normals of the vertices of each annular mesh line onto two basis vectors. These two basis vectors are the tangent direction of the curve and the direction from the center point of each annular mesh line on the slime flow direction curve to the rotated vertex. This allows another terminal to adjust the normals of the vertices of each annular mesh line on the slime model by reading the projection lengths on the two basis vectors in the texture.
[0130] The directions of the two basis vectors mentioned above can be calculated in another terminal, such as in the shader of a game engine. Then, a cross product is performed to obtain the direction of the third basis vector, which is the adjusted normal direction. It's understandable that when generating the slime model in the actual scene on another terminal, the actual normal direction of that slime model will be affected by the model structure. Therefore, a coordinate system must be determined, that is, the directions corresponding to which parameters form this coordinate system, so that the normal can be restored under a defined coordinate system.
[0131] Specifically, the projection length of the normal of each vertex on each loop mesh line of the slime model onto two basis vectors is obtained; a third texture for storing flow animation information is obtained, wherein one coordinate axis of the third texture indicates the frame number of the flow animation, and the other coordinate axis indicates the layer number of the loop mesh lines in the mesh-like planar model; based on the layer number of each loop mesh line in the mesh-like planar model and the frame number of the image frame currently being processed in the flow animation, the third pixel position of the slime attribute information of each loop mesh line of the current image frame stored in the third texture is determined; the projection length of the normal of each vertex on each loop mesh line of the slime model onto two basis vectors is baked to the third pixel position in the second texture, and the baked third texture is used to provide the projection length of the normal of the vertex onto two basis vectors for the slime model of the current image frame in the flow animation.
[0132] It is understandable that, since the pixel value of a pixel is rgba, the projection length of the normal of a vertex on a certain ring mesh line onto two basis vectors can be determined by reading the rg of a pixel in the baked third texture.
[0133] It is understandable that the first, second, and third textures mentioned above can be the same texture or different textures, depending on the requirements. If the first, second, and third textures are the same target texture, then the target texture can be divided into regions to create different regions, which can be used to represent different parameters in the slime attribute information on each ring grid line.
[0134] For example, the animation is set to include 128 image frames, and each mesh-like planar model has 32 ring-shaped mesh lines. The slime attribute information for each ring-shaped mesh line is also set to include quaternions, the position of the center point, the target offset value, and the projection length of the vertex normal onto the two basis vectors. The slime attribute information for each ring-shaped mesh line is saved to a texture map, such as... Figure 9 As shown, Figure 9 For a 128*96 texture, from Figure 9As can be seen, the texture is divided into three areas, namely Figure 9 The three dashed regions in the diagram are region A, region B, and region C, each measuring 128*32. Region A stores the projection length of the vertex normal onto the two basis vectors, region B includes the position of the center point and the target offset, and region C stores quaternions.
[0135] Understandably, the other terminal mentioned above also needs to obtain a mesh-like planar model when generating the slime model based on the texture. This mesh-like planar model can be recorded by UV unwrapping, for example, using two UV files. One UV file records the shape of the mesh-like planar model in two-dimensional space. Since the mesh-like planar model is generally a two-dimensional model, its shape in two-dimensional space is consistent with its shape in three-dimensional space, such as... Figure 3a The shape of the mesh-like planar model is shown; in addition, a second UV file can be used to record the numerical values of the layer number mapping for each ring of the mesh-like planar model. The specific recording method can be as follows: Figure 5a As shown, it can also be as follows Figure 5b As shown, the mapped value is used as an index of a coordinate in the texture when another terminal samples from the texture.
[0136] After sampling the texture on another terminal, based on the sampled slime attribute information, the corresponding slime model is generated in the local coordinates of the other terminal, and the normals of the vertices of each annular mesh line on the slime model are restored, thereby realizing the generation of the slime model in the other terminal.
[0137] In some embodiments, after obtaining the slime model, the terminal can also randomly or selectively acquire an image and assign a corresponding color to the slime model based on the colors in the image, thereby obtaining a colored slime model, such as... Figure 10 As shown.
[0138] As can be seen from the above, by obtaining a mesh-like planar model of the slime model to be generated, wherein the mesh on the mesh-like planar model is divided by at least two annular mesh lines and at least two dividing mesh lines intersecting the annular mesh lines, and the intersection points of the annular mesh lines and the dividing mesh lines are the vertices of the slime model, the structure of the slime model on the plane is determined based on this mesh-like planar model. Then, the slime flow direction curve is obtained, and the flow direction of the slime model is determined based on this curve. Then, the target height value and target offset value corresponding to the above vertices are obtained, and the position of the vertices on the annular mesh lines in the slime model should be determined based on the target height value and the target offset value. By controlling the offset of the above vertices along the slime flow direction curve according to the above target height value and the target offset value, the flow animation of the above slime model is generated, thereby improving the generation efficiency of the flow animation.
[0139] To better implement the above methods, this application also provides a motion animation generation device, which can be integrated into an electronic device, such as a computer device, which can be a terminal, server or other device.
[0140] The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.
[0141] For example, in this embodiment, the method of this application embodiment will be described in detail by taking the integration of the motion animation generation device into the terminal as an example. This embodiment provides a motion animation generation device, such as... Figure 11 As shown, the motion animation generation device may include:
[0142] The model acquisition module 111 is used to acquire the mesh-like planar model of the slime model to be generated, wherein the mesh on the mesh-like planar model is divided by at least two annular mesh lines and at least two cutting mesh lines that intersect with the annular mesh lines, and the intersection of the annular mesh lines and the cutting mesh lines is the vertex of the slime model.
[0143] Curve acquisition module 112 is used to acquire the mucus flow direction curve;
[0144] Information acquisition module 113 is used to acquire the target height value and target offset value corresponding to the above-mentioned vertex;
[0145] The model generation module 114 is used to control the vertex to offset along the flow direction curve of the slime according to the target height value and the target offset value, so as to generate the flow animation of the slime model.
[0146] In some embodiments, the information acquisition module 113 is specifically used for:
[0147] Obtain the slime height curve, wherein one coordinate axis of the slime height curve is used to indicate the layer number of the ring grid line in the grid-like planar model, and the other coordinate axis is used to indicate the height corresponding to the vertex on the ring grid line;
[0148] Based on the number of layers in the above-mentioned mesh planar model where each ring mesh line is located, the target height value corresponding to the vertex of each ring mesh line is obtained from the above-mentioned mucus height curve;
[0149] Obtain the slime offset curve, wherein, of the two coordinate axes of the slime offset curve, one coordinate axis is used to indicate the layer number of the annular grid line in the grid-like planar model, and the other coordinate axis is used to indicate the offset value corresponding to the vertex on the annular grid line;
[0150] Based on the layer number of each annular grid line in the aforementioned grid-like planar model, the target offset value corresponding to the vertex of each annular grid line is obtained from the aforementioned slime offset curve.
[0151] In some embodiments, the above-described motion animation generation apparatus further includes an operation module, which is specifically used for:
[0152] Display a mucus adjustment panel, which includes the mucus height curve and / or the mucus offset curve;
[0153] Obtain operational information for the above-mentioned mucus height curve and / or the above-mentioned mucus offset curve;
[0154] Based on the above operation information, control the changes of the above-mentioned mucus height curve and / or the above-mentioned mucus offset curve to obtain the changed mucus height curve and / or mucus offset curve.
[0155] In some embodiments, the model generation module 114 is specifically used for:
[0156] Based on the target height value corresponding to the vertex of each annular grid line, determine the center point of each annular grid line on the above-mentioned mucus flow direction curve, and determine the tangent direction of the curve at the above-mentioned center point;
[0157] Based on the tangent direction of the curve at the center point of each annular grid line, the vertices on each annular grid line are rotated to obtain the rotated vertices;
[0158] Based on the center point corresponding to each annular grid line and the vertices after rotation transformation, determine the offset direction of the vertices on each annular grid line;
[0159] The vertices on the aforementioned annular grid line, after being rotated and transformed, are moved along the aforementioned mucus flow direction curve to the aforementioned center point. Based on the aforementioned target offset value, the vertices after being rotated and transformed are offset along the aforementioned offset direction to generate the aforementioned mucus model's flow animation.
[0160] In some embodiments, the model generation module 114 is further specifically used for:
[0161] Obtain the normal direction of the vertices on each ring grid line;
[0162] Based on the above-mentioned normal direction and the above-mentioned curve tangent direction corresponding to the vertex on each annular grid line, determine the quaternion corresponding to the vertex on each annular grid line.
[0163] Based on the quaternions corresponding to the vertices on each ring grid line, a rotation transformation is performed on the vertices on each ring grid line to obtain the rotated vertices.
[0164] In some embodiments, the above-described motion animation generation apparatus further includes a first baking module, which is specifically used for:
[0165] Obtain a first texture for storing the flow animation information, wherein, of the two coordinate axes of the first texture, one coordinate axis indicates the number of frames of the flow animation, and the other coordinate axis indicates the number of layers of the ring grid lines in the grid-like planar model;
[0166] Based on the layer number of each ring grid line in the above-mentioned grid-like planar model and the frame number of the image frame currently being processed by the animation, the first pixel position of the slime attribute information of each ring grid line storing the current image frame in the above-mentioned first texture is determined.
[0167] The quaternion corresponding to each ring grid line is baked to the first pixel position in the first texture above. The baked first texture is used to provide quaternions for the slime model of the current image frame in the animation.
[0168] In some embodiments, the above-described motion animation generation apparatus further includes a second baking module, which is specifically used for:
[0169] Based on the target height value corresponding to the vertex of each annular grid line, the position of the center point of each annular grid line on the above-mentioned mucus flow direction curve is determined;
[0170] Obtain a second texture for storing the flow animation information, wherein one coordinate axis of the second texture indicates the number of frames of the flow animation, and the other coordinate axis indicates the number of layers of the ring grid lines in the grid-like planar model.
[0171] Based on the layer number of each ring grid line in the above-mentioned grid-like planar model and the frame number of the image frame currently being processed by the animation, the second pixel position of the mucus attribute information of each ring grid line in the above-mentioned second texture is determined.
[0172] The position of the center point and the target offset value corresponding to each ring grid line are baked to the second pixel position in the second texture. The baked second texture is used to provide the position of the center point and the target offset value for the slime model of the current image frame in the animation.
[0173] As can be seen from the above, the flow animation generation device of this embodiment acquires a mesh-like planar model of the slime model to be generated through the model acquisition module 111. The mesh on the mesh-like planar model is divided by at least two annular mesh lines and at least two dividing mesh lines intersecting the annular mesh lines. The intersection points of the annular mesh lines and the dividing mesh lines are the vertices of the slime model, thereby determining the structure of the slime model on the plane based on the mesh-like planar model. Then, the flow direction curve of the slime is acquired through the curve acquisition module 112, thereby determining the flow direction of the slime model based on the curve. Next, the target height value and target offset value corresponding to the vertices are acquired through the information acquisition module 113, thereby determining the position of the vertices on the annular mesh lines within the slime model based on the target height value and target offset value. The model generation module 114 then controls the vertices to offset along the slime flow direction curve according to the target height value and target offset value, thereby generating the flow animation of the slime model, thus improving the generation efficiency of the flow animation.
[0174] Accordingly, this application also provides an electronic device, which can be a terminal, such as a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer (PC), personal digital assistant (PDA), or other terminal device. Figure 12 As shown, Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 120 includes a processor 121 with one or more processing cores, a memory 122 with one or more computer-readable storage media, and a computer program stored on the memory 122 and executable on the processor. The processor 121 is electrically connected to the memory 122. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0175] The processor 121 is the control center of the electronic device 120. It connects various parts of the electronic device 120 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 122, and calling data stored in the memory 122, it performs various functions of the electronic device 120 and processes data, thereby monitoring the electronic device 120 as a whole.
[0176] In this embodiment, the processor 121 in the electronic device 120 loads the instructions corresponding to the processes of one or more applications into the memory 122 according to the following steps, and the processor 121 runs the applications stored in the memory 122 to realize various functions:
[0177] Obtain a mesh-like planar model of the slime model to be generated, wherein the mesh on the mesh-like planar model is divided by at least two annular mesh lines and at least two cutting mesh lines that intersect the annular mesh lines, and the intersection of the annular mesh lines and the cutting mesh lines is the vertex of the slime model;
[0178] Obtain the mucus flow direction curve;
[0179] Obtain the target height and target offset values corresponding to the above vertices;
[0180] Based on the target height value and the target offset value, the vertex is controlled to offset along the flow direction curve of the slime to generate the flow animation of the slime model.
[0181] In some embodiments, obtaining the target height value and target offset value corresponding to the vertex includes:
[0182] Obtain the slime height curve, wherein one coordinate axis of the slime height curve is used to indicate the layer number of the ring grid line in the grid-like planar model, and the other coordinate axis is used to indicate the height corresponding to the vertex on the ring grid line;
[0183] Based on the number of layers in the above-mentioned mesh planar model where each ring mesh line is located, the target height value corresponding to the vertex of each ring mesh line is obtained from the above-mentioned mucus height curve;
[0184] Obtain the slime offset curve, wherein, of the two coordinate axes of the slime offset curve, one coordinate axis is used to indicate the layer number of the annular grid line in the grid-like planar model, and the other coordinate axis is used to indicate the offset value corresponding to the vertex on the annular grid line;
[0185] Based on the layer number of each annular grid line in the aforementioned grid-like planar model, the target offset value corresponding to the vertex of each annular grid line is obtained from the aforementioned slime offset curve.
[0186] In some embodiments, it also includes:
[0187] Display a mucus adjustment panel, which includes the mucus height curve and / or the mucus offset curve;
[0188] Obtain operational information for the above-mentioned mucus height curve and / or the above-mentioned mucus offset curve;
[0189] Based on the above operation information, control the changes of the above-mentioned mucus height curve and / or the above-mentioned mucus offset curve to obtain the changed mucus height curve and / or mucus offset curve.
[0190] In some embodiments, controlling the vertex to offset along the mucus flow direction curve based on the target height value and the target offset value to generate the flow animation of the mucus model includes:
[0191] Based on the target height value corresponding to the vertex of each annular grid line, determine the center point of each annular grid line on the above-mentioned mucus flow direction curve, and determine the tangent direction of the curve at the above-mentioned center point;
[0192] Based on the tangent direction of the curve at the center point of each annular grid line, the vertices on each annular grid line are rotated to obtain the rotated vertices;
[0193] Based on the center point corresponding to each annular grid line and the vertices after rotation transformation, determine the offset direction of the vertices on each annular grid line;
[0194] The vertices on the aforementioned annular grid line, after being rotated and transformed, are moved along the aforementioned mucus flow direction curve to the aforementioned center point. Based on the aforementioned target offset value, the vertices after being rotated and transformed are also controlled to offset along the aforementioned offset direction to generate the aforementioned mucus model's flow animation.
[0195] In some embodiments, the above-mentioned rotation transformation of vertices on each annular grid line based on the tangent direction of the curve at the center point corresponding to each annular grid line to obtain the rotated vertices includes:
[0196] Obtain the normal direction of the vertices on each ring grid line;
[0197] Based on the above-mentioned normal direction and the above-mentioned curve tangent direction corresponding to the vertex on each annular grid line, determine the quaternion corresponding to the vertex on each annular grid line.
[0198] Based on the quaternions corresponding to the vertices on each ring grid line, a rotation transformation is performed on the vertices on each ring grid line to obtain the rotated vertices.
[0199] In some embodiments, after determining the quaternion corresponding to the vertex on each ring grid line, the method further includes:
[0200] Obtain a first texture for storing the flow animation information, wherein, of the two coordinate axes of the first texture, one coordinate axis indicates the number of frames of the flow animation, and the other coordinate axis indicates the number of layers of the ring grid lines in the grid-like planar model;
[0201] Based on the layer number of each ring grid line in the above-mentioned grid-like planar model and the frame number of the image frame currently being processed by the animation, the first pixel position of the slime attribute information of each ring grid line storing the current image frame in the above-mentioned first texture is determined.
[0202] The quaternion corresponding to each ring grid line is baked to the first pixel position in the first texture above. The baked first texture is used to provide quaternions for the slime model of the current image frame in the animation.
[0203] In some embodiments, after obtaining the target height value and target offset value corresponding to the above-mentioned vertex, the method further includes:
[0204] Based on the target height value corresponding to the vertex of each annular grid line, the position of the center point of each annular grid line on the above-mentioned mucus flow direction curve is determined;
[0205] Obtain a second texture for storing the flow animation information, wherein one coordinate axis of the second texture indicates the number of frames of the flow animation, and the other coordinate axis indicates the number of layers of the ring grid lines in the grid-like planar model.
[0206] Based on the layer number of each ring grid line in the above-mentioned grid-like planar model and the frame number of the image frame currently being processed by the animation, the second pixel position of the mucus attribute information of each ring grid line in the above-mentioned second texture is determined.
[0207] The position of the center point and the target offset value corresponding to each ring grid line are baked to the second pixel position in the second texture. The baked second texture is used to provide the position of the center point and the target offset value for the slime model of the current image frame in the animation.
[0208] Therefore, the electronic device 120 provided in this embodiment can bring the following technical effects: improve the generation efficiency of flowing animation.
[0209] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0210] Optional, such as Figure 12As shown, the electronic device 120 also includes: a touch display screen 123, a radio frequency circuit 124, an audio circuit 125, an input unit 126, and a power supply 127. The processor 121 is electrically connected to the touch display screen 123, the radio frequency circuit 124, the audio circuit 125, the input unit 126, and the power supply 127. Those skilled in the art will understand that... Figure 12 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0211] The touch display screen 123 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 123 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 electronic 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 121. It can also receive and execute commands from the processor 121. 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 121 to determine the type of touch event. Subsequently, the processor 121 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 123 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 123 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 123 can also be used as part of the input unit 126 to achieve input functions.
[0212] The radio frequency circuit 124 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices, and to transmit and receive signals with network devices or other electronic devices.
[0213] Audio circuitry 125 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuitry 125 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 125, converted back into audio data, and then processed by processor 121 before being transmitted via radio frequency circuitry 124 to, for example, another electronic device, or output to memory 122 for further processing. Audio circuitry 125 may also include an earphone jack to provide communication between peripheral headphones and electronic devices.
[0214] The input unit 126 can be used to receive input numbers, character information or user feature information (such as fingerprints, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0215] Power supply 127 is used to supply power to various components of electronic device 120. Optionally, power supply 127 can be logically connected to processor 121 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 127 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.
[0216] although Figure 12 As not shown in the diagram, electronic device 120 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0217] 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.
[0218] 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.
[0219] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of computer programs that can be loaded by a processor to execute the steps of any of the motion animation generation methods provided in embodiments of this application. For example, the computer program can execute the following steps:
[0220] Obtain a mesh-like planar model of the slime model to be generated, wherein the mesh on the mesh-like planar model is divided by at least two annular mesh lines and at least two cutting mesh lines that intersect the annular mesh lines, and the intersection of the annular mesh lines and the cutting mesh lines is the vertex of the slime model;
[0221] Obtain the mucus flow direction curve;
[0222] Obtain the target height and target offset values corresponding to the vertices on each annular grid line of the above mesh-like planar model;
[0223] Based on the target height value and the target offset value, the vertex is controlled to offset along the flow direction curve of the slime to generate the flow animation of the slime model.
[0224] In some embodiments, obtaining the target height value and target offset value corresponding to the vertex includes:
[0225] Obtain the slime height curve, wherein one coordinate axis of the slime height curve is used to indicate the layer number of the ring grid line in the grid-like planar model, and the other coordinate axis is used to indicate the height corresponding to the vertex on the ring grid line;
[0226] Based on the number of layers in the above-mentioned mesh planar model where each ring mesh line is located, the target height value corresponding to the vertex of each ring mesh line is obtained from the above-mentioned mucus height curve;
[0227] Obtain the slime offset curve, wherein one coordinate axis of the slime offset curve is used to indicate the layer number of the annular grid line in the grid-like planar model, and the other coordinate axis is used to indicate the offset value corresponding to the vertex on the annular grid line.
[0228] Based on the layer number of each annular grid line in the aforementioned grid-like planar model, the target offset value corresponding to the vertex of each annular grid line is obtained from the aforementioned slime offset curve.
[0229] In some embodiments, it also includes:
[0230] Display a mucus adjustment panel, which includes the mucus height curve and / or the mucus offset curve;
[0231] Obtain operational information for the above-mentioned mucus height curve and / or the above-mentioned mucus offset curve;
[0232] Based on the above operation information, control the changes of the above-mentioned mucus height curve and / or the above-mentioned mucus offset curve to obtain the changed mucus height curve and / or mucus offset curve.
[0233] In some embodiments, controlling the vertex to offset along the mucus flow direction curve based on the target height value and the target offset value to generate the flow animation of the mucus model includes:
[0234] Based on the target height value corresponding to the vertex of each annular grid line, determine the center point of each annular grid line on the above-mentioned mucus flow direction curve, and determine the tangent direction of the curve at the above-mentioned center point;
[0235] Based on the tangent direction of the curve at the center point of each annular grid line, the vertices on each annular grid line are rotated to obtain the rotated vertices;
[0236] Based on the center point corresponding to each annular grid line and the vertices after rotation transformation, determine the offset direction of the vertices on each annular grid line;
[0237] The vertices on the aforementioned annular grid line, after being rotated and transformed, are moved along the aforementioned mucus flow direction curve to the aforementioned center point. Based on the aforementioned target offset value, the vertices after being rotated and transformed are also controlled to offset along the aforementioned offset direction to generate the aforementioned mucus model's flow animation.
[0238] In some embodiments, the above-mentioned rotation transformation of vertices on each annular grid line based on the tangent direction of the curve at the center point corresponding to each annular grid line to obtain the rotated vertices includes:
[0239] Obtain the normal direction of the vertices on each ring grid line;
[0240] Based on the above-mentioned normal direction and the above-mentioned curve tangent direction corresponding to the vertex on each annular grid line, determine the quaternion corresponding to the vertex on each annular grid line.
[0241] Based on the quaternions corresponding to the vertices on each ring grid line, a rotation transformation is performed on the vertices on each ring grid line to obtain the rotated vertices.
[0242] In some embodiments, after determining the quaternion corresponding to the vertex on each ring grid line, the method further includes:
[0243] Obtain a first texture for storing the flow animation information, wherein, of the two coordinate axes of the first texture, one coordinate axis indicates the number of frames of the flow animation, and the other coordinate axis indicates the number of layers of the ring grid lines in the grid-like planar model;
[0244] Based on the layer number of each ring grid line in the above-mentioned grid-like planar model and the frame number of the image frame currently being processed by the animation, the first pixel position of the slime attribute information of each ring grid line storing the current image frame in the above-mentioned first texture is determined.
[0245] The quaternion corresponding to each ring grid line is baked to the first pixel position in the first texture above. The baked first texture is used to provide quaternions for the slime model of the current image frame in the animation.
[0246] In some embodiments, after obtaining the target height value and target offset value corresponding to the above-mentioned vertex, the method further includes:
[0247] Based on the target height value corresponding to the vertex of each annular grid line, the position of the center point of each annular grid line on the above-mentioned mucus flow direction curve is determined;
[0248] Obtain a second texture for storing the flow animation information, wherein one coordinate axis of the second texture indicates the number of frames of the flow animation, and the other coordinate axis indicates the number of layers of the ring grid lines in the grid-like planar model.
[0249] Based on the layer number of each ring grid line in the above-mentioned grid-like planar model and the frame number of the image frame currently being processed by the animation, the second pixel position of the mucus attribute information of each ring grid line in the above-mentioned second texture is determined.
[0250] The position of the center point and the target offset value corresponding to each ring grid line are baked to the second pixel position in the second texture. The baked second texture is used to provide the position of the center point and the target offset value for the slime model of the current image frame in the animation.
[0251] As can be seen, the computer program can be loaded by the processor to execute the steps in any of the motion animation generation methods provided in the embodiments of this application, thereby bringing about the following technical effects: improving the generation efficiency of motion animation.
[0252] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0253] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0254] Since the computer program stored in the computer-readable storage medium can execute the steps in any of the motion animation generation methods provided in the embodiments of this application, the beneficial effects that any of the motion animation generation methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0255] The foregoing has provided a detailed description of a method, apparatus, electronic device, and computer-readable storage medium for generating flowing animations 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 embodiments above 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 generating flowing animation, characterized in that, The method includes: Obtain a mesh-like planar model of the slime model to be generated, wherein the mesh on the mesh-like planar model is divided by at least two annular mesh lines and at least two dividing mesh lines intersecting the annular mesh lines, and the intersection of the annular mesh lines and the dividing mesh lines is the vertex of the slime model; Obtain the mucus flow direction curve; Obtain the target height value and target offset value corresponding to the vertex; Based on the target height value corresponding to the vertex of each annular grid line, the center point of each annular grid line on the mucus flow direction curve is determined, and the tangent direction of the curve at the center point is determined. Based on the tangent direction of the curve at the center point of each annular grid line, the vertex of each annular grid line is rotated to obtain the rotated vertex. Based on the center point of each annular grid line and the rotated vertex, the offset direction of the vertex on each annular grid line is determined. The rotated vertex on the annular grid line is controlled to move along the mucus flow direction curve to the center point, and according to the target offset value, the rotated vertex is controlled to offset along the offset direction to generate the flow animation of the mucus model.
2. The method for generating flowing animation as described in claim 1, characterized in that, The step of obtaining the target height value and target offset value corresponding to the vertex includes: Obtain a slime height curve, wherein one coordinate axis of the slime height curve is used to indicate the layer number of the annular grid line in the grid-like planar model, and the other coordinate axis is used to indicate the height corresponding to the vertex on the annular grid line; Based on the number of layers in the mesh-like planar model where each ring-shaped mesh line is located, the target height value corresponding to the vertex of each ring-shaped mesh line is obtained from the mucus height curve; Obtain the slime offset curve, wherein, of the two coordinate axes of the slime offset curve, one coordinate axis is used to indicate the layer number of the annular grid line in the grid-like planar model, and the other coordinate axis is used to indicate the offset value corresponding to the vertex on the annular grid line; Based on the layer number of each annular grid line in the grid-like planar model, the target offset value corresponding to the vertex of each annular grid line is obtained from the slime offset curve.
3. The method for generating flowing animation as described in claim 2, characterized in that, Also includes: Display a slime adjustment panel, which includes the slime height curve and / or the slime offset curve; Obtain operational information for the mucus height curve and / or the mucus offset curve; Based on the operation information, control the changes in the slime height curve and / or the slime offset curve to obtain the changed slime height curve and / or slime offset curve.
4. The method for generating flowing animation as described in claim 1, characterized in that, The process involves rotating the vertices on each annular grid line based on the tangent direction of the curve at the center point of each annular grid line to obtain the rotated vertices, including: Obtain the normal direction of the vertices on each ring grid line; Based on the normal direction of the vertex on each annular grid line and the tangent direction of the curve, determine the quaternion corresponding to the vertex on each annular grid line; Based on the quaternions corresponding to the vertices on each ring grid line, a rotation transformation is performed on the vertices on each ring grid line to obtain the rotated vertices.
5. The method for generating flowing animation as described in claim 4, characterized in that, After determining the quaternion corresponding to the vertex on each ring grid line, the following steps are also included: Obtain a first texture for storing the flow animation information, wherein one coordinate axis of the first texture indicates the number of frames of the flow animation, and the other coordinate axis indicates the number of layers of the ring grid lines in the mesh-like planar model; Based on the layer number of each ring grid line in the grid-like planar model and the frame number of the image frame currently being processed by the animation, the first pixel position of the mucus attribute information of each ring grid line in the first texture that stores the current image frame is determined. The quaternion corresponding to each ring grid line is baked to the first pixel position in the first texture. The baked first texture is used to provide quaternions for the slime model of the current image frame in the animation.
6. The method for generating flowing animation as described in any one of claims 1 to 5, characterized in that, After obtaining the target height value and target offset value corresponding to the vertex, the process also includes: Based on the target height value corresponding to the vertex of each annular grid line, the position of the center point of each annular grid line on the mucus flow direction curve is determined; Obtain a second texture for storing the flow animation information, wherein one coordinate axis of the second texture indicates the number of frames of the flow animation, and the other coordinate axis indicates the number of layers of the ring grid lines in the mesh-like planar model; Based on the layer number of each ring grid line in the mesh-like planar model and the frame number of the image frame currently being processed by the flow animation, the second pixel position of the mucus attribute information of each ring grid line in the second texture is determined. The position of the center point and the target offset value corresponding to each ring grid line are baked to the second pixel position in the second texture. The baked second texture is used to provide the position of the center point and the target offset value for the slime model of the current image frame in the flowing animation.
7. A motion animation generation device, characterized in that, The device includes: The model acquisition module is used to acquire a mesh-like planar model of the slime model to be generated, wherein the mesh on the mesh-like planar model is divided by at least two annular mesh lines and at least two cutting mesh lines intersecting the annular mesh lines, and the intersection of the annular mesh lines and the cutting mesh lines is the vertex of the slime model; The curve acquisition module is used to acquire the flow direction curve of the mucus; The information acquisition module is used to acquire the target height value and target offset value corresponding to the vertex; The model generation module is used to determine the center point of each annular grid line on the mucus flow direction curve based on the target height value corresponding to the vertex of each annular grid line, and to determine the tangent direction of the curve at the center point; to perform a rotation transformation on the vertices of each annular grid line based on the tangent direction of the curve at the center point of each annular grid line, to obtain the rotated vertices; to determine the offset direction of the vertices of each annular grid line based on the center point and the rotated vertices; to control the rotated vertices of the annular grid lines to move along the mucus flow direction curve to the center point, and to control the rotated vertices to offset along the offset direction according to the target offset value, so as to generate the flow animation of the mucus model.
8. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing multiple instructions; the processor loads instructions from the memory to perform the steps in the motion animation generation method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the motion animation generation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Image flowing picture rendering method and system based on local self-adaption
CN110728738A
Fluid display method and device, computer readable storage medium and terminal equipment
CN111476898A
