Method, device, equipment and storage medium for generating transition special effects graph

By generating transition effects with 3D effects, the problem of insufficient display effects of 2D transition images in the prior art is solved, and a richer visual experience is achieved.

CN115272060BActive Publication Date: 2025-04-22BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210968656.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-12
Publication Date
2025-04-22
Estimated Expiration
2042-08-12

AI Technical Summary

Technical Problem

In the prior art, the transition processing between video clips or pictures mainly generates transition diagrams with 2D effects, and the display effect is not rich enough and lacks a three-dimensional sense.

Method used

By determining the 3D transformation information of the transition model at the current time, transforming the transition model, sampling and setting the pixel values ​​of the setting graph, and generating a transition effect diagram with 3D effects.

Benefits of technology

The generated 3D transition effect has a 3D perspective effect, which significantly enriches the display effect of the transition image and enhances the visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115272060B_ABST
    Figure CN115272060B_ABST
Patent Text Reader

Abstract

The disclosed embodiments provide a method, device, equipment and storage medium for generating a transition special effect map. Determine the 3D transformation information corresponding to the transition model at the current moment; transform the transition model according to the 3D transformation information to obtain the transformed transition model; sample pixel values ​​from a set map according to the transformed transition model; generate a 3D transition special effect map corresponding to the transition model according to the pixel values. The method for generating a transition special effect map provided by the disclosed embodiments transforms the transition model according to the 3D transformation information at the current moment, and samples pixel values ​​from a set map according to the transformed transition model, so that the generated transition special effect map has a 3D perspective effect, which can enrich the display effect of the transition map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of image processing technology, and in particular to a method, device, equipment and storage medium for generating a 3D transition special effect graph. Background Art

[0002] When stitching together multiple video clips or multiple images, transition processing is required at the joints between the video clips or images. The process of transition processing may be to first generate multiple transition images, stitch the multiple transition images into a transition video, and set the transition video between two video clips or two images. In the related art, a transition image with a 2D effect is generally generated, and the display effect is not rich enough. Summary of the invention

[0003] The embodiments of the present disclosure provide a method, device, equipment and storage medium for generating a transition special effect graph, which can generate a transition special effect graph with a 3D effect and improve the display effect of the transition.

[0004] In a first aspect, an embodiment of the present disclosure provides a method for generating a 3D transition special effect graph, comprising:

[0005] Determine the 3D transformation information corresponding to the transition model at the current moment;

[0006] Transform the transition model according to the 3D transformation information to obtain a transformed transition model;

[0007] Sample pixel values ​​from the set image according to the transformed transition model;

[0008] A 3D transition special effects image corresponding to the transition model is generated according to the pixel value.

[0009] In a second aspect, the embodiment of the present disclosure further provides a device for generating a 3D transition special effect graph, including:

[0010] A 3D transformation information determination module is used to determine the 3D transformation information corresponding to the transition model at the current moment;

[0011] A transition model transformation module, used to transform the transition model according to the 3D transformation information to obtain a transformed transition model;

[0012] A pixel value sampling module, used to sample pixel values ​​from a set image according to a transformed transition model;

[0013] The 3D transition special effect graph generation module is used to generate a 3D transition special effect graph corresponding to the transition model according to the pixel value.

[0014] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0015] one or more processors;

[0016] a storage device for storing one or more programs,

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating a transition special effect graph as described in the embodiment of the present disclosure.

[0018] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the method for generating a transition special effect graph as described in the embodiment of the present disclosure.

[0019] The disclosed embodiments disclose a method, device, equipment and storage medium for generating a 3D transition special effects graph. Determine the 3D transformation information corresponding to the transition model at the current moment; transform the transition model according to the 3D transformation information to obtain the transformed transition model; sample pixel values ​​from a set image according to the transformed transition model; generate a 3D transition special effects graph corresponding to the transition model according to the pixel values. The method for generating a transition special effects graph provided by the disclosed embodiments transforms the transition model according to the 3D transformation information at the current moment, and samples pixel values ​​from a set image according to the transformed transition model, so that the generated transition special effects graph has a 3D perspective effect, which can enrich the display effect of the transition graph. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0021] Figure 1 It is a schematic diagram of a flow chart of a method for generating a transition special effect graph provided by an embodiment of the present disclosure;

[0022] Figure 2a is an example diagram of a transition forward diagram provided by an embodiment of the present disclosure;

[0023] Figure 2b is an example diagram of a transition backward diagram provided by an embodiment of the present disclosure;

[0024] Figure 2c This is an example diagram of a 3D transition special effect diagram provided by an embodiment of the present disclosure;

[0025] Figure 2d This is an example diagram of a 3D transition special effect diagram provided by an embodiment of the present disclosure;

[0026] Figure 3 It is a schematic diagram of the structure of a device for generating a transition special effect graph provided by an embodiment of the present disclosure;

[0027] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0029] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0030] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0031] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0032] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0033] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0034] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0035] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0036] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0037] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0038] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0039] Figure 1 A flow chart of a method for generating a transition special effect graph provided in an embodiment of the present disclosure is provided. The embodiment of the present disclosure is applicable to the case of generating a 3D transition special effect graph. The method can be executed by a device for generating a transition special effect graph, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc.

[0040] like Figure 1 As shown, the method includes:

[0041] S110, determining 3D transformation information corresponding to the transition model at the current moment.

[0042] Among them, the transition model can be understood as a virtual model for transition. In this embodiment, the transition model before transformation can be a 2D face, composed of 4 vertices, and after the 3D transformation information transformation, a 3D transition model can be generated. The 3D transformation information can be information for performing a 3D transformation on the transition model, and can be composed of perspective information, camera transformation information and model transformation information.

[0043] Optionally, the method for determining the 3D transformation information corresponding to the transition model at the current moment may be: obtaining perspective information and model transformation information and camera transformation information corresponding to the current moment; and determining the 3D transformation information of the transition model according to the perspective information, camera transformation information and model transformation information.

[0044] Among them, the model transformation information is the transformation information of the transition model. Model transformation information (Model) can be understood as the transformation information from model space to world space, including: model translation information, model scaling information and model rotation information. Camera transformation information (View) can be understood as the transformation information from world space to visual space, including: camera translation information, camera rotation information and setting component transformation information, among which the setting component transformation information can be the inversion of the Z component (the default direction of the camera is -Z). Perspective information (Projection) can be understood as the transformation information from visual space to clipping space.

[0045] Optionally, the process of acquiring perspective information may be: acquiring virtual camera information; and generating perspective information based on the virtual camera information.

[0046] Among them, the virtual camera information includes: viewing angle information, near plane information, far plane information and screen ratio information. The near plane information can be the distance between the near plane of the camera and the optical center, and the far plane information can be the distance between the far plane of the camera and the optical center. The screen ratio information can be the ratio of the screen width (W) to the height (H). In this embodiment, the perspective information can be a 4*4 perspective matrix P, and the method of generating the perspective information based on the virtual camera information can be: determining each element according to the virtual camera information, and forming a perspective matrix by each element. Specifically, assuming that the viewing angle information is represented as fov, the near plane information is represented as N, the far plane information is represented as F, and the screen ratio information is represented as aspect, the perspective matrix is ​​expressed as:

[0047] In this embodiment, the perspective information is determined according to the viewing angle information, the near plane information, the far plane information and the screen ratio information, so that the accuracy of the perspective information can be improved.

[0048] Optionally, the method of obtaining the model transformation information and the camera transformation information corresponding to the current moment may be: obtaining the transition progress corresponding to the current moment; and determining the model transformation information and the camera transformation information corresponding to the current moment based on the transition progress.

[0049] The transition progress is the ratio of the duration between the current moment and the transition start moment to the total transition duration. For example, assuming that the duration between the current moment and the transition start moment is t and the total transition duration is T, the transition progress can be expressed as t / T.

[0050] In this embodiment, the model transformation information includes: model translation information, model scaling information and model rotation information. The model translation information is linearly or nonlinearly related to the transition progress, or the model translation information remains unchanged with the transition progress. The model scaling information is linearly or nonlinearly related to the transition progress, or the model scaling information remains unchanged with the transition progress. The model rotation information is linearly or nonlinearly related to the transition progress, or the model rotation information remains unchanged with the transition progress. Specifically, the model transformation information corresponding to the current moment is determined according to the relationship between the transition progress and the model transformation information. The camera transformation information may include: camera translation information, camera rotation information and set component transformation information. The camera translation information is linearly or nonlinearly related to the transition progress, or the camera translation information remains unchanged with the transition progress. The camera rotation information is linearly or nonlinearly related to the transition progress, or the camera rotation information remains unchanged with the transition progress. Specifically, the camera transformation information at the current moment is determined according to the relationship between the transition progress and the camera transformation information. In this embodiment, the model transformation information and the camera transformation information corresponding to the current moment are determined according to the transition progress, so that the accuracy of the model transformation information and the camera transformation information can be improved.

[0051] Optionally, the method of determining the model transformation information and camera transformation information corresponding to the current moment based on the transition progress can be: determining the model translation information, model scaling information and model rotation information at the current moment according to the transition progress; determining the model transformation information according to the model translation information, model scaling information and model rotation information.

[0052] The model translation information may include translation information along the x-axis, along the y-axis, and along the z-axis, which may be expressed as (tx, ty, tz). The model scaling information may include scaling information along the x-axis, along the y-axis, and along the z-axis, which may be expressed as (kx, ky, kz). The model rotation information may include rotation angles around the x-axis, around the y-axis, and around the z-axis, which may be expressed as (α, β, γ).

[0053] Specifically, the method of determining the model transformation information according to the model translation information, model scaling information and model rotation information can be: determining the model translation matrix according to the model translation information, determining the model scaling matrix according to the model scaling information, determining the model rotation matrix according to the model rotation information, performing dot multiplication on the model translation matrix, the model rotation matrix and the model scaling matrix to obtain the model transformation matrix, and using the model transformation matrix as the model transformation information.

[0054] The model translation matrix may be a 4*4 matrix, and the model translation matrix obtained from the model translation information may be expressed as: The model scaling matrix may be a 4*4 matrix, and the model scaling matrix obtained from the model scaling information may be expressed as: The model rotation matrix can be a 4*4 matrix. The model rotation matrix obtained from the model rotation information can be expressed as:

[0055] The model transformation matrix can be expressed as: M=M1·M2·M3. In this embodiment, the model transformation information is determined according to the model translation information, the model scaling information and the model rotation information, so as to improve the accuracy of the model transformation information.

[0056] Optionally, the method of determining the camera transformation information corresponding to the current moment based on the transition progress may be: determining the camera translation information, camera rotation information and set component transformation information at the current moment according to the transition progress; determining the camera transformation information according to the camera translation information, camera rotation information and set component transformation information.

[0057] The camera translation information may include translation information along the x-axis, along the y-axis, and along the z-axis, which may be expressed as (vx, vy, vz). The camera rotation information may include rotation angles around the x-axis, around the y-axis, and around the z-axis, which may be expressed as (X, Y, Z). The component transformation information may be set to negate the Z component (the default camera orientation is -Z).

[0058] Specifically, the process of determining the camera transformation information according to the camera translation information, the camera rotation information and the set component transformation information can be: determining the camera translation matrix according to the camera translation information, determining the camera rotation matrix according to the camera rotation information, determining the Z component transformation matrix according to the set component transformation information, performing dot multiplication on the camera translation matrix, the camera rotation matrix and the Z component transformation matrix to obtain the camera transformation matrix, and determining the camera transformation information with the camera transformation matrix.

[0059] Among them, the method of determining the camera translation matrix according to the camera translation information can refer to the process of determining the model translation matrix according to the model translation information in the above embodiment, which will not be repeated here. The method of determining the camera rotation matrix according to the camera rotation information can refer to the process of determining the model rotation matrix according to the model rotation information in the above embodiment, which will not be repeated here. In this embodiment, the accuracy of the camera transformation information can be improved by determining the camera transformation information according to the camera translation information, the camera rotation information and the set component transformation information.

[0060] In this embodiment, the perspective information is represented by the perspective matrix P, the camera transformation information is represented by the camera transformation matrix V, and the model transformation information is represented by the model transformation matrix M.

[0061] Specifically, the method of determining the 3D transformation information according to the perspective information, the camera transformation information and the model transformation information may be: performing dot multiplication on the perspective matrix, the camera transformation matrix and the model transformation matrix to obtain a 3D transformation matrix, and determining the 3D transformation matrix as the 3D transformation information.

[0062] Assuming that the 3D transformation matrix is ​​represented as MVP, the process of determining the 3D transformation matrix can be represented as: MVP = P·V·M. In this embodiment, the perspective matrix, the camera transformation matrix and the model transformation matrix are dot-multiplied to obtain 3D transformation information, which can improve the accuracy of the 3D transformation matrix.

[0063] S120, transform the transition model according to the 3D transformation information to obtain a transformed transition model.

[0064] Wherein, the transition model can be a 2D patch. The transition model can be composed of a set number of model vertices, and the set number can be 4. The model vertex can be represented by a vector with a size of 4*1. In this embodiment, the coordinates of the four model vertices can be represented as: A=(-1,-1,0,0), B=(1,-1,0,0), C=(-1,1,0,0) and D=(1,1,0,0).

[0065] Specifically, the transition model is transformed according to the 3D transformation information to obtain the transformed transition model by: transforming a set number of model vertices according to the 3D transformation information to obtain transformed model vertices; the transformed model vertices constitute the transformed transition model.

[0066] Among them, the method of transforming a set number of model vertices according to the 3D transformation information can be: multiplying the coordinate information of the model vertices by the 3D transformation matrix corresponding to the 3D transformation information to obtain the transformed model vertices. The four transformed model vertices can be expressed as: A1=MVP·A, B1=MVP·B, C1=MVP·C, D1=MVP·D. In this embodiment, by transforming a set number of model vertices according to the 3D transformation information, the perspective, camera and model transformation of the transition model can be realized.

[0067] S130, sampling pixel values ​​from the setting image according to the transformed transition model.

[0068] The setting diagram includes a pre-transition diagram or a post-transition diagram. The pre-transition diagram may be a diagram located before the transition, and the post-transition diagram may be a diagram located after the transition. Optionally, the setting diagram may be any material diagram.

[0069] Optionally, the process of sampling pixel values ​​from the setting map according to the transformed transition model may be: determining the setting map according to the transition progress; obtaining the mapping coordinate information of the transformed transition model; and sampling pixel values ​​from the setting map according to the mapping coordinate information.

[0070] In this embodiment, the method of determining the setting diagram according to the transition progress can be: if the transition progress is less than the set threshold, the transition forward diagram is determined as the setting diagram; if the transition progress is greater than or equal to the set threshold, the transition backward diagram is determined as the setting diagram.

[0071] Among them, the set threshold can be set to any value between 1 / 3-2 / 3. For example, it can be set to 1 / 2. Specifically, if the transition progress is less than the set threshold, the transition forward graph is determined as the set graph, that is, the pixel values ​​are sampled from the transition forward graph. If the transition progress is greater than or equal to the set threshold, the transition backward graph is determined as the set graph, that is, the pixel values ​​are sampled from the transition backward graph. In this embodiment, determining the set graph based on the transition progress can improve the display effect of the transition.

[0072] Among them, the method of obtaining the mapping coordinate information of the transformed transition model can be: obtaining the UV coordinates of the transformed model vertices. The method of sampling pixel values ​​from the setting map according to the mapping coordinate information can be: interpolating the UV coordinates of the model vertices to obtain the UV coordinates of other pixels in the UV map, and sampling pixel values ​​from the setting map according to the UV coordinates of each pixel in the UV map. In this embodiment, in this embodiment, a 3D transition special effects map is generated according to the transformed transition model, and a transition special effects map with a 3D perspective effect can be generated.

[0073] S140, generating a 3D transition special effect image corresponding to the transition model according to the pixel value.

[0074] Specifically, the method of generating the 3D transition special effect image corresponding to the transition model according to the pixel value may be: rendering the transition model according to the sampled pixel value to obtain the 3D transition special effect image. Figure 2a is an example diagram of a transition forward graph in this embodiment. Figure 2b is an example diagram of a transition backward diagram in this embodiment. Figure 2c-2d is an example of a 3D transition special effect diagram in this embodiment. Figure 2c As shown, the 3D transition special effects diagram is from Figure 2a The image after sampling pixel values ​​of the transition forward image in the rendering has a 3D perspective effect, such as Figure 2d As shown, the 3D transition special effects diagram is from Figure 2b The image after the transition is rendered by sampling the pixel values ​​of the image, which has a 3D perspective effect.

[0075] The technical solution of the disclosed embodiment determines the 3D transformation information corresponding to the transition model at the current moment; transforms the transition model according to the 3D transformation information to obtain the transformed transition model; samples pixel values ​​from the setting map according to the transformed transition model; and generates a 3D transition special effect map corresponding to the transition model according to the pixel values. The method for generating a transition special effect map provided by the disclosed embodiment transforms the transition model according to the 3D transformation information at the current moment, and samples pixel values ​​from the setting map according to the transformed transition model, so that the generated transition special effect map has a 3D perspective effect, which can enrich the display effect of the transition map.

[0076] Figure 3 A schematic diagram of a structure of a device for generating a transition special effect graph provided by an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, the device comprises:

[0077] A 3D transformation information determination module 310 is used to determine the 3D transformation information corresponding to the transition model at the current moment;

[0078] A transition model transformation module 320, configured to transform the transition model according to the 3D transformation information to obtain a transformed transition model;

[0079] A pixel value sampling module 330, for sampling pixel values ​​from a setting image according to the transformed transition model;

[0080] The 3D transition special effect graph generating module 340 is used to generate a 3D transition special effect graph corresponding to the transition model according to the pixel value.

[0081] Optionally, the 3D transformation information determination module 310 is further configured to:

[0082] Obtain perspective information and model transformation information and camera transformation information corresponding to the current moment; wherein the model transformation information is the transformation information of the transition model;

[0083] The 3D transformation information of the transition model is determined according to the perspective information, the camera transformation information and the model transformation information.

[0084] Optionally, the 3D transformation information determination module 310 is further configured to:

[0085] Acquire virtual camera information; wherein the virtual camera information includes: viewing angle information, near plane information, far plane information and screen ratio information;

[0086] Perspective information is generated based on the virtual camera information.

[0087] Optionally, the 3D transformation information determination module 310 is further configured to:

[0088] Obtaining the transition progress corresponding to the current moment; wherein the transition progress is the ratio of the duration between the current moment and the transition start moment to the total duration of the transition;

[0089] The model transformation information and the camera transformation information corresponding to the current moment are determined based on the transition progress.

[0090] Optionally, the 3D transformation information determination module 310 is further configured to:

[0091] Determine the model translation information, model scaling information and model rotation information at the current moment according to the transition progress;

[0092] Model transformation information is determined according to the model translation information, the model scaling information, and the model rotation information.

[0093] Optionally, the 3D transformation information determination module 310 is further configured to:

[0094] Determine the camera translation information, camera rotation information and set component transformation information at the current moment according to the transition progress;

[0095] Camera transformation information is determined according to the camera translation information, the camera rotation information and the setting component transformation information.

[0096] Optionally, the perspective information is represented by a perspective matrix, the camera transformation information is represented by a camera transformation matrix, and the model transformation information is represented by a model transformation matrix; the 3D transformation information determination module 310 is further used to:

[0097] The perspective matrix, the camera transformation matrix and the model transformation matrix are dot-multiplied to obtain a 3D transformation matrix, and the 3D transformation matrix is ​​determined as 3D transformation information.

[0098] Optionally, the transition model includes a set number of model vertices; the transition model transformation module 320 is further used to:

[0099] Transform the set number of model vertices according to the 3D transformation information to obtain transformed model vertices;

[0100] The transformed model vertices constitute the transformed transition model.

[0101] Optionally, the pixel value sampling module 330 is further used for:

[0102] Determine a setting diagram according to the transition progress; wherein the setting diagram includes a transition forward diagram or a transition backward diagram;

[0103] Obtaining the texture coordinate information of the transformed transition model;

[0104] Sampling pixel values ​​from the setting map according to the map coordinate information;

[0105] Optionally, the 3D transition special effect image generation module 340 is further used for:

[0106] The transition model is rendered according to the sampled pixel values ​​to obtain a 3D transition special effects image.

[0107] Optionally, the 3D transition special effect image generation module 340 is further used for:

[0108] If the transition progress is less than a set threshold, the transition forward graph is determined as a set graph;

[0109] If the transition progress is greater than or equal to a set threshold, the transition backward graph is determined as a set graph.

[0110] The device for generating a 3D transition special effect graph provided in the embodiments of the present disclosure can execute the method for generating a transition special effect graph provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0111] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0112] Figure 4 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 4 , which shows an electronic device (eg, Figure 4 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0113] like Figure 4As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.

[0114] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0115] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0116] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0117] The electronic device provided in the embodiment of the present disclosure and the method for generating the transition special effect diagram provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0118] An embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the method for generating a transition special effect graph provided in the above embodiment is implemented.

[0119] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0120] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0121] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0122] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0123] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: determines the 3D transformation information corresponding to the transition model at the current moment; transforms the transition model according to the 3D transformation information to obtain the transformed transition model; samples pixel values ​​from the set image according to the transformed transition model; and generates a 3D transition special effects image corresponding to the transition model according to the pixel values.

[0124] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0125] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0126] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0127] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0128] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0129] According to one or more embodiments of the present disclosure, a method for generating a transition special effect graph is provided, comprising:

[0130] Determine the 3D transformation information corresponding to the transition model at the current moment;

[0131] Transform the transition model according to the 3D transformation information to obtain a transformed transition model;

[0132] Sample pixel values ​​from the set image according to the transformed transition model;

[0133] A 3D transition special effects image corresponding to the transition model is generated according to the pixel value.

[0134] Furthermore, the 3D transformation information corresponding to the transition model at the current moment is determined, including:

[0135] Obtain perspective information and model transformation information and camera transformation information corresponding to the current moment; wherein the model transformation information is the transformation information of the transition model;

[0136] The 3D transformation information of the transition model is determined according to the perspective information, the camera transformation information and the model transformation information.

[0137] Furthermore, perspective information is obtained, including:

[0138] Acquire virtual camera information; wherein the virtual camera information includes: viewing angle information, near plane information, far plane information and screen ratio information;

[0139] Perspective information is generated based on the virtual camera information.

[0140] Furthermore, the model transformation information and camera transformation information corresponding to the current moment are obtained, including:

[0141] Obtaining the transition progress corresponding to the current moment; wherein the transition progress is the ratio of the duration between the current moment and the transition start moment to the total duration of the transition;

[0142] The model transformation information and the camera transformation information corresponding to the current moment are determined based on the transition progress.

[0143] Further, determining the model transformation information and camera transformation information corresponding to the current moment based on the transition progress includes:

[0144] Determine the model translation information, model scaling information and model rotation information at the current moment according to the transition progress;

[0145] Model transformation information is determined according to the model translation information, the model scaling information, and the model rotation information.

[0146] Further, determining the camera transformation information corresponding to the current moment based on the transition progress includes:

[0147] Determine the camera translation information, camera rotation information and set component transformation information at the current moment according to the transition progress;

[0148] Camera transformation information is determined according to the camera translation information, the camera rotation information and the setting component transformation information.

[0149] Further, the perspective information is represented by a perspective matrix, the camera transformation information is represented by a camera transformation matrix, and the model transformation information is represented by a model transformation matrix; determining the 3D transformation information according to the perspective information, the camera transformation information and the model transformation information includes:

[0150] The perspective matrix, the camera transformation matrix and the model transformation matrix are dot-multiplied to obtain a 3D transformation matrix, and the 3D transformation matrix is ​​determined as 3D transformation information.

[0151] Furthermore, the transition model includes a set number of model vertices; transforming the transition model according to the 3D transformation information to obtain the transformed transition model includes:

[0152] Transform the set number of model vertices according to the 3D transformation information to obtain transformed model vertices;

[0153] The transformed model vertices constitute the transformed transition model.

[0154] Further, sampling pixel values ​​from the setting image according to the transformed transition model includes:

[0155] Determine a setting diagram according to the transition progress; wherein the setting diagram includes a transition forward diagram or a transition backward diagram;

[0156] Obtaining the texture coordinate information of the transformed transition model;

[0157] Sampling pixel values ​​from the setting map according to the map coordinate information;

[0158] Further, a 3D transition special effect image corresponding to the transition model is generated according to the pixel value, including

[0159] The transition model is rendered according to the pixel value to obtain a 3D transition special effects image.

[0160] Further, determining a setting diagram according to the transition progress includes:

[0161] If the transition progress is less than a set threshold, the transition forward graph is determined as a set graph;

[0162] If the transition progress is greater than or equal to a set threshold, the transition backward graph is determined as a set graph.

[0163] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0164] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0165] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for generating a transition special effect graph, characterized in that: include: Determine the 3D transformation information corresponding to the transition model at the current moment; The transition model is a virtual model used for transition; the transition model includes a set number of model vertices; the transition model is a 2D face; Transform the transition model according to the 3D transformation information to obtain a transformed transition model; Sampling pixel values ​​from a setting map according to a transformed transition model; wherein the setting map includes a transition forward map, a transition backward map, or a material map; the pixel values ​​are sampled from the setting map according to the mapping coordinate information of the transformed transition model; the setting map is determined based on the transition progress; Generate a 3D transition special effects image corresponding to the transition model according to the pixel value; The 3D transformation information is composed of at least one of perspective information, camera transformation information corresponding to the current moment, and model transformation information corresponding to the current moment; the camera transformation information is determined by at least one of camera translation information, camera rotation information, and set component transformation information; the camera transformation information corresponding to the current moment and the model transformation information corresponding to the current moment are determined based on the transition progress; Wherein, generating a 3D transition special effects image corresponding to the transition model according to the pixel value includes: Rendering the transition model according to the pixel value to obtain a 3D transition special effects image; The step of transforming the transition model according to the 3D transformation information to obtain the transformed transition model includes: Transform the set number of model vertices according to the 3D transformation information to obtain transformed model vertices; The transformed model vertices constitute the transformed transition model.

2. The method according to claim 1, characterized in that Determine the 3D transformation information corresponding to the transition model at the current moment, including: Obtain perspective information and model transformation information and camera transformation information corresponding to the current moment; wherein the model transformation information is the transformation information of the transition model; The 3D transformation information of the transition model is determined according to the perspective information, the camera transformation information and the model transformation information.

3. The method according to claim 2, characterized in that Get perspective information, including: Acquire virtual camera information; wherein the virtual camera information includes: viewing angle information, near plane information, far plane information and screen ratio information; Perspective information is generated based on the virtual camera information.

4. The method according to claim 2, characterized in that: Get the model transformation information and camera transformation information corresponding to the current moment, including: Obtaining the transition progress corresponding to the current moment; wherein the transition progress is the ratio of the duration between the current moment and the transition start moment to the total duration of the transition; The model transformation information and the camera transformation information corresponding to the current moment are determined based on the transition progress.

5. The method according to claim 4, characterized in that Determining model transformation information corresponding to the current moment based on the transition progress includes: Determine the model translation information, model scaling information and model rotation information at the current moment according to the transition progress; Model transformation information is determined according to the model translation information, the model scaling information, and the model rotation information.

6. The method according to claim 4, characterized in that Determining camera transformation information corresponding to the current moment based on the transition progress includes: Determine the camera translation information, camera rotation information and set component transformation information at the current moment according to the transition progress; Camera transformation information is determined according to the camera translation information, the camera rotation information and the setting component transformation information.

7. The method according to claim 2, characterized in that The perspective information is represented by a perspective matrix, the camera transformation information is represented by a camera transformation matrix, and the model transformation information is represented by a model transformation matrix; Determining 3D transformation information according to the perspective information, the camera transformation information, and the model transformation information includes: The perspective matrix, the camera transformation matrix and the model transformation matrix are dot-multiplied to obtain a 3D transformation matrix, and the 3D transformation matrix is ​​determined as 3D transformation information.

8. The method according to claim 4, characterized in that Sample pixel values ​​from the setting image according to the transformed transition model, including: Determine a setting diagram according to the transition progress; wherein the setting diagram includes a transition forward diagram or a transition backward diagram; Obtaining the texture coordinate information of the transformed transition model; Pixel values ​​are sampled from the setting map according to the mapping coordinate information.

9. The method according to claim 8, characterized in that Determining a setting diagram according to the transition progress includes: If the transition progress is less than a set threshold, the transition forward graph is determined as a set graph; If the transition progress is greater than or equal to a set threshold, the transition backward graph is determined as a set graph.

10. A device for generating a transition special effect graph, characterized in that: include: A 3D transformation information determination module is used to determine the 3D transformation information corresponding to the transition model at the current moment; The transition model is a virtual model used for transition; the transition model includes a set number of model vertices; the transition model is a 2D face; A transition model transformation module, used to transform the transition model according to the 3D transformation information to obtain a transformed transition model; A pixel value sampling module, used for sampling pixel values ​​from a setting map according to a transformed transition model; wherein the setting map includes a transition forward map, a transition backward map or a material map; the pixel values ​​are sampled from the setting map according to the mapping coordinate information of the transformed transition model; the setting map is determined based on the transition progress; A 3D transition special effect graph generation module, used to generate a 3D transition special effect graph corresponding to the transition model according to the pixel value; The 3D transformation information is composed of at least one of perspective information, camera transformation information corresponding to the current moment, and model transformation information corresponding to the current moment; the camera transformation information is determined by at least one of camera translation information, camera rotation information, and set component transformation information; the camera transformation information corresponding to the current moment and the model transformation information corresponding to the current moment are determined based on the transition progress; Wherein, the 3D transition special effect map generation module is used to: Rendering the transition model according to the pixel value to obtain a 3D transition special effects image; Wherein, the transition model transformation module is also used for: Transform the set number of model vertices according to the 3D transformation information to obtain transformed model vertices; The transformed model vertices constitute the transformed transition model.

11. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating a transition special effect graph as described in any one of claims 1-9.

12. A storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the method for generating a transition special effect graph as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and apparatus for realizing 3D transition animation for 2D control

    CN105488833A

  • View transition method, apparatus, computer readable storage medium, and computer device

    CN109542564A