Effect presentation method, device, equipment, storage medium, and program product
The effect presentation method addresses the lack of realism and immersion in current operations by controlling a target object to float and move based on physical attributes, enhancing user experience through realistic simulations.
Patent Information
- Application Number
- JP2024544387
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-01-25
- Filing Date
- 2023-01-13
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2043-01-13
AI Technical Summary
Current operations on effect targets lack a sense of reality and immersion, resulting in inadequate user experience.
An effect presentation method that controls a target effect object to move from an initial position to a target position, simulating a floating animation effect using physical attributes and dynamics models, enhancing realism and immersion.
The method enhances the sense of realism and immersion by simulating a floating animation effect, improving user experience.
Smart Images

Figure 0007796888000002 
Figure 0007796888000003 
Figure 0007796888000004
Abstract
Description
[Technical Field]
[0001] [CROSS-REFERENCE TO RELATED APPLICATIONS] This application is based on and claims priority from a Chinese patent application bearing application number 202210088012.9 and filed on January 25, 2022, the entire disclosure of which is incorporated herein by reference.
[0002] [Technical field] The present disclosure relates to the field of computer processing technology, and in particular to an effect presentation method, device, apparatus, storage medium, and program product. [Background technology]
[0003] With the rapid development of Internet technology and terminal devices, various terminal devices, such as mobile phones and tablet computers, have become an indispensable part of people's work and lives, and the functions of various media software installed on smart devices are becoming increasingly powerful. For example, media software installed on smart devices can realize operation on effect targets, which can reduce the demand for real materials, save costs, and make it easier to compile statistics on operation results. Summary of the Invention
[0004] According to some embodiments of the present disclosure, setting physical attributes of a target effect object, the physical attributes including a gravity parameter of the target effect object; determining a current position and a target position of the target effect object; determining a buoyancy parameter based on the current position and the target position; The present invention provides an effect presentation method that includes controlling the target effect object to float and move in accordance with a dynamics model based on the physical attribute and the levitation force parameter, thereby presenting a floating animation effect of the target effect object, wherein the dynamics model is for analyzing the movement state of the object having the physical attribute at the levitation force indicated by the levitation force parameter.
[0005] According to some further embodiments of the present disclosure, a physical attribute setting module for setting physical attributes of a target effect object, the physical attributes including a gravity parameter of the target effect object; a position determination module for determining a current position and a target position of the target effect object; a buoyancy parameter determination module for determining a buoyancy parameter based on the current position and the target position; An effect presentation device is provided, which includes a floating control module for controlling the target effect object to float and move in accordance with a dynamics model based on the physical attribute and the levitation force parameter, thereby presenting a floating animation effect of the target effect object, wherein the dynamics model is for analyzing the movement state of an object having the physical attribute at the levitation force indicated by the levitation force parameter.
[0006] According to still some embodiments of the present disclosure, 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 electronic device causes the one or more processors to implement the effect presentation method in any of the above-described embodiments.
[0007] According to still further embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program that, when executed by a processor, realizes the effect presentation method in any of the above-described embodiments.
[0008] According to still further embodiments of the present disclosure, there is provided a computer program product including a computer program or instructions that, when executed by a processor, implements the effect presentation method in any of the above-described embodiments.
[0009] According to still further embodiments of the present disclosure, there is provided a computer program including instructions that, when executed by a processor, cause the effect presentation method in any of the above-described embodiments to be implemented. [Brief explanation of the drawings]
[0010] These and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent from the following detailed description taken in conjunction with the accompanying drawings, in which the same or similar elements are designated by the same or similar reference numerals throughout the drawings. It should be understood that the drawings are schematic and that the materials and elements are not necessarily drawn to scale. [Figure 1] 1 is a flowchart of an effect presentation method according to an embodiment of the present disclosure. [Figure 2] FIG. 1 is a schematic diagram of a presentation state of candy craft in an embodiment of the present disclosure. [Figure 3] 10 is a flowchart illustrating a process for presenting a candy craft effect in an embodiment of the present disclosure. [Figure 4] 1 is a schematic diagram illustrating the configuration of an effect presentation device according to an embodiment of the present disclosure. [Figure 5] FIG. 1 is a schematic diagram illustrating the configuration of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0011] The following describes in more detail the embodiments of the present disclosure with reference to the accompanying drawings. Although several embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be realized in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the accompanying drawings and embodiments of the present disclosure are merely illustrative and do not limit the scope of protection of the present disclosure.
[0012] It should be understood that the steps described in the method embodiments of the present disclosure may be performed in a different order and / or in parallel. Furthermore, method embodiments may include additional steps and / or omit performing steps as shown. The scope of the present disclosure is not limited in this respect.
[0013] As used herein, the term "comprises" and variations thereof are open-ended, meaning "including, but not limited to." The term "based on" means "based at least in part on." The term "in one embodiment" means "at least one embodiment," the term "in another embodiment" means "at least one other embodiment," and the term "in some embodiments" means "at least some embodiments." Relevant definitions of other terms are provided below in the description.
[0014] It should be noted that the concepts of "first," "second," etc. described in this disclosure are merely intended to distinguish between different devices, modules, or units, and are not intended to limit the order or interdependence of functions performed by these devices, modules, or units.
[0015] It should be noted that the modifications of "one" and "multiple" described in the present disclosure are exemplary and not limiting. It is obvious to those skilled in the art that unless otherwise specified, it should be understood as "one or multiple."
[0016] The names of messages or information exchanged between devices in the embodiments of the present disclosure are merely descriptive and do not limit the scope of these messages or information.
[0017] The inventors have found that currently, operations on effect targets often lack a sense of reality and immersion, and users do not get a very strong sense of reality.
[0018] The embodiments of the present disclosure provide an effect presentation method, which controls an effect target to move from an initial position to a target position and presents the target effect target with a floating animation effect, thereby realizing a floating effect of the effect target, simulating the effect of a moving balloon, enhancing the sense of realism and immersion, and improving the user's realistic experience. The effect presentation method according to the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0019] 1 is a flowchart of an effect presentation method according to an embodiment of the present disclosure. This embodiment is applicable to adding effect props to instantaneous video, and the method may be performed by an effect presentation device, which may be implemented in software and / or hardware, and may be disposed in an electronic device.
[0020] For example, the electronic device may be a mobile terminal, a fixed terminal, or a portable terminal, such as a mobile phone, a site, a unit, a device, a multimedia computer, a multimedia tablet, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / video camera, a positioning device, a television receiver, a radio receiver, an e-book device, a gaming device, or any combination thereof, including accessories, external devices, or any combination thereof for these devices.
[0021] Furthermore, for example, the electronic device may be a server. The server may be a physical server or a cloud server. The server may be a single server or a server cluster.
[0022] As shown in FIG. 1, the effect presentation method according to some embodiments of the present disclosure mainly includes the following steps S101 to S104.
[0023] In step S101, a physical attribute of a target effect object is set, and the physical attribute includes a gravity parameter of the target effect object.
[0024] The effect target may be referred to as an effect prop and may be considered a realistic object to be operated on in a corresponding display scene. For example, the effect target may be a candy sculpture, and in some embodiments, the candy sculpture is a three-dimensional (3D) candy sculpture. The candy sculpture may have a variety of styles, such as a rabbit style, a tiger style, a peacock style, a character style, and a person style. In this embodiment, the style of the three-dimensional (3D) candy sculpture is not limited. The following description will be given using a tiger-style candy sculpture as an example.
[0025] In some embodiments, the target effect object refers to an effect object that is in a target state. In some embodiments, the effect object may be adjusted or changed depending on the length of time it takes the user to complete a specified action. The target effect object is the effect object in its final adjusted state. For example, if the effect object is a candy sculpture, when the user pouts, this triggers the candy sculpture to expand, and the longer the user pouts, the larger the candy sculpture becomes. When the candy sculpture changes to its maximum state, the candy sculpture is determined to be in the target state, and the candy sculpture in the target state is determined to be the target candy sculpture, i.e., the target effect object.
[0026] The physical attributes can be regarded as attribute parameters that should be set to simulate the real environment of the target effect object. In some embodiments, the gravity parameter may be optionally set to 0 to achieve a floating effect.
[0027] The physical attributes may further include linear damping and angular damping, where the linear damping and angular damping may be set according to the state of existence of the effect target in a real environment, and are not specifically limited in this embodiment.
[0028] In step S102, the current position and the target position of the target effect object are determined.
[0029] The current position can be considered as the position of the target effect object in the captured current video frame, and the target position can be considered as the position to which the target effect object is floating, i.e., the target effect object floats to the target position and then gradually comes to a rest state.
[0030] The current position is determined by at least one parameter among the buoyancy force applied to the target effect object in the previous video frame, the first collision force generated by the face collision object in the previous video frame, and the second collision force generated by the effect border collision object in the previous video frame.
[0031] In some embodiments, the current position is determined based on aerodynamics using one or more parameters including the buoyancy force applied to the target effect object in the previous video frame, the first collision force generated by the face collision object in the previous video frame, and the second collision force generated by the effect border collision object in the previous video frame. In this embodiment, the specific determination method is not further limited.
[0032] In some embodiments, determining the target position of the target effect object includes determining a mouth position in the collected facial image as an initial position of the target effect object, and determining the target position of the target effect object based on the initial position and a predetermined offset amount.
[0033] The initial position of the target effect object may be the position of the mouth in the face image on the terminal screen.
[0034] In some embodiments, a facial image of a user is obtained, feature extraction is performed on the facial image, and based on the feature extraction result, a mouth image in the facial image is determined, it is determined that the mouth image is on the terminal screen, and the initial position of the target effect object is further determined.
[0035] In some embodiments, depth information of the face image is obtained, a three-dimensional head model is constructed based on the depth information, the center of gravity position and mouth offset amount of the three-dimensional head model are obtained (the center of gravity position and mouth offset amount of the three-dimensional head model are known), and the position of the user's mouth is determined, and the initial position of the target effect object is further determined.
[0036] In some embodiments, the preset offset amount may be designed according to actual circumstances, the preset offset amount may be a vector having a direction and a length, and the initial position may be expressed in coordinates.
[0037] The target position can be obtained by adding the coordinates of the initial position and a preset offset amount. Here, the target position is the position to which the effect target gradually approaches and finally stops.
[0038] Note that to avoid the effect subject occluding the face, the target position is located near the face but does not overlap with the facial head model.
[0039] In some embodiments, the method further includes generating the target effect object.
[0040] Specifically, the process of generating the target effect object mainly includes detecting whether the target user's mouth has completed a specified action based on the collected facial image, presenting the effect object in an initial state after the target user's mouth has completed the specified action, obtaining the retention time length during which the target part completes and maintains the specified action, adjusting the presentation state of the effect object based on the retention time length, and generating the target effect object when the retention time length reaches a preset time length.
[0041] In some embodiments, a user's facial image is collected by a camera of the terminal device. Here, the camera may be an external camera connected to the terminal device or a camera built into the terminal device. The connection may be a wired connection or a wireless connection, and is not limited to this embodiment. The camera built into the terminal device may be a front camera or a rear camera. In some embodiments, the camera is the front camera of the terminal device. This allows the user to view the dynamic effects of the effect target on the display screen of the terminal device, improving the user experience.
[0042] The above-mentioned specified action can be regarded as a pouting action, and in this embodiment, no further specific mention will be made of a specific method for detecting the pouting action.
[0043] In some embodiments, after collecting a facial image, the facial image is detected to determine whether the user's mouth has completed a specified action, i.e., whether the user has completed a pouting action. Specifically, detecting the facial image is further used to detect the position of the user's mouth on the device screen.
[0044] For example, there are two main methods for determining the user's mouth position: one is to extract features from the face image, determine the mouth image in the face image based on the feature extraction results, and determine that the mouth image is on the terminal screen; the other is to obtain depth information from the face image, build a 3D head model based on the depth information, obtain the center of gravity and mouth offset of the 3D head model (the center of gravity and mouth offset of the 3D head model are known), and determine the user's mouth position.
[0045] In some examples, the initial state can be considered as the state of the effect target immediately after the user pouts. In some examples, the presentation state of the effect target changes as the user holds the pout for an increasing length of time.
[0046] In some embodiments, the effect target is divided into multiple stages, and different presentation states are designed for each stage, simulating the realistic change process of the effect target in a real environment and designing the shapes of different stages, thereby enhancing the realism of the effect target and increasing the enjoyment of user interaction.
[0047] In some embodiments, the presentation state of the effect target is determined based on the duration of time the mouth maintains the designated motion (i.e., pouting). For example, the entire change process of the effect target is designed to last 10 seconds, and the duration of each presentation state is designed according to the number of divided stages and the realistic change process of the effect target. In addition, the change process is first presented at a fast speed and then at a slower speed to restore a realistic rhythm.
[0048] In some embodiments, an example will be described in which the effect target is divided into six stages. In the first stage, when the user squints their mouth for less than one second, the effect target in the initial state is presented. In the second stage, when the user squints their mouth for one to two seconds, the effect target in the first state is presented. In the third stage, when the user squints their mouth for two to four seconds, the effect target in the second state is presented. In the fourth stage, when the user squints their mouth for four to eight seconds, the effect target in the third state is presented. In the fifth stage, when the user squints their mouth for eight to nine seconds, the effect target in the fourth state is presented. In the sixth stage, when the user squints their mouth for nine to ten seconds, the effect target in the target state is presented. After 10 seconds, the effect target moves away from the mouth and drifts around the face.
[0049] As an example, the effect target will be described using a tiger-style candy sculpture. As shown in Figure 2, the inflation process of the tiger-style candy sculpture is divided into six stages. By simulating the realistic inflation process of the tiger-style candy sculpture and designing the shapes for each stage, the realism of the inflation process can be enhanced, and the user's interaction experience can be enhanced. For example, in the first stage, the tiger's tail appears. In the second stage, the tiger's head appears faintly. In the third stage, the tiger's tail is fully shaped and the tiger's head becomes larger. In the fourth stage, the tiger's body appears. In the fifth stage, the overall outline appears. In the sixth stage, details such as the tiger's ears and limbs appear.
[0050] In some embodiments, depending on the desired effect, the blendshape timeline is used to assign and keyframe the time at which the tiger candy sculpture appears at each stage, thereby improving the smoothness of the tiger-style candy sculpture's inflation and restoring a realistic rhythm.
[0051] In some embodiments, when it is determined that the user has turned on the effect mode and a face image of the user is detected, an effect border is displayed on the terminal screen to optimize the display effect of the effect.
[0052] In some embodiments, the device screen may further display presentation information to prompt the target user to complete the specified action. For example, in a candy sculpture effect, the presentation information may be "inflate." In some embodiments, the device screen may further display a progress bar to prompt the user with the length of time it will take to complete the specified action. The progress bar may be displayed above the facial image, and the presentation information may be displayed above the progress bar at the beginning of the progress bar.
[0053] In some embodiments, the position of the presentation information changes depending on the actual progress of the progress bar. Specifically, as the target user holds the mouth pursed for an increasing period of time, the progress bar slides to the right, the "inflate" speech bubble moves to the top of the progress bar, and the candy sculpture begins to appear in the user's mouth. The presentation state of the candy sculpture is presented in stages, as described in the above embodiments.
[0054] In some embodiments, if the holding time length does not reach a preset time length and the target user's mouth has not completed the specified action, the effect target is presented in its current state, and presentation information is displayed to prompt the target user to continue completing the specified action.
[0055] Specifically, if the user does not continue to pout for a preset period of time, the current state of the effect target is determined and displayed in the user's mouth according to the current state. At this time, the progress bar is paused, and the "Inflate" speech bubble becomes "Keep inflating," accompanied by a breathing animation that expands and contracts.
[0056] In some embodiments, a facial image of the user is detected in real time, and it is determined whether the user has completed the pouting action again. When the user has completed the pouting action, the effect target is changed from the current presentation state in a preset change step.
[0057] In some embodiments, when the target effect object is generated, an expansion effect is played once at the effect border, twinkling stars appear, the effect object leaves the mouth and floats around the face, and a boom balloon sound effect is played.
[0058] In step S103, a buoyancy parameter is determined based on the current position and the target position.
[0059] In some embodiments, the buoyancy force parameters include a buoyancy force direction and a buoyancy force magnitude, where the buoyancy force parameters refer to the direction and magnitude of the buoyancy force to be applied to each video frame.
[0060] In some embodiments, the direction of the buoyancy force is determined from the difference between the current position and the target position, and the magnitude of the buoyancy force is preset.
[0061] If the current position overlaps with the initial position, a vector difference between the initial position and the target position is calculated, and the direction of the vector difference is determined as the buoyancy force direction. The magnitude of the buoyancy force is preset.
[0062] In some embodiments, each video frame is captured in real time, and each video frame is taken as a current video frame. The current position of the target effect object in the current video frame is determined, and the direction of the vector between the current position and the target position is determined as the levitation force direction. The levitation force magnitude is determined according to a preset force magnitude.
[0063] Step S 104 In the method, based on the physical attribute and the levitation force parameter, the target effect object is controlled to float and move in accordance with a dynamics model to present a floating animation effect of the target effect object, and the dynamics model is used to analyze the movement state of the object having the physical attribute at the levitation force indicated by the levitation force parameter.
[0064] In some embodiments, by setting a physical attribute to the target effect object and applying a levitation force toward the target position, the target effect object levitates from its initial position to the target position, presenting a floating animation effect on the terminal screen.
[0065] In this way, the farther away from the target position, the stronger the external force, and the easier it is to push the target effect object to the target position, and the closer it is, the weaker the external force, and the object floats at the target position, and if the target position does not change, the object gradually comes to rest.
[0066] In some embodiments, after the effect object moves to the target position, a new target position is determined based on the target position and a preset offset amount, and a levitation force parameter is calculated based on the current position in the current video frame and the new target position, so that the target effect object floats from the current position to the target position, and a floating animation effect is presented for the target effect object.
[0067] In some embodiments, the new target position is near the original target position. That is, when the target position is moved slightly, the target effect object oscillates back and forth near the target position until it comes to a stop. The floating animation effect at the target position is correlated with the value of the linear damping parameter of the target effect object; the smaller the damping, the more likely it is to oscillate back and forth, and the larger the damping, the more likely it is to stop. Air resistance is simulated.
[0068] Some embodiments of the present disclosure provide an effect presentation method, device, apparatus, storage medium, and program product, the method including: obtaining an initial position of a target effect object, which is an effect object in a target state; determining a target position based on the initial position and a preset offset amount; and controlling the target effect object to move from the initial position to the target position and present a floating animation effect. The embodiments of the present disclosure control the target effect object to move from the initial position to the target position and present the target effect object with a floating animation effect, thereby realizing a floating effect for the effect object, simulating the effect of a moving balloon, enhancing realism and immersion, and improving the user's realistic experience.
[0069] Based on the above embodiment, the method further includes controlling the target effect object to rotate according to an angular velocity when controlling the target effect object to float and move according to a dynamics model based on the physical attribute and the levitation force parameter.
[0070] Specifically, the angular velocity determination process includes: obtaining a current angle of the target effect object in a current video frame; determining an angle difference as the difference between the current angle and a preset angle; and determining the angular velocity based on the angle difference and a preset velocity value.
[0071] In some embodiments, if the target effect object is restored to its default angle when it comes to rest, a force to restore the angle must be applied to the target effect object. However, the target effect object does not have an external force that changes only its angle. Therefore, a velocity is simulated, and a velocity that rotates toward the specified angle is applied to the target effect object. The current angle g0 of the model is calculated, a preset angle g1 is specified, and the difference is obtained to obtain the angular difference dg. dg is then multiplied by an appropriate preset velocity value and assigned to the angular velocity of the target effect object. In this way, the target effect object always rotates toward the default direction.
[0072] Based on the above embodiment, controlling the target effect object to float and move in accordance with a dynamics model based on the physical attributes and the buoyancy force parameters includes detecting in real time whether the target user's head has moved, and when it is detected that the target user's head has moved, controlling the target effect object to float and move in accordance with a dynamics model based on the physical attributes and new buoyancy force parameters so that it follows the target user's head, wherein the new buoyancy force parameters are determined by external disturbance force parameters generated when the target user's head moves.
[0073] In some embodiments, when a movement of the target user's face is detected, the target effect object moves to follow the face, providing realistic physics collision and air resistance effects.
[0074] Specifically, the new buoyancy force parameters are determined by the following method: a new target position is determined based on the current position, a preset offset amount, and the disturbance force parameters. Target Position Based on the above, new buoyancy parameters are determined.
[0075] In some embodiments, the air around a fast-moving object follows Bernoulli's principle, which states that where the air is flowing faster, the pressure is lower and the object experiences a force in the direction of the lower pressure. In real life, when a train passes by at high speed, the air will draw anyone approaching closer to the train, which is the principle. Applying this principle to the prop will result in the target effect object moving closer to the area where the air is flowing faster.
[0076] If the original target position is p1, the initial position is p, and the preset offset amount is offset, then p1 = p + offset can be obtained. Here, a new spatial coordinate point, i.e., a new target position p5, is defined.
number
[0077] The current position and the new position Target Position The method for determining new buoyancy parameters based on the above is the same as the method for determining buoyancy parameters in the above embodiment, and for specific details, please refer to the explanation in the above embodiment, and no further explanation will be given in this embodiment.
[0078] Specifically, the disturbance force parameters generated when the target user's head moves are determined using the following method: A first head position of the target user in the current video frame and a second head position of the target user in the video frame N frames prior (where N is a positive integer) are obtained. The difference between the first head position and the second head position is determined as a position difference vector. A numerical value corresponding to the position difference vector is determined as the magnitude of the disturbance force. The normal direction of the position difference vector is determined as the direction of the disturbance force.
[0079] In some embodiments, the position information of the target user's head is recorded for each frame, and the difference between the first head position p3 of the target user in the current video frame and the second head position p4 of the target user 10 frames earlier is calculated to obtain a vector u1, which is determined as the direction and magnitude of the wind generated by the head moving at high speed.
[0080] Based on the above embodiment, the method further includes determining the number of target effect targets before detecting in real time whether the target user's head has moved, and detecting in real time whether the target user's face has moved when the number of target effect targets reaches a preset number.
[0081] The preset number may be designed according to actual circumstances. In some embodiments, the preset number is four. When the number of target effect objects reaches four, it is detected whether the target user's face has moved. If it has, the four target effect objects are controlled to move simultaneously to follow the target user's face. In this way, it is possible to avoid having too few effect objects affecting the display effect, and it is also possible to avoid having too many effect objects obscuring the target user's face.
[0082] In some embodiments, when a preset number of target effect objects are completed, an expansion effect is played once at the effect border, followed by twinkling stars and falling colorful ribbons, and finally, one of the candy figures leaves the mouth and floats around the face, with a boom balloon sound effect being played.
[0083] Based on the above embodiments, the embodiments of the present disclosure can further provide a method for generating an effect target material.
[0084] In some embodiments, a method for generating an effect target material mainly includes: fusing a pre-acquired MatCap (Material Capture) map and a PBR (Physically-Based Rendering) texture map to obtain a final fusion map; and adding transparency and light effects to the final fusion map to obtain the effect target.
[0085] Specifically, the MatCap map includes a MatCap candy map, a MatCap detail map, and a MatCap specular map.
[0086] In some embodiments, fusing the pre-acquired MatCap map and the PBR texture map to obtain a final fusion map includes: fusing the PBR texture map and the MatCap detail map to obtain a first fusion map; fusing the first fusion map and the MatCap specular map to obtain a second fusion map; and fusing the second fusion map and the MatCap candy map to obtain the final fusion map.
[0087] In some embodiments, different color values are set for different channels in the color model to obtain a MatCap candy map, a MatCap detail map, and a MatCap specular map.
[0088] In some embodiments, during the fusing of the MatCap map and the PBR texture map, different weight values may be assigned to the PBR texture map, the MatCap candy map, the MatCap detail map, and the MatCap specular map, respectively, so that the effect target after fusion is more realistic, where the corresponding weight values are obtained by the designer's input.
[0089] Based on the above embodiment, the present disclosure provides a method for presenting a tiger-style candy sculpture. As shown in FIG. 3, when it is detected that the target user pouts, the candy sculpture is triggered to inflate, i.e., the candy sculpture begins to appear. When it is detected that the user continues to pout, vertex animation is played, and the candy sculpture becomes larger and larger. When the target state is reached, the candy sculpture automatically separates from the mouth and floats to a predetermined position near the face, moving in accordance with the face and providing air resistance and dynamic effects. If the candy sculpture is not further pouted without reaching the target state, it remains in its current state and a progress bar is displayed to indicate that it will continue to inflate. When the user pouts again, the prompt disappears and the candy sculpture continues to grow. When the target state is reached, the candy sculpture automatically separates from the mouth and floats to a predetermined position near the face, moving in accordance with the face and providing air resistance and dynamic effects. Then, it is detected whether the target user pouts. When it is detected that the target user pouts, the next candy sculpture is triggered to inflate. 4 is a schematic diagram of an effect display device according to an embodiment of the present disclosure. This embodiment is applicable to adding effect props to instantaneous video, and the effect display device may be implemented in software and / or hardware, and may be disposed in an electronic device.
[0090] As shown in FIG. 4, the effect presentation device 40 according to the embodiment of the present disclosure mainly includes: Physical Attribute Setting Module 41, a target location determination module 42, Buoyancy force parameter determination module Includes 43.
[0091] The physical attribute setting module 41 is for setting physical attributes of a target effect object, the physical attributes including gravity parameters of the target effect object; a position determination module 42 for determining a current position and a target position of the target effect object; the buoyancy parameter determination module 43 is for determining a buoyancy parameter based on the current position and the target position; The levitation control module 44 is for controlling the target effect object to levitate and move in accordance with a dynamics model based on the physical attributes and the levitation force parameters, to present a levitation animation effect of the target effect object, and the dynamics model is for analyzing the movement state of the object having the physical attributes at the levitation force indicated by the levitation force parameters.
[0092] In some embodiments, the physical attributes further include linear damping and angular damping.
[0093] In some embodiments, the position determination module 42: an initial position determination unit for determining a mouth position in the collected face image as an initial position of the target effect; The apparatus includes a target position determination unit for determining a target position of the target effect object based on the initial position and a preset offset amount.
[0094] Specifically, the buoyancy force parameters include a buoyancy force direction and a buoyancy force magnitude, the buoyancy force direction is determined from the difference between the current position and the target position, the buoyancy force magnitude is set in advance, and the current position refers to the position of the target effect object in the current video frame.
[0095] In some embodiments, the current location is: A levitation force applied to the target effect subject in the previous video frame; The first collision force generated by the face collision object in the previous video frame; The second collision force generated by the effect border collision object in the previous video frame is determined by at least one parameter.
[0096] In some embodiments, the device further includes a rotation control module for controlling the target effect object to move from an initial position to the target position and for controlling the target effect object to rotate according to an angular velocity.
[0097] Specifically, the angular velocity determination process includes: obtaining a current angle of the target effect object in a current video frame; determining an angle difference as the difference between the current angle and a preset angle; and determining the angular velocity based on the angle difference and a preset velocity value.
[0098] In some embodiments, the flotation control module 44 includes: The target effect object includes a head movement detection unit for detecting in real time whether the target user's head has moved after controlling the target effect object to move from an initial position to the target position, and a levitation control unit for controlling the target effect object to move to follow the target user's head when it is detected that the target user's head has moved. Specifically, when it is detected that the target user's head has moved, the target effect object is controlled to levitate and move to follow the target user's head according to a dynamics model based on the physical attribute and a new levitation force parameter, and the new levitation force parameter is determined by a disturbance force parameter generated when the target user's head moves.
[0099] Specifically, the new buoyancy force parameters are determined by the following method: a new target position is determined based on the current position, a preset offset amount, and the disturbance force parameters. Target Position Based on the above, new buoyancy parameters are determined.
[0100] Specifically, the disturbance force parameters generated when the target user's head moves are determined using the following method: A first head position of the target user in the current video frame and a second head position of the target user in the video frame N frames prior (where N is a positive integer) are obtained. The difference between the first head position and the second head position is determined as a position difference vector. A numerical value corresponding to the position difference vector is determined as the magnitude of the disturbance force. The normal direction of the position difference vector is determined as the direction of the disturbance force.
[0101] In some embodiments, the device further includes a number determination module for determining the number of target effect targets before detecting in real time whether the target user's head has moved, and a head movement detection module for detecting in real time whether the target user's face has moved when the number of target effect targets reaches a preset number.
[0102] In some embodiments, the device comprises: an action completion determination module for detecting whether the target user's mouth has completed a designated action based on the collected facial images; an initial state presentation module for presenting the effect target in an initial state when the target user's mouth has completed a designated motion; a retention time length acquisition unit for acquiring a retention time length during which the mouth part completes and maintains the designated motion; a presentation state adjustment module for adjusting a presentation state of the effect target based on the retention time length; The apparatus further includes a target effect object generating unit for generating the target effect object when the holding time length reaches a predetermined time length.
[0103] In some embodiments, the device comprises: If the holding time length does not reach a predetermined time length and the target user's mouth has not completed the specified action, the device further includes a current state presentation module for presenting the effect target in a current state, and a presentation information display module for displaying presentation information, wherein the presentation information is for presenting the target user with the intention of continuing to complete the specified action.
[0104] In some embodiments, the device further includes a map fusion module for fusing a pre-acquired MatCap map and a PBR texture map to obtain a final fusion map, and an effect object generation module for adding transparency effects and light effects to the final fusion map to obtain the effect object.
[0105] The MatCap map includes a MatCap candy map, a MatCap detail map, and a MatCap specular map, and the map fusion module includes a first fusion unit for fusing the PBR texture map and the MatCap detail map to obtain a first fusion map, a second fusion unit for fusing the first fusion map and the MatCap specular map to obtain a second fusion map, and a final fusion unit for fusing the second fusion map and the MatCap candy map to obtain the final fusion map.
[0106] The effect presentation device according to the embodiments of the present disclosure can perform the steps performed in the effect presentation method according to the method embodiments of the present disclosure, and the included performing steps and beneficial effects will not be further described here.
[0107] FIG. 5 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. The following specifically refers to FIG. 5 , which illustrates a schematic diagram of an electronic device 500 suitable for implementing an embodiment of the present disclosure. The electronic device 500 according to an embodiment of the present disclosure may include, but is not limited to, mobile devices such as mobile phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), tablets, portable multimedia players (PMPs), in-vehicle devices (e.g., in-vehicle navigation devices), and wearable devices, as well as fixed devices such as digital TVs, desktop computers, and smart homes. The electronic device illustrated in FIG. 5 is merely an example and does not impose any limitations on the functionality and scope of use of the embodiment of the present disclosure.
[0108] 5, the electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 501, which can perform various appropriate operations 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 to realize an image rendering method according to an embodiment of the present disclosure. The RAM 503 further stores various programs and data necessary for the operation of the terminal device 500. The processing unit 501, the ROM 502, and the RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0109] Typically, input devices 506, including, for example, a touch screen, touch panel, keyboard, mouse, camera head, microphone, accelerometer, gyroscope, etc.; output devices 507, including, for example, a liquid crystal display (LCD), speaker, oscillator, etc.; storage devices 508, including, for example, a magnetic tape, hard disk, etc.; and communication devices 509 may be connected to the I / O interface 505. The communication devices 509 enable the terminal device 500 to exchange data with other devices through wireless or wired communication. While FIG. 5 illustrates the terminal device 500 with various devices, it should be understood that it is not intended to require the implementation or inclusion of all of the devices shown. More or fewer devices may alternatively be implemented or included.
[0110] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product, which includes a computer program stored on a non-transitory computer-readable medium and includes program code for executing the methods shown in the flowcharts, thereby realizing the page jump method described above. In such embodiments, the computer program can be downloaded and installed from a network via the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When executed by the processing device 501, the computer program performs the functions defined by the methods of the embodiments of the present disclosure.
[0111] In this disclosure, the computer-readable medium may be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. The computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer-readable storage medium include, but are not limited to, an electrical connection having one or more conductors, 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 compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program can be used in or in combination with a command execution system, apparatus, or device. In this disclosure, the computer-readable signal medium may include a data signal propagated in baseband or a data signal propagated in part on a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may transmit, propagate, or transmit a program for use in or in connection with a command execution system, apparatus, or device. The program code contained in the computer-readable medium may be transmitted over any suitable medium, including, but not limited to, electrical wire, optical cable, RF (radio frequency), or the like, or any suitable combination thereof.
[0112] In some embodiments, clients and servers may communicate using any now known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect 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"), the Internet, and an end-to-end network (e.g., an ad hoc end-to-end network), as well as any now known or later developed network.
[0113] The computer-readable medium may be included in the electronic device, or may be a standalone medium not mounted in the electronic device.
[0114] The computer-readable medium has one or more programs stored therein, and when the one or more programs are executed by the terminal device, the terminal device is caused to perform the following operations: setting physical attributes of a target effect object, wherein the physical attributes include gravity parameters of the target effect object; determining a current position and a target position of the target effect object; determining levitation force parameters based on the current position and the target position; and controlling the target effect object to float and move in accordance with a dynamics model based on the physical attributes and the levitation force parameters, to present a floating animation effect of the target effect object, wherein the dynamics model is for analyzing the movement state of an object having the physical attributes at a levitation force indicated by the levitation force parameters.
[0115] In some embodiments, when the one or more programs are executed by the terminal device, the terminal device may perform other steps described in the above embodiments.
[0116] Computer program code for carrying out the operations of the present disclosure can be written using one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, and C++, as well as general procedural programming languages such as "C" or similar programming languages. The program code can execute 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 the case of a remote computer, the remote computer can be connected to the user's computer by any network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., via the Internet using an Internet Service Provider).
[0117] The flowcharts and block diagrams in the accompanying drawings illustrate possible system architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, program segment, or portion of code, which includes one or more executable instructions for implementing a specified logical function. Note that in some alternative implementations, the functions depicted in the blocks may be implemented in a different order than depicted in the drawings. For example, two successively shown blocks may be executed substantially simultaneously, or, depending on the functionality, they may be executed in the reverse order. Note that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or by a combination of dedicated hardware and computer instructions.
[0118] The units according to the embodiments of the present disclosure may be realized by software or hardware, and the names of the units may not necessarily limit the units themselves.
[0119] The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, exemplary hardware logic components that may be used include, but are not limited to, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), etc.
[0120] In this disclosure, a machine-readable medium may be a tangible medium that can contain or store a program used by or in combination with a command execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the above. More specific examples of machine-readable storage media include one or more wire-based electrical connections, 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 compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0121] According to some embodiments of the present disclosure, there is provided an effect presentation method including: setting physical attributes of a target effect object, wherein the physical attributes include gravity parameters of the target effect object; determining a current position and a target position of the target effect object; determining levitation force parameters based on the current position and the target position; and controlling the target effect object to float and move in accordance with a dynamics model based on the physical attributes and the levitation force parameters to present a floating animation effect of the target effect object, wherein the dynamics model is for analyzing the movement state of an object having the physical attributes at a levitation force indicated by the levitation force parameters.
[0122] In some embodiments, the physical attributes further include linear damping and angular damping.
[0123] In some embodiments, determining the target position of the target effect object includes determining a mouth position in the collected facial image as an initial position of the target effect object, and determining the target position of the target effect object based on the initial position and a predetermined offset amount.
[0124] In some embodiments, the buoyancy force parameters include a buoyancy force direction and a buoyancy force magnitude, the buoyancy force direction is determined from the difference between the current position and the target position, the buoyancy force magnitude is preset, and the current position refers to the position of the target effect object in the current video frame.
[0125] In some embodiments, the current position is determined by at least one parameter of a levitation force applied to the target effect object in the previous video frame, a first impact force generated by a face impactor in the previous video frame, and a second impact force generated by an effect border impactor in the previous video frame.
[0126] In some embodiments, the method includes, when controlling the target effect subject to levitate and move according to a dynamics model based on the physical attribute and the levitation force parameter: The method further includes controlling the target effect object to rotate according to an angular velocity.
[0127] In some embodiments, the process of determining the angular velocity includes obtaining a current angle of the target effect object in a current video frame; and determining an angle difference as a difference between the current angle and a preset angle; determining the angular velocity based on the angular difference and a preset velocity value.
[0128] In some embodiments, controlling the target effect object to float and move in accordance with a dynamics model based on the physical attributes and the levitation force parameters includes detecting in real time whether the target user's head has moved, and when it is detected that the target user's head has moved, controlling the target effect object to float and move in accordance with a dynamics model based on the physical attributes and new levitation force parameters so that the target effect object floats and moves to follow the target user's head, wherein the new levitation force parameters are determined by disturbance force parameters generated when the target user's head moves.
[0129] In some embodiments, the new buoyancy force parameters are determined in the following manner: a new target position is determined based on the current position, a preset offset amount, and the disturbance force parameters. Target Position Based on the above, new buoyancy parameters are determined.
[0130] In some embodiments, a disturbance force parameter generated when the target user's head moves is determined by the following method: A first head position of the target user in a current video frame and a second head position of the target user in a video frame N frames prior (where N is a positive integer) are obtained; A difference between the first head position and the second head position is determined as a position difference vector; A numerical value corresponding to the position difference vector is determined as the magnitude of the disturbance force; A normal direction of the position difference vector is determined as the direction of the disturbance force.
[0131] In some embodiments, the method further includes determining the number of target effect targets before detecting in real time whether the target user's head has moved, and detecting in real time whether the target user's face has moved when the number of target effect targets reaches a preset number.
[0132] In some embodiments, the method further includes detecting whether the target user's mouth has completed a specified action based on the collected facial images; if the target user's mouth has completed the specified action, presenting the effect target in an initial state; obtaining a holding time length for the mouth to complete and hold the specified action; adjusting the presentation state of the effect target based on the holding time length; and generating the target effect target when the holding time length reaches a predetermined time length.
[0133] In some embodiments, the method further includes, if the holding time length does not reach a predetermined time length and the target user's mouth has not completed the specified action, presenting the effect target in a current state and displaying presentation information to prompt the target user to continue completing the specified action.
[0134] In some embodiments, the method further includes fusing the previously acquired MatCap map and the PBR texture map to obtain a final fusion map, and adding transparency and light effects to the final fusion map to obtain the effect target.
[0135] In some embodiments, the MatCap map includes a MatCap candy map, a MatCap detail map, and a MatCap specular map, and fusing the previously acquired MatCap map with a PBR texture map to obtain a final fusion map includes fusing the PBR texture map with the MatCap detail map to obtain a first fusion map, fusing the first fusion map with the MatCap specular map to obtain a second fusion map, and fusing the second fusion map with the MatCap candy map to obtain the final fusion map.
[0136] According to some embodiments of the present disclosure, an effect presentation device is provided, including: a physical attribute setting module for setting physical attributes of a target effect object, wherein the physical attributes include gravity parameters of the target effect object; a position determination module for determining a current position and a target position of the target effect object; a levitation force parameter determination module for determining levitation force parameters based on the current position and the target position; and a levitation control module for controlling the target effect object to levitate and move in accordance with a dynamics model based on the physical attributes and the levitation force parameters to present a levitation animation effect of the target effect object, wherein the dynamics model is for analyzing the movement state of an object having the physical attributes at a levitation force indicated by the levitation force parameter.
[0137] In some embodiments, the physical attributes further include linear damping and angular damping.
[0138] In some embodiments, the position determination module includes an initial position determination unit for determining a mouth position in the collected facial image as an initial position of the target effect object, and a target position determination unit for determining a target position of the target effect object based on the initial position and a predetermined offset amount.
[0139] In some embodiments, the buoyancy force parameters include a buoyancy force direction and a buoyancy force magnitude, the buoyancy force direction is determined from the difference between the current position and the target position, the buoyancy force magnitude is preset, and the current position refers to the position of the target effect object in the current video frame.
[0140] In some embodiments, the current position is determined by at least one parameter of a levitation force applied to the target effect object in the previous video frame, a first impact force generated by a face impactor in the previous video frame, and a second impact force generated by an effect border impactor in the previous video frame.
[0141] In some embodiments, the device further includes a rotation control module for controlling the target effect object to move from an initial position to the target position and for controlling the target effect object to rotate according to an angular velocity.
[0142] In some embodiments, the process of determining the angular velocity includes obtaining a current angle of the target effect object in a current video frame, determining an angle difference as a difference between the current angle and a preset angle, and determining the angular velocity based on the angle difference and a preset velocity value.
[0143] In some embodiments, the floating control module includes a head movement detection unit for detecting in real time whether the target user's head has moved after controlling the target effect object to move from an initial position to the target position, and a floating control unit for controlling the target effect object to move to follow the target user's head when it detects that the target user's head has moved.
[0144] In some embodiments, the new buoyancy force parameters are determined in the following manner: a new target position is determined based on the current position, a preset offset amount, and the disturbance force parameters. Target Position Based on the above, new buoyancy parameters are determined.
[0145] In some embodiments, a disturbance force parameter generated when the target user's head moves is determined by the following method: A first head position of the target user in a current video frame and a second head position of the target user in a video frame N frames prior (where N is a positive integer) are obtained; A difference between the first head position and the second head position is determined as a position difference vector; A numerical value corresponding to the position difference vector is determined as the magnitude of the disturbance force; A normal direction of the position difference vector is determined as the direction of the disturbance force.
[0146] In some embodiments, the device further includes a number determination module for determining the number of target effect targets before detecting in real time whether the target user's head has moved, and a head movement detection module for detecting in real time whether the target user's face has moved when the number of target effect targets reaches a preset number.
[0147] In some embodiments, the device further includes an action completion determination module for detecting whether the target user's mouth has completed a specified action based on the collected facial image, an initial state presentation module for presenting the effect target in an initial state when the target user's mouth has completed the specified action, a retention time length acquisition unit for acquiring a retention time length for the mouth to complete and maintain the specified action, a presentation state adjustment module for adjusting the presentation state of the effect target based on the retention time length, and a target effect target generation unit for generating the target effect target when the retention time length reaches a predetermined time length.
[0148] In some embodiments, the device further includes a current state presentation module for presenting the effect target in a current state when the holding time length has not reached a predetermined time length and the target user's mouth has not completed the specified action, and a presentation information display module for displaying presentation information, the presentation information being for presenting the target user to continue completing the specified action.
[0149] In some embodiments, the device further includes a map fusion module for fusing a pre-acquired MatCap map and a PBR texture map to obtain a final fusion map, and an effect object generation module for adding transparency effects and light effects to the final fusion map to obtain the effect object.
[0150] In some embodiments, the MatCap maps include a MatCap candy map, a MatCap detail map, and a MatCap specular map, and the map fusion module includes a first fusion unit for fusing the PBR texture map and the MatCap detail map to obtain a first fusion map, a second fusion unit for fusing the first fusion map and the MatCap specular map to obtain a second fusion map, and a final fusion unit for fusing the second fusion map and the MatCap candy map to obtain the final fusion map.
[0151] According to some embodiments of the present disclosure, one or more processors; a memory for storing one or more programs; An electronic device is provided that, when the one or more programs are executed by the one or more processors, causes the one or more processors to realize any of the effect presentation methods described herein.
[0152] According to some embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program that, when executed by a processor, causes any of the effect presentation methods described herein to be implemented.
[0153] Some embodiments of the present disclosure further provide a computer program product including a computer program or instructions that, when executed by a processor, implements the above-described effect presentation method.
[0154] According to some embodiments of the present disclosure, a computer program is provided that includes instructions that, when executed by a processor, cause the effect presentation method in any of the above-described embodiments to be implemented.
[0155] The above is merely a description of preferred embodiments and the technical principles applied in the present disclosure. It is obvious to those skilled in the art that the scope of the present disclosure is not limited to the technical solution based on a specific combination of the above technical features, but should also include other technical solutions formed by any combination of the above technical features or features equivalent thereto without departing from the concept of the above disclosure. For example, it also includes technical solutions formed by mutually replacing the above features with technical features having similar functions disclosed in the present disclosure (including but not limited to those).
[0156] Also, although operations are described in a particular order, this should not be understood as requiring such operations to be performed in the particular order shown, or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although certain specific implementation details are included in the above description, they should not be construed as limiting the scope of the present disclosure. Certain features described in the context of a single embodiment can also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
[0157] Although the present subject matter has been described in language specific to structural features and / or methodological operations, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or operations described above. Rather, the specific features and operations described above are merely example forms of implementing the claims.
Claims
1. setting physical attributes of a target effect object, the physical attributes including a gravity parameter of the target effect object; determining a current position and a target position of the target effect object; determining a buoyancy parameter based on the current position and the target position; An effect presentation method including controlling the target effect object to float and move in accordance with a dynamics model based on the physical attribute and the levitation force parameter to present a floating animation effect of the target effect object, wherein the dynamics model is for analyzing the movement state of an object having the physical attribute at the levitation force indicated by the levitation force parameter.
2. The method of claim 1 , wherein the physical attributes further include linear damping and angular damping.
3. Determining a target position for the target effect object includes: determining a mouth position in the collected face image as an initial position of the target effect; The effect presentation method according to claim 1 , further comprising: determining a target position of the target effect object based on the initial position and a preset offset amount.
4. 2. The effect presentation method of claim 1, wherein the buoyancy force parameters include a buoyancy force direction and a buoyancy force magnitude, the buoyancy force direction is determined from the difference between the current position and the target position, the buoyancy force magnitude is set in advance, and the current position refers to the position of the target effect object in the current video frame.
5. The current location is A levitation force applied to the target effect object in the previous video frame; A first collision force generated by the face-colliding object in the previous video frame; The effect presentation method according to claim 4 , wherein the effect border collision force is determined by at least one parameter among the following: a second collision force generated by the effect border collision body in the previous video frame;
6. When the target effect object is controlled to float and move according to a dynamics model based on the physical attribute and the levitation force parameter, The effect presentation method according to claim 1 , further comprising controlling the target effect object to rotate according to an angular velocity.
7. The process of determining the angular velocity comprises: obtaining a current angle of the target effect object in a current video frame; determining a difference between the current angle and a preset angle as an angle difference; The effect presentation method according to claim 6 , further comprising: determining the angular velocity based on the angular difference and a preset velocity value.
8. Controlling the target effect subject to float and move in accordance with a dynamics model based on the physical attribute and the levitation force parameter, Detecting in real time whether the target user's head has moved; 2. The effect presentation method of claim 1, further comprising: when detecting that the target user's head has moved, controlling the target effect object to float and move in accordance with the target user's head in accordance with a dynamics model based on the physical attribute and a new buoyancy force parameter; wherein the new buoyancy force parameter is determined by a disturbance force parameter that occurs when the target user's head moves.
9. The new buoyancy parameter is: determining a new target position based on the current position, a preset offset amount, and the disturbance force parameter; The effect presentation method according to claim 8 , wherein the new buoyancy force parameter is determined based on the current position and the new target position.
10. The disturbance force parameter generated when the target user's head moves is obtaining a first head position of the target user in a current video frame; Obtaining a second head position of the target user in a video frame N frames prior, where N is a positive integer; determining a difference between the first head position and the second head position as a position difference vector; determining a numerical value corresponding to the position difference vector as a magnitude of the disturbance force; The effect presentation method according to claim 8 , wherein the direction of the disturbance force is determined by a method of determining a normal direction of the position difference vector as the direction of the disturbance force.
11. before detecting in real time whether the target user's head has moved; determining the number of target effect subjects; The effect presentation method according to claim 8 , further comprising: detecting in real time whether the face of the target user has moved when the number of target effect objects reaches a preset number.
12. Detecting whether the target user's mouth has completed a specified action based on the collected facial images; When the target user's mouth has completed the designated motion, presenting an effect target in an initial state; acquiring a duration of time during which the mouth completes and maintains the designated motion; adjusting a presentation state of the effect target based on the retention time length; The effect presentation method according to claim 1 , further comprising: generating the target effect object when the holding time length reaches a preset time length.
13. If the holding time length does not reach a predetermined time length and the target user's mouth does not complete a designated motion, presenting the effect target in a current state; The effect presentation method according to claim 12 , further comprising: displaying presentation information to prompt the target user to continue completing the designated action.
14. Fusing the previously acquired MatCap map and the PBR texture map to obtain a final fusion map; The effect presenting method of claim 12 , further comprising: adding transparency and light effects to the final fusion map to obtain the effect target.
15. The MatCap map includes a MatCap candy map, a MatCap detail map, and a MatCap specular map. The MatCap map and the PBR texture map are fused to obtain a final fusion map. fusing the PBR texture map and the MatCap detail map to obtain a first fusion map; fusing the first fusion map and the MatCap specular map to obtain a second fusion map; The method for presenting an effect according to claim 14, further comprising fusing the second fusion map with the MatCap candy map to obtain the final fusion map.
16. a physical attribute setting module for setting physical attributes of a target effect object, the physical attributes including a gravity parameter of the target effect object; a position determination module for determining a current position and a target position of the target effect object; a buoyancy parameter determination module for determining a buoyancy parameter based on the current position and the target position; An effect presentation device comprising: a floating control module for controlling the target effect object to float and move in accordance with a dynamics model based on the physical attribute and the levitation force parameter, thereby presenting a floating animation effect of the target effect object, wherein the dynamics model is for analyzing the movement state of an object having the physical attribute at the levitation force indicated by the levitation force parameter.
17. one or more processors; a storage device for storing one or more programs; An electronic device that, when the one or more programs are executed by the one or more processors, causes the one or more processors to realize the effect presentation method according to any one of claims 1 to 15.
18. A computer-readable storage medium storing a computer program that, when executed by a processor, realizes the effect presentation method according to any one of claims 1 to 15.
19. A computer program comprising instructions that, when executed by a processor, cause the computer program to implement the effect presentation method according to any one of claims 1 to 15.
Citation Information
Patent Citations
Operation control method and device
CN111760265A
Game program and game device
JP2007202695A
Super-pressure balloon
US20160096612A1
Airborne lifting device within a video game
WO2020115452A1
Levitation object capable of adjusting levitating height
WO2020256330A1