Model special effect generation method and device, electronic equipment and storage medium

By decomposing the object model into multiple model compits, and based on the apex movement of the motion control parameter control model cubes at the change stage, the problem of computing performance caused by multi -bone motion in existing technologies has been solved, and the efficiency of model special effects generation is improved.

CN119379869APending Publication Date: 2025-01-28NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411467892.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

In the prior art, when implementing the change effects of the object model, multiple bones need to be set up, resulting in a degradation of computing performance and low efficiency in model effect generation.

Method used

By obtaining the target object model composed of multiple model blocks, and obtaining the first movement control parameter of the changing stage required for changing the special effects of the object, based on the model logo of these parameters and model blocks The vertex of the apex is performed to generate the special effects of the object.

Benefits of technology

By obtaining the motion control parameters corresponding to the model of the target object model, the motion control parameters required by the special effects of the special effects are controlled to control the apex of each model element for exercise to avoid controlling the calculation performance of multiple bone motion. Efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379869A_ABST
    Figure CN119379869A_ABST
Patent Text Reader

Abstract

The invention discloses a model special effect generation method and device, electronic equipment and a computer readable storage medium. According to the embodiment of the invention, a target object model is obtained; a first motion control parameter of a change stage required for generating the object change special effect of the target object model is obtained, and the first motion control parameter is used for indicating motion of the target object model in the corresponding change stage; second motion control parameters of the model blocks in the change stage are determined on the basis of the first motion control parameters of the change stage and the model identifiers of the model blocks, and the second motion control parameters of at least two model blocks in the change stage are different; on the basis of the second motion control parameter of the model block in the change stage, the vertex of the model block is controlled to move so as to generate the object change special effect, and the efficiency of generating the model special effect can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of rendering technology, and in particular to a model special effect generation method, device, electronic device and storage medium. Background Art

[0002] Under the tide of the Internet, entertainment projects are becoming more and more important in people's lives. In order to meet the needs of scene effect presentation in some entertainment projects (such as animated movies and games), it is necessary to render corresponding object change special effects for object models in virtual scenes to make the presented scenes better.

[0003] Generally, in order to realize the special effects of object model changes, skeletal animation can be used to add multiple bones to the object model and bind them, so as to drive the changes of the object model by controlling the movements of different bones respectively, and generate the special effects of object model changes. At present, in order to realize the special effects of object model changes, multiple bones need to be set, which leads to a decrease in the required computing performance, resulting in low efficiency in generating model special effects. Summary of the invention

[0004] The embodiments of the present application provide a model special effect generation method, device, electronic device and storage medium, which can improve the efficiency of model special effect generation.

[0005] In a first aspect, an embodiment of the present application provides a method for generating model special effects, the method comprising:

[0006] Acquire a target object model, wherein the target object model is composed of a plurality of model blocks, a plurality of vertices of the model blocks are configured with the same model identifier, and the model identifier is used to indicate a position of the model block;

[0007] Acquire a first motion control parameter of a change phase required for generating an object change special effect of the target object model, wherein the first motion control parameter is used to indicate the motion of the target object model in the corresponding change phase;

[0008] Determine the second motion control parameter of the model block in the above-mentioned change stage based on the first motion control parameter of the above-mentioned change stage and the model identifier of the above-mentioned model block, wherein the second motion control parameters of at least two model blocks in the above-mentioned change stage are different;

[0009] Based on the second motion control parameter of the model block in the change phase, the vertices of the model block are controlled to move to generate the object change effect.

[0010] In a second aspect, an embodiment of the present application provides a model special effect generation device, the device comprising:

[0011] A model acquisition module, used to acquire a target object model, wherein the target object model is composed of a plurality of model blocks, a plurality of vertices of the model blocks are configured with the same model identifier, and the model identifier is used to indicate the position of the model block;

[0012] A parameter acquisition module, used to acquire a first motion control parameter of a change phase required for generating an object change special effect of the target object model, wherein the first motion control parameter is used to indicate the motion of the target object model in a corresponding change phase;

[0013] a parameter determination module, configured to determine, based on the first motion control parameter of the change stage and the model identifier of the model block, a second motion control parameter of the model block in the change stage, wherein the second motion control parameters of at least two model blocks in the change stage are different;

[0014] The animation generation module is used to control the movement of the vertices of the above-mentioned model block based on the second motion control parameter of the above-mentioned model block in the above-mentioned change stage to generate the above-mentioned object change special effect.

[0015] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory storing a plurality of instructions; a processor loads instructions from the memory to execute the steps of any one of the model special effects generation methods provided in the embodiments of the present application.

[0016] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions, and the instructions are suitable for a processor to load to execute the steps of any one of the model special effects generation methods provided in the embodiments of the present application.

[0017] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps in any one of the model special effects generation methods provided in the embodiments of the present application.

[0018] By adopting the scheme of the embodiment of the present application, a target object model composed of multiple model blocks can be obtained, and then a first motion control parameter of the change stage required for generating the object change special effect of the above-mentioned target object model, which can indicate the movement of the above-mentioned target object model in the corresponding change stage, is obtained, and based on the first motion control parameter of the above-mentioned change stage and the model identification of the above-mentioned model block, the second motion control parameter of the above-mentioned model block in the above-mentioned change stage is determined, and the second motion control parameters of at least two model blocks are different, and finally, based on the second motion control parameter of the above-mentioned model block in the above-mentioned change stage, the vertices of the above-mentioned model block are controlled to move to generate the above-mentioned object change special effect, so as to respectively control the movement of the vertices of each model block by obtaining the motion control parameters corresponding to the model blocks required for generating the object change special effect of the target object model, thereby avoiding the computing performance consumed by controlling the movements of multiple bones, so as to improve the efficiency of model special effect generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 This is a flow chart of an embodiment of a method for generating model special effects provided in an embodiment of the present application;

[0021] Figure 2 is a schematic diagram of a gemstone model provided in an embodiment of the present application;

[0022] Figure 3 is a schematic diagram of the first center position of the model block provided in the embodiment of the present application;

[0023] Figure 4 is a schematic diagram of the reduced effect of the gemstone model provided in the embodiment of the present application;

[0024] Figure 5 is a schematic diagram of a presentation method of a first motion control parameter provided in an embodiment of the present application;

[0025] Figure 6 is a schematic diagram of a process for determining target position change information provided in an embodiment of the present application;

[0026] Figure 7 It is a schematic diagram of object change special effects provided in an embodiment of the present application;

[0027] Figure 8 It is a structural schematic diagram of a model special effect generating device provided in an embodiment of the present application;

[0028] Fig. 9 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0030] Embodiments of the present application provide a model special effect generation method, device, electronic device, and computer-readable storage medium.

[0031] Specifically, this embodiment will be described from the perspective of a model special effect generation device, which can be integrated into an electronic device, that is, the model special effect generation method of the embodiment of the present application can be executed by an electronic device, and optionally, the electronic device may include: a terminal device. The terminal device may be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, a game console, or a personal computer (PC) and the like.

[0032] The model special effect generation method provided in the embodiment of the present application can be applied to a model special effect generation system. The model special effect generation system may include a player terminal device and a server, and the terminal may be a device including both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. The player terminal device and the server may perform two-way communication via a network.

[0033] Optionally, the server may be an independent server, or a server network or server cluster composed of servers, including but not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud server composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.

[0034] The following is a detailed description in conjunction with the accompanying drawings. In this embodiment, the execution subject is a terminal device as an example. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments. Although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown in the accompanying drawings.

[0035] The model special effects generation method of the present embodiment obtains a target object model, wherein the target object model is composed of multiple model blocks, and multiple vertices of the model blocks are configured with the same model identifier, and the model identifier is used to indicate the position of the model block; obtains the first motion control parameter of the change stage required for generating the object change special effects of the target object model, wherein the first motion control parameter is used to indicate the movement of the target object model in the corresponding change stage; based on the first motion control parameter of the change stage and the model identifier of the model block, determines the second motion control parameter of the model block in the change stage, wherein the second motion control parameters of at least two model blocks in the change stage are different; based on the second motion control parameter of the model block in the change stage, controls the vertices of the model block to move to generate the object change special effects, which can improve the efficiency of model special effects generation.

[0036] Please refer to Figure 1 Taking a terminal as an example, this embodiment provides a model special effect generation method. The specific process of the model special effect generation method can be as follows: Step 101 to Step 104, wherein:

[0037] Step 101: Acquire a target object model, wherein the target object model is composed of a plurality of model blocks, a plurality of vertices of the model blocks are configured with a same model identifier, and the model identifier is used to indicate a position of the model block.

[0038] Among them, the target object model is in a virtual scene, and the appearance and performance of the target object model can be enhanced by special effects. For example, the target object model can be changed by special effects in the virtual scene through object change special effects to enhance its effect presentation in the virtual scene and match the content in the virtual scene.

[0039] Among them, the above-mentioned object change special effects can be special effects for the changes of the target object model itself, such as a shattering special effect, that is, the target object model can express the shattering special effect through animation processes such as unstable shaking, exploding, suspension of the model block after the explosion, and retraction of the suspended model block.

[0040] In this embodiment, the terminal obtains the target object model to render the target object model accordingly to generate corresponding special effects of the target object model, and in order to be able to more accurately control the table object model to generate special effects with better effects, the terminal further processes the target object model into a plurality of model blocks, and the terminal can configure the same model identifier for the multiple vertices constituting the model block, so as to control the multiple vertices of the model block to perform unified movement, for example, the multiple vertices of the model block are uniformly subjected to scaling displacement operations or rotation operations, etc., to show the motion effect of the model block.

[0041] It can be understood that since each vertex is calculated in parallel in the shader, it is not known which vertices belong to a model block. Therefore, in this embodiment, the terminal needs to indicate the model block to which the vertex belongs through the model identifier, that is, the above-mentioned model identifier can be used to identify the model block, that is, by associating the model identifier with the vertex, such as storing the identification information on the vertex to indicate which model block the vertex belongs to, so as to control the unified movement of multiple vertices belonging to the same model block, so as to realize the overall movement of the model block.

[0042] The target object model may refer to a complete representation of a virtual object, and the vertices are three-dimensional points constituting the target object model. The vertices may be connected together to form triangles or other shapes, and then these triangles or other shapes may be combined together to form the target object model.

[0043] Specifically, the terminal can use existing nodes in a visual shader editor ShaderGraph in the Unity engine to control the unified movement of multiple vertices of the model block. For example, the "Rotate About Axis" node can be used to control the unified rotation operation of multiple vertices based on the same model identifier configured for multiple vertices.

[0044] Specifically, in order to process the target object model as being composed of multiple model blocks, the initial target object model that has not been cut into multiple model blocks can be fragmented, and the terminal can use the nodes for Boolean operations in the preset three-dimensional computer graphics software (Houdini software), for example, using the "Boolean" node to cut the target object model, and the cut target object model has corresponding connection information. Through the corresponding connection information of the cut target object model, each model block can be separated, and then the corresponding model identifiers can be set on multiple vertices of the model block.

[0045] Among them, the above-mentioned node is a set of logical encapsulations, which consists of input, parameters, internal logic, output and other links. Its function is to process the input and output the corresponding result; the above-mentioned Houdini software is a product designed based on the node mode; the above-mentioned shader can be used in 3D rendering technology to process how the surface interacts with light to form the lighting effect of the model. In this embodiment, the above-mentioned shader can be a vertex shader to process vertex movement.

[0046] Specifically, since the positions of different model blocks in the target object model are different, the model identifiers that can indicate the module positions are also different. The terminal can establish a mapping relationship between the positions of the model blocks and the model identifiers to determine the corresponding model identifiers based on the positions of the model blocks; the terminal can also directly use the positions of the model blocks as the model identifiers, for example, using the center position of the center point of the model block as the model identifier. It can be understood that since there are other center positions later, in this embodiment, the center position of the center point of the model block is recorded as the first center position.

[0047] It can be understood that, in addition to being independently set in the virtual scene and performing corresponding object change effects based on the actions of the target object model in the virtual scene, the target object model can also be associated with other virtual objects. For example, the above-mentioned target object model is set on a virtual object in the virtual scene. Since the target object model is associated with other virtual objects, in order to improve the performance of the virtual scene, the animation actions of the virtual objects associated with the target object model in the virtual scene can affect the object change effects of the target object model, that is, different animation actions correspond to different object change effects of the target object model, and the different ways of the object change effects can be different in the content design of the animation process, in the presentation duration of the animation process, etc., which can be set specifically according to needs and are not limited here.

[0048] For example, the virtual object may be a firearm, and the target object model may be a gemstone model disposed on the firearm, such as Figure 2 As shown, the gem model can be composed of 50 model blocks. If the current firearm design is set to have three animation actions, namely inspection action, reloading action, and empty chamber reloading action, since these three actions have different action performances, different animation effects are required to correspond to them. Therefore, the gem model can be controlled to present different broken special effects.

[0049] Then, if Figure 3 As shown, the position of the center point of each model block in the gemstone model, that is, the first center position, can be calculated. Figure 3 The position indicated by the middle arrow is recorded as pivot, which is the first center position. It can be understood that for ease of viewing, Figure 3 Only the pivots of three model blocks are indicated, and the other model blocks are also set with pivots.

[0050] Furthermore, if Figure 4 As shown, Figure 4 When no pivot is set at the vertex of the gemstone model block in the upper area, the reduction of the gemstone model is for the entire gemstone model, that is, the gemstone model is reduced as a whole. Figure 4 When each model block of the gem model in the lower area is set with a pivot, the reduction of the gem model is targeted at the model blocks of the gem model, that is, the model blocks of the gem model are reduced separately.

[0051] Step 102: Obtain a first motion control parameter of a change phase required for generating an object change special effect of the target object model, wherein the first motion control parameter is used to indicate the motion of the target object model in a corresponding change phase.

[0052] It can be understood that the object change special effects of the above-mentioned target object model can be composed of one or at least two different animation processes. For example, for the shattering special effect, the shattering special effect can be expressed through animation processes such as unstable shaking, exploding, suspension of the model block after the explosion, and retraction of the suspended model block.

[0053] In this regard, in order to accurately present the different animation processes of the object change effects of the target object model, the terminal can set a corresponding change stage for each animation process. In order to be able to present the corresponding animation process in a change stage of the object change effect, it is necessary to set motion control parameters that match the animation process for each change stage required for the object change effect. It can be understood that since there are other motion control parameters later, in this embodiment, the motion control parameters of the target object model that match the change stage are recorded as the first motion control parameters.

[0054] In this embodiment, the terminal controls the target object model to move in the virtual scene based on the first motion control parameter preset or generated in real time for the target object model, and the motion includes but is not limited to a displacement operation or a rotation operation.

[0055] Specifically, the first motion control parameter may be a description of the motion of the target object model in the corresponding change stage. Exemplarily, setting the object change special effect of the target object model requires four change stages, namely, TimeInAnim2, TimeInAnim3 and TimeInAnim4. The TimeInAnim1 corresponds to parameter 1 indicating that the current target object model maintains its status quo in the change stage; the TimeInAnim2 (recorded as the explosion stage) corresponds to parameter 2 indicating that the current target object model explodes in the change stage, that is, the model block of the target object model is controlled to move outward; the TimeInAnim3 corresponds to parameter 3 indicating that the current target object model is suspended in the change stage, that is, the displacement is maintained for a period of time, which can cause the model block to have a slight outward expansion movement; the TimeInAnim4 (recorded as the closing stage) corresponds to parameter 4 indicating that the current target object model rotates and retracts in the change stage, for example, while rotating, the model block of the target object model is controlled to move inward.

[0056] The outward movement of the model block means that the model block moves in a direction away from the center position of the target object model, while the inward movement of the model block means that the model block moves in a direction close to the center position of the target object model.

[0057] Specifically, the above-mentioned first motion control parameter can also be the initial position change of the target object model in the corresponding change stage, and the initial position change includes but is not limited to the initial displacement change and the initial rotation degree change. The initial position change of the target object model may include: it can be the total change from the starting position to the end position in the change stage, such as the total displacement required to be moved, and the total rotation degree required to be rotated; or, it can also be the change corresponding to each node in the change stage, such as the displacement value required to be displaced at the node, and the rotation degree required to be rotated at the node; or, it can also be a parameter change curve matching the change stage, the horizontal axis of the parameter change curve corresponds to the change stage, and the vertical axis of the parameter change curve corresponds to the total change or the change of a node, which can be set according to needs and is not limited here.

[0058] For example, based on the four change stages in the above example, namely, TimeInAnim1, TimeInAnim2, TimeInAnim3 and TimeInAnim4, corresponding parameter change curves can be designed for TimeInAnim1, TimeInAnim2, TimeInAnim3 and TimeInAnim4 respectively, so as to obtain a total parameter change curve corresponding to the object change special effect, such as Figure 5 As shown, the total parameter change curve includes the total displacement change curve ( Figure 5 The curve corresponding to the displacement) and the total curve of the rotation degree change ( Figure 5 The curve corresponding to the rotation in ).

[0059] from Figure 5 As can be seen, Figure 5 The 0 to 1 in the above is the total change required for the object change effect composed of each change stage. Different change stages have different proportions in the total change stage, and the corresponding animation duration required in the corresponding change stage is also different. In TimeInAnim1, the target object model remains unchanged to form a preheating state; in TimeInAnim2, the target object model explodes, and the model block needs to move outward without rotation, so only the displacement of the corresponding curve part changes; in TimeInAnim3, the target object model needs to show that the model block is suspended and slightly expanded, so there is a little displacement, which prompts the model block to have a slight outward expansion movement, accompanied by rapid rotation; in TimeInAnim4, the target object model needs to be restored, that is, the target object model needs to be rotated and retracted, so it needs to be based on the displacement of moving inward. It should be noted that the rotation degree of the model block during rotation has been restored from 0 to 360, while the displacement needs to be restored from 0 to 1 and then to 0.

[0060] In some embodiments, when the target object model is set on a virtual object in a virtual scene, since the animation action of the virtual object associated with the target object model in the virtual scene can affect the object change effect of the target object model, the acquisition of the first motion control parameter of the change stage required for generating the object change effect of the target object model may include: the terminal may acquire the animation action of the virtual object in the virtual scene; then, the terminal may determine the first motion control parameter of the change stage based on the animation action of the virtual object to achieve different animation actions of the virtual object to affect the object change effect of the target object model, such as under different animation actions, the first motion control parameter of some change stages is set to empty, and under different animation actions, the first motion control parameters of some change stages are different, and under different animation actions, the proportion of some change stages in all change stages is different, etc. The specific setting can be made according to the needs and is not limited here.

[0061] Step 103, based on the first motion control parameters of the above-mentioned change stage and the model identification of the above-mentioned model block, determine the second motion control parameters of the above-mentioned model block in the above-mentioned change stage, wherein the second motion control parameters of at least two model blocks in the above-mentioned change stage are different.

[0062] In this embodiment, the terminal can use the first motion control parameters of each change stage to clarify the movement of the target object model in different change stages, and the terminal can use the model identifier of each model block to clarify the position of each model block during movement, thereby finally determining the parameters used to indicate the movement mode of each model block in each change stage, that is, the above-mentioned second motion control parameters, so that the terminal can control the movement of the corresponding model block based on the second motion control parameters. The second motion control parameters can be stored in the vertices corresponding to the model blocks, or can be stored in a preset storage space in association with the model blocks. The specific settings can be made according to needs and are not limited here.

[0063] Among them, the above-mentioned second motion control parameter includes position change information, which is used to indicate the position change of the model block in the corresponding change stage, such as the change of displacement, and the change of rotation angle. Among them, the above-mentioned position change information includes the position change direction and the position change amount. The position change direction is used to indicate the direction based on which the model block changes its position, such as the target displacement direction when displacing, and the target rotation direction axis when rotating. The position change amount includes but is not limited to the displacement change amount and the rotation degree change amount.

[0064] Specifically, the position change of the above-mentioned model block may include: it may be the total change from the starting position to the ending position in the change stage, such as the displacement change is the total displacement amount to be moved, and the total rotation degree to be rotated; or, it may be the change corresponding to each node in the change stage, such as the displacement value to be displaced under the node, and the rotation degree to be rotated under the node; or, it may be a parameter change curve matching the change stage, the horizontal axis of the parameter change curve corresponds to the change stage, and the vertical axis of the parameter change curve corresponds to the total change or the change of a node, which can be set according to needs and is not limited here.

[0065] In some embodiments, the above-mentioned model identifier is used to indicate the first center position of the above-mentioned model block. It can be understood that since the model block needs to move in the virtual scene to meet the model change special effects, its first center position needs to change with the movement of the model block, that is, the above-mentioned first center position changes with the above-mentioned position change information.

[0066] Specifically, the above-mentioned determination of the second motion control parameter of the above-mentioned model block in the above-mentioned change stage based on the first motion control parameter of the above-mentioned change stage and the model identification of the above-mentioned model block may include: determining the position change amount of the above-mentioned model block in the above-mentioned change stage based on the first motion control parameter of the above-mentioned change stage; determining the position change direction of the above-mentioned model block in the above-mentioned change stage based on the first center position of the above-mentioned model block.

[0067] Among them, the initial position change amount in the first motion control parameter of the above-mentioned change stage can be directly used as the position change amount of the above-mentioned model block in the corresponding change stage. For example, the total change amount from the starting position to the ending position of the target object model in the change stage is used as the total change amount from the starting position to the ending position of the model block in the change stage. Then, when controlling the movement of the model block, the position change amount and the model identification of the model block can be used to control the movement of each model vertex with the same model identification based on the position change amount. Alternatively, the initial position change amount in the first motion control parameter of the above-mentioned change stage can be reprocessed (such as random processing) to update the position change amount to obtain the position change amount of the above-mentioned model block in the corresponding change stage.

[0068] In some embodiments, the above-mentioned position change direction includes a target displacement direction. The above-mentioned determination of the position change direction of the above-mentioned model block in the above-mentioned change stage based on the first center position of the above-mentioned model block may include: the terminal may obtain the second center position of the above-mentioned target object model, to determine the target displacement direction of the above-mentioned model block in the above-mentioned change stage based on the above-mentioned first center position and the above-mentioned second center position, thereby determining the target displacement direction of the model block in different change stages of the target object model through the relative position of the model block and the target object model, such as the model block may move outward, and the model block may also move inward.

[0069] Specifically, the above-mentioned object change special effects include a shattering special effect, the above-mentioned change stage includes an explosion stage and a closing stage, and the above-mentioned determination of the target displacement direction of the above-mentioned model block in the above-mentioned change stage based on the above-mentioned first center position and the above-mentioned second center position may include: calculating the first difference vector between the above-mentioned first center position and the above-mentioned second center position, and using the above-mentioned first difference vector as the target displacement direction of the above-mentioned model block in the above-mentioned explosion stage, and at this time the target displacement direction is the direction of outward movement.

[0070] Then, the second difference vector between the second center position and the first center position can be calculated, or a negative value can be assigned to the first difference vector to obtain the second difference vector, so that the second difference vector can be used as the target displacement direction of the model block in the closing stage, and the target displacement direction is the direction of inward movement.

[0071] Exemplarily, the first center position of the model block is set to C, the second center position of the target object model is set to CT, the difference vector obtained by subtracting CT from C is used as the first difference vector, and the difference vector obtained by subtracting C from CT is used as the second difference vector.

[0072] In some embodiments, after determining the target displacement direction of the above-mentioned model block in the above-mentioned change stage, the target displacement direction can also be assigned randomness to enhance the displacement effect of the model block in the object change special effects, that is, it can include: the terminal can assign a first random value to the coordinate value of the above-mentioned first center position on each coordinate axis, respectively, to obtain the random displacement direction of the above-mentioned model block, and then, the terminal can update the above-mentioned target displacement direction based on the above-mentioned random displacement direction to obtain an updated target displacement direction.

[0073] Specifically, an interpolation function, such as a lerp function, can be introduced to interpolate the latest displacement direction from the target displacement direction and the random displacement direction according to the difference variable set by the user, so as to update the target displacement direction, that is, replace the target displacement direction with the latest displacement direction, and the latest displacement direction is the updated target displacement direction.

[0074] Exemplarily, the target displacement direction is set to N, and N is randomly processed by the random function Rand function, that is, by RandN = (rand(Nx), rand(Ny), rand(Nz)), so as to assign a first random value to the coordinate value of the above-mentioned first center position on each coordinate axis, and obtain the random displacement direction RandN of the above-mentioned model block.

[0075] Then, the lerp function is used to interpolate between RandN and N to control the degree of randomness, that is, FinalN=lerp(N,RandN,randScale), where FinalN is the updated target displacement direction, and randScale is the difference variable set by the user, that is, randScale indicates whether it tends to be A or B. If randScale is 0, FinalN is equal to N, if randScale is 1, FinalN is equal to RandN, and if randScale is an intermediate value between 0 and 1, FinalN is equal to the interpolation between N and RandN, that is, a transition is performed.

[0076] In some embodiments, the above-mentioned first motion control parameter includes an initial displacement change, the above-mentioned position change includes a target displacement change, and the above-mentioned first motion control parameter based on the above-mentioned change stage determines the position change of the above-mentioned model block in the above-mentioned change stage, which may include: the terminal may generate a second random value of the above-mentioned model block based on the first center position of the above-mentioned model block, and then the terminal may update the initial displacement value corresponding to the above-mentioned first center position in the above-mentioned initial displacement change based on the above-mentioned second random value, such as calculating the product between the second random value and the initial displacement value to obtain an updated displacement value, wherein the above-mentioned updated displacement value is used to constitute the above-mentioned target displacement change.

[0077] Specifically, a pseudo-random function can be designed to obtain the second random value corresponding to each model block, that is, a set of unpredictable values ​​is calculated through the decimal part of the trigonometric function, that is, the second random value RandValue = frac(sin(C)*100) is set. Among them, C is the first center position, sin(C) is used to obtain an infinite non-repeating decimal, and by calculating the product of sin(C) and 100, and then taking the decimal part through the frac function, an irregular value between 0 and 1 can be obtained as the second random value, so that each model block has a different degree of explosion, which looks more natural.

[0078] In addition, the displacement change degree of the model block can also be controlled by the displacement variable set by the user. For example, if the displacement change degree is relatively large, this displacement variable is set greater than 1, and the product of the displacement variable and the initial displacement value is used as the updated displacement value, then the displacement value will be relatively large; if the displacement change degree is relatively small, then this displacement variable can be set less than 1, and the product of the displacement variable and the initial displacement value is used as the updated displacement value, then the displacement value will be relatively small.

[0079] In some embodiments, the above-mentioned position change direction includes a target rotation direction axis, and the above-mentioned determination of the position change direction of the above-mentioned model block in the above-mentioned change stage based on the first center position of the above-mentioned model block may include: the terminal may generate a third random value of the above-mentioned model block based on the first center position of the above-mentioned model block; then, the terminal may generate a target rotation vector based on the above-mentioned third random value and the normal vector at the first center position of the above-mentioned model block, wherein the above-mentioned target rotation vector serves as the above-mentioned target rotation direction axis.

[0080] Alternatively, the terminal may also directly use the normal vector at the first center position of the above model block as the target rotation vector. Alternatively, the terminal may also use the vector corresponding to the generated third random value as the target rotation vector, which may be set according to the requirements and is not limited here.

[0081] In some embodiments, the above-mentioned position change also includes a target rotation change. The processing method of the target rotation change can refer to the target displacement change.

[0082] Step 104: Based on the second motion control parameter of the model block in the change phase, control the vertices of the model block to move, so as to generate the object change effect.

[0083] In this embodiment, the terminal can control the movement of the vertices of each model block based on the second motion control parameters corresponding to each model block in each change stage. For example, based on the position change amount in the second motion control parameters and the model identifier of a model block, the terminal can control the movement of each model vertex with the same model identifier based on the position change amount to generate object change special effects, thereby reducing performance consumption and improving the efficiency of model special effects generation.

[0084] Among them, the second motion control parameter of the model block can directly or indirectly control the parameters of the vertex movement. For example, the vertex can be directly controlled to perform corresponding movement through the information in the second motion control parameter. For example, the second motion control parameter needs to be processed to control the vertex to perform corresponding movement according to the processed information.

[0085] It can be understood that the above-mentioned second motion control parameters can be stored in the vertices so that the information required to restore the vertex motion can be calculated by obtaining the parameters from the vertices. The second motion control parameters can also be stored in the storage space associated with the model block so that they can be obtained from the corresponding storage space when needed.

[0086] In some embodiments, the above-mentioned position change may include a target rotation change. The above-mentioned second motion control parameter of the above-mentioned model block in the above-mentioned change stage controls the movement of the vertices of the above-mentioned model block, which may include: the terminal may determine the target rotation degree corresponding to the above-mentioned first center position in the above-mentioned target rotation change; then, the terminal may control the vertices of the above-mentioned model block to rotate the above-mentioned target rotation degree around the above-mentioned target rotation direction axis.

[0087] In some embodiments, based on the above Figure 5 It can be seen that each change stage has a different proportion in the total change stage, and the total change stage can be represented by 0 to 1. Therefore, the above-mentioned second motion control parameter in the above-mentioned change stage includes a third motion control parameter corresponding to at least two positions. The above-mentioned second motion control parameter of the above-mentioned model block in the above-mentioned change stage controls the movement of the vertices of the above-mentioned model block to generate the above-mentioned object change special effect, including: the terminal can obtain the animation generation progress of the above-mentioned object change special effect to clarify which change stage the animation generation progress is in the total change stage, and which position the animation generation progress is currently in in the corresponding change stage. The current position reached by the animation generation progress can be used as the target generation position.

[0088] Then, the terminal can determine the third motion control parameter of the model block at the target generation position corresponding to the animation generation progress from the second motion control parameter of the model block in the above-mentioned change stage, and control the movement of the vertices of the model block at the above-mentioned target generation position based on the third motion control parameter of the model block to generate the above-mentioned object change special effect.

[0089] Specifically, the above-mentioned change stages include at least two, the above-mentioned second motion control parameters include position change information, and the above-mentioned third motion control parameters of the above-mentioned model block at the target generation position corresponding to the above-mentioned animation generation progress are determined from the second motion control parameters of the above-mentioned model block in the above-mentioned change stage, including: the terminal can determine the target change stage corresponding to the above-mentioned animation generation progress from at least two change stages; then, the terminal can interpolate the position change information of the above-mentioned model block in the above-mentioned target change stage based on the above-mentioned target generation position in the above-mentioned target change stage, and obtain the target position change information of the above-mentioned model block at the above-mentioned target generation position, wherein the above-mentioned target position change information is used as the above-mentioned third motion control parameter.

[0090] For example, based on the four change stages in the above example, namely, TimeInAnim1, TimeInAnim2, TimeInAnim3 and TimeInAnim4, as Figure 6 As shown, the terminal may further introduce a parameter TimeInAnim, which represents the animation generation progress, that is, this parameter represents the progress of the overall action and is reasonably shrunk to [0,1]. 0 represents the beginning of the animation, 1 represents the end of the animation, and the sum of the proportions of TimeInAnim1, TimeInAnim2, TimeInAnim3 and TimeInAnim4 in the total change stage is 1.

[0091] Then, the running time of TimeInAnim1 is equal to the total running time of TimeInAnim, and the running time of TimeInAnim2 is TimeInAnim-TimeInAnim1, and the same is true for TimeInAnim3 and TimeInAnim4.

[0092] from Figure 6It can be seen that TimeInAnim is currently in TimeInAnim2, so the relative position of the target generation position in the target change stage can be obtained by the function Clamp(TimeInAnim-TimeInAnim1,0,TimeInAnim2) / TimeInAnim2, so as to interpolate the position change information of the model block in the target change stage based on the relative position, obtain the position change information corresponding to the relative position, and record it as the target position change information corresponding to the target generation position.

[0093] Among them, the Clamp function can limit the value of TimeInAnim-TimeInAnim1 to between 0 and TimeInAnim2. For example, if TimeInAnim-TimeInAnim1 is greater than TimeInAnim2, the Clamp function can return the value of TimeInAnim2. When TimeInAnim has not yet entered this change stage, that is, TimeInAnim-TimeInAnim1<=0, this value will be taken as 0, indicating that the duration of the second animation is 0. Finally, divide this value by TimeInAnim2, and the final value can be mapped between 0-1 for easy calculation.

[0094] Furthermore, if Figure 7 As shown, as TimeInAnim progresses, the displacements and rotations corresponding to the four stages can be combined. Figure 7 The four areas in the diagram correspond to the animation actions respectively, among which, Figure 7 , the first area corresponds to TimeInAnim1, the second area corresponds to TimeInAnim2, the third area corresponds to TimeInAnim3, and the fourth area corresponds to TimeInAnim4.

[0095] It can be understood that, based on the second motion control parameters of each model block in each change stage, the vertices of each model block are controlled to move to generate the object change special effect. It is necessary to configure a total duration for the total change stage, and then determine the animation duration of each change stage according to the proportion of each change stage in the total change stage. Finally, based on the second motion control parameters of each model block in each change stage and the animation duration corresponding to each change stage, the vertices of each model block are controlled to move to generate the object change special effect, so as to set parameters without a timeline to achieve the object change special effect, so that different users do not need to spend a lot of time adjusting the parameters when setting the time for different time requirements in different change stages of the object change special effect.

[0096] From the above content, it can be seen that by obtaining a target object model composed of multiple model blocks, and then obtaining the first motion control parameter of the change stage required for generating the object change special effect of the above target object model, which can indicate the movement of the above target object model in the corresponding change stage, based on the first motion control parameter of the above change stage and the model identification of the above model block, the second motion control parameter of the above model block in the above change stage is determined, and the second motion control parameters of at least two model blocks are different. Finally, based on the second motion control parameter of the above model block in the above change stage, the vertices of the above model block are controlled to move to generate the above object change special effect, so as to obtain the motion control parameters corresponding to the model blocks required for generating the object change special effect of the target object model, and to control the movement of the vertices of each model block separately, thereby avoiding the computing performance consumed by controlling the movements of multiple bones, so as to improve the efficiency of model special effect generation.

[0097] This embodiment also provides a model special effect generation device, which can be integrated into a terminal device. Figure 8 As shown, the model special effect generating device may include:

[0098] The model acquisition module 801 is used to acquire a target object model, wherein the target object model is composed of a plurality of model blocks, a plurality of vertices of the model blocks are configured with the same model identifier, and the model identifier is used to indicate the position of the model block;

[0099] The parameter acquisition module 802 is used to acquire the first motion control parameter of the change phase required for generating the object change special effect of the target object model, wherein the first motion control parameter is used to indicate the motion of the target object model in the corresponding change phase;

[0100] A parameter determination module 803, configured to determine a second motion control parameter of the model block in the change stage based on the first motion control parameter in the change stage and the model identifier of the model block, wherein the second motion control parameters of at least two model blocks in the change stage are different;

[0101] The animation generation module 804 is used to control the vertices of the model block to move based on the second motion control parameter of the model block in the change stage to generate the object change effect.

[0102] In some embodiments, the animation generation module 804 is specifically used for:

[0103] Get the animation generation progress of the above object change special effects;

[0104] Determining a third motion control parameter of the model block at a target generation position corresponding to the animation generation progress from the second motion control parameter of the model block at the change stage;

[0105] Based on the third motion control parameter of the model block, the vertices of the model block at the target generation position are controlled to move to generate the object change special effect.

[0106] In some embodiments, the change phases include at least two, the second motion control parameter includes position change information, and the animation generation module 804 is specifically used for:

[0107] Determining a target change stage corresponding to the animation generation progress from the at least two change stages;

[0108] Based on the target generation position in the target change phase, the position change information of the model block in the target change phase is interpolated to obtain the target position change information of the model block at the target generation position, wherein the target position change information is used as the third motion control parameter.

[0109] In some embodiments, the model identifier is used to indicate the first center position of the model block, the second motion control parameter includes position change information, the position change information includes the position change direction and the position change amount, and the first center position changes with the position change information; the parameter determination module 803 is specifically used to:

[0110] Determining the position change amount of the model block in the above-mentioned change stage based on the first motion control parameter in the above-mentioned change stage;

[0111] Based on the first center position of the model block, a position change direction of the model block in the change stage is determined.

[0112] In some embodiments, the position change direction includes a target displacement direction, and the parameter determination module 803 is specifically used to:

[0113] Obtaining a second center position of the target object model;

[0114] Based on the first center position and the second center position, a target displacement direction of the model block in the change phase is determined.

[0115] In some embodiments, the object change special effect includes a shattering special effect, the change stage includes an explosion stage and a closing stage, and the parameter determination module 803 is specifically used to:

[0116] Calculating a first difference vector between the first center position and the second center position, and using the first difference vector as a target displacement direction of the model block in the explosion stage;

[0117] Calculate a second difference vector between the second center position and the first center position, or assign a negative value to the first difference vector to obtain a second difference vector;

[0118] The second difference vector is used as the target displacement direction of the model block in the closing stage.

[0119] In some embodiments, the model special effect generating device further includes an updating module, and the updating module is specifically used for:

[0120] Assigning first random values ​​to the coordinate values ​​of the first center position on each coordinate axis respectively, to obtain the random displacement direction of the model block;

[0121] Based on the random displacement direction, the target displacement direction is updated to obtain an updated target displacement direction.

[0122] In some embodiments, the first motion control parameter includes an initial displacement change, the position change includes a target displacement change, and the parameter determination module 803 is specifically used to:

[0123] Based on the first center position of the model block, generating a second random value of the model block;

[0124] Based on the second random value, the initial displacement value corresponding to the first center position is updated in the initial displacement change to obtain an updated displacement value, wherein the updated displacement value is used to constitute the target displacement change.

[0125] In some embodiments, the position change direction includes a target rotation direction axis, and the parameter determination module 803 is specifically used for:

[0126] Based on the first center position of the model block, generating a third random value of the model block;

[0127] A target rotation vector is generated based on the third random value and the normal vector at the first center position of the model block, wherein the target rotation vector serves as the target rotation direction axis.

[0128] In some embodiments, the position change includes a target rotation change, and the animation generation module 804 is specifically used to:

[0129] In the above target rotation variation, determine the target rotation degree corresponding to the above first center position;

[0130] Control the vertices of the model block to rotate around the target rotation direction axis by the target rotation degree.

[0131] In some embodiments, the target object model is set on a virtual object in a virtual scene, and the parameter acquisition module 802 is specifically used to:

[0132] Obtaining the animation action of the virtual object in the virtual scene;

[0133] Based on the animation action of the virtual object, the first motion control parameter of the change phase is determined.

[0134] From the above content, it can be seen that by obtaining a target object model composed of multiple model blocks, and then obtaining the first motion control parameter of the change stage required for generating the object change special effect of the above target object model, which can indicate the movement of the above target object model in the corresponding change stage, based on the first motion control parameter of the above change stage and the model identification of the above model block, the second motion control parameter of the above model block in the above change stage is determined, and the second motion control parameters of at least two model blocks are different. Finally, based on the second motion control parameter of the above model block in the above change stage, the vertices of the above model block are controlled to move to generate the above object change special effect, so as to obtain the motion control parameters corresponding to the model blocks required for generating the object change special effect of the target object model, and to control the movement of the vertices of each model block separately, thereby avoiding the computing performance consumed by controlling the movements of multiple bones, so as to improve the efficiency of model special effect generation.

[0135] Accordingly, an embodiment of the present application further provides an electronic device, which may be a terminal, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and other terminal devices. Alternatively, the electronic device may be a server.

[0136] like Fig. 9 As shown, Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 900 includes a processor 901 having one or more processing cores, a memory 902 having one or more computer-readable storage media, and a computer program stored in the memory 902 and executable on the processor. The processor 901 is electrically connected to the memory 902. It will be understood by those skilled in the art that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.

[0137] The processor 901 is the control center of the electronic device 900, and uses various interfaces and lines to connect various parts of the entire electronic device 900. By running or loading software programs and / or units stored in the memory 902, and calling data stored in the memory 902, the processor 901 executes various functions of the electronic device 900 and processes data, thereby monitoring the electronic device 900 as a whole. The processor 901 can be a central processing unit CPU, a graphics processing unit GPU, a network processor (Network Processor, NP), etc., and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application.

[0138] In the embodiment of the present application, the processor 901 in the electronic device 900 loads instructions corresponding to the processes of one or more application programs into the memory 902 according to the following steps, and the processor 901 runs the application programs stored in the memory 902, thereby realizing various functions, for example:

[0139] Acquire a target object model, wherein the target object model is composed of a plurality of model blocks, a plurality of vertices of the model blocks are configured with the same model identifier, and the model identifier is used to indicate a position of the model block;

[0140] Acquire a first motion control parameter of a change phase required for generating an object change special effect of the target object model, wherein the first motion control parameter is used to indicate the motion of the target object model in the corresponding change phase;

[0141] Determine the second motion control parameter of the model block in the above-mentioned change stage based on the first motion control parameter of the above-mentioned change stage and the model identifier of the above-mentioned model block, wherein the second motion control parameters of at least two model blocks in the above-mentioned change stage are different;

[0142] Based on the second motion control parameter of the model block in the change phase, the vertices of the model block are controlled to move to generate the object change effect.

[0143] Therefore, the electronic device 900 provided in this embodiment can bring the following technical effects: improving the efficiency of generating model special effects.

[0144] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0145] Optional, such as Fig. 9As shown, the electronic device 900 further includes: a touch screen 903, a radio frequency circuit 904, an audio circuit 905, an input unit 906, and a power supply 907. The processor 901 is electrically connected to the touch screen 903, the radio frequency circuit 904, the audio circuit 905, the input unit 906, and the power supply 907, respectively. Those skilled in the art can understand that Fig. 9 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0146] The touch display screen 903 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 903 may include a display panel and a touch panel. Among them, the display panel may be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces may be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel may be used to collect the user's touch operation on or near it (such as the user using any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 901, and can receive the command sent by the processor 901 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 901 to determine the type of touch event, and then the processor 901 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 903 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 903 can also be used as a part of the input unit 906 to realize the input function.

[0147] The radio frequency circuit 904 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals with the network device or other electronic devices.

[0148] The audio circuit 905 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 905 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 905 and converted into audio data, and then the audio data is output to the processor 901 for processing, and then sent to another electronic device through the radio frequency circuit 904, or the audio data is output to the memory 902 for further processing. The audio circuit 905 may also include an earplug jack to provide communication between an external headset and an electronic device.

[0149] The input unit 906 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0150] The power supply 907 is used to supply power to various components of the electronic device 900. Optionally, the power supply 907 can be logically connected to the processor 901 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 907 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0151] although Fig. 9 Not shown, the electronic device 900 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0152] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0153] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0154] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer program can be loaded by a processor to execute any one of the model special effect generation methods provided in the embodiment of the present application. The computer program can execute the following steps of the model special effect generation method:

[0155] Acquire a target object model, wherein the target object model is composed of a plurality of model blocks, a plurality of vertices of the model blocks are configured with the same model identifier, and the model identifier is used to indicate a position of the model block;

[0156] Acquire a first motion control parameter of a change phase required for generating an object change special effect of the target object model, wherein the first motion control parameter is used to indicate the motion of the target object model in the corresponding change phase;

[0157] Determine the second motion control parameter of the model block in the above-mentioned change stage based on the first motion control parameter of the above-mentioned change stage and the model identifier of the above-mentioned model block, wherein the second motion control parameters of at least two model blocks in the above-mentioned change stage are different;

[0158] Based on the second motion control parameter of the model block in the change phase, the vertices of the model block are controlled to move to generate the object change effect.

[0159] It can be seen that the computer program can be loaded by the processor to execute any model special effect generation method provided in the embodiments of the present application, thereby bringing the following technical effects: improving the efficiency of model special effect generation.

[0160] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0161] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0162] Since the computer program stored in the computer-readable storage medium can execute any one of the model special effects generation methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the model special effects generation methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0163] According to one aspect of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in various optional implementations of the above embodiments.

[0164] In the above-mentioned model special effect generation device, computer-readable storage medium, electronic device, and computer program product embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process and beneficial effects of the above-described model special effect generation device, computer-readable storage medium, computer program product, electronic device and its corresponding units can refer to the description of the model special effect generation method in the above embodiment, and will not be repeated here.

[0165] The above is a detailed introduction to a model special effects generation method, device, electronic device, computer-readable storage medium and computer program product provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for generating model special effects, characterized in that: The method comprises: Acquire a target object model, wherein the target object model is composed of a plurality of model blocks, a plurality of vertices of the model blocks are configured with the same model identifier, and the model identifier is used to indicate a position of the model block; Acquire a first motion control parameter of a change phase required for generating an object change special effect of the target object model, wherein the first motion control parameter is used to indicate the motion of the target object model in a corresponding change phase; Determining, based on the first motion control parameter of the change stage and the model identifier of the model block, the second motion control parameter of the model block in the change stage, wherein the second motion control parameters of at least two model blocks in the change stage are different; Based on the second motion control parameter of the model block in the change stage, the vertices of the model block are controlled to move to generate the object change special effect.

2. The model special effect generation method according to claim 1, characterized in that: The second motion control parameter in the change stage includes third motion control parameters corresponding to at least two positions, and the vertices of the model block are controlled to move based on the second motion control parameters of the model block in the change stage to generate the object change special effect, including: Obtaining the animation generation progress of the object change special effect; Determining, from the second motion control parameters of the model block in the change phase, a third motion control parameter of the model block at the target generation position corresponding to the animation generation progress; Based on the third motion control parameter of the model block, the vertices of the model block at the target generation position are controlled to move to generate the object change special effect.

3. The model special effect generation method according to claim 2, characterized in that: The change stage includes at least two, the second motion control parameter includes position change information, and determining the third motion control parameter of the model block at the target generation position corresponding to the animation generation progress from the second motion control parameter of the model block in the change stage includes: Determining a target change stage corresponding to the animation generation progress from at least two change stages; Based on the target generation position in the target change stage, the position change information of the model block in the target change stage is interpolated to obtain the target position change information of the model block at the target generation position, wherein the target position change information is used as the third motion control parameter.

4. The model special effect generation method according to claim 1, characterized in that: The model identifier is used to indicate a first center position of the model block, the second motion control parameter includes position change information, the position change information includes a position change direction and a position change amount, and the first center position changes with the position change information; The determining, based on the first motion control parameter of the change stage and the model identifier of the model block, the second motion control parameter of the model block in the change stage comprises: determining, based on the first motion control parameter of the change phase, an amount of position change of the model block in the change phase; Based on the first center position of the model block, a position change direction of the model block in the change phase is determined.

5. The model special effect generation method according to claim 4, characterized in that: The position change direction includes a target displacement direction, and determining the position change direction of the model block in the change stage based on the first center position of the model block includes: Acquire a second center position of the target object model; Based on the first center position and the second center position, a target displacement direction of the model block in the change phase is determined.

6. The model special effect generation method according to claim 5, characterized in that: The object change special effect includes a breaking special effect, the change stage includes an explosion stage and a closing stage, and determining the target displacement direction of the model block in the change stage based on the first center position and the second center position includes: Calculating a first difference vector between the first center position and the second center position, and using the first difference vector as a target displacement direction of the model block in the explosion stage; Calculating a second difference vector between the second center position and the first center position, or assigning a negative value to the first difference vector to obtain a second difference vector; The second difference vector is used as the target displacement direction of the model block in the closing stage.

7. The model special effect generation method according to claim 5, characterized in that: After determining the target displacement direction of the model block in the change phase, the method further includes: Assigning first random values ​​to the coordinate values ​​of the first center position on each coordinate axis respectively, to obtain a random displacement direction of the model block; Based on the random displacement direction, the target displacement direction is updated to obtain an updated target displacement direction.

8. The model special effect generation method according to claim 4, characterized in that: The first motion control parameter includes an initial displacement change, the position change includes a target displacement change, and determining the position change of the model block in the change stage based on the first motion control parameter in the change stage includes: generating a second random value for the model block based on the first center position of the model block; Based on the second random value, the initial displacement value corresponding to the first center position is updated in the initial displacement change to obtain an updated displacement value, wherein the updated displacement value is used to constitute the target displacement change.

9. The model special effect generation method according to claim 4, characterized in that: The position change direction includes a target rotation direction axis, and determining the position change direction of the model block in the change stage based on the first center position of the model block includes: generating a third random value for the model block based on the first center position of the model block; A target rotation vector is generated based on the third random value and the normal vector at the first center position of the model block, wherein the target rotation vector serves as the target rotation direction axis.

10. The model special effect generation method according to claim 9, characterized in that: The position change includes a target rotation change, and the second motion control parameter of the model block in the change stage is used to control the vertex of the model block to move, including: Determining the target rotation degree corresponding to the first center position in the target rotation change; Control the vertices of the model block to rotate around the target rotation direction axis by the target rotation degree.

11. The model special effect generation method according to any one of claims 1 to 10, characterized in that: The target object model is set on a virtual object in a virtual scene, and the obtaining of a first motion control parameter of a change phase required for generating an object change special effect of the target object model includes: Acquire the animation action of the virtual object in the virtual scene; Based on the animation action of the virtual object, a first motion control parameter of the change phase is determined.

12. A model special effect generating device, characterized in that: The device comprises: A model acquisition module, used for acquiring a target object model, wherein the target object model is composed of a plurality of model blocks, a plurality of vertices of the model blocks are configured with the same model identifier, and the model identifier is used for indicating the position of the model block; A parameter acquisition module, used for acquiring a first motion control parameter of a change phase required for generating an object change special effect of the target object model, wherein the first motion control parameter is used for indicating the motion of the target object model in a corresponding change phase; a parameter determination module, configured to determine a second motion control parameter of the model block in the change stage based on the first motion control parameter of the change stage and the model identifier of the model block, wherein the second motion control parameters of at least two model blocks in the change stage are different; The animation generation module is used to control the movement of the vertices of the model block based on the second motion control parameter of the model block in the change stage to generate the object change special effect.

13. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps of the model special effect generation method as claimed in any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps of the model special effect generation method according to any one of claims 1 to 11.