CN110930484B - Animation configuration method and device, storage medium and electronic device - Google Patents
Animation configuration method and device, storage medium and electronic device Download PDFInfo
- Publication number
- CN110930484B CN110930484B CN201911151365.3A CN201911151365A CN110930484B CN 110930484 B CN110930484 B CN 110930484B CN 201911151365 A CN201911151365 A CN 201911151365A CN 110930484 B CN110930484 B CN 110930484B
- Authority
- CN
- China
- Prior art keywords
- target
- animation
- graph
- setting
- display area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
- G06T13/20—3D [Three Dimensional] animation
- G06T13/60—3D [Three Dimensional] animation of natural phenomena, e.g. rain, snow, water or plants
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
- G06T13/20—3D [Three Dimensional] animation
- G06T13/40—3D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention discloses an animation configuration method and device, a storage medium and an electronic device. Wherein, the method comprises the following steps: setting the first target graph as a graph of a target animation to be configured; setting the second target graph as a graph for showing the target animation; setting target animation parameters for the target animation, wherein the target animation parameters comprise an area size parameter of an animation display area and a moving speed of a second target graph on the animation display area, and the animation display area is adjacent to the first target graph; the method comprises the steps of setting a corresponding animation control file for the target animation, wherein the animation control file is used for generating an animation display area according to the shape and area size parameters of a first target graph and controlling a second target graph to move on the animation display area according to the moving speed so as to display the target animation.
Description
Technical Field
The invention relates to the field of picture display, in particular to an animation configuration method and device, a storage medium and an electronic device.
Background
In some picture display scenarios, it is often desirable to highlight an image, and some animated indicia is often displayed around the image, presenting to a person to see the image as flashing. For example, the player account may be provided with a flashing effect at the edge of the avatar, or the game character may be provided in the form of a flashing light.
The flash form is usually presented in a frame animation. The frame animation is a principle that animation action is decomposed in 'continuous key frames', namely different contents are drawn on each frame of a time axis frame by frame, and the animation is continuously played to form animation. Because the frame sequence contents of the frame-by-frame animation are different, not only is the burden imposed on the production, but also the amount of files to be finally output is large. For example: sharp turns of the character or animal, waving of hair and clothing, walking, speaking, and delicate 3D effects, etc.
The principle of the production module developed by various three-dimensional software for simulating the effects of water, fire, fog, gas and the like in reality is to combine countless single particles to enable the particles to present a fixed form, and the whole or single movement of the particles is controlled by a controller and a script to simulate the real effect.
In the above manner, the data packet showing the rapid turning of the person or animal, the waving of the hair and clothes, the walking, the speaking and the delicate 3D effect usually includes a large amount of picture resources, and the data packet occupies a large space. And in the case of simulating the effects of water, fire, fog, gas, etc. in reality, and the particle size and shape are different, it is necessary to produce a plurality of particle special effects, and the versatility is low.
That is to say, in the prior art, a data packet compiled to present the above 3D effect is large, and a large data packet needs to be acquired when a mobile terminal acquires a corresponding related presentation effect, which occupies a large storage space and reduces the running speed of the terminal.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides an animation configuration method and device, a storage medium and an electronic device, and at least solves the technical problem that data files presenting special effect are large in data in the prior art.
According to an aspect of an embodiment of the present invention, there is provided an animation configuration method including: setting the first target graph as a graph of a target animation to be configured; setting a second target graph as a graph for showing the target animation; setting target animation parameters for the target animation, wherein the target animation parameters comprise an area size parameter of an animation display area and a moving speed of the second target graph on the animation display area, and the animation display area is adjacent to the first target graph; and setting a corresponding animation control file for the target animation, wherein the animation control file is used for generating the animation display area according to the shape of the first target graph and the area size parameter, and controlling the second target graph to move on the animation display area according to the moving speed so as to display the target animation.
According to another aspect of the embodiments of the present invention, there is also provided an animation configuration apparatus, including: the first setting unit is used for setting the first target graph as a graph of the target animation to be configured; the second setting unit is used for setting a second target graph as a graph for showing the target animation; a third setting unit, configured to set target animation parameters for the target animation, where the target animation parameters include an area size parameter of an animation display area and a moving speed of the second target graphic on the animation display area, and the animation display area is adjacent to the first target graphic; and the fourth setting unit is used for setting a corresponding animation control file for the target animation, wherein the animation control file is used for generating the animation display area according to the shape of the first target graph and the area size parameter, and controlling the second target graph to move on the animation display area according to the moving speed so as to display the target animation.
According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the above animation configuration method when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the animation configuration method through the computer program.
In the embodiment of the invention, the first target graph is set as the graph of the target animation to be configured; setting the second target graph as a graph for showing the target animation; setting target animation parameters for the target animation, wherein the target animation parameters comprise an area size parameter of an animation display area and a moving speed of a second target graph on the animation display area, and the animation display area is adjacent to the first target graph; and setting a corresponding animation control file for the target animation, wherein the animation control file is used for generating an animation display area according to the shape and area size parameters of the first target graph and controlling the second target graph to move on the animation display area according to the moving speed so as to display the target animation, so that the aim of presenting an animation effect through one target graph is fulfilled, the technical effect of realizing a small data file of the animation effect is realized, and the technical problem that the data file presenting a special effect is large in data in the prior art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of an application environment for an alternative animation configuration method according to an embodiment of the invention;
FIG. 2 is a flow diagram of an alternative animation configuration method according to an embodiment of the invention;
FIG. 3 is a flowchart of an alternative method for producing special effects based on UV (unity shader) animation, in accordance with a preferred embodiment of the present invention;
FIG. 4 is a diagram of an optional add component UI interface in accordance with a preferred embodiment of the present invention;
FIG. 5 is an alternative pentagon according to the preferred embodiment of the present invention;
FIG. 6 is an alternative gridded pentagon (I) according to the preferred embodiment of the present invention;
FIG. 7 is an alternative gridded pentagon (two) according to the preferred embodiment of the present invention;
FIG. 8 is a diagram illustrating an alternative process of assigning triangular points, code and results of drawing in accordance with a preferred embodiment of the present invention;
FIG. 9 is an alternative gridded rectangle in accordance with the preferred embodiment of the present invention;
FIG. 10 is a schematic diagram of an alternative animation configuration device, according to an embodiment of the invention;
fig. 11 is a schematic structural diagram of an electronic device according to an alternative animation configuration method in an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present invention, there is provided an animation configuration method, which may be applied, but not limited, to the environment shown in fig. 1 as an alternative implementation.
Optionally, in this embodiment, the animation configuration method may be applied, but not limited to, in the server 112, for assisting the application client in performing the search determination process on the published media file. The application client may be but not limited to run in the user equipment 102, and the user equipment 102 may be but not limited to a mobile phone, a tablet computer, a notebook computer, a PC, and other terminal equipment supporting running of the application client. The server 112 and the user device 102 may implement data interaction through a network, which may include but is not limited to a wireless network or a wired network. Wherein, this wireless network includes: bluetooth, WIFI, and other networks that enable wireless communication. Such wired networks may include, but are not limited to: wide area networks, metropolitan area networks, and local area networks. The above is merely an example, and this is not limited in this embodiment.
The method is applied to the server 112, that is, when a target application is written, according to the method, in a written code program, a first target graph is set as a graph of a target animation to be configured; setting the second target graph as a graph for showing the target animation; setting target animation parameters for the target animation, wherein the target animation parameters comprise an area size parameter of an animation display area and a moving speed of a second target graph on the animation display area, and the animation display area is adjacent to the first target graph; and setting a corresponding animation control file for the target animation, wherein the animation control file is used for generating an animation display area according to the shape and area size parameters of the first target graph and controlling the second target graph to move on the animation display area according to the moving speed so as to display the target animation. And then the steps are executed to form a control code file. And when the steps are executed, displaying the second target graph at the periphery of the first target graph displayed on the terminal in an animation mode. I.e. presenting the target animation in the terminal.
Optionally, as an optional implementation, as shown in fig. 2, the animation configuration method includes:
step S202, setting the first target graph as a graph of the target animation to be configured.
And step S204, setting the second target graph as a graph for displaying the target animation.
And step S206, setting target animation parameters for the target animation, wherein the target animation parameters comprise an area size parameter of an animation display area and a moving speed of a second target graph on the animation display area, and the animation display area is adjacent to the first target graph.
And S208, setting a corresponding animation control file for the target animation, wherein the animation control file is used for generating an animation display area according to the shape and area size parameters of the first target graph and controlling the second target graph to move on the animation display area according to the moving speed so as to display the target animation.
Optionally, the method in this embodiment may include, but is not limited to, writing a data file for displaying a special effect scene in a game, where the special effect may include waving of hair and clothes of a game character in the game. When the waving of the hair and clothes of the game character in the game is carried out and a code program is compiled, a graph displaying the waving of the hair can be obtained and used as a resource for compiling a game special effect data file. The method can also be applied to compiling the special effects of thunder and rain in the webpage.
The second target graph may be a single graph or a plurality of graphs, but is less than the number of frames per second when the animation is played. For example, in the animation, 30 graphics are required, and in the conventional method, 30 graphics are included in the resource package of the data file, but in the embodiment, the number of the graphics is less than 30. That is, animation can be formed by one or more figures without 30 figures, and the size of control code file data of the game animation special effect can be reduced.
It should be noted that the first target pattern may be a pattern including a pattern. For example, the avatar file displayed by a game account can be regarded as a first target graphic. The second target graphic may be a graphic including a pattern, for example, a graphic with a meteor style, may be displayed at the edge of the first target graphic, and may be a dynamic graphic around the avatar file displayed by the game account.
Optionally, the animation display area surrounds the first target graphic, wherein the animation display area is in contact with or not in contact with a boundary of the first target graphic. For example, the animation display region is in contact with the first target graphic region, overlaps a predetermined portion, or is a distance away.
It should be noted that the animation mode may be formed by controlling the file to move the second target graphic in the display area with a predetermined size at a predetermined moving speed. Since the display area is generated according to the shape and area size parameters of the first target graphic, the second target graphic can be displayed in the form of animation at the edge of the first target graphic, and the presentation effect can be in the form of blinking.
Optionally, the setting the first target graphic as the graphic of the target animation to be configured includes: acquiring a first operation instruction on a configuration interface, and setting a first target graph selected by the first operation instruction as a graph of a target animation to be configured;
setting the second target graph as a graph for showing the target animation, comprising: acquiring a second operation instruction on the configuration interface, and setting a second target graph selected by the second operation instruction as a graph for displaying the target animation;
setting target animation parameters for the target animation, comprising: and acquiring a third operation instruction on the configuration interface, and setting animation parameters input by the third operation instruction as target animation parameters.
In this embodiment, the first target graphic, the second target graphic and the target animation parameter may be configured in the configuration interface, that is, the first target graphic, the second target graphic and the target animation parameter may be configured arbitrarily when the control code is written. For example, the moving speed of the second target graphic in the display area is set to 0.2 m/s by the input operation, and the second target graphic is presented in the display area and in the form of animation.
Optionally, a fourth operation instruction is obtained on the configuration interface; setting the target shape selected by the fourth operation instruction as the shape of the first target graph; or after the first target graph is set as the graph of the target animation to be configured in response to the first operation instruction, the method further comprises the following steps: and acquiring the shape of the first target graph from the attribute parameters of the first target graph.
Wherein, set up the corresponding animation control file for the target animation, include: and setting corresponding animation control codes for the target animation, wherein the animation control codes are used for dividing the animation display area represented by the shape and area size parameters of the first target graph into a group of triangles, acquiring the connection sequence of the vertexes of the group of triangles, and forming a mesh area comprising the group of triangles according to the connection sequence, wherein the mesh area is the animation display area.
Optionally, the installation file of the target application is set to be a configuration file including a first target graph, a second target graph, an animation control file, and a target animation, wherein a first identifier for acquiring the first target graph, a second identifier for acquiring the second target graph, and a target animation parameter are recorded in the configuration file, an animation control code is recorded in the animation control file, the animation control code is used for generating an animation display area according to the shape and area size parameter of the first target graph, and controlling the second target graph to move on the animation display area according to the moving speed to display the target animation, and the target animation is used for displaying when the target application runs.
The target application may include, but is not limited to, a gaming application, among others.
According to the embodiment, the first target graph is set as the graph of the target animation to be configured; setting the second target graph as a graph for showing the target animation; setting target animation parameters for the target animation, wherein the target animation parameters comprise an area size parameter of an animation display area and a moving speed of a second target graph on the animation display area, and the animation display area is adjacent to the first target graph; and setting a corresponding animation control file for the target animation, wherein the animation control file is used for generating an animation display area according to the shape and area size parameters of the first target graph and controlling the second target graph to move on the animation display area according to the moving speed so as to display the target animation, so that the aim of presenting an animation effect through one target graph is fulfilled, the technical effect of realizing a small data file of the animation effect is realized, and the technical problem that the data file presenting a special effect is large in data in the prior art is solved.
It should be noted that the method in this embodiment can reduce a large amount of picture resources and performance consumption caused by animation effects in the game.
As an alternative embodiment, after setting the installation file of the target application as a configuration file including the first target graphic, the second target graphic, the animation control file, and the target animation, the method further includes: after installing the installation file on the target terminal, running the target application on the target terminal; displaying a first target graphic in a target application; and acquiring a second target graph through a second identifier in the configuration file, generating an animation display area according to the shape and area size parameters of the first target graph by running an animation control code in the animation control file, and controlling the second target graph to move on the animation display area according to the moving speed.
In this embodiment, the data package of the animation configuration, i.e. the installation file, is installed in the target terminal, and the target application is run, the animation effect will be displayed by the second target graphic around the first target graphic.
In combination with the above embodiments, the present invention also provides an alternative embodiment, a method for producing special effects based on uv (unity shader) animation. As shown in fig. 3, a flow chart of the preferred embodiment.
the UI interface of the component is shown in fig. 4, and fig. 4 shows the main parameters of the added component: target: target UI object, Type: animation expression type, Texture: and (5) animation resource mapping. As shown in fig. 4, the graphics are input in the object in the assembly, the speed is set to 0.2 m/s, the rectangle in the pattern is selected, the size is selected to be 50 mm, and the texture is selected to be light. Setting relevant parameters in the components, and running code files in the relevant components in the game, wherein the code files can be presented in a display interface: the rectangular pattern as a base pattern, a pattern having a brilliant texture in a region 50 mm wide around the rectangular pattern, was run at a speed of 0.2 m/sec, and was further shown as a special effect of flickering in a region 50 mm around the base pattern.
where Mesh is one component in Unity, called a grid component. Generally speaking, Mesh refers to the Mesh of a model, a 3D model is formed by splicing polygons, and a complex polygon is actually formed by splicing a plurality of triangular faces. The surface of a 3D model is made up of a plurality of triangular faces connected to each other. In the three-dimensional space, the set of points constituting the triangular faces and the sides of the triangle is the Mesh.
So modeling is to draw a series of triangles and locating a triangle requires only 3 vertices. Taking a pentagon as an example, as shown in fig. 5, a pentagon comprises 5 vertices and 5 sides, and 5 points are point 1, point 2, point 3, point 4, and point 5. In Unity, it is drawn by converting it into a series of triangles. This pentagon can be made up in what combination by several triangles as follows. The grid is composed of three triangles (1, 2, 3), (1, 3, 4) and (1, 4, 5), and as shown in fig. 6, the grid is a pentagon (one). Alternatively, a grid is composed of three triangles (2, 1, 5), (2, 4, 5) and (2, 3, 4), as shown in fig. 7, and a grid is formed by a pentagon (two).
In the class of Unity Mesh, the array Mesh is used to store the triangle vertex coordinates. When the number of vertices exceeds 3, the sequence of the connection points is different, so that different shapes of graphs can be drawn, and the desired sequence of the connection points must be obtained. The array mesh. triangles is used to record the order in which triangles are connected. Since the order of the three vertices of each triangle to be drawn needs to be known, the order of 3 × n points is needed to be known for drawing n triangles. I.e. the length of the array mesh.
All figures are composed of triangles, and drawing comprises three parts: verticals: all vertex coordinates of the graph; triangles: drawing the graph in a sequence, namely selecting three vertexes to form a triangle, wherein the sequence must be clockwise, and the graph can be drawn on the back in a counterclockwise manner; uv: the material map is corresponding to the graph, uv lower left corner (0, 0) and upper right corner (1, 1), namely each vertex coordinate is corresponding to the map, the vertex coordinate can be moved to the area of the upper right corner first, and then the proportion is scaled to 1; according to the method for drawing triangles, a graph is drawn, wherein the assignment process, the codes and the drawing result of the triangle points are shown in FIG. 8. The serial numbers (0, 1, 3) can be drawn clockwise first, and then the serial numbers (3, 1, 2) can be drawn clockwise, so that the Quad result is finally obtained.
In which the program automatically creates a mesh according to the size and shape (rectangle, circle, etc.) of the UI original, as shown in fig. 9, a gridded rectangle.
It should be noted that, in consideration of universality, various general graphs are expanded, and a circle is formed by a circle center and a point on the circle to form a triangle; the electric fan type circular ring is composed of a small trapezoid, and each trapezoid can be composed of two triangles.
Firstly, a program creates a mesh through a grid vertex, a UV map and a normal line according to the size and the shape (rectangle, circle and the like) of an original, then adds a (a plurality of) maps to the mesh, realizes a simple circular UV rolling shape, and calls a UV value in Update to realize the dynamic effect.
wherein, the first target graph and the second target graph are written into the code. The size and shape of the first target feature is determined.
wherein the moving speed of the second target pattern is set.
And 5, finally displaying. I.e. displaying special effects in the terminal.
Through the scheme in the embodiment, special effects of thunder and rain can be displayed in the game, or special effects of flickering around the head portrait area of some game characters can be made to be obvious.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiment of the invention, an animation configuration device for implementing the animation configuration method is also provided. As shown in fig. 10, the apparatus includes: a first setting unit 1011, a second setting unit 1013, a third setting unit 1015, and a fourth setting unit 1017.
A first setting unit 1011, configured to set the first target graphic as a graphic of a target animation to be configured;
a second setting unit 1013 for setting the second target graphic as a graphic for showing the target animation;
a third setting unit 1015, configured to set target animation parameters for the target animation, where the target animation parameters include a region size parameter of an animation display region and a moving speed of the second target graphic on the animation display region, and the animation display region is adjacent to the first target graphic;
a fourth setting unit 1017, configured to set a corresponding animation control file for the target animation, where the animation control file is configured to generate an animation display area according to the shape and the area size parameter of the first target graph, and control the second target graph to move on the animation display area according to the moving speed, so as to display the target animation.
Optionally, in this embodiment, the first setting unit 1011 is further configured to perform the following operations: acquiring a first operation instruction on a configuration interface, and setting a first target graph selected by the first operation instruction as a graph of a target animation to be configured;
the second setting unit 1013 is also configured to perform the following operations: acquiring a second operation instruction on the configuration interface, and setting a second target graph selected by the second operation instruction as a graph for displaying the target animation;
the third setting unit 1015 is further configured to perform the following operations: and acquiring a third operation instruction on the configuration interface, and setting animation parameters input by the third operation instruction as target animation parameters.
Optionally, the fourth setting unit 1017 may include: the setting module is used for setting corresponding animation control codes for the target animation, wherein the animation control codes are used for dividing an animation display area represented by the shape and area size parameters of the first target graph into a group of triangles, acquiring the connection sequence of the vertexes of the group of triangles, and forming a mesh area comprising the group of triangles according to the connection sequence, wherein the mesh area is the animation display area.
With the present embodiment, the first setting unit 1011 sets the first target graphic as a graphic of the target animation to be configured; the second setting unit 1013 sets the second target graphic as a graphic for showing the target animation; the third setting unit 1015 sets target animation parameters for the target animation, where the target animation parameters include a region size parameter of an animation display region and a moving speed of the second target graphic on the animation display region, and the animation display region is adjacent to the first target graphic; the fourth setting unit 1017 sets a corresponding animation control file for the target animation, wherein the animation control file is used for generating an animation display area according to the shape and area size parameters of the first target graph, and controlling the second target graph to move on the animation display area according to the moving speed so as to display the target animation. The purpose of presenting the animation effect through one target graph is achieved, the technical effect that the data file achieving the animation effect is small is achieved, and the technical problem that the data file presenting the special effect is large in data in the prior art is solved.
As an alternative embodiment, the apparatus may further include:
the fifth setting unit is used for setting the installation file of the target application into a configuration file comprising a first target graph, a second target graph, an animation control file and a target animation, wherein a first identifier for acquiring the first target graph, a second identifier for acquiring the second target graph and a target animation parameter are recorded in the configuration file, an animation control code is recorded in the animation control file, the animation control code is used for generating an animation display area according to the shape and the area size parameter of the first target graph and controlling the second target graph to move on the animation display area according to the moving speed so as to display the target animation, and the target animation is used for displaying when the target application runs.
As an alternative embodiment, the apparatus may further include:
an execution unit configured to execute the target application on the target terminal after installing the installation file on the target terminal after setting the installation file of the target application as a configuration file including the first target graphic, the second target graphic, the animation control file, and the target animation;
a first display unit for displaying a first target graphic in a target application;
and the processing unit is used for acquiring a second target graph through a second identifier in the configuration file, generating an animation display area according to the shape and area size parameters of the first target graph by running an animation control code in the animation control file, and controlling the second target graph to move on the animation display area according to the moving speed.
As an alternative embodiment, the apparatus may further include:
the first acquisition unit is used for acquiring a fourth operation instruction on the configuration interface; setting the target shape selected by the fourth operation instruction as the shape of the first target graph; or
And the second acquisition unit is used for acquiring the shape of the first target graph from the attribute parameters of the first target graph after the first target graph is set as the graph of the target animation to be configured in response to the first operation instruction.
According to yet another aspect of the embodiments of the present invention, there is also provided an electronic device for implementing the animation configuration method, as shown in fig. 11, the electronic device includes a memory 1102 and a processor 1104, the memory 1102 stores therein a computer program, and the processor 1104 is configured to execute the steps in any one of the method embodiments through the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, setting the first target graph as a graph of a target animation to be configured;
s2, setting the second target graph as a graph for showing the target animation;
s3, setting target animation parameters for the target animation, wherein the target animation parameters comprise an area size parameter of an animation display area and a moving speed of a second target graph on the animation display area, and the animation display area is adjacent to the first target graph;
and S4, setting a corresponding animation control file for the target animation, wherein the animation control file is used for generating an animation display area according to the shape and area size parameters of the first target graph and controlling the second target graph to move on the animation display area according to the moving speed so as to display the target animation.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 11 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 11 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 11, or have a different configuration than shown in FIG. 11.
The memory 1102 may be used to store software programs and modules, such as program instructions/modules corresponding to the animation configuration method and apparatus in the embodiments of the present invention, and the processor 1104 executes various functional applications and data processing by running the software programs and modules stored in the memory 1102, so as to implement the animation configuration method. The memory 1102 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1102 can further include memory located remotely from the processor 1104 and such remote memory can be coupled to the terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 1102 may be specifically, but not limited to, used for the first target graphic information, the second target graphic information, the target animation parameter, and the like. As an example, as shown in fig. 11, the memory 1102 may include, but is not limited to, a first setting unit 1011, a second setting unit 1013, a third setting unit 1015, and a fourth setting unit 1017 of the animation configuration device. In addition, other module units in the animation configuration apparatus may also be included, but are not limited to, and are not described in detail in this example.
Optionally, the transmitting device 1106 is used for receiving or transmitting data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 1106 includes a Network adapter (NIC) that can be connected to a router via a Network cable to communicate with the internet or a local area Network. In one example, the transmission device 1106 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In addition, the electronic device further includes: a display 1108 for displaying the animation effect; and a connection bus 1110 for connecting the respective module parts in the above-described electronic apparatus.
According to a further aspect of an embodiment of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, setting the first target graph as a graph of a target animation to be configured;
s2, setting the second target graph as a graph for showing the target animation;
s3, setting target animation parameters for the target animation, wherein the target animation parameters comprise an area size parameter of an animation display area and a moving speed of a second target graph on the animation display area, and the animation display area is adjacent to the first target graph;
and S4, setting a corresponding animation control file for the target animation, wherein the animation control file is used for generating an animation display area according to the shape and area size parameters of the first target graph and controlling the second target graph to move on the animation display area according to the moving speed so as to display the target animation.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (15)
1. An animation configuration method, comprising:
setting the first target graph as a graph of a target animation to be configured;
setting a second target graph as a graph for showing the target animation;
setting target animation parameters for the target animation, wherein the target animation parameters comprise an area size parameter of an animation display area and a moving speed of the second target graph on the animation display area, and the animation display area is adjacent to the first target graph;
and setting a corresponding animation control file for the target animation, wherein the animation control file is used for generating the animation display area according to the shape of the first target graph and the area size parameter, and controlling the second target graph to move on the animation display area according to the moving speed so as to display the target animation.
2. The method of claim 1, further comprising:
setting an installation file of a target application as a configuration file comprising the first target graph, the second target graph, the animation control file and the target animation, wherein a first identifier for acquiring the first target graph, a second identifier for acquiring the second target graph and the target animation parameters are recorded in the configuration file, an animation control code is recorded in the animation control file, the animation control code is used for generating the animation display area according to the shape of the first target graph and the area size parameters, and controlling the second target graph to move on the animation display area according to the moving speed so as to display the target animation, and the target animation is used for displaying when the target application runs.
3. The method of claim 2, wherein after setting an installation file for a target application to a configuration file that includes the first target graphic, the second target graphic, the animation control file, and the target animation, the method further comprises:
after the installation file is installed on a target terminal, running the target application on the target terminal;
displaying the first target graphic in the target application;
and acquiring the second target graph through the second identifier in the configuration file, generating the animation display area according to the shape of the first target graph and the area size parameter by operating the animation control code in the animation control file, and controlling the second target graph to move on the animation display area according to the moving speed.
4. The method of claim 1, wherein:
the setting of the first target graph as the graph of the target animation to be configured includes: acquiring a first operation instruction on a configuration interface, and setting the first target graph selected by the first operation instruction as a graph of the target animation to be configured;
the setting of the second target graph as the graph for displaying the target animation comprises the following steps: acquiring a second operation instruction on the configuration interface, and setting the second target graph selected by the second operation instruction as a graph for displaying the target animation;
the setting of target animation parameters for the target animation comprises the following steps: and acquiring a third operation instruction on the configuration interface, and setting animation parameters input by the third operation instruction as the target animation parameters.
5. The method of claim 4,
the method further comprises the following steps: acquiring a fourth operation instruction on the configuration interface; setting the target shape selected by the fourth operation instruction as the shape of the first target graph; or
After setting the first target graphic as a graphic for which the target animation is to be configured in response to the first operation instruction, the method further includes: and acquiring the shape of the first target graph from the attribute parameters of the first target graph.
6. The method according to any one of claims 1 to 5, wherein the setting of the corresponding animation control file for the target animation comprises:
and setting a corresponding animation control code for the target animation, wherein the animation control code is used for dividing the animation display area represented by the shape of the first target graph and the area size parameter into a group of triangles, acquiring the connection sequence of the vertexes of the group of triangles, and forming a mesh area comprising the group of triangles according to the connection sequence, wherein the mesh area is the animation display area.
7. The method of any of claims 1 to 5, wherein the animated display region surrounds the first target graphic, wherein the animated display region is in contact or not in contact with a boundary of the first target graphic.
8. An animation configuration apparatus, comprising:
the first setting unit is used for setting the first target graph as a graph of the target animation to be configured;
the second setting unit is used for setting a second target graph as a graph for showing the target animation;
a third setting unit, configured to set target animation parameters for the target animation, where the target animation parameters include an area size parameter of an animation display area and a moving speed of the second target graphic on the animation display area, and the animation display area is adjacent to the first target graphic;
and the fourth setting unit is used for setting a corresponding animation control file for the target animation, wherein the animation control file is used for generating the animation display area according to the shape of the first target graph and the area size parameter, and controlling the second target graph to move on the animation display area according to the moving speed so as to display the target animation.
9. The apparatus of claim 8, further comprising:
a fifth setting unit, configured to set an installation file of a target application to a configuration file that includes the first target graphic, the second target graphic, the animation control file, and the target animation, where a first identifier for acquiring the first target graphic, a second identifier for acquiring the second target graphic, and the target animation parameter are recorded in the configuration file, and an animation control code is recorded in the animation control file, where the animation control code is configured to generate the animation display area according to the shape of the first target graphic and the area size parameter, and control the second target graphic to move on the animation display area according to the moving speed to display the target animation, where the target animation is used to be displayed when the target application runs.
10. The apparatus of claim 9, further comprising:
an execution unit configured to execute a target application on a target terminal after an installation file of the target application is set as a configuration file including the first target graphic, the second target graphic, the animation control file, and the target animation is installed on the target terminal;
a first display unit for displaying the first target graphic in the target application;
and the processing unit is used for acquiring the second target graph through the second identifier in the configuration file, generating the animation display area according to the shape of the first target graph and the area size parameter by running the animation control code in the animation control file, and controlling the second target graph to move on the animation display area according to the moving speed.
11. The apparatus of claim 8, wherein:
the first setting unit is further configured to perform the following operations: acquiring a first operation instruction on a configuration interface, and setting the first target graph selected by the first operation instruction as a graph of the target animation to be configured;
the second setting unit is further configured to perform the following operations: acquiring a second operation instruction on the configuration interface, and setting the second target graph selected by the second operation instruction as a graph for displaying the target animation;
the third setting unit is further configured to perform the following operations: and acquiring a third operation instruction on the configuration interface, and setting animation parameters input by the third operation instruction as the target animation parameters.
12. The apparatus of claim 11, further comprising:
the first acquisition unit is used for acquiring a fourth operation instruction on the configuration interface; setting the target shape selected by the fourth operation instruction as the shape of the first target graph; or
And the second acquisition unit is used for acquiring the shape of the first target graph from the attribute parameters of the first target graph after the first target graph is set as the graph of the target animation to be configured in response to the first operation instruction.
13. The apparatus according to any one of claims 8 to 12, wherein the fourth setting unit includes:
and the setting module is used for setting a corresponding animation control code for the target animation, wherein the animation control code is used for dividing the animation display area represented by the shape of the first target graph and the area size parameter into a group of triangles, acquiring the connection sequence of the vertexes of the group of triangles, and forming a mesh area comprising the group of triangles according to the connection sequence, wherein the mesh area is the animation display area.
14. A storage medium comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 7.
15. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911151365.3A CN110930484B (en) | 2019-11-21 | 2019-11-21 | Animation configuration method and device, storage medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911151365.3A CN110930484B (en) | 2019-11-21 | 2019-11-21 | Animation configuration method and device, storage medium and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110930484A CN110930484A (en) | 2020-03-27 |
CN110930484B true CN110930484B (en) | 2021-01-15 |
Family
ID=69851568
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911151365.3A Active CN110930484B (en) | 2019-11-21 | 2019-11-21 | Animation configuration method and device, storage medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110930484B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111768480B (en) * | 2020-07-03 | 2024-04-09 | 网易(杭州)网络有限公司 | Flame animation generation method and device, computer storage medium and electronic equipment |
CN112150592B (en) * | 2020-09-28 | 2023-07-14 | 腾讯科技(深圳)有限公司 | Animation file generation method and device, storage medium and electronic equipment |
CN114187170B (en) * | 2021-12-10 | 2024-06-21 | 北京字节跳动网络技术有限公司 | Method, device, equipment and storage medium for generating image special effect package |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103200177B (en) * | 2013-02-27 | 2016-02-17 | 深圳第七大道网络技术有限公司 | A kind of game special animated show method |
US9076258B2 (en) * | 2013-03-14 | 2015-07-07 | Pixar | Stylizing animation by example |
CN104850389B (en) * | 2014-02-14 | 2020-09-29 | 腾讯科技(深圳)有限公司 | Method and device for realizing dynamic interface |
US9786032B2 (en) * | 2015-07-28 | 2017-10-10 | Google Inc. | System for parametric generation of custom scalable animated characters on the web |
CN107608993B (en) * | 2016-07-12 | 2024-05-28 | 腾讯科技(深圳)有限公司 | Webpage animation generation method and device |
CN108379841B (en) * | 2018-03-15 | 2021-10-29 | 网易(杭州)网络有限公司 | Game special effect processing method and device and terminal |
JP2019175266A (en) * | 2018-03-29 | 2019-10-10 | 株式会社Preferred Networks | Operation generation device, model generation device, operation generation method and program |
CN108619720B (en) * | 2018-04-11 | 2020-07-07 | 腾讯科技(深圳)有限公司 | Animation playing method and device, storage medium and electronic device |
CN109939438B (en) * | 2019-02-19 | 2022-09-13 | 腾讯数码(天津)有限公司 | Track display method and device, storage medium and electronic device |
CN110163935A (en) * | 2019-04-04 | 2019-08-23 | 浙江口碑网络技术有限公司 | Animation rendering method, device, equipment and readable storage medium storing program for executing |
-
2019
- 2019-11-21 CN CN201911151365.3A patent/CN110930484B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN110930484A (en) | 2020-03-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108619720B (en) | Animation playing method and device, storage medium and electronic device | |
CN110930484B (en) | Animation configuration method and device, storage medium and electronic device | |
CN107358649B (en) | Processing method and device of terrain file | |
CN109685909B (en) | Image display method, image display device, storage medium and electronic device | |
KR102698917B1 (en) | Image processing method and device, electronic device and storage medium | |
CN112200896B (en) | Virtual object wind animation rendering method and device, storage medium and electronic device | |
CN112241993B (en) | Game image processing method and device and electronic equipment | |
CN105913471B (en) | The method and apparatus of picture processing | |
CN111127611B (en) | Three-dimensional scene rendering method and device and electronic equipment | |
CN103247064B (en) | A kind of generation method of three-dimensional dynamic graphical, device and mobile terminal | |
US20220230375A1 (en) | Three-dimensional avatar generation and customization | |
CN111773688B (en) | Flexible object rendering method and device, storage medium and electronic device | |
CN111710020B (en) | Animation rendering method and device and storage medium | |
CN115641375B (en) | Method, device, equipment and storage medium for processing hair of virtual object | |
EP4394713A1 (en) | Image rendering method and apparatus, electronic device, computer-readable storage medium, and computer program product | |
CN108837510B (en) | Information display method and device, storage medium and electronic device | |
CN112967367B (en) | Water wave special effect generation method and device, storage medium and computer equipment | |
CN111773719A (en) | Rendering method and device of virtual object, storage medium and electronic device | |
CN113318428A (en) | Game display control method, non-volatile storage medium, and electronic device | |
CN113546415B (en) | Scenario animation playing method, scenario animation generating method, terminal, device and equipment | |
WO2022100059A1 (en) | Data storage management method, object rendering method, and device | |
CN112669423B (en) | Lightning generation method, device, electronic equipment and computer readable storage medium | |
CN104881230A (en) | Method and equipment for performing man-machine interaction on touch control terminal | |
CN115089964A (en) | Method and device for rendering virtual fog model, storage medium and electronic device | |
CN111462343B (en) | Data processing method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40022592 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant |