Special effect processing method and device, storage medium and equipment

By generating particles corresponding to skeletal points for static models and processing particle dynamic data based on preset effects, the problem of static models being unable to generate special effects is solved, realizing dynamic changes of static models and enriching the special effects generation effects.

CN120876689APending Publication Date: 2025-10-31NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510975478.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-14
Publication Date
2025-10-31

Smart Images

  • Figure CN120876689A_ABST
    Figure CN120876689A_ABST
Patent Text Reader

Abstract

The invention discloses a special effect processing method and device, a storage medium and equipment. The special effect processing method comprises the steps of obtaining skeleton binding data of a skeleton binding model corresponding to a target static model; generating a plurality of particles according to the target static model and the skeleton binding data, wherein the plurality of particles correspond to skeleton points in the skeleton binding data; performing special effect processing on the plurality of particles based on a preset special effect, and determining particle dynamic data of the plurality of particles corresponding to the special effect processing; determining model dynamic data of the target static model according to the particle dynamic data; the target static model is controlled to generate the preset special effect of the target static model according to the model dynamic data change, the special effect can be used for the static model, the special effect generation effect is improved, and the special effect generation mode is enriched.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image rendering technology, specifically to a special effects processing method, apparatus, storage medium, and device. Background Technology

[0002] In the fields of game and film development, static models refer to 3D (Three Dimensions) models that do not deform or move during runtime, such as buildings, trees, and houses in a virtual scene. How to generate special effects for static models, such as making trees sway in the wind in a virtual scene, is the technical problem that this application aims to solve. Summary of the Invention

[0003] This application provides a special effects processing method, apparatus, storage medium, and device. Particles are generated by using a static model and the skeletal binding data of a corresponding skeletal binding model. The particle dynamic data obtained by applying special effects to the particles is transformed into the model dynamic data of the static model. The static model is driven by the model static data, thereby enabling the application of special effects to the static model. This can improve the special effects generation effect and enrich the special effects generation methods.

[0004] On one hand, embodiments of this application provide a special effects processing method, the method comprising: obtaining skeletal binding data of a skeletal binding model corresponding to a target static model; generating multiple particles based on the target static model and the skeletal binding data, wherein the multiple particles correspond to skeletal points in the skeletal binding data; performing special effects processing on the multiple particles based on preset special effects, and determining particle dynamic data of the multiple particles corresponding to the special effects processing; determining model dynamic data of the target static model based on the particle dynamic data; and controlling the target static model to generate preset special effects of the target static model according to changes in the model dynamic data.

[0005] On the other hand, embodiments of this application provide a special effects processing device, the device comprising: a skeleton acquisition unit, used to acquire skeleton binding data of a skeleton binding model corresponding to a target static model; a particle generation unit, used to generate multiple particles based on the target static model and the skeleton binding data, wherein the multiple particles correspond to bone points in the skeleton binding data; a special effects processing unit, used to perform special effects processing on the multiple particles based on preset special effects, and determine the particle dynamic data of the multiple particles corresponding to the special effects processing; a data determination unit, used to determine the model dynamic data of the target static model based on the particle dynamic data; and a special effects generation unit, used to control the target static model to generate preset special effects of the target static model according to changes in the model dynamic data.

[0006] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program adapted for loading by a processor to perform the special effects processing method as described in any of the above embodiments.

[0007] On the other hand, embodiments of this application provide a computer device, which includes a processor and a memory. The memory stores a computer program, and the processor executes the special effects processing method of any of the above embodiments by calling the computer program stored in the memory.

[0008] On the other hand, embodiments of this application provide a computer program product, including computer instructions, which, when executed by a processor, implement the special effects processing method as described in any of the above embodiments.

[0009] The special effects processing method provided in this application involves obtaining skeletal binding data of a target static model corresponding to a skeletal binding model. Then, multiple particles are generated based on the target static model and the skeletal binding data, with each particle corresponding to a bone point in the skeletal binding data. Next, special effects processing is applied to these particles based on preset effects, determining the particle dynamic data corresponding to the special effects processing. Finally, the model dynamic data of the target static model is determined based on the particle dynamic data, and the target static model is controlled to generate preset special effects based on changes in the model dynamic data. In this process, the dynamic data of the particles applying the special effects can be converted into the dynamic data of the static model, allowing the static model to change dynamically like particles. This overcomes the technical limitation of not being able to directly apply special effects to a static model using particles, enabling the static model to follow the changes in the special effects, i.e., generating special effects for the static model. This improves the special effects generation effect and enriches the special effects generation methods. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a flowchart illustrating a special effects processing method provided in an embodiment of this application.

[0012] Figure 2A This is a first schematic diagram of a special effects processing method provided in an embodiment of this application.

[0013] Figure 2B This is a second schematic diagram of the special effects processing method provided in the embodiments of this application.

[0014] Figure 2C This is a third schematic diagram of the special effects processing method provided in the embodiments of this application.

[0015] Figure 2DThe fourth schematic diagram illustrates the special effects processing method provided in the embodiments of this application.

[0016] Figure 2E The fifth schematic diagram illustrates the special effects processing method provided in the embodiments of this application.

[0017] Figure 2F The sixth schematic diagram illustrates the special effects processing method provided in the embodiments of this application.

[0018] Figure 2G The sixth schematic diagram illustrates the special effects processing method provided in the embodiments of this application.

[0019] Figure 3 The seventh schematic diagram illustrates the special effects processing method provided in the embodiments of this application.

[0020] Figure 4 This is a schematic diagram of a special effects processing device provided in an embodiment of this application.

[0021] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0023] This application provides a special effects processing method, apparatus, storage medium, device, and program product. Specifically, the special effects processing method of this application can be executed by a computer device, wherein the computer device can be a terminal and / or a server, etc. The terminal can be a smartphone, tablet computer, laptop computer, smart TV, wearable smart device, smart vehicle terminal, etc. The terminal can also include a client, which can be a game development client, browser client, instant messaging client, or applet, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms.

[0024] It should be noted that all information, data (including, but not limited to, data used for analysis, stored data, and data displayed, such as static models, skeletal rigging models, and dynamic data) and signals involved in this application have been authorized by the user or by all parties in full, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the static models involved in this application and the operations performed on the static models were obtained under full authorization.

[0025] In one embodiment, the technical solution of this application can be applied to game and film development scenarios, specifically to scenarios where special effects are generated / applied to 3D models such as static models. The special effects can be dynamic effects such as swaying in the wind or being collided with, but are not limited to these.

[0026] The technical solution of this application will be described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0027] Please see Figures 1 to 3 , Figure 1 This is a flowchart illustrating the special effects processing method provided in the embodiments of this application. Figures 2A to 2G as well as Figure 3 This is a schematic diagram illustrating a special effects processing method provided in an embodiment of this application. It should be noted that the steps shown may be executed in a logical order different from that shown in the flowchart.

[0028] Please see Figure 1 This method can be executed by a computer device and may include the following steps:

[0029] Step 110: Obtain the skeleton binding data of the skeleton binding model corresponding to the target static model.

[0030] In one embodiment, a target static mesh corresponding to the target static model can be generated first, then a skeleton binding model corresponding to the target static mesh can be generated, and then the skeleton binding data can be obtained.

[0031] Specifically, the target static model can be imported into a preset engine to generate the target static mesh. The preset engine can be a game development engine, such as Unity or Godot, but is not limited to these.

[0032] As is understandable, a mesh is a geometric representation in 3D computer graphics used to describe the geometry and surface structure of an object; it is the underlying data structure of a 3D model. The mesh of a static model can be called a static mesh.

[0033] Skeletal rigging models associate a skeletal system with a 3D model (e.g., a static model or a static mesh), enabling the 3D model to move and deform like a real creature or object. Each vertex of the 3D model can be bound to at least one bone point; for example, 1-4 bone points can be bound. Vertices are affected by the bound bone points (specifically, the deformation effects and animation logic, i.e., the effects and logic corresponding to preset effects), with the degree of influence determined by bone weights (or skinning weights). The transformation data of a vertex under preset effects (e.g., movement and rotation) can be a weighted sum of the transformation data of the bound bone points based on the bone weights. Furthermore, bones in the skeletal system are organized through a parent-child hierarchy, where child bones can inherit the transformations (e.g., movement, rotation, scaling) of their parent bones; that is, changes in a parent bone point can affect the transformations of its child bone points.

[0034] Skeletal binding data may include at least one of the following: bone point identifiers, bone weights, bone hierarchical organization, and bone point locations, but is not limited to these.

[0035] Specifically, you can first create a bone hierarchy, then bind the bones to a static mesh, determine the bone points corresponding to each vertex and the bone weights, so that the static model can naturally transform with the bones, such as moving and rotating, thus obtaining the target skeletal model. You can use engines like Unity or 3D development software to create the skeletal model.

[0036] Alternatively, the aforementioned target static mesh or target skeleton binding model can be predetermined and input by the user, without requiring computer equipment to generate it again.

[0037] Accordingly, step 120 may include: processing the target static mesh based on the skeleton binding data through the target engine to obtain multiple particles.

[0038] Accordingly, step 150 may include: controlling the target static mesh to generate preset effects of the target static mesh according to the changes in the model dynamic data.

[0039] In one embodiment, assuming the target static model is a fern vegetation model, the corresponding target static mesh volume can be as follows: Figure 2A As shown, the bones of the corresponding skeletal binding model can be as follows: Figure 2B As shown.

[0040] Through the above embodiments, the skeletal binding data of the target static model can be obtained, which facilitates the generation of particles based on the target static model. The generated particles correspond to the corresponding skeletal points of the target static model, and the dynamic data of the generated particles (e.g., transformation data such as movement and rotation under preset effects) correspond to the dynamic data of the skeletal points. The skeletal points are bound to the vertices of the target static model, thereby establishing a connection between the target static model and the particles. This allows the dynamic data of the target static model (specifically, the vertices of the target static model) to be linked with the dynamic data of the particles, facilitating the subsequent "transmission" of the particle's dynamic data to the target static model. This enables the target static model to deform / move according to the dynamic data corresponding to the preset effects applied to the particles, solving the technical defect that effects cannot be directly applied to static models through particles, and achieving the technical objective of applying effects to static models.

[0041] Furthermore, since static meshes contain geometric information such as vertices, a more direct, accurate, and numerical connection can be established with skeletal points through this information. Moreover, when controlling changes in the static model based on dynamic model data, the vertex positions can be directly modified through the dynamic model data to quickly and accurately control the changes in the static model.

[0042] Step 120: Generate multiple particles based on the target static model and skeletal binding data, with each particle corresponding to a skeletal point in the skeletal binding data.

[0043] In one embodiment, the skeletal point binding data can be first stored in the vertex attributes of the target static model; then, the plurality of particles can be generated based on the target static model in which the skeletal point binding data is stored in the vertex attributes.

[0044] Specifically, bone point identifiers can be stored in the vertex colors of the target static model; bone weights can be stored in the UV channels of the target static model, such as UV2 and UV3. The bone point identifier can be a bone point ID or a bone point number. Alternatively, the bone point identifier can also be stored in the UV channels.

[0045] For example, each vertex on the target static model can be iterated over, and the bone point number and bone weight bound to each vertex can be determined based on the bone binding data. Then, the bone point number is stored in the vertex color of the target static model, and the bone point weight is stored in UV2 and UV3 of the target static model. For example, the vertex color RGBA can store: the number of the bound first bone point, the number of the bound second bone point, etc.; UV2 can store: the bone weight of the bound first bone point, the bone weight of the bound second bone point; UV3 can store: the bone weight of the bound third bone point, the bone weight of the bound fourth bone point.

[0046] Accordingly, when performing step 140, i.e., determining the model dynamic data based on the particle dynamic data, the bone point binding data in the vertex attributes can be used in combination with the particle dynamic data to determine the model dynamic data.

[0047] In one embodiment, the target static model storing bone binding data, i.e., the target static model with modified vertex colors and its UV2 and UV3, can be exported as FBX (Filmbox) format. FBX is a common 3D model file format. An FBX format target static model can be used as follows: Figure 2C As shown.

[0048] Through the above embodiments, bone point identifiers can be stored in vertex colors and bone weights in UV channels, achieving efficient binding between static model vertices and GPU particle skeletons. Dynamic deformation can be driven without modifying the model topology, balancing performance and flexibility. Moreover, existing model attributes can be reused, avoiding additional storage overhead.

[0049] Furthermore, since the FBX format is a universal format across multiple platforms, exporting a static model that stores bone binding data into the FBX format can achieve cross-software compatibility between bone binding information and the model, ensuring that the engine can directly read and drive dynamic deformation without additional processing.

[0050] In one embodiment, before performing step 120, bone point data of the target skeleton binding model can be obtained; a skeleton point data file can be generated based on the skeleton point data, and the skeleton point data file can be stored (e.g., cached). The skeleton point data can originate from the aforementioned skeleton binding data. The skeleton point data file can be used for subsequent matching of particle dynamic data and participation in the calculation of model dynamic data.

[0051] Specifically, skeletal point data can include the hierarchical relationship (parent and child skeletal points) of each skeletal point, the original position (i.e., the position before applying special effects to the static model or particles), etc.

[0052] For example, skeletal point data can be exported as JSON (JavaScript Object Notation). The skeletal point data file contains the following content:

[0053] ["cache_data(bone point cache data)":[bone point number of the current bone point, original position of the current bone point, bone point number of the child bone point of the current bone point, bone point number of the parent bone point of the current bone point]].

[0054] Accordingly, step 120 may include: generating multiple particles based on the stored skeletal point data file, the target static model, and the skeletal binding data;

[0055] Accordingly, step 140 may include: determining the model dynamic data of the target static model based on the particle dynamic data and the stored skeletal point data file.

[0056] Through the above embodiments, skeletal point data (e.g., the hierarchical relationship and original position information of skeletal points) can be recorded in a skeletal point data file for subsequent particle generation and matching of particle dynamic data to participate in the calculation of model dynamic data. Pre-determining and independently storing skeletal point data can avoid over-reliance on the target static model to obtain this skeletal point data when performing subsequent steps, thereby improving flexibility and performance. At the same time, it can provide a benchmark for subsequent particle generation and dynamic data calculation, ensuring that the special effects delivery conforms to the actual structure of the model.

[0057] In one embodiment, multiple particles can be generated using a target engine based on a static target model and skeletal binding data. Alternatively, particles can be generated in conjunction with a graphics processing unit (GPU).

[0058] Specifically, the target static model storing bone point binding data in its vertex attributes can be imported into a target engine, such as Unity. Then, the target engine can read the bone point data file to obtain the hierarchical relationship, original position, and bone point number of each bone point. Based on the target static model storing the bone point binding data, a one-to-one correspondence between particles and bone points is determined. Multiple particles have corresponding hierarchical relationships and original positions with respect to bone points. The original position of a bone point can be its corresponding original position in the target static model. In other words, the original positions of the particles to be generated and the hierarchical relationships between particles can be determined based on the target static model storing the bone point binding data. Next, multiple particles can be generated based on the GPU particle system, combining the determined original positions of the particles and the hierarchical relationships between them. Specifically, the original positions of the particles and the hierarchical relationships between them can be injected into the GPU Event of the Visual Effects Graph (VFX Graph). The target engine can generate instructions for generating particles, and the GPU can receive these instructions and perform calculations accordingly to generate particles.

[0059] VFX Graph is a GPU-driven effects tool in the Unity engine that can be used to process particles and create particle effects (such as explosions, smoke, collisions, etc.).

[0060] In the above embodiments, particles can be generated by binding data to bones and a target static model. The particles are associated with the vertices of the target static model by the correspondence between bone points and particles, and the correspondence between vertices of the target static model and bone points. This facilitates the subsequent "transmission" of the particle's dynamic data to the target static model, allowing the target static model to deform / move according to the dynamic data corresponding to the preset effects applied to the particles.

[0061] Moreover, compared to the use of a central processing unit (CPU) to process skeletons or physical simulations to achieve special effects in related technologies, the above-mentioned use of a GPU to process particles is more efficient and can improve the efficiency and effectiveness of special effects generation.

[0062] Step 130: Apply special effects processing to multiple particles based on preset special effects, and determine the particle dynamic data of the multiple particles corresponding to the special effects processing.

[0063] Among them, particle dynamic data refers to the data on the dynamic motion (such as swaying, collision response, wind effect, etc.) produced by particles after being subjected to preset special effects, which may include particle position change data, rotation data, etc. Subsequent step 140 will introduce this.

[0064] In one embodiment, the particles can be physically analyzed using a GPU to achieve preset effects on the particles.

[0065] Specifically, the effect parameters corresponding to the preset effect can be determined first. For example, if the preset effect is a wind swaying effect, the effect parameters can be wind force, wind direction, intensity, etc. If the preset effect is a collision motion effect, the effect parameters can be collision intensity, direction, etc. Then, the effect parameters can be converted into physical force field formulas that can be calculated by the GPU (which are mathematical expressions that characterize the influence of environmental forces (such as wind force, gravity, eddies, etc.) on particles). Then, the GPU can drive the particle motion according to the physical force field formula to achieve the effect corresponding to the preset effect.

[0066] Simultaneously, it can record particle dynamic data, specifically through Compute Shader. Compute Shader is a general-purpose computing program running on the GPU, which can leverage the GPU's parallel computing capabilities to efficiently handle large-scale data computation tasks.

[0067] In one embodiment, combining the above, the generated particles can be as follows: Figure 2D As shown, assuming the preset effect is a collision response effect when hit by a sphere, the preset effects for the generated particles are as follows: Figure 2E As shown, the dynamic effect displayed is the result of physical collision calculation for fern vegetation.

[0068] In the above embodiments, the preset special effects that need to be applied to the target static model can be applied to the particles first, so as to determine the particle dynamic data corresponding to the preset special effects, and then use the particle dynamic data to convert the particle dynamic data into model dynamic data, so that the target static model can deform / move according to the dynamic data corresponding to the preset special effects applied to the particles.

[0069] At the same time, since GPUs consume less energy and are more efficient than CPUs when performing physical calculations (i.e., generating special effects), generating particles through GPUs can improve the efficiency of special effects generation and reduce the generation cost.

[0070] Step 140: Determine the model dynamic data of the target static model based on the particle dynamic data.

[0071] Based on the above embodiments, it can be understood that the vertices of the target static model are bound to skeletal points, and the skeletal points correspond to particles. Therefore, the dynamic data of the target static model to which the preset special effects are applied, i.e., the model dynamic data, can be determined based on the particle dynamic data. The following embodiments will describe this.

[0072] Furthermore, based on the above description of skeletal point data files and skeletal point binding data stored in vertex attributes, the skeletal point-related data used when determining the dynamic data of the target static model can come from pre-cached skeletal point data files and skeletal point binding data stored in vertex attributes.

[0073] In one embodiment, step 140 may include the following steps:

[0074] Step 141: Store the particle dynamic data in the render texture (RT).

[0075] Specifically, step 141 may include the following steps:

[0076] Step 141-1: For each frame of the target particle dynamic data in the particle dynamic data, determine the first current position of any target particle among multiple particles in the target particle dynamic data and the second current position of the particle corresponding to the parent bone point of the target particle;

[0077] Step 141-2: Obtain the first original position of the target particle without any special effects processing on multiple particles and the second original position of the particle corresponding to the parent bone point of the target particle; where the first original position and the second original position can be understood as the reference position of the particle generated in step 120. The particle at the reference position is not affected by any external special effects or dynamic forces. The reference position corresponds to the vertex coordinates of the target static model. The reference position usually remains unchanged during the life cycle of the particle and belongs to the static attribute before any dynamic effects are applied to the particle. The calculation of the dynamic data, i.e., the motion data, corresponding to the subsequent special effects processing can be performed relative to this reference position.

[0078] Step 141-3: Generate a particle transformation matrix based on the first current position, the second current position, the first original position, and the second original position. The particle transformation matrix indicates the motion data of the corresponding particles.

[0079] Step 141-4: Write the particle transformation matrix into the rendering texture.

[0080] It is understandable that the solution effect corresponding to the particles that apply special effects is dynamic, including the effect corresponding to multiple image frames. The dynamic data of the particles in each frame, such as position and rotation, are different. Therefore, the dynamic data of each particle in each frame can be calculated to determine the dynamic data of each vertex in each frame, thereby better restoring the solution effect of the static model for the preset special effects.

[0081] For example, the first original position of the target particle is the original position of the bone point corresponding to the target particle, and the second original position is the original position of the parent bone point of the bone point corresponding to the target particle. These two original positions can be obtained from the bone point data file.

[0082] For steps 141-3, for example, the current vector pointing from the target particle to the parent bone point can be calculated using the first current position and the second current position; the original vector pointing from the target particle to the parent bone point can be calculated using the second current position and the second current position; a rotation matrix can be constructed based on the current vector and the original vector; and the first current position and the first original position can be merged into the rotation matrix to obtain the particle transformation matrix.

[0083] For example, the difference between the first current position and the second current position can be calculated to obtain the current vector; the difference between the second current position and the second current position can be calculated to obtain the original vector.

[0084] For example, based on the current vector and the original vector, the corresponding rotation axis unit vector, rotation angle, and rotation parameters can be calculated; and a rotation matrix can be constructed based on the rotation axis unit vector, rotation angle, and rotation parameters. The rotation axis unit vector, rotation angle, and rotation parameters can be data corresponding to the Rodriguez rotation formula.

[0085] For example, the rotation axis unit vector can be obtained from the cross product of the current vector and the original vector; the rotation angle can be obtained from the dot product of the current vector and the original vector; and the rotation parameters can be obtained from the rotation axis unit vector and the rotation angle.

[0086] For example, the translation matrix can be determined based on the first current position; the reference origin matrix can be determined based on the first original position; and the translation matrix and the reference origin matrix can be merged into the rotation matrix to obtain the particle transformation matrix.

[0087] For steps 141-3, for example, the particle transformation matrix can be split into rows; each row of the particle transformation matrix can be written into a rendering texture; wherein the rows of the rendering texture correspond to the rows of the particle transformation matrix, and the columns of the rendering texture correspond to each particle.

[0088] For example, the column index of the rendered texture corresponds one-to-one with the bone point identifier of each particle's corresponding bone point.

[0089] For example, the rotation matrix in the particle transformation matrix can be stored in the RGB channel of the rendering texture, and the position data in the particle transformation matrix can be stored in the alpha channel of the rendering texture, such as the current position of the particle.

[0090] In one embodiment, the following operations can be performed on each particle in each frame under the preset effect in the GPU: first, obtain the current position Pos (i.e., the first current position) of the particle and the current position ParentPos (i.e., the second current position) of the parent bone corresponding to the particle's bone point; and calculate the vector B = Pos - ParentPos (i.e., the current vector) pointing from the parent bone to the bone point; obtain the original position OrgPos (i.e., the first original position) of the bone point corresponding to the particle and the original position OrigParentPos (i.e., the second original position) of the parent bone point stored in the bone point data file, and calculate the vector OrigParentRelDir = OrgPos - OrigParentPos (i.e., the original vector) pointing from the parent bone to the bone point.

[0091] For example, this can be achieved using the following code:

[0092] vector position;

[0093] vector ParentPosition;

[0094] vector OrgPosition;

[0095] vector OrigParentPos;

[0096] vector B=normalize(position-ParentPosition);

[0097] vector OrigParentRelDir=normalize(OrgPosition-OrigParentPos).

[0098] Here, "vector position" defines the world coordinates of the current particle (corresponding to a bone point), i.e., the first current position; "vector ParentPosition" defines the world coordinates of the parent bone point corresponding to the current particle, i.e., the second current position; "vector OrgPosition" defines the initial world coordinates of the current particle, i.e., the first original position; "vector OrigParentPos" defines the initial world coordinates of the parent bone point corresponding to the current particle, i.e., the second original position; "vector B = normalize(position - ParentPosition)" calculates the normalized direction vector of the current particle relative to the corresponding parent bone point, representing the particle's current dynamic direction (e.g., the dynamic direction after being affected by special effects), i.e., the current vector; "vector OrigParentRelDir = normalize(OrgPosition - OrigParentPos)" calculates the normalized direction vector of the particle when it was initially bound, representing the particle's original static direction (e.g., the direction before being affected by special effects), i.e., the original vector.

[0099] Next, a 4x4 transformation matrix (i.e., the particle transformation matrix, containing a 3x3 rotation matrix based on the Rodriguez rotation matrix and a 1x1 transformation matrix (for the first current position and the first original position) can be constructed based on the above vectors and positions. Specifically, by calculating the dot product, the cosine value of the angle between the original direction and the new direction, c = cosθ = dot(B, OrigParentRelDir), is determined, which is the rotation angle; the cross product a = cross(B, OrigParentRelDir), is calculated to obtain the rotation axis vector, and after normalization, the unit rotation axis a = a / alength is obtained; the rotation parameters are constructed using s = sinθ = alength and t = 1 - cosθ; finally, the rotation matrix is ​​obtained as follows:

[0100] [t*x 2 +c, t*xy–zs, t*xz+ys]

[0101] [t*xy+zs,t*y 2 +c, t*yz-xs]

[0102] [t*xz–ys, t*yz+xs, t*z 2 +c]

[0103] Where x, y, z are the unit vector components of the rotation axis, c = cosθ, s = sinθ, t = 1 – cosθ.

[0104] Then, the particle's first current position (which can be its position in the world coordinate system) is merged into the rotation matrix, resulting in the following matrix:

[0105] [t*x 2 +c, t*xy–zs, t*xz+ys, pos.x]

[0106] [t*xy+zs,t*y 2 +c, t*yz-xs, pos.y]

[0107] [t*xz–ys, t*yz+xs, t*z 2 +c, pos.z]

[0108] Finally, the first original position is merged into the above matrix to obtain the particle transformation matrix as follows:

[0109] [t*x 2 +c, t*xy–zs, t*xz+ys, pos.x]

[0110] [t*xy+zs,t*y 2 +c, t*yz-xs, pos.y]

[0111] [t*xz–ys, t*yz+xs, t*z 2 +c, pos.z]

[0112] [OrigPos.x, OrigPos.y, OrigPos.z, 1]

[0113] Next, the particle transformation matrix can be baked into the rendering texture. Specifically, each row of the particle transformation matrix can be broken down and written into the rendering texture sequentially according to the vertex index. For example... Figure 2F As shown, the rendered texture can be understood as a temporary image, where each row in the image corresponds to each row in the particle transformation matrix, and each column in the image corresponds one-to-one with the bone point of the particle.

[0114] In the above embodiments, the position and rotation information of particles can be encapsulated by a particle transformation matrix, so as to quickly and accurately obtain particle dynamic data according to the rows and columns of the matrix.

[0115] Furthermore, since the rotation matrix contains the position of the corresponding parent bone point, changes in the parent bone point will affect the child bone points. Therefore, it is possible to better reproduce the changes of each vertex of the model under special effects, achieving more realistic changes. Moreover, when calculating the original vector, the positions of the bone points before the special effects are applied are used for particles in each frame, which do not change. This ensures that the original vectors calculated for each frame are accurate.

[0116] Since the rendered texture is a GPU-readable and writable texture, it is suitable for efficiently transmitting dynamic data updated with each frame. Therefore, storing particle dynamic data in the rendered texture can enable fast reading and use of particle dynamic data.

[0117] Step 142: Determine the model dynamic data based on the particle dynamic data obtained from the rendered texture.

[0118] Specifically, particle dynamic data can be obtained from the rendered texture; for the target particle dynamic data corresponding to each frame in the particle dynamic data, the initial vertex position of any target vertex in the target static model can be obtained; based on the initial vertex position and the target particle dynamic data, the model dynamic data corresponding to the target vertex can be determined.

[0119] It is understandable that the vertex attributes of the target static model store bone point identifiers, and the particle dynamic data written to the rendering texture is also written according to the bone point identifiers. Therefore, the particle dynamic data (specifically the particle transformation matrix) corresponding to each bone point / particle can be accurately obtained from the rendering texture.

[0120] For example, the relative position of the target vertex with respect to the bone point of the specific particle can be determined based on the initial vertex position and the first original position of the bone point corresponding to the specific particle in the target particle dynamic data; the relative position after rotation can be determined based on the relative position and the rotation matrix of the specific particle in the target particle dynamic data; and the new vertex position corresponding to the target vertex can be determined based on the relative position after rotation and the first current position of the specific particle in the target particle dynamic data.

[0121] For example, the difference between the initial vertex position and the first original position is determined as the relative position.

[0122] For example, the product of the relative position and the rotation matrix is ​​used to determine the relative position after rotation.

[0123] For example, the new vertex position can be determined by the sum of the rotated relative position and the first current position of a specific particle.

[0124] In one embodiment, step 140 can be implemented using a GPU.

[0125] In one embodiment, such as Figure 3As shown, particle dynamic data can be written to the rendering texture using Niagara (Niagara Visual Effects System, Unreal Engine particle system) according to bone point identifiers (specifically bone point numbers, or Houdini (Houdini by SideFX, 3D effects software). In addition, the vertex attributes (e.g., vertex color or UV channels) of the target static model compress the bone point identifiers. Therefore, when it is determined that the bone point identifiers written in Niagara are aligned with the bone point numbers in Houdini, the bone point identifiers can be directly used to sample the rendering texture to obtain the particle transformation matrix corresponding to each particle in each frame.

[0126] Specifically, vertex color is a set of color information recorded on the vertices of the model. It can store bone point identifiers; for example, the R channel (color.r) of the vertex color can store the bone point identifier bound to the corresponding vertex. UV coordinates (coordinates used for sampling textures (rendered textures can be understood as images)) can be constructed based on the vertex colors. These are two-dimensional values, and each vertex needs to use UV coordinates to read data from the texture. The U coordinates in the UV coordinates correspond to columns of the rendered texture, with each column corresponding to a bone point. The V coordinates correspond to rows of the rendered texture. The V coordinates "1 / 4, 2 / 4, 3 / 4, 4 / 4" divide the height of the rendered texture into four equal segments, corresponding to the four rows of the particle transformation matrix. For example, the bone point identifier can be determined as the U coordinate using the R channel (color.r) obtained from the vertex color, and four UV coordinates can be constructed using fixed V coordinates (1 / 4, 2 / 4, 3 / 4, 4 / 4): (color.r, 1 / 4), (color.r, 2 / 4), (color.r, 3 / 4), and (color.r, 4 / 4). Then, the texture is sampled and rendered sequentially using the above four UV coordinates to obtain the particle transformation matrix in the rendered texture. The UV coordinates can be constructed as shown in the following code:

[0127] Sampleuv1=float2(color.r,1 / 4);

[0128] Sampleuv2=float2(color.r,2 / 4);

[0129] Sampleuv3=float2(color.r, 3 / 4);

[0130] Sampleuv4=float2(color.r, 4 / 4).

[0131] Here, float2 is a data type in shader languages ​​(e.g., HLSL / GLSL) that represents a vector containing two floating-point numbers (float), indicating the construction of a UV coordinate system. Sampleuv1, Sampleuv2, Sampleuv3, and Sampleuv4 are variable names that represent the corresponding UV coordinates used to sample and render textures.

[0132] In one embodiment, for each frame of the particle transformation matrix, the vertex position WorldPos (i.e., the initial vertex position, which can be the position in the world coordinate system) of each vertex of the target static model can be obtained first. The relative position offset (i.e., relative position) of the vertex relative to the bound bone point can be calculated as WorldPos - Sampleuv4, where Sampleuv4 represents the data in the 4th row of the particle transformation matrix, i.e., the first original position. Then, the rotation matrix in the particle transformation matrix can be applied to the offset (i.e., rotating the relative position to the direction of the current particle) to obtain the rotated relative position: offset * matrix Sampleuv1.rgb Sampleuv2.rgb Sampleuv3.rgb, where "matrix Sampleuv1.rgb Sampleuv2.rgb Sampleuv3.rgb" represents the rotation matrix in the particle transformation matrix, corresponding to the RGB channels of the rendered texture. Finally, the offset of the applied rotation matrix can be added to the position of the bone point (i.e., the new position of the bone point is superimposed) to obtain the final transformation data of the vertex, that is, the new vertex position: offset + matrix Sampleuv1.a Sampleuv2.a Sampleuv3.a, where "matrix Sampleuv1.a Sampleuv2.a Sampleuv3.a" corresponds to the first current position of the particle in the particle transformation matrix and corresponds to the alpha channel of the rendered texture.

[0133] Through the above embodiments, particle dynamic data can be accurately obtained from the rendered texture through the coordinates of the skeleton points. At the same time, by combining the vertex positions of the target static model and the particle dynamic data, the rotation, position, etc. of the vertices of the target static model can be determined. The particle dynamic data can be converted into model dynamic data, so that the target static model can deform / move according to the dynamic data corresponding to the preset special effects applied to the particles.

[0134] Step 150: Control the target static model to generate preset special effects based on changes in the model's dynamic data.

[0135] In one embodiment, the target static mesh can be controlled to generate preset effects based on changes in the model's dynamic data.

[0136] Specifically, the GPU can use physical simulation results (i.e., dynamic model data) to drive the vertex movement of a target static mesh, thereby applying preset effects to the target static model. Vertex positions can be modified using the game engine's material shader based on the model's dynamic data, replacing old vertex positions with new ones (e.g., WorldPos mentioned above). This causes the target static mesh to dynamically deform following the movement of particles applying the preset effects, generating the preset effects for the target static mesh.

[0137] In one embodiment, in conjunction with the above Figure 2E The preset effects of the generated particles shown are as follows: a static fern vegetation model is collided with a sphere, producing effects such as... Figure 2G The collision response effects shown in (1), (2) and (3) are consistent with the solution effect of applying special effects to particles.

[0138] In the above embodiments, the motion data of the particle's action characteristics are transmitted to the static mesh, so that the vertices of the static model follow the dynamic changes of the particles, thereby realizing the "dynamicization" of the static model and generating special effects for the static model.

[0139] To facilitate better implementation of the special effects processing method in the embodiments of this application, the embodiments of this application also provide a special effects processing apparatus. Please refer to... Figure 4 , Figure 4 This is a schematic diagram of a special effects processing device provided in an embodiment of this application. The special effects processing device 400 may include: a skeleton acquisition unit 410, a particle generation unit 420, a special effects processing unit 430, a data determination unit 440, a special effects generation unit 450, a file determination unit 460, and a mesh generation unit 470.

[0140] In one embodiment, the skeleton acquisition unit 410 is used to acquire the skeleton binding data of the skeleton binding model corresponding to the target static model; the particle generation unit 420 is used to generate multiple particles according to the target static model and the skeleton binding data, wherein the multiple particles correspond to the bone points in the skeleton binding data; the special effects processing unit 430 is used to perform special effects processing on the multiple particles based on preset special effects, and determine the particle dynamic data of the multiple particles corresponding to the special effects processing; the data determination unit 440 is used to determine the model dynamic data of the target static model according to the particle dynamic data; and the special effects generation unit 450 is used to control the target static model to generate preset special effects of the target static model according to the changes in the model dynamic data.

[0141] In one embodiment, the data determination unit 440 is specifically used to: store particle dynamic data in a rendering texture; and determine model dynamic data based on the particle dynamic data obtained from the rendering texture.

[0142] In one embodiment, the data determination unit 440 is specifically configured to: determine the first current position of any target particle among multiple particles in the target particle dynamic data and the second current position of the particle corresponding to the parent bone point of the target particle for each frame of the particle dynamic data; obtain the first original position of the target particle and the second original position of the particle corresponding to the parent bone point of the target particle without special effects processing on the multiple particles; generate a particle transformation matrix based on the first current position, the second current position, the first original position and the second original position, wherein the particle transformation matrix indicates the motion data of the corresponding particle; and write the particle transformation matrix into a rendering texture.

[0143] In one embodiment, the data determination unit 440 is specifically used to: calculate the current vector of the target particle pointing to the target particle from the parent bone point corresponding to the target particle using the first current position and the second current position; calculate the original vector of the target particle pointing to the target particle from the parent bone point corresponding to the target particle using the second current position and the second current position; construct a rotation matrix based on the current vector and the original vector; and merge the first current position and the first original position into the rotation matrix to obtain a particle transformation matrix.

[0144] In one embodiment, the data determination unit 440 is specifically used to: calculate the difference between the first current position and the second current position to obtain the current vector; and calculate the difference between the second current position and the second current position to obtain the original vector.

[0145] In one embodiment, the data determination unit 440 is specifically used to: calculate the corresponding rotation axis unit vector, rotation angle, and rotation parameters based on the current vector and the original vector; and construct a rotation matrix based on the rotation axis unit vector, rotation angle, and rotation parameters.

[0146] In one embodiment, the data determination unit 440 is specifically used to: obtain the rotation axis unit vector based on the cross product of the current vector and the original vector; obtain the rotation angle based on the dot product of the current vector and the original vector; and obtain the rotation parameter based on the rotation axis unit vector and the rotation angle.

[0147] In one embodiment, the data determination unit 440 is specifically used to: determine a translation matrix based on a first current position; determine a reference origin matrix based on a first original position; and merge the translation matrix and the reference origin matrix into a rotation matrix to obtain a particle transformation matrix.

[0148] In one embodiment, the data determination unit 440 is specifically used to: split the particle transformation matrix by row; write each row of the particle transformation matrix into a rendering texture; wherein the rows of the rendering texture correspond to the rows of the particle transformation matrix, and the columns of the rendering texture correspond to each particle.

[0149] In one embodiment, the column index of the rendered texture corresponds one-to-one with the bone point identifier of each particle's corresponding bone point.

[0150] In one embodiment, the data determination unit 440 is specifically used to: store the rotation matrix in the particle transformation matrix in the RGB channel of the rendering texture, and store the position data in the particle transformation matrix in the Alpha channel of the rendering texture.

[0151] In one embodiment, the data determination unit 440 is specifically used to: obtain particle dynamic data from the rendered texture;

[0152] For each frame of the particle dynamic data, obtain the initial vertex position of any target vertex in the target static model.

[0153] Based on the initial vertex position and the target particle dynamic data, determine the model dynamic data corresponding to the target vertex.

[0154] In one embodiment, the data determination unit 440 is specifically configured to: determine the relative position of the target vertex with respect to the corresponding bone point of the specific particle based on the initial vertex position and the first original position of the bone point corresponding to the specific particle in the target particle dynamic data; determine the rotated relative position based on the relative position and the rotation matrix of the specific particle in the target particle dynamic data; and determine the new vertex position corresponding to the target vertex based on the rotated relative position and the first current position of the specific particle in the target particle dynamic data.

[0155] In one embodiment, the data determination unit 440 is specifically used to: determine the difference between the initial vertex position and the first original position as the relative position.

[0156] In one embodiment, the data determining unit 440 is specifically used to: determine the product of the relative position and the rotation matrix as the rotated relative position.

[0157] In one embodiment, the data determination unit 440 is specifically used to: determine a new vertex position by summing the rotated relative position and the first current position of a specific particle.

[0158] In one embodiment, the particle generation unit 420 is specifically used to: store the skeletal point binding data in the vertex attributes of the target static model;

[0159] The target engine processes the static target model that stores bone point binding data in the vertex attributes to obtain multiple particles.

[0160] In one embodiment, the particle generation unit 420 is specifically used to: store skeletal point identifiers in the vertex color of the target static model;

[0161] Store the bone weights in UV2 and UV3 of the target static model.

[0162] In one embodiment, the data determination unit 440 is specifically used to: determine model dynamic data based on the bone point binding data and particle dynamic data in the vertex attributes.

[0163] In one embodiment, the file determination unit 470 is used to acquire the bone point data of the target skeleton binding model and generate a skeleton point data file based on the bone point data; correspondingly, the particle generation unit 420 is specifically used to process the target static model through the target engine based on the skeleton binding data and the stored skeleton point data file to obtain multiple particles; the data determination unit 440 is specifically used to determine the model dynamic data of the target static model based on the particle dynamic data and the stored skeleton point data file.

[0164] In one embodiment, the mesh generation unit 480 is used to generate a target static mesh corresponding to the target static model; correspondingly, the particle generation unit 420 is specifically used to: process the target static mesh according to the skeleton binding data through the target engine to obtain multiple particles; correspondingly, the special effects generation unit 450 is specifically used to: control the target static mesh to generate preset special effects of the target static mesh according to the changes in the model dynamic data.

[0165] Each unit in the aforementioned special effects processing device can be implemented entirely or partially through software, hardware, or a combination thereof. Each unit can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each unit.

[0166] The aforementioned special effects processing device can be integrated into a terminal or server that has storage and a processor and thus computing power, or the special effects processing can be performed on the terminal or server.

[0167] Optionally, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0168] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device may be a terminal or a server. Figure 5As shown, the computer device 500 includes a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, and a computer program stored in the memory 502 and executable on the processor. The processor 501 is electrically connected to the memory 502. Those skilled in the art will understand that the computer device structure shown in the figures does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0169] The processor 501 is the control center of the computer device 500. It connects various parts of the computer device 500 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 502, and calling data stored in the memory 502, it performs various functions of the computer device 500 and processes data, thereby performing overall processing of the computer device 500.

[0170] In this embodiment, the processor 501 in the computer device 500 loads the instructions corresponding to the processes of one or more computer programs into the memory 502 according to the following steps, and the processor 501 runs the computer programs stored in the memory 502 to realize various functions:

[0171] In some embodiments, the processor 501 in the computer device 500 loads the instructions corresponding to the processes of one or more computer programs into the memory 502 according to the following steps, and the processor 501 runs the computer programs stored in the memory 502 to realize various functions:

[0172] Obtain the target skeleton binding model corresponding to the target static model; process the target skeleton binding model through the target engine to obtain multiple particles; apply special effects to the multiple particles based on preset special effects to determine the particle dynamic data of the multiple particles corresponding to the special effects processing; determine the model dynamic data of the target static model based on the particle dynamic data; control the target static model to generate the preset special effects of the target static model according to the changes in the model dynamic data.

[0173] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0174] Optional, such as Figure 5 As shown, the computer device 500 also includes: a display screen 503, a radio frequency circuit 504, an audio circuit 505, an input unit 506, and a power supply 507. The processor 501 is electrically connected to the display screen 503, the radio frequency circuit 504, the audio circuit 505, the input unit 506, and the power supply 507. Those skilled in the art will understand that... Figure 5The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0175] The display screen 503 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The display screen 503 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program. Optionally, the touch panel may include a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 501, and can receive and execute commands from the processor 501. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 501 to determine the type of touch event. Subsequently, the processor 501 provides corresponding visual output on the display panel according to the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the display screen 503 to achieve input and output functions. However, in some embodiments, the touch panel and the display screen 503 can be implemented as two independent components to achieve input and output functions. That is, the display screen 503 can also be used as part of the input unit 506 to achieve input functions.

[0176] The radio frequency circuit 504 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.

[0177] Audio circuitry 505 can be used to provide an audio interface between a user and a computer device via a speaker and a microphone. Audio circuitry 505 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 505, converted back into audio data, and output to processor 501 for processing. The audio data is then transmitted via radio frequency circuitry 504 to, for example, another computer device, or output to memory 502 for further processing. Audio circuitry 505 may also include an earphone jack to facilitate communication between peripheral headphones and the computer device.

[0178] The input unit 506 can be used to receive input numbers, character information or object feature information (such as fingerprints, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0179] Power supply 507 is used to supply power to various components of computer device 500. Optionally, power supply 507 can be logically connected to processor 501 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 507 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0180] although Figure 5 As not shown in the diagram, the computer device 500 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.

[0181] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to a computer device, and the computer program causes the computer device to execute the corresponding processes in the special effects processing methods described in the embodiments of this application; for brevity, these will not be elaborated further here.

[0182] This application also provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the special effects processing method described in the embodiments of this application. For simplicity, further details are omitted here.

[0183] This application also provides a computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the special processing method of this application; for brevity, further details are omitted here.

[0184] It should be understood that the processor in this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0185] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0186] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0187] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0188] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0189] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0190] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0191] In addition, the functional units in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0192] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer or a server) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0193] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A special effects processing method, characterized in that, The method includes: Obtain the bone binding data of the bone binding model corresponding to the target static model; Multiple particles are generated based on the target static model and the skeleton binding data, and the multiple particles correspond to the bone points in the skeleton binding data. Based on preset special effects, special effects processing is applied to the multiple particles to determine the particle dynamic data of the multiple particles corresponding to the special effects processing; Based on the particle dynamic data, determine the model dynamic data of the target static model; The target static model is controlled to generate preset special effects based on changes in the model's dynamic data.

2. The special effects processing method as described in claim 1, characterized in that, The step of determining the model dynamic data of the target static model based on the particle dynamic data includes: The particle dynamic data is stored in the rendered texture; The model dynamic data is determined based on the particle dynamic data obtained from the rendered texture.

3. The special effects processing method as described in claim 2, characterized in that, The step of storing the particle dynamic data in the rendering texture includes: For each frame of the target particle dynamic data in the particle dynamic data, determine the first current position of any target particle among the plurality of particles in the target particle dynamic data and the second current position of the particle corresponding to the parent bone point of the target particle; Obtain the first original position of the target particle without any special effects processing on the multiple particles, and the second original position of the particle corresponding to the parent bone point of the target particle; Based on the first current position, the second current position, the first original position, and the second original position, a particle transformation matrix is ​​generated, which is used to indicate the motion data of the corresponding particle. Write the particle transformation matrix into the rendering texture.

4. The special effects processing method as described in claim 3, characterized in that, The step of generating a particle transformation matrix based on the first current position, the second current position, the first original position, and the second original position includes: Calculate the current vector pointing from the particle corresponding to the parent bone point of the target particle to the target particle using the first current position and the second current position; Using the second current position and the second current position, calculate the original vector pointing from the particle corresponding to the parent bone point of the target particle to the target particle; Construct a rotation matrix based on the current vector and the original vector; The first current position and the first original position are merged into the rotation matrix to obtain the particle transformation matrix.

5. The special effects processing method as described in claim 4, characterized in that, The step of calculating the current vector pointing from the target particle to the parent bone point of the target particle using the first current position and the second current position includes: Calculate the difference between the first current position and the second current position to obtain the current vector; The step of calculating the original vector pointing from the parent bone point of the target particle to the target particle using the second current position and the second current position includes: The difference between the second current position and the second current position is calculated to obtain the original vector.

6. The special effects processing method as described in claim 4, characterized in that, The step of constructing a rotation matrix based on the current vector and the original vector includes: Based on the current vector and the original vector, calculate the corresponding rotation axis unit vector, rotation angle, and rotation parameters; The rotation matrix is ​​constructed based on the unit vector of the rotation axis, the rotation angle, and the rotation parameters.

7. The special effects processing method as described in claim 6, characterized in that, The step of calculating the corresponding rotation axis unit vector, rotation angle, and rotation parameters based on the current vector and the original vector includes: The rotation axis unit vector is obtained by taking the cross product of the current vector and the original vector. The rotation angle is obtained by the dot product of the current vector and the original vector; The rotation parameters are obtained based on the unit vector of the rotation axis and the rotation angle.

8. The special effects processing method as described in claim 4, characterized in that, The step of merging the first current position and the first original position into the rotation matrix to obtain the particle transformation matrix includes: Determine the translation matrix based on the first current position; Based on the first original position, determine the reference origin matrix; The translation matrix and the reference origin matrix are merged into the rotation matrix to obtain the particle transformation matrix.

9. The special effects processing method as described in claim 3, characterized in that, The step of writing the particle transformation matrix into the rendering texture includes: The particle transformation matrix is ​​split row by row; Write each row of the particle transformation matrix into the rendering texture; The rows of the rendering texture correspond to the rows of the particle transformation matrix, and the columns of the rendering texture correspond to each particle.

10. The special effects processing method as described in claim 2, characterized in that, Determining the model dynamic data based on the particle dynamic data obtained from the rendered texture includes: Obtain the particle dynamic data from the rendered texture; For each frame of the particle dynamic data, the initial vertex position of any target vertex in the target static model is obtained. Based on the initial vertex position and the target particle dynamic data, determine the model dynamic data corresponding to the target vertex.

11. The special effects processing method as described in claim 10, characterized in that, The step of determining the model dynamic data corresponding to the target vertex based on the initial vertex position and the target particle dynamic data includes: Based on the initial vertex position and the first original position of the bone point corresponding to the specific particle in the target particle dynamic data, the relative position of the target vertex with respect to the bone point corresponding to the specific particle is determined. The relative position after rotation is determined based on the relative position and the rotation matrix of the specific particle in the target particle dynamic data; Based on the relative position after rotation and the first current position of the specific particle in the target particle dynamic data, the new vertex position corresponding to the target vertex is determined.

12. The special effects processing method as described in claim 11, characterized in that, The step of determining the relative position of the target vertex with respect to the bone point corresponding to the specific particle based on the initial vertex position and the first original position of the bone point corresponding to the specific particle in the target particle dynamic data includes: The difference between the initial vertex position and the first original position is determined as the relative position.

13. The special effects processing method as described in claim 11, characterized in that, Determining the rotated relative position based on the relative position and the rotation matrix of the specific particle in the target particle dynamic data includes: The product of the relative position and the rotation matrix is ​​used to determine the relative position after rotation.

14. The special effects processing method as described in claim 11, characterized in that, The step of determining the new vertex position corresponding to the target vertex based on the rotated relative position and the first current position of the specific particle in the target particle dynamic data includes: The new vertex position is determined by the sum of the rotated relative position and the first current position of the specific particle.

15. The special effects processing method according to any one of claims 1-14, characterized in that, The generation of multiple particles based on the target static model and the skeletal binding data includes: The skeletal point binding data is stored in the vertex attributes of the target static model; The plurality of particles are generated based on the target static model that stores the bone point binding data in the vertex attributes.

16. The special effects processing method as described in claim 15, characterized in that, The step of storing the skeletal point binding data in the vertex attributes of the target static model includes: The skeletal point identifiers are stored in the vertex color of the target static model; The bone weights are stored in UV2 and UV3 of the target static model.

17. The special effects processing method according to any one of claims 1-14, characterized in that, Before generating multiple particles based on the target static model and the skeleton binding data, the method further includes: Obtain the bone point data of the target skeleton binding model; Generate a skeleton point data file based on the skeleton point data; The skeletal point data file is stored; Accordingly, the generation of multiple particles based on the target static model and the skeletal binding data includes: Multiple particles are generated based on the stored skeletal point data file, the target static model, and the skeletal binding data; Accordingly, determining the model dynamic data of the target static model based on the particle dynamic data includes: Based on the particle dynamic data and the stored skeletal point data file, the model dynamic data of the target static model is determined.

18. A special effects processing device, characterized in that, The device includes: The skeleton acquisition unit is used to acquire the skeleton binding data of the skeleton binding model corresponding to the target static model; A particle generation unit is used to generate multiple particles based on the target static model and the skeleton binding data, wherein the multiple particles correspond to the bone points in the skeleton binding data. The special effects processing unit is used to perform special effects processing on the multiple particles based on preset special effects, and to determine the particle dynamic data of the multiple particles corresponding to the special effects processing. A data determination unit is used to determine the model dynamic data of the target static model based on the particle dynamic data; The special effects generation unit is used to control the target static model to generate preset special effects for the target static model according to the changes in the model's dynamic data.

19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the special effects processing method as described in any one of claims 1-17.

20. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the special effects processing method according to any one of claims 1-17 by calling the computer program stored in the memory.