WO2024008142A1 - 一种动画渲染方法、装置、设备及存储介质 - Google Patents
一种动画渲染方法、装置、设备及存储介质 Download PDFInfo
- Publication number
- WO2024008142A1 WO2024008142A1 PCT/CN2023/106047 CN2023106047W WO2024008142A1 WO 2024008142 A1 WO2024008142 A1 WO 2024008142A1 CN 2023106047 W CN2023106047 W CN 2023106047W WO 2024008142 A1 WO2024008142 A1 WO 2024008142A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image frame
- rendered
- target
- triangulation
- adjacent previous
- 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.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
- G06T13/20—Three-dimensional [3D] animation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
- G06T13/80—Two-dimensional [2D] animation, e.g. using sprites
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/246—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
- G06T7/248—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments involving reference images or patches
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2213/00—Indexing scheme for animation
- G06T2213/12—Rule based animation
Definitions
- the present disclosure relates to the field of data processing, and in particular to an animation rendering method, device, equipment and storage medium.
- Lottie is a cross-platform animation solution that can parse AE (Adobe After Effects, dynamic graphics software) and export to generate JSON files through the Bodymovin plug-in, and realize animation effects on IOS, Android, Web, and React Native.
- embodiments of the present disclosure provide an animation rendering method.
- an animation rendering method which method includes:
- the graphics drawing mode of the target graphic object is the fill drawing mode
- the triangulation state of the target graphics object if it is determined that the image frame to be rendered has not changed compared with the adjacent previous image frame, then based on the relationship between the adjacent previous image frame and the target The triangulation data of the graphics object corresponding to the graphics object, for all the images on the image frame to be rendered.
- the target graphics object is rendered.
- determining whether the image frame to be rendered has changed compared with the previous adjacent image frame for the triangulation state of the target graphics object including:
- the left and right states of the ear apex of the target graphic object determine whether the image frame to be rendered has changed compared with the adjacent previous image frame, wherein the left and right states of the ear apex indicate the left and right states of the ear apex. Is the successor vector to the left or right of the predecessor vector of the ear tip vertex.
- determining whether the image frame to be rendered has changed compared with the previous adjacent image frame for the left and right status of the ear tip vertex of the target graphic object includes:
- determining whether the image frame to be rendered has changed compared with the previous adjacent image frame for the number of vertices of the target graphics object includes:
- determining whether the image frame to be rendered has changed compared with the adjacent previous image frame for the left and right status of the ear tip vertex of the target graphic object includes:
- the method further includes:
- the graphics drawing mode of the target graphic object is the stroke drawing mode
- the target graphics object on the image frame to be rendered is rendered based on the triangulation data of the target graphics object.
- the target graphic object is triangulated based on the triangulation data of the adjacent previous image frame of the image frame to be rendered, and the corresponding target graphic object is obtained.
- triangulation data including:
- the triangulation data corresponding to the repeated drawing data and the new triangulation data are determined as the triangulation data corresponding to the target graphics object on the image frame to be rendered.
- an animation rendering device which includes:
- the first determination module is used to determine the target graphics object on the image frame to be rendered in the target graphics animation and the graphics drawing method of the target graphics object;
- the second determination module is used to determine that when the graphics drawing mode of the target graphic object is the fill drawing mode, based on the triangulation state of the target graphic object, determine the phase between the image frame to be rendered and the adjacent previous image frame. Whether the ratio changes; wherein, the adjacent previous image frame is the previous frame adjacent to the to-be-rendered image frame in the target graphics animation;
- a first rendering module configured to, for the triangulation state of the target graphics object, if it is determined that the image frame to be rendered has not changed compared with the adjacent previous image frame, based on the adjacent previous image frame
- the triangulation data of the graphic object corresponding to the target graphic object on the image frame is used to render the target graphic object on the image frame to be rendered.
- the present disclosure provides a non-transitory computer-readable storage medium, the computer-readable storage medium stores instructions, and when the instructions are run on a terminal device, the instructions are caused to cause the The terminal device implements the above method.
- the present disclosure provides an animation rendering device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor executing the computer program , implement the above method.
- the present disclosure provides a computer program product.
- the computer program product includes a computer program/instruction. When the computer program/instruction is executed by a processor, the above method is implemented.
- the present disclosure provides a computer program, which when executed by a processor causes the processor to implement the above method.
- Figure 1 is a flow chart of an animation rendering method provided by an embodiment of the present disclosure
- Figure 2 is a schematic diagram of a graphic object provided by an embodiment of the present disclosure
- Figure 3 is a schematic diagram of another graphic object provided by an embodiment of the present disclosure.
- Figure 4 is a polygonal schematic diagram provided by an embodiment of the present disclosure.
- Figure 5 is a schematic diagram of another graphic object provided by an embodiment of the present disclosure.
- Figure 6 is a schematic diagram of stroke drawing provided by an embodiment of the present disclosure.
- Figure 7 is another schematic diagram of stroke drawing provided by an embodiment of the present disclosure.
- Figure 8 is a schematic structural diagram of an animation rendering device provided by an embodiment of the present disclosure.
- Figure 9 is a schematic structural diagram of an animation rendering device provided by an embodiment of the present disclosure.
- the present disclosure provides an animation rendering method. First, the target graphic object on the image frame to be rendered in the target graphic animation and the graphic drawing mode of the target graphic object are determined. If it is determined that the graphic drawing mode of the target graphic object is the fill drawing mode, then Based on the triangulation state of the target graphics object, determine whether the image frame to be rendered has changed compared with the adjacent previous image frame, where the adjacent previous image frame is the upper image frame adjacent to the image frame to be rendered in the target graphics animation.
- the triangulation data is used to render the target graphics object on the image frame to be rendered.
- the embodiment of the present disclosure compares the triangulation state of the image frame to be rendered of the target graphics object with the adjacent previous image frame, and compares the target graphics object based on the triangulation data of the target graphics object in the adjacent previous image frame.
- the rendering method avoids repeated triangulation of the target graphics object and improves rendering performance.
- an embodiment of the present disclosure provides an animation rendering method.
- Figure 1 is a flow chart of an animation rendering method provided by an embodiment of the present disclosure. The method includes:
- S101 Determine the target graphics object on the image frame to be rendered in the target graphics animation and the graphics drawing method of the target graphics object.
- the target graphic animation may be any continuous frame graphic animation, and each frame of the continuous frame animation includes at least one graphic object, and the same graphic object on each frame of the graphic animation has similarities.
- the image frame to be rendered can be any frame of graphics animation in consecutive frames of graphics animation.
- Graphic objects refer to elements on the image that are drawn based on the graphics drawing method. As shown in Figure 2, each letter in “HAPPY” can be drawn based on the graphics drawing method, so they all belong to the graphics object.
- the target graphics object can be any graphics object on the image frame to be rendered in the target graphics animation.
- Graphic drawing method refers to the drawing method of graphics, such as fill drawing method, stroke drawing method, etc.
- the fill drawing method refers to filling the graphic object, for example, the graphic object can be filled with different colors;
- the stroke drawing method refers to filling the outline of the graphic object, for example, the outline of the picture object can be filled with different backgrounds. Pattern.
- the graphics drawing mode of the target graphics object can be determined according to the drawing instruction. Specifically, after the target graphics object on the image frame to be rendered is determined, the graphics drawing mode of the target graphics object is determined according to the drawing instruction.
- the adjacent previous image frame is the previous frame in the target graphics animation adjacent to the image frame to be rendered.
- the triangulation status is used to reflect whether the triangulation data changes. That is, the triangulation status can reflect whether the triangulation data changes.
- the triangulation data can be obtained after triangulation processing of the graphic object. data.
- Triangulation refers to dividing a graphical object into several triangles. It should be noted that this disclosure does not place any restrictions on the triangulation method.
- the triangulation state can characterize the way a graphics object is triangulated.
- the triangulation status includes the number of vertices of the target graphics object and/or the left and right status of the ear tip vertices, that is, the number of vertices of the target graphics object and/or the left and right status of the ear tip vertices can be used to reflect whether the triangulation data changes.
- the number of vertices of the target graphics object refers to the number of all vertices that constitute the target graphics object;
- the ear tip vertex refers to the vertex corresponding to the convex angle in the target graphics object on the image frame to be rendered, and is formed based on the convex angle.
- the triangle contains no other vertices.
- the number of vertices of the target graphics object of the image frame to be rendered is determined based on the drawing command and the number of vertices of the adjacent previous image. Whether the number of vertices of the target graphics object of the frame has changed. If the number of vertices of the target graphics object of the image frame to be rendered is different from the number of vertices of the target graphics object of the adjacent previous image frame, it means that the target graphics of the image frame to be rendered is different. The object's triangulation state has changed compared to the target graphics object on the adjacent previous image frame.
- the number of vertices of the target graphics object of the image frame to be rendered is equal to that of the adjacent If the number of vertices of the target graphics object on the previous image frame is different, it means that the triangulation state of the target graphics object of the image frame to be rendered has changed compared with the target graphics object on the adjacent previous image frame, that is, the repetition cannot continue. Triangulate data using the target graphics object on the adjacent previous image frame.
- the left and right states of each ear tip vertex of the target graphics object of the image frame to be rendered are determined. Whether the left and right states of each ear tip vertex of the target graphic object on the adjacent previous image frame have changed compared to the previous image frame. If it is determined that the left and right states of each ear tip vertex of the target graphic object of the image frame to be rendered have not changed compared with the left and right states of each ear tip vertex of the target graphic object on the adjacent previous image frame, then it is determined that the image frame to be rendered is consistent with the corresponding ear tip point. There is no change compared to the previous image frame. Otherwise, the image frame to be rendered has changed compared to the previous image frame.
- the number of vertices of the target graphics object of the image frame to be rendered is A
- the number of vertices of the target graphics object has not changed compared with the number of vertices of the target graphics object on the adjacent previous image frame, then continue to determine the left and right states of each ear tip vertex of the target graphics object in the image frame to be rendered and the number of vertices on the adjacent previous image. Whether the left and right states of each ear tip vertex of the target graphic object on the frame have changed compared to each other.
- each ear tip vertex of the target graphic object of the image frame to be rendered are different from those of the target graphic object on the adjacent previous image frame. If the left and right states of each ear tip vertex have not changed, it is determined that the image frame to be rendered has not changed compared with the adjacent previous image frame, that is, the target graphics object triangulation on the adjacent previous image frame can continue to be reused. data, otherwise, the image frame to be rendered has changed compared with the adjacent previous image frame, that is, the triangulation data of the target graphics object on the adjacent previous image frame cannot be continued to be reused.
- the number of vertices of the target graphics object of the image frame to be rendered is determined based on the drawing command and the number of vertices of the target graphics object on the adjacent previous image frame. Whether the number of vertices of the graphics object has changed, thereby determining whether the image frame to be rendered has changed compared to the adjacent previous image frame.
- the image frame to be rendered has changed compared with the previous image frame; if If the number of vertices of the target graphics object of the rendered image frame is the same as the number of vertices of the target graphics object on the adjacent previous image frame, it means that the image frame to be rendered has not changed compared with the previous adjacent image frame.
- the drawing command of the target graphics object on the image frame to be rendered and the drawing command on the adjacent previous image frame are respectively determined as the first drawing command and the second drawing command, and the first drawing command is extracted according to the preset rules.
- the characteristics of the drawing command and the second drawing command determine whether the image frame to be rendered has changed compared with the adjacent previous image frame based on the comparison result of the characteristics of the first drawing command and the characteristics of the second drawing command.
- the drawing command can be composed of multiple commands, such as move To, line To, etc.
- the first drawing command is a drawing command of the target graphics object on the image frame to be rendered.
- the second drawing command is a drawing command on an adjacent previous image frame of the target graphics object.
- the preset rules are preset feature extraction rules, which can be set as needed.
- the preset rules can be set to extract the first letter of each drawing command corresponding to the target graphics object on the image frame, and add each first letter to Characteristics of the drawing command corresponding to the target graphics object on the image frame are combined according to the drawing order.
- This disclosure does not place any limitation on the setting method of the preset rules.
- the characteristic of the drawing command may be an abbreviation of the drawing command, for example, the first letter of the drawing command is used as the characteristic of the drawing command. As shown in the code of the following drawing command, the characteristics of the corresponding drawing command are mlll.
- Figure 3 is a schematic diagram of another graphic object provided by the embodiment of the present disclosure. It is assumed that the target graphic object of the image frame to be rendered is on the adjacent previous image frame. is the rectangle shown in Figure 3, where W1, B1, A1, and Z1 respectively correspond to the four vertices of the rectangle, and the coordinates corresponding to the four vertices are (W1.x, W1.y), (B1.x, B1.y), (A1.x,A1.y), (Z1.x,Z1.y).
- the corresponding drawing command is as shown in the following code: moveTo(W1.x,W1.y);//m lineTo(B1.x,B1.y); //l lineTo(A1.x,A1.y); //l lineTo(Z1.x,Z1.y); //l
- the characteristics of the second drawing command corresponding to the target graphics object on the adjacent previous image frame of the target graphics object of the image frame to be rendered are mlll. If the first drawing command corresponding to the target graphics object of the image frame to be rendered is If the characteristics of the drawing command are the same as the above-mentioned second drawing command, it is determined that the image frame to be rendered has not changed compared with the previous adjacent image frame.
- the left and right states of the ear tip vertex of the target graphic object of the image frame to be rendered are determined based on the cross product of the predecessor vector and the successor vector of the ear tip vertex. Whether the left and right states of the ear tip vertices of the target graphic object on the adjacent previous image frame have changed compared to the adjacent previous image frame, thereby determining whether the image frame to be rendered has changed compared with the adjacent previous image frame.
- the left and right state of the ear tip vertex of the target graphics object of the image frame to be rendered changes compared with the left and right status of the ear tip vertex of the target graphics object of the adjacent previous image frame, it means that the image frame to be rendered is compared with the adjacent previous image frame. has changed; if the left and right states of the ear apex of the target graphics object in the image frame to be rendered have not changed compared with the left and right states of the ear apex of the target graphic object in the adjacent previous image frame, it means that the image frame to be rendered is different from the adjacent apex. No changes from the previous image frame.
- the ear tip vertex of the target graphic object of the image frame to be rendered is determined, and the intersection of the predecessor vector and the successor vector of the ear tip vertex is calculated.
- Product based on the comparison result of the cross product corresponding to the ear tip vertex and the cross product corresponding to the corresponding ear tip vertex on the adjacent previous image frame, determine whether the image frame to be rendered has changed compared with the adjacent previous image frame.
- triangulation refers to dividing the graphic object into several triangles. It should be noted that this disclosure does not place any limitations on the triangulation method.
- the ear tip vertex refers to the vertex corresponding to the convex angle in the target graphics object of the image frame to be rendered, and the triangle formed by the convex angle does not contain other vertices.
- the precursor vector and the successor vector refer to the order in which vectors are drawn.
- the vector drawn first is called the precursor.
- Figure 4 is a polygon schematic diagram provided by an embodiment of the present disclosure. As shown in Figure 4, assuming that the ear tip vertex is vertex B2, then its corresponding precursor vector is The successor vector is
- the left and right state of the ear apex refers to the left and right state of the successor vector of the ear apex relative to the predecessor vector, that is, whether the successor vector of the ear apex is to the left or right of the predecessor vector.
- the ear apex is vertex W2, which corresponds to The precursor vector of is The successor vector is It can be seen from Figure 4 that the successor vector in the precursor vector on the right side, so the vertex state of the ear tip of vertex W2 is on the right side, and its corresponding vertex is a concave angle.
- the ear tip vertex of the target graphic object of the image frame to be rendered is determined, and the predecessor vector and successor of the ear tip vertex are calculated.
- the cross product of vectors is calculated.
- the target on the adjacent previous image frame of the image frame to be rendered will If the cross product of the predecessor vector and the successor vector of the corresponding ear tip vertex of the graphic object is less than 0 (or greater than 0), it is determined that the left and right status of the ear tip vertex has changed, thereby determining the difference between the image frame to be rendered and the adjacent previous image.
- the positive and negative states of the cross product of the predecessor vector and the successor vector of the ear tip vertex C of the target graphics object of the image frame to be rendered are compared to the The positive and negative states of the cross product of the predecessor vector and the successor vector of the ear tip vertex C of the target graphics object on the adjacent previous image frame of the dyed image frame change, and the predecessor of the ear tip vertex D of the target graphics object in the image frame to be rendered changes.
- the positive and negative states of the cross product of the vector and the successor vector change compared to the positive and negative states of the cross product of the predecessor vector and the successor vector of the ear tip vertex D of the target graphic object on the adjacent previous image frame of the image frame to be rendered, Then it is determined that the image frame to be rendered has changed compared with the adjacent previous image frame.
- the triangulation state of the target graphics object of the image frame to be rendered and the triangulation state of the adjacent previous image frame are determined based on the number of vertices of the target graphics object and the left and right states of the ear tip vertices.
- the triangulation state of the target graphic object is more accurate than whether it has changed.
- the data obtained after triangulating any graphic object on any image frame is the triangulation data of the graphic object.
- the target graphics object of the image frame to be rendered does not need to be triangulated again, and the adjacent adjacent graphics objects are directly used.
- the triangulation data of the graphics object corresponding to the target graphics object on the previous image frame and the vertex coordinate data of the target graphics object can be used to render the target graphics object on the image frame to be rendered, avoiding duplication of the target graphics object. Triangulation, improved rendering performance.
- Figure 5 is a schematic diagram of another graphic object provided by an embodiment of the present disclosure
- the target graphic object is a rectangle W2B2A2Z2 as shown in Figure 5
- its adjacent previous image frame is a rectangle W1B1A1Z1 as shown in Figure 3.
- the rectangle W2B2A2Z2 can be rendered based on the triangulation data of rectangle W1B1A1Z1 and the vertex coordinate data of rectangle W2B2A2Z2.
- the animation rendering method first determine the target graphics object on the image frame to be rendered in the target graphics animation and the graphics drawing method of the target graphics object. If the target graphics object is determined If the graphics drawing mode of the target graphic object is the fill drawing mode, then according to the triangulation state of the target graphic object, determine whether the image frame to be rendered has changed compared with the adjacent previous image frame, where the adjacent previous image frame is The previous frame in the target graphics animation adjacent to the image frame to be rendered, and then for the triangulation state of the target graphics object, if it is determined that the image frame to be rendered has not changed compared with the adjacent previous image frame, based on the adjacent The triangulation data of the graphics object corresponding to the target graphics object on the previous image frame is rendered to the target graphics object on the image frame to be rendered.
- the embodiment of the present disclosure compares the triangulation state of the image frame to be rendered of the target graphics object with the adjacent previous image frame, and compares the target graphics object based on the triangulation data of the target graphics object in the adjacent previous image frame.
- the rendering method avoids repeated triangulation of the target graphics object and improves rendering performance.
- the target graphics object is triangulated based on the triangulation data of the adjacent previous image frame of the image frame to be rendered.
- the stroke drawing method refers to filling the outline of the picture object.
- Figure 6 is a schematic diagram of a stroke drawing provided by an embodiment of the present disclosure. As shown in Figure 6, the rectangle OPQR is a stroke drawing of the line segment MN. .
- the triangulation data of the adjacent previous image frame of the target graphics object is first obtained, and then the triangulation data is multiplexed into the target graphics object.
- the corresponding triangular part in the graphic object is triangulated, and then the triangular part of the target graphic object that is different from the adjacent previous image frame is triangulated.
- the target graphic is obtained.
- the triangulation data corresponding to the object is rendered based on the triangulation data of the target graphics object, and the target graphics object on the image frame to be rendered is rendered.
- the triangulation data corresponding to the target graphics object is as follows:
- the repeated drawing data of the drawing data of the target graphic object compared with the adjacent previous image frame is first determined, and the drawing data corresponding to the drawing data of the target graphic object except the repeated drawing data is determined.
- triangulation processing is performed to obtain new triangulation data.
- the triangulation data corresponding to the repeated drawing data and the new triangulation data are determined as the data to be drawn. Renders the triangulation data corresponding to the target graphics object on the graphics frame.
- the figure shows the line segment MN and its corresponding stroked rectangle OPQR.
- the stroke width is 10 pixels
- four rectangle OPQR can be obtained
- the vertex coordinates are then triangulated to obtain 2 triangles, namely triangle OPQ and triangle OQR.
- Figure 7 is another schematic diagram of stroke drawing provided by an embodiment of the present disclosure.
- Figure 7 is a newly added rectangular SQTU based on Figure 6.
- the triangulation data in Figure 7 can be split into the triangulation data of the rectangle O1P1Q1R1 (that is, the triangulation data corresponding to the repeated drawing data) and the triangulation data of the rectangle SQTU Triangulation data (that is, new triangulation data), so that only the rectangular SQTU needs to be triangulated, realizing the reuse of repeated drawing data and improving rendering performance.
- the present disclosure also provides an animation rendering device.
- Figure 8 is a schematic structural diagram of an animation rendering device provided by an embodiment of the present disclosure.
- the device includes:
- the first determination module 801 is used to determine the target graphics object on the image frame to be rendered in the target graphics animation and the graphics drawing method of the target graphics object;
- the second determination module 802 is used to determine the image frame to be rendered and the adjacent previous image frame based on the triangulation state of the target graphic object when it is determined that the graphics drawing mode of the target graphic object is the fill drawing mode. Whether the comparison has changed; wherein, the adjacent previous image frame is the previous frame adjacent to the to-be-rendered image frame in the target graphics animation;
- the first rendering module 803 is configured to, for the triangulation state of the target graphics object, if it is determined that the image frame to be rendered has not changed compared with the adjacent previous image frame, based on the adjacent previous image frame
- the triangulation data of the graphic object corresponding to the target graphic object on an image frame is used to render the target graphic object on the image frame to be rendered.
- the second determination module includes:
- the first determination sub-module is used to determine whether the image frame to be rendered has changed compared with the adjacent previous image frame with respect to the number of vertices of the target graphics object;
- the second determination sub-module is used to determine whether the image frame to be rendered has changed compared with the adjacent previous image frame with respect to the left and right status of the ear tip vertex of the target graphic object.
- the second determination sub-module is specifically used to:
- the first determination sub-module includes:
- the third determination sub-module is used to determine the drawing command of the target graphics object on the image frame to be rendered and the drawing command on the adjacent previous image frame as the first drawing command and the second drawing command respectively.
- An extraction submodule configured to respectively extract features of the first drawing command and the second drawing command according to preset rules
- the fourth determination sub-module is used to determine whether the image frame to be rendered has changed compared with the adjacent previous image frame based on the comparison result of the characteristics of the first drawing command and the characteristics of the second drawing command.
- the second determination sub-module includes:
- the fifth determination sub-module is used to determine the ear tip vertex of the target graphic object based on the triangulation data of the adjacent previous image frame;
- the calculation submodule is used to calculate the cross product of the predecessor vector and the successor vector of the ear tip vertex;
- the sixth determination sub-module is used to determine that the image frame to be rendered is the same as the adjacent one based on the comparison result between the cross product corresponding to the ear tip vertex and the cross product corresponding to the ear tip vertex of the adjacent previous image frame. Whether there have been changes compared to the previous image frame.
- the device further includes:
- a processing module configured to, when it is determined that the graphics drawing mode of the target graphic object is the stroke drawing mode, perform a processing on the target graphic object based on the triangulation data of the adjacent previous image frame of the image frame to be rendered. Perform triangulation processing to obtain triangulation data corresponding to the target graphic object;
- the second rendering module is configured to render the target graphic object on the image frame to be rendered based on the triangulation data of the target graphic object.
- the processing module includes:
- the seventh determination sub-module is used to determine the difference between the drawing data of the target graphic object and the adjacent upper Repeated drawing data compared to an image frame;
- a processing submodule configured to perform triangulation processing on the graphics portion corresponding to the drawing data in the drawing data of the target graphic object except the repeated drawing data, to obtain newly added triangulation data;
- the eighth determination sub-module is used to determine the triangulation data corresponding to the repeated drawing data and the new triangulation data as the triangulation corresponding to the target graphics object on the image frame to be rendered. data.
- the target graphic object on the image frame to be rendered in the target graphic animation and the graphic drawing mode of the target graphic object are first determined. If it is determined that the graphic drawing mode of the target graphic object is the fill drawing mode, Then based on the triangulation state of the target graphics object, determine whether the image frame to be rendered has changed compared with the adjacent previous image frame, where the adjacent previous image frame is the image frame adjacent to the image frame to be rendered in the target graphics animation.
- the embodiment of the present disclosure compares the triangulation state of the image frame to be rendered of the target graphics object with the adjacent previous image frame, and compares the target graphics object based on the triangulation data of the target graphics object in the adjacent previous image frame.
- the rendering method avoids repeated triangulation of the target graphics object and improves rendering performance.
- embodiments of the present disclosure also provide a computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are run on a terminal device, the terminal device enables the terminal device to implement the present invention. The animation rendering method described in the embodiment is disclosed.
- An embodiment of the present disclosure also provides a computer program product.
- the computer program product includes a computer program/instruction.
- the animation rendering method described in the embodiment of the present disclosure is implemented.
- An embodiment of the present disclosure also provides a computer program, which when executed by a processor causes the processor to implement the animation rendering method described in the embodiment of the present disclosure.
- an animation rendering device as shown in Figure 9, which may include:
- the number of processors 901 in the animation rendering device may be one or more. In FIG. 9 , one processor is taken as an example. In some embodiments of the present disclosure, the processor 901, the memory 902, the input device 903 and the output device 904 may be connected through a bus or other means, wherein the connection through the bus is taken as an example in FIG. 9 .
- the memory 902 can be used to store software programs and modules.
- the processor 901 executes various functional applications and data processing of the animation rendering device by running the software programs and modules stored in the memory 902 .
- the memory 902 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system, at least one application program required for a function, and the like.
- memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
- the input device 903 may be used to receive input numeric or character information, and to generate signal input related to user settings and function control of the animation rendering device.
- the processor 901 will load the executable files corresponding to the processes of one or more application programs into the memory 902 according to the following instructions, and the processor 901 will run the executable files stored in the memory 902. application to realize various functions of the above animation rendering device.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Generation (AREA)
Abstract
Description
moveTo(W1.x,W1.y);//m
lineTo(B1.x,B1.y);//l
lineTo(A1.x,A1.y);//l
lineTo(Z1.x,Z1.y);//l
Claims (12)
- 一种动画渲染方法,所述方法包括:确定目标图形动画中的待渲染图像帧上的目标图形对象以及所述目标图形对象的图形绘制方式;如果确定所述目标图形对象的图形绘制方式为填充绘制方式,则针对所述目标图形对象的三角剖分状态,确定所述待渲染图像帧与相邻上一图像帧相比是否发生变化;其中,所述相邻上一图像帧为所述目标图形动画中与所述待渲染图像帧相邻的上一帧;针对所述目标图形对象的三角剖分状态,如果确定所述待渲染图像帧与所述相邻上一图像帧相比未发生变化,则基于所述相邻上一图像帧上与所述目标图形对象对应的图形对象的三角剖分数据,对所述待渲染图像帧上的所述目标图形对象进行渲染。
- 根据权利要求1所述的方法,其中,所述针对所述目标图形对象的三角剖分状态,确定所述待渲染图像帧与相邻上一图像帧相比是否发生变化,包括:针对所述目标图形对象的顶点数量,确定所述待渲染图像帧与相邻上一图像帧相比是否发生变化;和/或,针对所述目标图形对象的耳尖顶点的左右状态,确定所述待渲染图像帧与所述相邻上一图像帧相比是否发生变化,其中耳尖顶点的左右状态指示出耳尖顶点的后继向量在耳尖顶点的前驱向量的左侧还是右侧。
- 根据权利要求2所述的方法,其中,所述针对所述目标图形对象的耳尖顶点的左右状态,确定所述待渲染图像帧与相邻上一图像帧相比是否发生变化,包括:针对所述目标图形对象的顶点数量,如果确定所述待渲染图像帧与相邻上一图像帧相比未发生变化,则执行所述针对所述目标图形对象的耳尖顶点的左右状态,确定所述待渲染图像帧与相邻上一图像帧相比是否发生变化的步骤。
- 根据权利要求2所述的方法,其中,所述针对所述目标图形对象的顶 点数量,确定所述待渲染图像帧与相邻上一图像帧相比是否发生变化,包括:将所述目标图形对象在所述待渲染图像帧上的绘制命令以及在相邻上一图像帧上的绘制命令,分别确定为第一绘制命令和第二绘制命令;按照预设规则分别提取所述第一绘制命令和所述第二绘制命令的特征;基于所述第一绘制命令的特征和所述第二绘制命令的特征的对比结果,确定所述待渲染图像帧与相邻上一图像帧相比是否发生变化。
- 根据权利要求2所述的方法,其中,所述针对所述目标图形对象的耳尖顶点的左右状态,确定所述待渲染图像帧与所述相邻上一图像帧相比是否发生变化,包括:基于所述相邻上一图像帧的三角剖分数据,确定所述目标图形对象的耳尖顶点;计算耳尖顶点的前驱向量与后继向量的叉积;基于耳尖顶点对应的叉积与所述相邻上一图像帧的相对应的耳尖顶点对应的叉积的比较结果,确定所述待渲染图像帧与所述相邻上一图像帧相比是否发生变化。
- 根据权利要求1所述的方法,其中,所述方法还包括:如果确定所述目标图形对象的图形绘制方式为描边绘制方式,则基于所述待渲染图像帧的相邻上一图像帧的三角剖分数据,对所述目标图形对象进行三角剖分处理,得到所述目标图形对象对应的三角剖分数据;基于所述目标图形对象的三角剖分数据,对所述待渲染图像帧上的所述目标图形对象进行渲染。
- 根据权利要求6所述的方法,其中,所述基于所述待渲染图像帧的相邻上一图像帧的三角剖分数据,对所述目标图形对象进行三角剖分处理,得到所述目标图形对象对应的三角剖分数据,包括:确定所述目标图形对象的绘制数据与所述相邻上一图像帧相比的重复绘制数据;针对所述目标图形对象的绘制数据中除所述重复绘制数据之外的绘制数据对应的图形部分,进行三角剖分处理,得到新增三角剖分数据;将所述重复绘制数据对应的三角剖分数据和所述新增三角剖分数据,确 定为所述待渲染图像帧上的所述目标图形对象对应的三角剖分数据。
- 一种动画渲染装置,所述装置包括:第一确定模块,用于确定目标图形动画中的待渲染图像帧上的目标图形对象以及所述目标图形对象的图形绘制方式;第二确定模块,用于确定所述目标图形对象的图形绘制方式为填充绘制方式时,针对所述目标图形对象的三角剖分状态,确定所述待渲染图像帧与相邻上一图像帧相比是否发生变化;其中,所述相邻上一图像帧为所述目标图形动画中与所述待渲染图像帧相邻的上一帧;第一渲染模块,用于针对所述目标图形对象的三角剖分状态,如果确定所述待渲染图像帧与所述相邻上一图像帧相比未发生变化,则基于所述相邻上一图像帧上与所述目标图形对象对应的图形对象的三角剖分数据,对所述待渲染图像帧上的所述目标图形对象进行渲染。
- 一种非瞬态的计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在终端设备上运行时,使得所述终端设备实现如权利要求1-7中任一项所述的方法。
- 一种动画渲染设备,包括:存储器,处理器,及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现如权利要求1-7中任一项所述的方法。
- 一种计算机程序产品,所述计算机程序产品包括计算机程序/指令,所述计算机程序/指令被处理器执行时实现如权利要求1-7中任一项所述的方法。
- 一种计算机程序,当所述计算机程序被处理器执行时使得所述处理器实现如权利要求1-7中任一项所述的方法。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US18/861,509 US20250292476A1 (en) | 2022-07-06 | 2023-07-06 | Animation rendering method and apparatus, and device and storage medium |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210797333.6A CN117409111A (zh) | 2022-07-06 | 2022-07-06 | 一种动画渲染方法、装置、设备及存储介质 |
| CN202210797333.6 | 2022-07-06 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024008142A1 true WO2024008142A1 (zh) | 2024-01-11 |
Family
ID=89454428
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/106047 Ceased WO2024008142A1 (zh) | 2022-07-06 | 2023-07-06 | 一种动画渲染方法、装置、设备及存储介质 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US20250292476A1 (zh) |
| CN (1) | CN117409111A (zh) |
| WO (1) | WO2024008142A1 (zh) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5357599A (en) * | 1992-07-30 | 1994-10-18 | International Business Machines Corporation | Method and apparatus for rendering polygons |
| CN106709863A (zh) * | 2016-12-28 | 2017-05-24 | 杭州趣维科技有限公司 | 一种基于gpu的高效2d矢量图形渲染方法 |
| CN107657590A (zh) * | 2017-09-01 | 2018-02-02 | 北京小米移动软件有限公司 | 图片处理方法及装置 |
| CN111815775A (zh) * | 2020-06-12 | 2020-10-23 | 中国船舶重工集团公司第七二四研究所 | 一种基于OpenGL的三维背景地图快速填充方法 |
| CN113256484A (zh) * | 2021-05-17 | 2021-08-13 | 百果园技术(新加坡)有限公司 | 一种对图像进行风格化处理的方法及装置 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101183276A (zh) * | 2007-12-13 | 2008-05-21 | 上海交通大学 | 基于摄像头投影仪技术的交互系统 |
| AU2019227506A1 (en) * | 2018-02-27 | 2020-08-06 | Magic Leap, Inc. | Matching meshes for virtual avatars |
| CN109242756B (zh) * | 2018-09-07 | 2023-04-04 | 格兰菲智能科技有限公司 | 计算机系统、图形处理单元及其图形处理方法 |
-
2022
- 2022-07-06 CN CN202210797333.6A patent/CN117409111A/zh active Pending
-
2023
- 2023-07-06 US US18/861,509 patent/US20250292476A1/en active Pending
- 2023-07-06 WO PCT/CN2023/106047 patent/WO2024008142A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5357599A (en) * | 1992-07-30 | 1994-10-18 | International Business Machines Corporation | Method and apparatus for rendering polygons |
| CN106709863A (zh) * | 2016-12-28 | 2017-05-24 | 杭州趣维科技有限公司 | 一种基于gpu的高效2d矢量图形渲染方法 |
| CN107657590A (zh) * | 2017-09-01 | 2018-02-02 | 北京小米移动软件有限公司 | 图片处理方法及装置 |
| CN111815775A (zh) * | 2020-06-12 | 2020-10-23 | 中国船舶重工集团公司第七二四研究所 | 一种基于OpenGL的三维背景地图快速填充方法 |
| CN113256484A (zh) * | 2021-05-17 | 2021-08-13 | 百果园技术(新加坡)有限公司 | 一种对图像进行风格化处理的方法及装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN117409111A (zh) | 2024-01-16 |
| US20250292476A1 (en) | 2025-09-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8482560B2 (en) | Image forming techniques | |
| US9330466B2 (en) | Methods and apparatus for 3D camera positioning using a 2D vanishing point grid | |
| CN114241151B (zh) | 三维模型简化方法、装置、计算机设备和计算机存储介质 | |
| US20190019333A1 (en) | Vector Graphics Rendering Techniques | |
| CN106530379B (zh) | 用于执行路径描边的方法和设备 | |
| AU2021225277B2 (en) | Image cropping method and apparatus, and device and storage medium | |
| CN111798361A (zh) | 渲染方法、装置、电子设备及计算机可读存储介质 | |
| EP4270321B1 (en) | Graphic rendering method and apparatus, and storage medium | |
| CN112433796B (zh) | 电子书的仿真翻页方法、电子设备及计算机存储介质 | |
| KR20130097886A (ko) | 렌더링 장치 및 그 방법 | |
| US20250014258A1 (en) | Graphics Processing Unit Instancing Control | |
| US9202148B2 (en) | Image processing apparatus and method for generating stencil data of a stroke based on shape information, connection-point information, and end-point information | |
| CN112837416A (zh) | 基于三角剖分的多边形渲染方法、装置及存储介质 | |
| US12315042B2 (en) | Image generation method, apparatus, and device, and storage medium | |
| WO2018018941A1 (zh) | 利用OpenGL与OpenCL协作实现图像缩放的方法及系统 | |
| US10380722B2 (en) | Editing a graphic object in a vector representation to improve crisp property in raster representation | |
| US11010939B2 (en) | Rendering of cubic Bezier curves in a graphics processing unit (GPU) | |
| CN112433795A (zh) | 电子书的仿真翻页方法、电子设备及计算机存储介质 | |
| CN110554871B (zh) | NinePatch图形描绘方法及装置、计算机可读存储介质 | |
| WO2024008142A1 (zh) | 一种动画渲染方法、装置、设备及存储介质 | |
| CN107038729A (zh) | 一种基于OpenGL‑ES的数字仪表盘绘制方法 | |
| US10573033B2 (en) | Selective editing of brushstrokes in a digital graphical image based on direction | |
| CN110310353A (zh) | 一种bim模型数据的优化方法及系统 | |
| KR101755206B1 (ko) | 스케일러블 벡터 그래픽의 워핑 방법 | |
| CN116433820A (zh) | 图纸处理方法、装置、电子设备及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23834909 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 18861509 Country of ref document: US |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 11.04.2025) |
|
| WWP | Wipo information: published in national office |
Ref document number: 18861509 Country of ref document: US |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 23834909 Country of ref document: EP Kind code of ref document: A1 |