Sequence frame material generation method and device, electronic equipment and storage medium
By automatically calculating and rendering the proportion and rendering range of sequence frame images, the problem of multiple sequence frame material generation parameters and complex calculations in the animation engine is solved, improving efficiency and compatibility, and reducing costs and construction periods.
Patent Information
- Application Number
- CN202410590216.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-13
- Publication Date
- 2024-09-10
AI Technical Summary
When the existing technology uses animation engines to generate sequence frame materials, there are many input parameters and complex calculations, resulting in low development efficiency, high cost and long cycle.
By obtaining the original image of the sequence frame, quantity parameters and the sequence number of the frame to be rendered, it automatically calculates the proportion of the sequence frame image and the rendering range, automatically renders the frames based on engine tools, and generates the sequence frame material, reducing input parameters and reducing calculation complexity.
It improves the efficiency of sequence frame material generation, reduces communication costs and calculation complexity, shortens the project duration, and achieves cost reduction and efficiency improvement.
Smart Images

Figure CN118628342A
Abstract
Description
Technical Field
[0001] The present application relates to the field of animation technology, and in particular to a method, device, electronic device and storage medium for generating sequence frame materials. Background Art
[0002] The rise of new energy vehicles has overturned the appearance and functional structure of traditional vehicles. The on-board instrument screen and central control screen have evolved from old-fashioned instrument panels and electronic buttons to electronic screens. The new user interface is very different from the user interface of traditional vehicles, with a huge gap in appearance and function. Users can not only see the body information in the user interface, but also display various special effects in the user interface, which improves the user experience.
[0003] In the actual development process, engine tools are usually used to develop user interfaces. Common engine tools include Kanzistudio, Unity, etc. Sequence frame animation is a common display information in user interfaces. It achieves animation effects by playing sequence frame images at a preset speed in the engine tool. Sequence frame materials are usually provided by interface designers or written by development engineers who can write shaders. After the written sequence frame material is placed on a carrier, the carrier can cut and display the original sequence frame image to obtain a sequence frame animation.
[0004] However, when actually writing sequence frame materials, different sequence frame materials bring different development problems and different development efficiency to development engineers. The conventional implementation method requires understanding the pixel size of the sequence frame original image and the pixel size of each frame in the sequence frame image, the total number of frames in the sequence frame original image, and the current number of animation frames. This requires communication with interface designers and adding multiple input parameter functions to the shader development page, which greatly reduces development efficiency, increases development costs and cycles, increases the difficulty of use, and also prolongs the project cycle. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a method, device, electronic device and storage medium for generating sequence frame materials to solve the problem of large number of input parameters and complex calculation when using animation engines to generate sequence frame materials in the prior art.
[0006] A first aspect of an embodiment of the present application provides a method for generating a sequence frame material, comprising:
[0007] Acquire a sequence frame original image, wherein the sequence frame original image includes N sequence frame images, where N is a positive integer greater than 1;
[0008] Acquire quantity parameters, where the quantity parameters at least include the total number of rows and the total number of columns of the sequence frame images;
[0009] Determine a ratio of sequence frame images, where the ratio of sequence frame images is the ratio of each sequence frame image to the original sequence frame image;
[0010] Obtaining a sequence number of a frame to be rendered, and determining that the difference between the sequence number of the frame to be rendered and 1 is the frame number of the frame to be rendered, wherein the frame to be rendered is a frame image in the sequence of frame images;
[0011] Determine the starting position of the frame to be rendered using the frame number of the frame to be rendered and the total number of rows and columns of the sequence frame images;
[0012] Obtaining a coordinate range of the frame to be rendered in the original image of the sequence frame, and determining a rendering range of the frame to be rendered using a starting position, a coordinate range, and a proportion of the sequence frame image of the frame to be rendered;
[0013] Taking the starting point as the coordinate origin, rendering the frame to be rendered within the rendering range;
[0014] Repeat the steps of obtaining the serial number of the frame to be rendered, determining the starting position and rendering range of the frame to be rendered, and rendering the frame to be rendered based on the starting position and rendering range until the rendering of all sequence frame images is completed and the sequence frame material is generated.
[0015] A second aspect of an embodiment of the present application provides a sequence frame material generation device, comprising:
[0016] An acquisition module is configured to acquire a sequence frame original image, wherein the sequence frame original image includes N sequence frame images, where N is a positive integer greater than 1;
[0017] The acquisition module is further configured to acquire quantity parameters, wherein the quantity parameters at least include the total number of rows and the total number of columns of the sequence frame images;
[0018] A determination module is configured to determine a ratio of sequence frame images, where the ratio of sequence frame images is a ratio of each sequence frame image to the original sequence frame image;
[0019] The acquisition module is further configured to acquire a sequence number of a frame to be rendered, and determine that the difference between the sequence number of the frame to be rendered and 1 is the frame number of the frame to be rendered, and the frame to be rendered is a frame image in the sequence of frame images;
[0020] The determination module is further configured to determine the starting position of the frame to be rendered using the frame number of the frame to be rendered and the total number of rows and columns of the sequence frame images;
[0021] The determination module is further configured to obtain a coordinate range of the frame to be rendered in the original image of the sequence frame, and determine a rendering range of the frame to be rendered using a starting position, a coordinate range, and a proportion of the sequence frame image of the frame to be rendered;
[0022] A rendering module is configured to render the frame to be rendered within the rendering range with the starting point as the coordinate origin;
[0023] The generation module is configured to repeatedly execute the steps of obtaining the serial number of the frame to be rendered, determining the starting position and rendering range of the frame to be rendered, and rendering the frame to be rendered based on the starting position and rendering range, until the rendering of all sequence frame images is completed and the sequence frame material is generated.
[0024] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0025] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0026] Compared with the prior art, the embodiments of the present application have the following beneficial effects: by obtaining the sequence frame original image, quantity parameters and the serial number of the frame to be rendered, the sequence frame image ratio is automatically calculated based on the quantity parameters, the starting position of the frame to be rendered is automatically calculated based on the serial number of the frame to be rendered, and the rendering range of the frame to be rendered is calculated based on the sequence frame image ratio and the coordinate range of the frame to be rendered in the sequence frame original image automatically provided by the engine tool, and then the frame to be rendered is rendered according to the starting position and the coordinate range, and the sequence frame original image that completes the rendering of all sequence frame images is used as the generated sequence frame material, so that the rendering of each sequence frame image in the sequence frame original image is completed by translating the origin of the coordinate system, without the need to input a large number of parameters such as the sequence frame original image pixels, the pixels of each sequence frame image, the number of frames per second, etc., thereby reducing communication costs, reducing calculation complexity, and improving the efficiency of sequence frame material generation, thereby achieving the effect of reducing costs and increasing efficiency as well as shortening project schedules.
[0027] Furthermore, the embodiment of the present application, by additionally configuring additional parameters, can generate the position offset and rendering range of each sequence frame image according to the pixels of the sequence frame original image and the pixels of each sequence frame image in the sequence frame original image by re-entering the pixels of the sequence frame original image and the pixels of each sequence frame image in the sequence frame original image at a specified position in the quantity parameter when the acquired sequence frame original image does not meet the specification requirements, thereby further improving the compatibility of the solution and enhancing the fault tolerance of the solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0029] Figure 1 This is a flowchart of how to use engine tools to generate sequence frame materials.
[0030] FIG. 2(A) is a schematic diagram of a method for rendering a single-frame image using a shader in an engine tool in the related art.
[0031] FIG. 2(B) is a schematic diagram of a shader development interface in the related art.
[0032] Figure 3 It is a flowchart of a method for generating sequence frame material provided in an embodiment of the present application.
[0033] Figure 4 It is a flowchart of a method for determining the starting position of a frame to be rendered using the frame number of the frame to be rendered and the total number of rows and columns of a sequence of frame images provided in an embodiment of the present application.
[0034] Figure 5 It is a flowchart of another sequence frame material generation method provided in an embodiment of the present application.
[0035] FIG6(A) is a schematic diagram of a method for rendering a single-frame image using a shader in an engine tool provided in an embodiment of the present application.
[0036] FIG6(B) is a schematic diagram of the shader development interface provided in an embodiment of the present application.
[0037] Figure 7 It is a schematic diagram of a sequence frame material generation device provided in an embodiment of the present application.
[0038] Figure 8 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0040] A method and device for generating sequence frame material according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0041] As mentioned above, when actually writing sequence frame materials, different sequence frame materials bring different development problems and different development efficiency to development engineers. The conventional implementation method requires understanding the pixel size of the sequence frame original image and the pixel size of each frame in the sequence frame image, the total number of frames in the sequence frame original image, and the current number of animation frames. This requires communication with interface designers and adding multiple input parameter functions to the shader development page, which greatly reduces development efficiency, increases development costs and cycles, increases the difficulty of use, and also prolongs the project cycle.
[0042] Figure 1 This is a flowchart of how to use engine tools to generate sequence frame materials. Figure 1 As shown, in the related art, the steps of using the engine tool to generate a sequence frame material may include inputting parameters, vertex shader shading, fragment shader shading, and outputting a single frame image. The output single frame images are arranged in a predetermined order to obtain the generated sequence frame material.
[0043] FIG2(A) is a schematic diagram of a method for rendering a single-frame image using a shader in an engine tool in the related art. As shown in FIG2(A), when a single-frame image is rendered using a shader in an engine tool, the lower left vertex of the region where the sequence frame original image is located can be used as the origin of the coordinate system, and each sequence frame image in the sequence frame original image can be rendered in sequence. Furthermore, for the convenience of calculation, the range where the sequence frame original image is located can be set to have a horizontal coordinate value ranging from 0 to 1, and a vertical coordinate value also ranging from 0 to 1.
[0044] FIG2(B) is a schematic diagram of a shader development interface in the related art. As shown in FIG2(B), when a single-frame image is rendered using a shader in an engine tool in the related art, input items such as atlas resolution (AtlasResolution), frame count (frameCount), frame count per second (framePerSecond) and frame resolution (frameResolution) can be provided in the shader development graphical interface of the engine tool. Since the original sequence frame image is usually a square, the AtlasResolution used to characterize the resolution of the original sequence frame image can only input a single data, such as inputting 2048, indicating that the resolution of the original sequence frame image is 2048*2048. On the other hand, each sequence frame image in the original sequence frame image usually has different pixel values in the horizontal axis direction and the vertical axis direction of the coordinate, so frameResolution needs to input two data, where X' is the pixel value of the sequence frame image in the horizontal axis direction, and Y' is the pixel value of the sequence frame image in the vertical axis direction, for example, X'=334, Y'=140. Furthermore, in one example, frameCount may be 30, and framePerSecond may also be 30. And framePerSecond may be adjusted through an adjustment axis in the graphical interface, for example, framePerSecond may be adjusted to any value between 30 and 60.
[0045] That is to say, in the related art, when using shader in the engine tool to render a single frame image, it is necessary to input the values of AtlasResolution, frameCount, framePerSecond and frameResolution in the graphical interface of the engine tool respectively. Then, the X' and Y' ratios are calculated according to the pixel length (X'), width (Y') of each frame of the sequence frame image and the pixel size of the sequence frame original image, and the number of sequence frame images horizontally laid out in the sequence frame original image is calculated, and then the current frame number is divided by frameCount to obtain the current frame number, and finally the current frame number is divided by the number of sequence frame images horizontally laid out in the sequence frame original image to obtain the position of the currently rendered sequence frame image in the sequence frame original image, and based on the position, the coordinates of the currently rendered sequence frame image in the sequence frame original image coordinate system are offset in the sequence frame original image coordinate system, and the rendering of the sequence frame image can be completed in combination with the coordinate range of the sequence frame image obtained from the engine tool.
[0046] The above-mentioned rendering method in the related technology requires input of four parameters, namely AtlasResolution, frameCount, framePerSecond and frameResolution, when calculating the position of the currently rendered sequence frame image in the sequence frame original image. These parameters need to be obtained through communication with the interface designer, and multiple input parameter functions need to be added to the shader development page, which greatly reduces the development efficiency, increases the development cost and cycle, increases the difficulty of use, and also prolongs the project cycle.
[0047] In view of this, an embodiment of the present application provides a method for generating sequence frame materials, by obtaining a sequence frame original image, a quantity parameter and a sequence number of a frame to be rendered, automatically calculating the ratio of sequence frame images based on the quantity parameter, automatically calculating the starting position of the frame to be rendered based on the sequence number of the frame to be rendered, and calculating the rendering range of the frame to be rendered based on the ratio of sequence frame images and the coordinate range of the frame to be rendered in the sequence frame original image automatically provided by the engine tool, and then rendering the frame to be rendered according to the starting position and the coordinate range, and using the sequence frame original image that completes the rendering of all sequence frame images as the generated sequence frame material, thereby achieving the rendering of each sequence frame image in the sequence frame original image by translating the origin of the coordinate system, without having to input a large number of parameters such as the pixels of the sequence frame original image, the pixels of each sequence frame image, the number of frames per second, etc., thereby reducing communication costs, reducing calculation complexity, and improving the efficiency of sequence frame material generation, thereby achieving the effect of reducing costs and increasing efficiency as well as shortening project schedules.
[0048] Figure 3 1 is a flow chart of a method for generating a sequence frame material provided in an embodiment of the present application. Figure 3 As shown, the method comprises the following steps:
[0049] In step S301, the original image of the sequence frame is obtained.
[0050] The original sequence frame images include N sequence frame images, where N is a positive integer greater than 1.
[0051] In step S302, a quantity parameter is obtained.
[0052] The quantity parameter at least includes the total number of rows and columns of the sequence frame images.
[0053] In step S303, the image proportion of the sequence frames is determined.
[0054] The sequence frame image ratio is the ratio of each sequence frame image to the original sequence frame image.
[0055] In step S304, the serial number of the frame to be rendered is obtained, and the difference between the serial number of the frame to be rendered and 1 is determined to be the frame number of the frame to be rendered.
[0056] The frame to be rendered is a frame image in a sequence of frame images.
[0057] In step S305, the starting position of the frame to be rendered is determined using the frame number of the frame to be rendered and the total number of rows and columns of the sequence frame images.
[0058] In step S306, the coordinate range of the frame to be rendered in the original sequence frame image is obtained, and the rendering range of the frame to be rendered is determined using the starting position, coordinate range and image proportion of the frame to be rendered.
[0059] In step S307, the frame to be rendered is rendered within the rendering range with the starting point as the coordinate origin.
[0060] In step S308, the steps of obtaining the serial number of the frame to be rendered, determining the starting position and rendering range of the frame to be rendered, and rendering the frame to be rendered based on the starting position and the rendering range are repeated until the rendering of all sequence frame images is completed and the sequence frame material is generated.
[0061] In an embodiment of the present application, the sequence frame material generation method can be executed by an engine tool. In one example, the engine tool can be Kanzi studio. Further, the method can be executed by a shader writing function module in the engine tool.
[0062] In the embodiment of the present application, a sequence frame original image can be obtained through Kanzi studio, and the sequence frame original image includes N sequentially arranged sequence frame images, where N is a positive integer greater than 1. It should be noted that the sequence frame original image composed of N sequentially arranged sequence frame images can be provided by the interface designer.
[0063] In an embodiment of the present application, a user can input a quantity parameter in the shader writing function module, and the quantity parameter includes at least the total number of rows and columns of the sequence frame image, and the total number of rows and columns can be determined from the sequence frame original image provided by the above-mentioned interface designer.
[0064] In the embodiment of the present application, Kanzi studio can determine the ratio of the sequence frame images according to the total number of rows and columns of the sequence frame images, and the ratio of the sequence frame images is the ratio of each sequence frame image to the original sequence frame image. Generally, each sequence frame image has the same resolution, so each sequence frame image has the same ratio to the original sequence frame image.
[0065] In the embodiment of the present application, the user can also input the serial number of the frame to be rendered in the shader writing function module, and Kanzistudio will use the serial number of the frame to be rendered minus 1 as the frame number of the frame to be rendered. The frame to be rendered is a frame image in the sequence of frame images, and Kanzi studio currently needs to perform a rendering operation on the frame to be rendered.
[0066] In the embodiment of the present application, Kanzi studio can use the frame number of the frame to be rendered and the total number of rows and columns of the sequence frame image to determine the starting position of the frame to be rendered. Further, Kanzi studio itself can provide a coordinate range for obtaining the frame to be rendered in the original sequence frame image. Therefore, Kanzi studio can use the starting position, coordinate range and proportion of the frame to be rendered to determine the rendering range of the frame to be rendered.
[0067] In the embodiment of the present application, after completing the rendering of the current frame to be rendered, the user can input the serial number of the next frame to be rendered again. Kanzi studio repeatedly executes the steps of obtaining the serial number of the frame to be rendered, determining the starting position and rendering range of the frame to be rendered, and rendering the frame to be rendered based on the starting position and rendering range, until the rendering of all sequence frame images in the sequence frame original image is completed and the sequence frame material is generated. That is, after the rendering of each sequence frame image arranged in sequence in the sequence frame original image is completed, the sequence frame original image including the rendered sequence frame image is the generated sequence frame material.
[0068] According to the technical solution provided in the embodiment of the present application, by obtaining the sequence frame original image, quantity parameters and the serial number of the frame to be rendered, the sequence frame image ratio is automatically calculated based on the quantity parameters, the starting position of the frame to be rendered is automatically calculated based on the serial number of the frame to be rendered, and the rendering range of the frame to be rendered is calculated based on the sequence frame image ratio and the coordinate range of the frame to be rendered in the sequence frame original image automatically provided by the engine tool, and then the frame to be rendered is rendered according to the starting position and the coordinate range, and the sequence frame original image that completes the rendering of all sequence frame images is used as the generated sequence frame material, so that the rendering of each sequence frame image in the sequence frame original image is completed by translating the origin of the coordinate system, without inputting a large number of parameters such as the sequence frame original image pixels, each sequence frame image pixels, and the number of frames per second, thereby reducing communication costs, reducing calculation complexity, and improving the efficiency of sequence frame material generation, thereby achieving the effect of reducing costs and increasing efficiency as well as shortening project schedules.
[0069] In the embodiment of the present application, the proportion of the sequence frame images can be a two-dimensional vector, including the proportion of the sequence frame image rows and the proportion of the sequence frame image columns. The step of determining the proportion of the sequence frame images includes: determining the reciprocal of the total number of rows of the sequence frame images as the proportion of the sequence frame image rows; and determining the reciprocal of the total number of columns of the sequence frame images as the proportion of the sequence frame image columns.
[0070] In the embodiment of the present application, that is, if the total number of rows of the sequence frame images is TotalNum.x, then the row ratio of the sequence frame images ratio.x = 1 / TotalNum.x. On the other hand, if the total number of columns of the sequence frame images is TotalNum.y, then the column ratio of the sequence frame images ratio.y = 1 / TotalNum.y.
[0071] Figure 4 1 is a flow chart of a method for determining the starting position of a frame to be rendered using the frame number of the frame to be rendered and the total number of rows and columns of a sequence of frame images provided in an embodiment of the present application. Figure 4 As shown, the method comprises the following steps:
[0072] In step S401, a modulo operation is performed on the frame number of the frame to be rendered and the total number of rows of the sequence frame images, and the operation result is rounded up to obtain the calculated number of rows of the frame to be rendered.
[0073] In step S402, the quotient of the frame number of the frame to be rendered and the total number of rows of the sequence frame images is calculated, and the calculated quotient is rounded down to obtain the calculated number of columns of the frame to be rendered.
[0074] In step S403, the calculated number of lines of the frame to be rendered is determined to be the number of lines x of the frame to be rendered.
[0075] In step S404, the total number of columns of the sequence frame images is subtracted by 1 to obtain the total number of columns for conversion.
[0076] In step S405, the difference between the total number of converted columns and the calculated number of columns of the frame to be rendered is determined as the number of columns y of the frame to be rendered.
[0077] In step S406, the lower left vertex position of the sequence frame image in the xth row and yth column in the sequence frame original image is determined as the starting point position of the frame to be rendered.
[0078] In the embodiment of the present application, when the starting position of the frame to be rendered is determined using the frame number of the frame to be rendered and the total number of rows and columns of the sequence frame images, the frame number of the frame to be rendered and the total number of rows of the sequence frame images can first be modulo-operated, and the operation result can be rounded up to obtain the calculated number of rows of the frame to be rendered. Then, the quotient of the frame number of the frame to be rendered and the total number of rows of the sequence frame images is calculated, and the calculated quotient is rounded down to obtain the calculated number of columns of the frame to be rendered.
[0079] Next, the calculated number of rows of the frame to be rendered can be directly determined as the number of rows x of the frame to be rendered. On the other hand, the total number of columns of the sequence frame image can be subtracted by 1 to obtain the total number of converted columns, and then the difference between the total number of converted columns and the calculated number of columns of the frame to be rendered is determined as the number of columns y of the frame to be rendered. Finally, the lower left vertex position of the sequence frame image at the xth row and yth column in the original sequence frame image is determined as the starting position of the frame to be rendered. This is because the shader starts rendering the image from the lower left corner, so the lower left vertex position of the sequence frame image is determined as the starting position of the frame to be rendered.
[0080] That is to say, if the total number of rows of the sequence frame images is TotalNum.x, the total number of columns of the sequence frame images is TotalNum.y, and the frame number of the frame to be rendered is realFrame, then the calculated number of rows and columns of the frame to be rendered can be calculated by the formula position=vec2(ceil(mod(realFrame, TotalNum.x)), floor(realFrame / TotalNum.x)), where vec2 indicates that position is a two-dimensional vector, which can be expressed as (position.x, position.y), ceil() is a rounding function, mod() is a modulus function, and floor() is a rounding function. Then use the formula Vec2 Ori = vec2 (position.x, numTrans.y-position.y) to calculate the number of rows x and columns y of the frame to be rendered, where numTrans.y is the total number of columns to be converted, numTrans = (numTrans.x, numTrans.y) = TotalNum-vec2 (1.0, 1.0), numTrans.x is the total number of rows to be converted, and numTrans is the total number of rows and columns to be converted. Ori is a two-dimensional vector, which can be expressed as (x, y).
[0081] In an embodiment of the present application, the starting position, coordinate range and image ratio of the frame to be rendered are used to determine the rendering range of the frame to be rendered. The rendering range of the frame to be rendered can be obtained by multiplying the sum of the starting position and the coordinate range of the frame to be rendered by the image ratio of the sequence frame.
[0082] In other words, kzTextureCoordinate0 can be directly obtained from Kanzi studio, and kzTextureCoordinate0 represents the coordinate range of the frame to be rendered. The rendering range vTexCoord of the frame to be rendered can be calculated using the formula vTexCoord = (kzTextureCoordinate0 + Ori) * ratio, where ratio is the ratio of the sequence frame image, ratio = vec2 (1.0 / realNum.x, 1.0 / realNum.y).
[0083] In the embodiment of the present application, the quantity parameter also includes an additional parameter. The additional parameter is used to determine whether the original image of the sequence frame meets the preset specification.
[0084] Figure 5 : is a flow chart of another method for generating sequence frame material provided by an embodiment of the present application. Figure 5 Steps S501 to S502 in the embodiment shown are Figure 3Steps S301 to S302 in the illustrated embodiment are substantially the same. Figure 5 Steps S505 to S506 in the embodiment shown are Figure 3 Steps S303 to S304 in the illustrated embodiment are substantially the same. Figure 5 Steps S508 to S510 in the illustrated embodiment are similar to Figure 3 Steps S306 to S308 in the illustrated embodiment are substantially the same and will not be described in detail herein. Figure 5 As shown, the method also includes the following steps:
[0085] In step S503, valid parameters are determined.
[0086] The effective parameter is 0 when the additional parameter is equal to 0, and is 1 when the additional parameter is greater than 0.
[0087] In step S504, the actual total number of rows and the actual total number of columns of the sequence frame images are determined using the valid parameters and the total number of rows and the total number of columns of the sequence frame images.
[0088] Among them, the actual total number of rows of the determined sequence frame images is equal to the total number of rows of the sequence frame images when the effective parameter is 0, the actual total number of columns of the sequence frame images is equal to the number of columns and rows of the sequence frame images when the effective parameter is 0, and the actual total number of rows of the sequence frame images is equal to the quotient of the additional parameter and the total number of rows of the sequence frame images when the effective parameter is 1, and the actual total number of columns of the sequence frame images is equal to the quotient of the additional parameter and the total number of columns of the sequence frame images when the effective parameter is 1.
[0089] In step S507, the starting position of the frame to be rendered is determined using the frame number of the frame to be rendered and the actual total number of rows and the actual total number of columns of the sequence frame images.
[0090] In the embodiment of the present application, when the quantity parameter also includes additional parameters, Kanzi studio can first determine the valid parameters according to the additional parameters after obtaining the quantity parameters. If the additional parameters are represented by TotalNum.z and the valid parameters are represented by valid, then float valid = TotalNum.z>0.0?1.0:0, that is, valid is a floating point number, when TotalNum.z>0.0, valid = 1.0, when TotalNum.z = 0.0, valid = 0.
[0091] In an embodiment of the present application, after determining the effective parameters, the effective parameters and the total number of rows and columns of the sequence frame images in the quantity parameters can be used to determine the actual total number of rows and the actual total number of columns of the sequence frame images, so that the actual total number of rows of the sequence frame images is equal to the total number of rows of the sequence frame images when the effective parameters are 0, the actual total number of columns of the sequence frame images is equal to the number of columns and rows of the sequence frame images when the effective parameters are 0, and the actual total number of rows of the sequence frame images is equal to the quotient of the additional parameters and the total number of rows of the sequence frame images when the effective parameters are 1, and the actual total number of columns of the sequence frame images is equal to the quotient of the additional parameters and the total number of columns of the sequence frame images when the effective parameters are 1.
[0092] In an example, if the actual total number of rows and the actual total number of columns of the sequence frame image are represented by realNum, then Vec2realNum=vec2(valid*(TotalNum.z / TotalNum.x)+(1.0–valid)*TotalNum.x, valid*(TotalNum.z / TotalNum.y)+(1.0–valid)*TotalNum.y), where Vec2 realNum indicates that realNum is a two-dimensional vector, which can be represented by (realNum.x, realNum.y).
[0093] In the embodiment of the present application, after determining the actual total number of rows and columns of the sequence frame images, the following method can be used: Figure 3 The method provided by the illustrated embodiment sequentially obtains the sequence number of the frame to be rendered, determines the starting position and rendering range of the frame to be rendered, and renders the frame to be rendered based on the starting position and rendering range until the rendering of all sequence frame images in the sequence frame original image is completed to generate a sequence frame material. When determining the starting position of the frame to be rendered, the total number of rows and the total number of columns of the sequence frame image need to be replaced with the actual total number of rows and the actual total number of columns of the sequence frame image.
[0094] It can be understood that after determining the actual total number of rows and columns of the sequence frame images, the following Figure 3 When the method provided in the illustrated embodiment generates a sequence frame material, it is also necessary to replace the total number of rows and columns of the sequence frame images with the actual total number of rows and columns of the sequence frame images when calculating the proportion of the sequence frame images.
[0095] In the embodiment of the present application, when the determined effective parameter is 1, each sequence frame image in the sequence frame original image may not meet the requirement of exactly covering the sequence frame original image. At this time, each sequence frame image can be made to cover the sequence frame original image by calculating the actual total number of rows and the actual total number of columns. On the other hand, it is also possible to switch to the method of calculating the position of the frame to be rendered based on the pixel size in the related art to achieve the rendering of the sequence frame image and thus generate the sequence frame material.
[0096] In the embodiment of the present application, when the effective parameter is determined to be 1, the pixels of the sequence frame original image and the pixels of each sequence frame image in the sequence frame original image can be obtained. Then, the pixels of the sequence frame original image and the pixels of each sequence frame image in the sequence frame original image are used to determine the position offset and rendering range of each sequence frame image in the sequence frame original image in turn, wherein the position offset of the sequence frame image is the displacement between the lower left vertex of the sequence frame image to be rendered and the coordinate origin of the sequence frame original image, and the coordinate origin of the sequence frame original image is the lower left vertex of the sequence frame original image. Finally, the position offset and the rendering range are used to render each sequence frame image to generate a sequence frame material.
[0097] Among them, obtaining the pixels of the sequence frame original image and the pixels of each sequence frame image in the sequence frame original image can be: obtaining the additional parameters in the updated quantity parameters as the pixels of the sequence frame original image; obtaining the total number of rows of the sequence frame images in the updated quantity parameters as the row pixels of each sequence frame image in the sequence frame original image; obtaining the total number of columns of the sequence frame images in the updated quantity parameters as the column pixels of each sequence frame image in the sequence frame original image.
[0098] That is to say, the technical solution provided by the embodiment of the present application divides the entire sequence frame original image into multiple grids according to the number of sequence frame images contained in the sequence frame original image, thereby fixing the horizontal and vertical proportions. Further, by moving the origin of the coordinate system to render each sequence frame image, the input items in the shader development page are reduced, and the calculation complexity is reduced.
[0099] FIG6(A) is a schematic diagram of a method for rendering a single frame image using a shader in an engine tool provided by an embodiment of the present application. As shown in FIG6(A), when using a shader in an engine tool to render each sequence frame image, the sequence frame original image can be first divided into multiple grids, each grid including a sequence frame image, and when rendering each sequence frame image, the lower left vertex of the sequence frame image is updated to the origin of the coordinate system, and then the coordinate range of the sequence frame image is obtained from the engine tool, and the coordinate range is scaled according to the proportion of the sequence frame image to obtain the rendering range of the sequence frame image, and the rendering of the sequence frame image can be completed by rendering the rendering range starting from the coordinate origin.
[0100] FIG6(B) is a schematic diagram of the shader development interface provided by the embodiment of the present application. As shown in FIG6(B), when a single frame image is rendered using a shader in an engine tool using the technical solution provided by the embodiment of the present application, the frame number (Frame) to be rendered and the quantity parameter (TotalNum) input items can be provided in the shader development graphical interface of the engine tool, where TotalNum can further include the total number of rows X of the sequence frame image, the total number of columns Y of the sequence frame image, and an additional parameter Z. In one example, Frame can be 1, X can be 4, Y can be 6, and Z can be 0.
[0101] As mentioned above, in the shader development interface provided by the embodiment of the present application, the input item Frame is determined by the user, and it is ensured that it traverses all the sequence frame images in the sequence frame original image. The input item TotalNum can be determined by the user according to the sequence frame original image containing the sequence frame image provided by the interface designer, so there is no need to communicate with the interface designer to obtain the values of other input items, which reduces the communication cost and improves the development efficiency.
[0102] The technical solution of the embodiment of the present application abstracts the method of moving the offset pixels one by one. Different from the traditional method of calculating the pixel position and then offsetting it, it no longer renders the entire sequence frame original image with a fixed origin and a fixed value range, that is, drawing the texture of the entire sequence frame original image. Instead, each frame of the sequence frame image in the sequence frame original image is abstracted into a small coordinate system, the origin is scaled and translated, the origin of each frame is moved, and the value range is reduced and moved to the corresponding position to draw a single frame.
[0103] The technical solution of the embodiment of the present application can reduce the difficulty of development engineers to get started and the cost of function production, allowing development engineers to easily complete complex functions of sequence frames, with stronger compatibility, higher fault tolerance, and can be used in different scenarios. The generation of sequence frame materials can be completed by selecting a simple number of rows and columns and frames, which reduces the communication cost between development engineers and interface designers. If the design of the picture is irregular, it can also be compatible with the common use of single-frame pixels in conjunction with the pixels of the entire picture, which can achieve the technical effect of reducing costs and increasing efficiency, accelerating project progress, and shortening construction period.
[0104] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0105] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0106] Figure 7 Schematic diagram of a sequence frame material generation device provided in an embodiment of the present application. Figure 7 As shown, the device comprises:
[0107] The acquisition module 701 is configured to acquire a sequence frame original image, where the sequence frame original image includes N sequence frame images, where N is a positive integer greater than 1.
[0108] The acquisition module 701 is further configured to acquire quantity parameters, which at least include the total number of rows and the total number of columns of the sequence frame images.
[0109] The determination module 702 is configured to determine a ratio of sequence frame images, where the ratio of sequence frame images is a ratio of each sequence frame image to the original sequence frame image.
[0110] The acquisition module 701 is further configured to acquire the serial number of the frame to be rendered, and determine that the difference between the serial number of the frame to be rendered and 1 is the frame number of the frame to be rendered, and the frame to be rendered is a frame image in the sequence of frame images.
[0111] The determination module 702 is further configured to determine the starting position of the frame to be rendered using the frame number of the frame to be rendered and the total number of rows and columns of the sequence frame images.
[0112] The determination module 702 is further configured to obtain a coordinate range of the frame to be rendered in the original sequence frame image, and determine a rendering range of the frame to be rendered using the starting position, coordinate range and image proportion of the frame to be rendered.
[0113] The rendering module 703 is configured to render the frame to be rendered within the rendering range with the starting point as the coordinate origin.
[0114] The generation module 704 is configured to repeatedly execute the steps of obtaining the serial number of the frame to be rendered, determining the starting position and rendering range of the frame to be rendered, and rendering the frame to be rendered based on the starting position and the rendering range, until the rendering of all sequence frame images is completed and the sequence frame material is generated.
[0115] According to the technical solution provided in the embodiment of the present application, by obtaining the sequence frame original image, quantity parameters and the serial number of the frame to be rendered, the sequence frame image ratio is automatically calculated based on the quantity parameters, the starting position of the frame to be rendered is automatically calculated based on the serial number of the frame to be rendered, and the rendering range of the frame to be rendered is calculated based on the sequence frame image ratio and the coordinate range of the frame to be rendered in the sequence frame original image automatically provided by the engine tool, and then the frame to be rendered is rendered according to the starting position and the coordinate range, and the sequence frame original image that completes the rendering of all sequence frame images is used as the generated sequence frame material, so that the rendering of each sequence frame image in the sequence frame original image is completed by translating the origin of the coordinate system, without inputting a large number of parameters such as the sequence frame original image pixels, each sequence frame image pixels, and the number of frames per second, thereby reducing communication costs, reducing calculation complexity, and improving the efficiency of sequence frame material generation, thereby achieving the effect of reducing costs and increasing efficiency as well as shortening project schedules.
[0116] In an embodiment of the present application, the ratio of sequence frame images is a two-dimensional vector, including the ratio of sequence frame image rows and the ratio of sequence frame image columns; determining the ratio of sequence frame images includes: determining the inverse of the total number of rows of sequence frame images as the ratio of sequence frame image rows; and determining the inverse of the total number of columns of sequence frame images as the ratio of sequence frame image columns.
[0117] In an embodiment of the present application, the starting position of the frame to be rendered is determined using the frame number of the frame to be rendered and the total number of rows and the total number of columns of the sequence frame images, including: performing a modulo operation on the frame number of the frame to be rendered and the total number of rows of the sequence frame images, and rounding up the operation result to obtain the calculated number of rows of the frame to be rendered; calculating the quotient of the frame number of the frame to be rendered and the total number of rows of the sequence frame images, and rounding down the calculated quotient to obtain the calculated number of columns of the frame to be rendered; determining the calculated number of rows of the frame to be rendered to be the number of rows x of the frame to be rendered; subtracting 1 from the total number of columns of the sequence frame images to obtain the converted total number of columns; determining the difference between the converted total number of columns and the calculated number of columns of the frame to be rendered to be the number of columns y of the frame to be rendered; and determining the lower left vertex position of the sequence frame image at the xth row and yth column in the original image of the sequence frame as the starting position of the frame to be rendered.
[0118] In an embodiment of the present application, the step of determining the rendering range of the frame to be rendered using the starting position, coordinate range and image ratio of the frame to be rendered is: multiplying the sum of the starting position and coordinate range of the frame to be rendered by the image ratio of the sequence frame to obtain the rendering range of the frame to be rendered.
[0119] In the embodiment of the present application, the quantity parameter also includes an additional parameter; after obtaining the quantity parameter, it also includes: determining a valid parameter, the valid parameter is 0 when the additional parameter is equal to 0, and is 1 when the additional parameter is greater than 0; using the valid parameter and the total number of rows and the total number of columns of the sequence frame images to determine the actual total number of rows and the actual total number of columns of the sequence frame images, so that the actual total number of rows of the sequence frame images is equal to the total number of rows of the sequence frame images when the valid parameter is 0, the actual total number of columns of the sequence frame images is equal to the number of columns and rows of the sequence frame images when the valid parameter is 0, and the actual total number of rows of the sequence frame images is equal to the quotient of the additional parameter and the total number of rows of the sequence frame images when the valid parameter is 1, and the actual total number of columns of the sequence frame images is equal to the quotient of the additional parameter and the total number of columns of the sequence frame images when the valid parameter is 1; using the following method: Figure 3 The method provided by the illustrated embodiment determines the generated sequence frame material, wherein the number of rows and columns of the frame to be rendered is determined according to the sequence number of the frame to be rendered and the actual total number of rows and the actual total number of columns of the sequence frame image.
[0120] In an embodiment of the present application, after obtaining the quantity parameter, it also includes: determining a valid parameter, the valid parameter is 0 when the additional parameter is equal to 0, and is 1 when the additional parameter is greater than 0; in response to determining that the valid parameter is 1, obtaining the pixels of the sequence frame original image and the pixels of each sequence frame image in the sequence frame original image; using the pixels of the sequence frame original image and the pixels of each sequence frame image in the sequence frame original image to determine the position offset and rendering range of each sequence frame image in the sequence frame original image in turn, wherein the position offset of the sequence frame image is the displacement between the lower left vertex of the sequence frame image to be rendered and the coordinate origin of the sequence frame original image, and the coordinate origin of the sequence frame original image is the lower left vertex of the sequence frame original image; using the position offset and the rendering range to render each sequence frame image to generate a sequence frame material.
[0121] In the embodiment of the present application, pixels of a sequence frame original image and pixels of each sequence frame image in the sequence frame original image are obtained, including: obtaining additional parameters in the updated quantity parameters as pixels of the sequence frame original image; obtaining the total number of rows of the sequence frame images in the updated quantity parameters as row pixels of each sequence frame image in the sequence frame original image; obtaining the total number of columns of the sequence frame images in the updated quantity parameters as column pixels of each sequence frame image in the sequence frame original image.
[0122] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0123] Figure 8 Schematic diagram of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 8 of this embodiment includes: a processor 801, a memory 802, and a computer program 803 stored in the memory 802 and executable on the processor 801. When the processor 801 executes the computer program 803, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 801 executes the computer program 803, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0124] The electronic device 8 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 8 may include, but is not limited to, a processor 801 and a memory 802. Those skilled in the art will appreciate that Figure 8 The electronic device 8 is merely an example and does not limit the electronic device 8 . The electronic device 8 may include more or fewer components than those shown in the figure, or different components.
[0125] The processor 801 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0126] The memory 802 may be an internal storage unit of the electronic device 8, for example, a hard disk or memory of the electronic device 8. The memory 802 may also be an external storage device of the electronic device 8, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 8. The memory 802 may also include both an internal storage unit of the electronic device 8 and an external storage device. The memory 802 is used to store computer programs and other programs and data required by the electronic device.
[0127] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0128] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0129] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for generating a sequence frame material, characterized in that: include: Acquire a sequence frame original image, wherein the sequence frame original image includes N sequence frame images, where N is a positive integer greater than 1; Acquire quantity parameters, where the quantity parameters at least include the total number of rows and the total number of columns of the sequence frame images; Determine a ratio of sequence frame images, where the ratio of sequence frame images is the ratio of each sequence frame image to the original sequence frame image; Obtaining a sequence number of a frame to be rendered, and determining that the difference between the sequence number of the frame to be rendered and 1 is the frame number of the frame to be rendered, wherein the frame to be rendered is a frame image in the sequence of frame images; Determine the starting position of the frame to be rendered using the frame number of the frame to be rendered and the total number of rows and columns of the sequence frame images; Obtaining a coordinate range of the frame to be rendered in the original image of the sequence frame, and determining a rendering range of the frame to be rendered using a starting position, a coordinate range, and a proportion of the sequence frame image of the frame to be rendered; Taking the starting point as the coordinate origin, rendering the frame to be rendered within the rendering range; Repeat the steps of obtaining the serial number of the frame to be rendered, determining the starting position and rendering range of the frame to be rendered, and rendering the frame to be rendered based on the starting position and rendering range until the rendering of all sequence frame images is completed and the sequence frame material is generated.
2. The method according to claim 1, characterized in that The sequence frame image ratio is a two-dimensional vector, including the sequence frame image row ratio and the sequence frame image column ratio; The determining the image proportion of the sequence frames includes: Determine the reciprocal of the total number of rows of the sequence frame images as the row ratio of the sequence frame images; as well as The reciprocal of the total number of columns of the sequence frame images is determined as the column ratio of the sequence frame images.
3. The method according to claim 1, characterized in that The step of using the frame number of the frame to be rendered and the total number of rows and columns of the sequence frame images to determine the starting point position of the frame to be rendered includes: Performing a modulo operation on the frame number of the frame to be rendered and the total number of rows of the sequence frame images, and rounding up the operation result to obtain the calculated number of rows of the frame to be rendered; Calculate the quotient of the frame number of the frame to be rendered and the total number of rows of the sequence frame images, and round down the calculated quotient to obtain the calculated column number of the frame to be rendered; Determine the calculated number of rows of the frame to be rendered as the number of rows x of the frame to be rendered; Subtract 1 from the total number of columns of the sequence frame images to obtain the total number of columns for conversion; Determine the difference between the total number of converted columns and the calculated number of columns of the frame to be rendered as the number of columns y of the frame to be rendered; The lower left vertex position of the sequence frame image at the xth row and the yth column in the sequence frame original image is determined as the starting point position of the frame to be rendered.
4. The method according to claim 1, characterized in that: The step of using the starting position, coordinate range and image proportion of the frame to be rendered to determine the rendering range of the frame to be rendered is as follows: The sum of the starting point position of the frame to be rendered and the coordinate range is multiplied by the image ratio of the sequence frame to obtain the rendering range of the frame to be rendered.
5. The method according to claim 1, characterized in that The quantity parameters also include additional parameters; After obtaining the quantity parameter, the method further includes: Determine a valid parameter, where the valid parameter is 0 when the additional parameter is equal to 0, and is 1 when the additional parameter is greater than 0; Determine the actual total number of rows and the actual total number of columns of the sequence frame images using the effective parameter and the total number of rows and the total number of columns of the sequence frame images, so that the actual total number of rows of the sequence frame images is equal to the total number of rows of the sequence frame images when the effective parameter is 0, the actual total number of columns of the sequence frame images is equal to the number of columns and rows of the sequence frame images when the effective parameter is 0, and the actual total number of rows of the sequence frame images is equal to the quotient of the additional parameter and the total number of rows of the sequence frame images when the effective parameter is 1, and the actual total number of columns of the sequence frame images is equal to the quotient of the additional parameter and the total number of columns of the sequence frame images when the effective parameter is 1; The generated sequence frame material is determined by the method as claimed in claim 1, wherein the number of rows and columns of the frame to be rendered is determined according to the sequence number of the frame to be rendered and the actual total number of rows and the actual total number of columns of the sequence frame image.
6. The method according to claim 5, characterized in that After obtaining the quantity parameter, the method further includes: Determine a valid parameter, where the valid parameter is 0 when the additional parameter is equal to 0, and is 1 when the additional parameter is greater than 0; In response to determining that the effective parameter is 1, obtaining pixels of the sequence frame original image and pixels of each sequence frame image in the sequence frame original image; Using the pixels of the sequence frame original image and the pixels of each sequence frame image in the sequence frame original image, the position offset and rendering range of each sequence frame image in the sequence frame original image are determined in sequence, wherein the position offset of the sequence frame image is the displacement between the lower left vertex of the sequence frame image to be rendered and the coordinate origin of the sequence frame original image, and the coordinate origin of the sequence frame original image is the lower left vertex of the sequence frame original image; Each sequence frame image is rendered using the position offset and the rendering range to generate a sequence frame material.
7. The method according to claim 6, characterized in that The acquiring pixels of the original sequence frame image and pixels of each sequence frame image in the original sequence frame image comprises: Obtaining additional parameters in the updated quantity parameters as pixels of the original image of the sequence frame; Obtaining the total number of rows of the sequence frame images in the updated number parameter as the row pixels of each sequence frame image in the sequence frame original image; The total number of columns of the sequence frame images in the updated number parameter is obtained as the column pixels of each sequence frame image in the sequence frame original image.
8. A sequence frame material generation device, characterized in that: include: An acquisition module is configured to acquire a sequence frame original image, wherein the sequence frame original image includes N sequence frame images, where N is a positive integer greater than 1; The acquisition module is further configured to acquire quantity parameters, wherein the quantity parameters at least include the total number of rows and the total number of columns of the sequence frame images; A determination module is configured to determine a ratio of sequence frame images, where the ratio of sequence frame images is a ratio of each sequence frame image to the original sequence frame image; The acquisition module is further configured to acquire a sequence number of a frame to be rendered, and determine that the difference between the sequence number of the frame to be rendered and 1 is the frame number of the frame to be rendered, and the frame to be rendered is a frame image in the sequence of frame images; The determination module is further configured to determine the starting position of the frame to be rendered using the frame number of the frame to be rendered and the total number of rows and columns of the sequence frame images; The determination module is further configured to obtain a coordinate range of the frame to be rendered in the original image of the sequence frame, and determine a rendering range of the frame to be rendered using a starting position, a coordinate range, and a proportion of the sequence frame image of the frame to be rendered; A rendering module is configured to render the frame to be rendered within the rendering range with the starting point as the coordinate origin; The generation module is configured to repeatedly execute the steps of obtaining the serial number of the frame to be rendered, determining the starting position and rendering range of the frame to be rendered, and rendering the frame to be rendered based on the starting position and rendering range, until the rendering of all sequence frame images is completed and the sequence frame material is generated.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
