Special effect processing method and device, equipment, storage medium and program product
By generating special effects particle objects on the terminal device and determining control vectors and behavior vectors, the problem of the single particle motion control rules in the particle system is solved, realizing natural interaction and delicate presentation between particle effects and virtual characters, and improving the realism and coordination of the effects.
Patent Information
- Application Number
- CN202511247399.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2025-12-26
AI Technical Summary
In particle systems, particle motion control rules are fixed and singular, making it difficult for particles to respond naturally and reasonably based on the virtual character's actions. Special effects are disconnected from character behavior, failing to accurately simulate the complex interactions between particles, resulting in special effects that are not delicate or realistic enough.
The terminal device provides a graphical user interface, which generates special effects particle objects in response to the release of virtual character props. It determines control vectors and behavior vectors, and controls the movement of particle objects based on these vectors, so as to achieve precise interaction and complex interaction between particles and characters.
It improved the matching accuracy between particle motion and character movements, enhanced the correlation and coordination between special effects and virtual characters, made particle effects more natural and realistic, and improved the overall quality.
Smart Images

Figure CN121197801A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a special effects processing method, apparatus, device, storage medium, and program product. Background Technology
[0002] Particle effects are a common special effects technique in 3D computer graphics, widely used in various fields. For example, in the game industry, they can simulate natural phenomena such as fire, snow, and smoke. The key to realistic particle effects lies in the control of particle motion.
[0003] In related technologies, particle systems are often used to control the movement of special effects particles. However, the rules for particle movement control in particle systems are relatively fixed and singular, making it difficult for particles to respond naturally and reasonably to the actions controlled by virtual characters. This results in a disconnect between special effects and character behavior, disrupting the harmony of the scene. Furthermore, particle systems cannot accurately simulate the complex interactions between particles, leading to a lack of subtlety and realism in the presentation of special effects.
[0004] Therefore, in order to improve the interactivity and realism of particle effects, there is an urgent need for a special effects processing method to achieve precise and flexible control over the particle motion state, so that particle effects can interact with virtual characters more naturally and realistically, thereby improving the matching accuracy between particle motion and character actions and enhancing the accuracy of particle interaction simulation. Summary of the Invention
[0005] This invention provides a special effects processing method, apparatus, device, storage medium, and program product to achieve precise and flexible control over particle motion states, enabling particle special effects to interact more naturally and realistically with virtual characters, thereby improving the matching accuracy between particle motion and character actions and enhancing the accuracy of particle interaction simulation.
[0006] According to one aspect of the present invention, a special effects processing method is provided, which provides a graphical user interface through a terminal device, the graphical user interface displaying a game scene; the game scene includes a virtual character controlled and operated through the terminal device, the method comprising:
[0007] In response to the item release operation targeting the virtual character, release special effect items in the game scene to generate multiple special effect particle objects;
[0008] For each of the multiple special effects particle objects, in response to the generation event of the current special effects particle object, determine the control vector of the current special effects particle object controlled by the virtual character, and determine the behavior vector of the current special effects particle object affected by the associated special effects particle objects;
[0009] The motion vector of the current special effects particle object is determined based on the control vector and the behavior vector, and the motion of the current special effects particle object relative to the virtual character is controlled based on the motion vector.
[0010] According to another aspect of the present invention, a special effects processing apparatus is provided, applied to a terminal device, which provides a graphical user interface (GUI) displaying a game scene; the game scene includes a virtual character controlled and operated via the terminal device, and the apparatus includes:
[0011] The particle generation module is used to release special effect items in the game scene in response to the item release operation for the virtual character, so as to generate multiple special effect particle objects.
[0012] The event response module is used to determine the control vector of the current special effect particle object being controlled by the virtual character, and to determine the behavior vector of the current special effect particle object being affected by the associated special effect particle objects, for each of the multiple special effect particle objects; wherein, the associated special effect particle objects are each particle in the other special effect particle objects.
[0013] The particle control module is used to determine the motion vector of the current special effects particle object based on the control vector and the behavior vector, and to control the movement of the current special effects particle object relative to the virtual character based on the motion vector.
[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0015] One or more processors;
[0016] Storage device for storing one or more programs.
[0017] When one or more programs are executed by one or more processors, the one or more processors implement any of the special effects processing methods described in the embodiments of this disclosure.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement any of the special effects processing methods of the present invention.
[0019] According to another aspect of the present disclosure, a computer program product is provided, which, when executed by a processor, implements any of the special effects processing methods described in the embodiments of the present disclosure.
[0020] The technical solution of this disclosure provides a graphical user interface (GUI) through a terminal device, displaying a game scene and a virtual character controlled by the player. In response to an item release operation targeting the virtual character, special effect items are released in the game scene to generate multiple special effect particle objects. For each of the multiple special effect particle objects, in response to the generation event of the current special effect particle object, a control vector controlled by the virtual character is determined, and a behavior vector is determined resulting from the influence of associated special effect particle objects. This technical solution precisely controls the movement of the special effect particle objects through control vectors, ensuring that the special effect particle objects closely follow the control intentions of the virtual character, enhancing the correlation and coordination between the special effects and the virtual character. Furthermore, the behavior vectors can more accurately simulate the interactions between particles, making the particle effects more delicate and realistic, effectively improving the overall quality of the particle effects.
[0021] Furthermore, the motion vector of the current special effects particle object can be determined based on the control vector and behavior vector, and the motion of the current special effects particle object relative to the virtual character can be controlled based on the motion vector. In this way, the special effects particles can change accordingly based on the virtual character's actions, making the interaction between particle effects and the virtual character more natural and realistic, thereby improving the matching accuracy between particle motion and character actions and enhancing scene coordination. The technical solution in this disclosure solves the problems in related technologies where particle motion control rules in particle systems are fixed and singular, particles cannot respond naturally and reasonably according to the virtual character's control actions, special effects are disconnected from character behavior, and complex interactions between particles cannot be accurately simulated, resulting in less refined and realistic special effects presentation.
[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this disclosure, 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 A flowchart illustrating a special effects processing method provided in an embodiment of this disclosure;
[0025] Figure 2 Example diagrams of game scenes applicable to special effects processing methods provided in embodiments of this disclosure;
[0026] Figure 3 Example diagrams of particle motion effects applicable to special effects processing methods provided in embodiments of this disclosure;
[0027] Figure 4 Example diagram of a particle information configuration interface for special effects processing methods provided in embodiments of this disclosure;
[0028] Figure 5 Example diagram of a smoke particle model applicable to special effects processing methods provided in embodiments of this disclosure;
[0029] Figure 6 Example diagram of vertex offset texture provided for special effects processing methods in embodiments of this disclosure;
[0030] Figure 7 Example diagram of a smoke particle model applicable to special effects processing methods provided in embodiments of this disclosure;
[0031] Figure 8 Example diagram of smoke particle effects applicable to special effects processing methods provided in embodiments of this disclosure;
[0032] Figure 9 Example diagram of smoke particle effects applicable to special effects processing methods provided in embodiments of this disclosure;
[0033] Figure 10 Example diagram of smoke particle effects applicable to special effects processing methods provided in embodiments of this disclosure;
[0034] Figure 11 A flowchart illustrating a special effects processing method provided in an embodiment of this disclosure;
[0035] Figure 12 A flowchart illustrating a special effects processing method provided in an embodiment of this disclosure;
[0036] Figure 13 This is a schematic diagram of the structure of a special effects processing device provided in an embodiment of the present disclosure;
[0037] Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0038] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0039] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0040] In the technical solution of this disclosure embodiment, a graphical user interface (GUI) is provided through a terminal device. The GUI displays a game scene, which includes a virtual character controlled and operated by the terminal device. The terminal device can be understood as a smart device that provides a GUI and is capable of controlling the virtual character. For example, the terminal device can be any of the following devices, including but not limited to: smartphones, tablets, laptops, desktop computers, game consoles, etc. In this disclosure embodiment, an application supporting the game scene is installed and runs on the terminal device. Optionally, the application can be a standalone application or a network-connected application. In this disclosure embodiment, the GUI can be understood as an interface used to present the game scene. The game scene can be understood as a virtual environment displayed when the application runs on the terminal device. In this disclosure embodiment, the virtual character can be understood as a controllable dynamic character in the game scene. Optionally, the dynamic character can be a virtual person, virtual animal, anime character, etc.
[0041] Figure 1 This is a flowchart illustrating a special effects processing method provided in an embodiment of this disclosure. This embodiment is applicable to situations where the movement of special effects particle objects released by a virtual character needs to be controlled. The method can be executed by a special effects processing device, which can be implemented in hardware and / or software and can be configured in electronic devices such as computers or servers. Figure 1 As shown, the method in this embodiment includes:
[0042] S110, in response to an item release operation targeting a virtual character, releases special effect items in the game scene to generate multiple special effect particle objects.
[0043] In this context, a virtual character can be understood as a game character capable of releasing special effect items within a game scene. In this embodiment, the virtual character can be configured according to actual needs, and is not specifically limited thereto. For example, a mage character, a warrior character, etc. In this embodiment, the item release operation can be understood as triggering the virtual character to use a special effect item to generate multiple special effect particle objects in the game scene. In this embodiment, the triggering method for the virtual character to use special effect items can include one of the following: manual triggering by the player through an input device (e.g., keyboard, gamepad, touchscreen, etc.); or automatic triggering under preset game logic conditions.
[0044] Optionally, preset game logic conditions may include one of the following: The virtual character enters a preset trigger area in the game scene; the shape of the preset trigger area can be set according to actual needs, such as a fan-shaped area, a circular area, or a rectangular area. The distance between the virtual character and a scene marker is less than a threshold. The virtual character remains on a specific terrain for more than a time threshold. An enemy character enters a preset area centered on the virtual character. An enemy character is at a preset distance from the virtual character. An enemy character is in a specific abnormal state. The virtual character's combo skill reaches a preset value, where the preset value can be set according to actual needs and is not specifically limited here.
[0045] In this embodiment, special effects props can be understood as props released by virtual characters in a game scene that can generate multiple special effects particle objects. In this embodiment, special effects props have two display states in the game scene: a visible state and an invisible state. Simply put, when a special effects prop is visible, the player can see its various visual effects in the game scene; when a special effects prop is invisible, it will not be displayed in any form that can be perceived by the player, and the player will not be aware of its existence.
[0046] In this embodiment, when a special effects prop is released in the game scene, the game scene will present an overall special effects form (e.g., a smoke effect form) constructed by multiple special effects particle objects. A special effects particle object can be understood as a single particle object with specific visual characteristics generated after the special effects prop is released. For example, special effects particle objects can be smoke particle objects, petal particle objects, leaf particle objects, bubble particle objects, water particle virtual objects, dust particle objects, snow particle virtual objects, and ice particle virtual objects, etc. In this embodiment, multiple special effects particle objects can be generated based on a particle system. It should be noted that the sizes of different special effects particle objects can be the same or different.
[0047] Specifically, in response to an item release operation targeting a virtual character, the release location of the special effect item in the game scene can be determined. This allows the special effect item to be released at the release location to generate multiple special effect particle objects. In this embodiment, the item release location can be set according to actual needs and is not specifically limited here. For example, the item release location can be a position at a preset distance from the virtual character; the preset distance can be set according to actual needs and is not specifically limited here. Alternatively, it can be the location where the skill effect is first displayed in the game scene when the virtual character uses an attack item. Taking the "Meteor Shower" skill with a magic wand as an example, the release location of the special effect item is the top of the magic wand. Alternatively, it can be the location of the virtual character in the game scene.
[0048] S120. For each of the multiple special effect particle objects, in response to the generation event of the current special effect particle object, determine the control vector of the current special effect particle object controlled by the virtual character, and determine the behavior vector of the current special effect particle object affected by the associated special effect particle object.
[0049] In this context, the current special effects particle object can be understood as one of multiple special effects particle objects to be processed. The associated special effects particle object can be understood as the special effects particle object that influences the movement of the current special effects particle among the remaining special effects particle objects (excluding the current one). In practical applications, the number of associated special effects particle objects is usually multiple, such as 500, 800, or 1000. In this embodiment, the associated special effects particle object is at least a portion of the remaining special effects particle objects. In other words, the associated special effects particle object can be some or all of the remaining special effects particle objects. When the associated special effects particle object is a portion of the remaining special effects particle objects, it can be a special effects particle object within a defined range around the current special effects particle object. The defined range can be set according to actual needs and is not specifically limited here. Optionally, the center of the defined range can be the location of the current special effects particle object.
[0050] In this embodiment, the control vector is understood as a vector that can be used to characterize the current special effects particle object being controlled by the virtual character. This technical solution, by representing the direct control force of the virtual character over the movement of the current special effects particle object using the control vector, enables precise interactive manipulation of the special effects particle object by the virtual character, thereby enhancing the interactivity between the virtual character and the special effects particle object in the game scene. In this embodiment, the method for determining the control vector of the current special effects particle object being controlled by the virtual character can be as follows: based on a first vector input operation, the control vector of the current special effects particle object being controlled by the virtual character is obtained; wherein, the first vector input operation can be understood as an operation used to input the control vector.
[0051] In this embodiment, the behavior vector can be understood as a vector representing the influence of associated special effects particle objects on the current special effects particle object. This technical solution uses behavior vectors to represent the interaction between special effects particle objects, thereby enhancing the interactivity between them in the game scene. In this embodiment, the method for determining the behavior vector of the current special effects particle object being influenced by associated special effects particle objects can be as follows: based on a second vector input operation, the behavior vector of the current special effects particle object being influenced by associated special effects particle objects is obtained; wherein, the second vector input operation can be understood as the operation of inputting the behavior vector. It should be noted that the direction of the control vector and the direction of the behavior vector can be the same or different.
[0052] S130. Determine the motion vector of the current special effects particle object based on the control vector and behavior vector, and control the movement of the current special effects particle object relative to the virtual character based on the motion vector.
[0053] In this embodiment, the motion vector of the current special effects particle object is determined by a control vector and a cooperative vector, achieving fine-grained control over the dynamic separation effect between the special effects particle object and the virtual character. The motion vector can be understood as the vector controlling the movement of the current special effects particle object relative to the virtual character. In this embodiment, controlling the movement of the current special effects particle object relative to the virtual character can include: controlling the current special effects particle object to move away from the virtual character; or controlling the current special effects particle object to move towards the virtual character. In this implementation, the motion vector can include the speed and direction of the special effects particle object's velocity, which determines how the special effects particle object moves in the game scene. In simpler terms, the motion vector determines how fast and in which direction the special effects particle object should move in the game scene.
[0054] Specifically, the control vector and behavior vector are summed to obtain a summed vector. In practical applications, the magnitude of the control vector is greater than the magnitude of the behavior vector. That is, the current motion direction of the special effects particle object depends on the control vector, thus the control vector dominates the motion direction of the current special effects particle object. Therefore, the summed vector can be determined as the motion vector of the current special effects particle object. Furthermore, based on the motion vector, the force that needs to be applied to the current special effects particle object can be determined. This force can then be applied to the current special effects particle object, and through this force, the motion of the current special effects particle object relative to the virtual character can be controlled.
[0055] In this embodiment of the disclosure, there are multiple ways to control the movement of the current special effects particle object relative to the virtual character based on motion vectors.
[0056] As an optional implementation in this disclosure, the control vector is used to control the movement of the special effects particle object in a direction away from the virtual character. Controlling the movement of the current special effects particle object relative to the virtual character based on the motion vector can include: controlling the current special effects particle object to move along a preset direction under the action of the motion vector, so as to move away from the virtual character. The preset direction is the same as the direction of the control vector. This approach ensures that the movement direction of the special effects particle object is away from the virtual character. In this disclosure, the preset direction can be understood as the direction in which the current special effects particle object moves away from the virtual character.
[0057] In this embodiment, by precisely controlling the movement path of the current special effects particle object based on motion vectors, it dynamically diffuses in a direction away from the virtual character, achieving the effect of the special effects particle object being dispersed by the virtual character. This naturally presents the dynamic process of the special effects particle object being "dispersed" by the virtual character, enhancing the dynamic realism of the special effects visual effect. For example, in combat, a virtual character releases a smoke barrier effect towards an enemy character. The smoke is composed of multiple smoke particle objects. At the moment the virtual character releases the smoke effect, the smoke particles can diffuse from the virtual character's hand to the area around the enemy character.
[0058] For example, such as Figure 2 As shown, the game scene includes a virtual character (the "block" in the image). After the virtual character releases a smoke item, a large number of smoke particles are generated around the virtual character. For each smoke particle, its motion vector is used to control its movement away from the virtual character, thus achieving the effect of the smoke particles being dispersed by the virtual character (see [link to documentation]). Figure 3 ).
[0059] As another optional implementation in this disclosure, a control vector is used to control the movement of special effects particle objects toward the virtual character. Controlling the movement of the current special effects particle object relative to the virtual character based on the motion vector can include: controlling the current special effects particle object to move toward the virtual character under the influence of the motion vector, so that multiple special effects particle objects form an effect of gathering toward the virtual character. For example, when a player controls a virtual character to cast healing magic, triggering an item release, 500 petal particles are instantly generated. When the petal particles are generated, the control vector pointing to the virtual character for each petal particle object, and the behavior vector generated by neighboring petal particles toward that petal particle object, can be determined. These two vectors are combined into a motion vector, thereby controlling the petal particles to gather around the virtual character.
[0060] Based on the above embodiments, before responding to the item release operation for the virtual character, the method may further include: determining the configuration information of special effect particle objects through a particle information configuration interface. The configuration information of special effect particle objects may include the number of special effect particle objects and particle motion attribute information. The particle information configuration interface can be used to configure the particle information of the special effect particle objects to obtain the configuration information of the special effect particle objects. In this embodiment, the particle information configuration interface is an interactive interface for setting and adjusting the relevant parameters of special effect particle objects. This interface allows for intuitive configuration of various attributes of the special effect particle objects. The configuration information of special effect particle objects can be understood as the configuration information of the special effect particle objects.
[0061] In this embodiment, the configuration information of special effects particle objects can be used to determine the behavioral characteristics of special effects particle objects in a game scene. The number of special effects particle objects can be understood as the total number of special effects particle objects generated by item release operations in the game scene. Particle motion attribute information can be understood as the motion attribute information of special effects particle objects. In this embodiment, particle motion attribute information may include the movement speed of the special effects particle objects, their initial direction of motion (e.g., random direction, pointing to a specific target, etc.), and their interaction rules with other particles (e.g., whether they attract or repel each other, etc.).
[0062] In this embodiment, there are multiple ways to determine the configuration information of special effects particle objects through a particle information configuration interface. For example, it can be a display of the particle information configuration interface. This interface includes multiple preset configuration items. In response to an information configuration operation on these preset items, the configuration information of the special effects particle objects is obtained. In this embodiment, the multiple preset configuration items may include a configuration item for the number of special effects particle objects and multiple particle motion attribute information configuration items. Alternatively, it can be a display of the particle information configuration interface. The display of the particle information configuration interface receives the number of special effects particle objects and particle motion attribute information to obtain the configuration information of the special effects particle objects.
[0063] For example, such as Figure 4 As shown, the preset configuration items can be used to set the particle motion control algorithm, population initialization parameters, population particle velocity, and population motion attributes. The population initialization parameters can include at least one of the following: population model (e.g., smoke model), second target, second target following distance, population size, population generation range, and population activity range. The second target can be used to set the role model that interacts with the population model. Population particle velocity can include movement speed and rotation speed. Population motion attributes can include at least one of the following: separation strength, alignment strength, aggregation strength, control strength, second control strength, separation effect influence range, alignment effect influence range, and aggregation effect influence range.
[0064] Based on the above embodiments, in order to make the special effects particle objects more flexible, after responding to the generation event of the current special effects particle object, it may further include: determining the vertex offset map of the particle model of the current special effects particle object, determining the vertex offset of each model vertex on the particle model based on the vertex offset map; for each model vertex of the model particle, adjusting the vertex offset of the model vertex based on the preset offset intensity coefficient, motion vector and vertex position of the model vertex in the model space, so as to update the particle model.
[0065] In this context, the particle model can be understood as a three-dimensional mesh model that constitutes the visual representation of a single special effects particle. The vertex offset map can be understood as a pre-made texture map storing height information, used to indicate the degree to which each vertex on the particle model surface should be offset in the normal direction. Optionally, the vertex offset map can be a grayscale image. White areas can represent the maximum positive offset. Black areas can represent no offset. Gray transition areas can represent different degrees of offset. In this embodiment, the UV coordinates (texture coordinates) of the vertex offset map correspond to the vertex coordinates on the particle model surface, ensuring that each vertex can be mapped to a specific position on the map.
[0066] A preset offset intensity coefficient can be used to control the overall intensity of vertex offset. In this embodiment, the preset offset intensity coefficient can be set according to actual needs, and is not specifically limited herein. Model space is a coordinate space relative to a specific model itself. In model space, the position, orientation, and size of the model are relative to the model itself. Model space is typically used to define and manipulate the geometry and properties of a model, such as vertex coordinates and normal vectors.
[0067] Taking smoke particles as an example, the smoke particle model can be the basic geometry of the smoke particles. For example, such as... Figure 5 As shown, the smoke particle model is a spherical mesh. The vertex offset texture of the smoke particles (see...) Figure 6The perturbation pattern at the edge of the smoke is represented by white areas, indicating strong perturbations and black areas, indicating stable regions. Based on this, by adjusting the vertex offset of the smoke particle model obtained from the vertex offset map of the smoke particles, an updated smoke particle model can be obtained (see...). Figure 7 This allows for control over the movement of the updated smoke particle model relative to the virtual character. It should be noted that, in this embodiment, the vertex offset of the smoke particle model is affected by the speed of the smoke particles.
[0068] In this embodiment of the disclosure, determining the vertex offset of each model vertex on the particle model based on the vertex offset map may include: sampling the vertex offset map to determine the sampled value of each model vertex on the particle model on the vertex offset map; and determining the vertex offset of the model vertex along its own normal direction based on the sampled value and a preset sampling intensity coefficient.
[0069] The adopted value can be the color value at a specific texture coordinate obtained from the vertex offset map through texture sizing operations. The preset sampling intensity coefficient can be understood as a parameter used to adjust the influence of the vertex offset map sampling value on the offset. In the embodiments of this disclosure, the preset sampling intensity coefficient can be set according to actual needs, and it is not specifically limited here.
[0070] Specifically, each vertex of the particle model is traversed, and for each vertex reached, its position in the texture UV coordinate system is determined. Then, the sampled value (grayscale value) at the corresponding position can be read from the vertex offset map. Next, the sampled value is multiplied by a preset sampling intensity coefficient to obtain the offset distance of the current model vertex. Finally, based on the vertex position and offset distance in model space, the vertex offset along its own normal direction can be obtained.
[0071] Alternatively, the vertex offset of the model vertices can be adjusted using the following formulas, including:
[0072]
[0073] Where, p BOID This can represent the vertex offset obtained after adjusting the vertex offset of the model vertex. distort It can represent the vertex offset of the model's vertices. α can represent the preset offset intensity coefficient. It can represent a motion vector. vec It can represent the vertex position of a model vertex in model space. dot(a,b) can be used to calculate the dot product of two vectors a and b. len() can be used to calculate the magnitude of a vector.
[0074] Building upon the above embodiments, to better integrate the special effects particle object with the game scene, the current special effects particle object can be feathered. Specifically, after responding to the generation event of the current special effects particle object, the process may further include: determining the particle depth value of the current special effects particle object and the scene depth value of the game scene, calculating the difference between the particle depth value and the scene depth value; obtaining the particle feathering intensity of the current special effects particle object based on the difference and a first particle feathering intensity coefficient, and feathering the current special effects particle object based on the particle feathering intensity.
[0075] The particle depth value can be understood as the depth coordinates of the current special effects particle object in the 3D scene. In this embodiment, the particle depth value can be calculated by the rendering pipeline based on the particle position of the current special effects particle object and its distance from the camera, and is used to determine the foreground / background occlusion relationship of the current special effects particle object on the screen. The scene depth value can be understood as the background depth value in the game scene corresponding to the location of the current special effects particle object. In this embodiment, the difference between the particle depth value and the scene depth value is calculated, and the numerical difference between the particle depth value and the scene depth value reflects the relative distance between the particle and the background. It can be understood that a positive difference indicates that the particle is in front of the game scene, and a negative difference indicates that the particle is occluded by the game scene.
[0076] The first particle feathering intensity coefficient can be understood as a preset adjustment parameter used to control the intensity of the feathering effect (e.g., the degree of edge blurring). It is understood that the larger the first particle feathering intensity coefficient value, the more pronounced the feathering effect. The particle feathering intensity can be understood as a value calculated based on the first particle feathering intensity coefficient and the difference between the particle depth value and the scene depth value. In this embodiment, the particle feathering intensity can be used to adjust the edge transparency of the special effects particle object to achieve a smooth transition effect (e.g., the particle edges gradually disappear). Feathering the current special effects particle object allows for a gradual change in the transparency of its edges, making the current special effects particle object blend more naturally with the game scene and avoiding the visual abruptness of hard-edged edges.
[0077] For example, Figure 8 The image shows the smoke particle effect before feathering. The feathering intensity of the smoke particles is calculated to perform feathering processing on the smoke particles, resulting in the feathered smoke particle effect (see [link]). Figure 9 ).
[0078] In this embodiment, the particle feathering intensity of the current special effects particle object is obtained based on the difference and the first particle feathering intensity coefficient, including: multiplying the difference and the first particle feathering intensity coefficient. The result of the multiplication is determined as the particle feathering intensity of the current special effects particle object. In this embodiment, feathering the current special effects particle object based on the particle feathering intensity may include: adjusting the particle edge transparency of the current special effects particle object according to the feathering intensity. It can be understood that the higher the feathering intensity, the more transparent the particle edge. If the feathering intensity is 0, it can indicate that the current special effects particle object is hidden.
[0079] Optionally, the current special effects particle object can be feathered based on the particle feathering intensity in the following ways:
[0080]
[0081] Among them, Alpha dep This can represent the feathering intensity of the current special effects particle object. Alpha can represent the transparency of the current special effects particle object before feathering. effect This can represent the particle depth value of the current special effects particle object. (dep) scene K can represent the background depth value corresponding to the location of the current special effect particle object in the game scene. dep It can represent the feathering intensity coefficient of the first particle.
[0082] Based on the above embodiments, after feathering the current special effects particle object, the method may further include: updating the feathering result of the current special effects particle object based on the motion vector of the current special effects particle object, the second particle feathering intensity coefficient, and the vertex position of each model vertex on the particle model of the current special effects particle object.
[0083] Specifically, based on the dot product calculation function, the dot product of the motion vector of the current special effects particle object and the vertex positions of each model vertex on the particle model of the current special effects particle object is calculated to obtain the dot product result. Then, the dot product result can be multiplied by the second particle feathering intensity coefficient to obtain the multiplication result. The motion vector of the current special effects particle object is then modulo-processed to obtain the modulus of the motion vector. Finally, the feathering result of the current special effects particle object can be updated based on the multiplication result and the modulus of the motion vector.
[0084] Optionally, the feathering result of the current special effects particle object can be updated using the following formula, including:
[0085]
[0086] Among them, Alpha BOIDThis can be represented as the result obtained after updating the feathering process of the current special effects particle object. Alpha dep This can be represented as the feathering result of the current special effects particle object. β can be represented as the feathering intensity coefficient of the second particle. vec It can be represented as the vertex position of each model vertex on the particle model of the current special effects particle object. It can be represented as the motion vector of the current special effects particle object.
[0087] It should be noted that the update of the feathering result for the current special effects particle object will be affected by the movement direction of the special effects particle object. This is understandable, as... Figure 10 As shown, the feathering degree is stronger for vertices moving in the opposite direction.
[0088] The technical solution of this disclosure provides a graphical user interface (GUI) through a terminal device, which displays a game scene and a virtual character controlled by the player. In response to an item release operation targeting the virtual character, special effect items are released in the game scene to generate multiple special effect particle objects. For each of the multiple special effect particle objects, in response to the generation event of the current special effect particle object, a control vector controlled by the virtual character is determined, and a behavior vector is determined based on the influence of associated special effect particle objects. This technical solution precisely controls the movement of the special effect particle objects through control vectors, ensuring that the special effect particle objects closely follow the control intentions of the virtual character, enhancing the correlation and coordination between the special effects and the virtual character. Furthermore, the behavior vectors can more accurately simulate the interaction between particles, making the particle effects more delicate and realistic, effectively improving the overall quality of the particle effects. The motion vector of the current special effect particle object is determined based on the control vector and the behavior vector, and the movement of the current special effect particle object relative to the virtual character is controlled based on the motion vector. In this way, special effects particles can change accordingly based on the virtual character's movements, making the interaction between particle effects and the virtual character more natural and realistic. This improves the matching accuracy between particle movement and character actions, and enhances the coordination of the scene. The technical solution in this embodiment solves the problems in related technologies where particle movement control rules in particle systems are fixed and singular, making it difficult for particles to respond naturally and reasonably based on the virtual character's controlled actions, resulting in a disconnect between special effects and character behavior, and an inability to accurately simulate complex interactions between particles, leading to less refined and realistic special effects.
[0089] Figure 11 This is a flowchart illustrating another special effects processing method provided in this embodiment. The technical solution of this embodiment can be combined with other embodiments; for the same or related parts, they can be described in conjunction with the descriptions of other embodiments, and will not be repeated here. Figure 11As shown, the method in this embodiment may specifically include:
[0090] S210, in response to an item release operation targeting a virtual character, releases special effect items in the game scene to generate multiple special effect particle objects.
[0091] S220. For each of the multiple special effect particle objects, in response to the generation event of the current special effect particle object, determine the behavior vector of the current special effect particle object affected by the associated special effect particle object; and determine the preset control strength coefficient of the current special effect particle object controlled by the virtual character, the first particle position of the current special effect particle object, and the character position of the virtual character.
[0092] The preset control intensity coefficient can be set according to actual needs and is not specifically limited here. The first particle position can be understood as the position of the current special effect particle object in the game scene. The character position can be understood as the position of the virtual character in the game scene. In this embodiment, the first particle position and the character position are coordinates in the world coordinate system. It should be noted that the world coordinate system is a global coordinate system in the game scene. A fixed point in the game scene (e.g., the center point or the origin of the feature) is used as a reference to provide a unified positioning standard for all elements in the scene. In the world coordinate system, each point has a unique coordinate value to represent its position.
[0093] In this embodiment, there are multiple ways to preset the control intensity coefficient. As one optional implementation method, a first coefficient configuration interface is displayed, which includes a horizontal graphical slider as a control for setting the control intensity coefficient. The left side of the slider is labeled "Weak Control," and the right side is labeled "Strong Control." Users can drag the slider to set the control intensity coefficient of the current special effect particle object being controlled by the virtual character. The value corresponding to the current position of the slider is displayed in real-time in a small text box above the slider. For example, when the slider is dragged to the middle position, the text box displays "0.5," indicating that the current control intensity coefficient is 0.5. Users can flexibly adjust the slider position according to the expected effect of the special effect to quickly find a suitable control intensity coefficient.
[0094] As another optional implementation of this disclosure, a second coefficient configuration interface is displayed, which includes a numerical input box as a control for setting the intensity coefficient. Next to this input box are "Increase" and "Decrease" buttons. By default, an initial value, such as "0.3", is displayed in the input box. Users can directly input the desired value, such as "0.7", or click the "Increase" or "Decrease" button to gradually adjust the value in steps of a preset value (such as 0.1). After each input or button click, the input value is first verified by a validator to determine whether it is within a reasonable range (e.g., between 0 and 1). If it exceeds the range, a prompt is given and it is automatically corrected to a boundary value.
[0095] S230. Based on the preset control intensity coefficient, the position of the first particle, and the position of the character, determine the control vector of the current special effect particle object being controlled by the virtual character.
[0096] Specifically, based on the position of the first particle and the position of the character, the distance between the current special effects particle object and the virtual character is determined. Then, based on this distance and a preset control strength coefficient, the control vector by which the virtual character controls the current special effects particle object can be determined.
[0097] Optionally, the control vector of the current special effects particle object controlled by the virtual character can be determined using the following formula:
[0098]
[0099] in This can be represented as the control vector of the current special effects particle object i, which is controlled by the virtual character char. i This can be represented as the position of the i-th special effect particle object in the game scene, i.e., the position of the first particle. P char This can be represented as the position of a game character within the game scene, i.e., the character's position. K char It can represent the preset control intensity coefficient.
[0100] S240. Determine the motion vector of the current special effects particle object based on the control vector and behavior vector, and control the movement of the current special effects particle object relative to the virtual character based on the motion vector.
[0101] The technical solution of this disclosure determines a preset control intensity coefficient for the current special effects particle object being controlled by a virtual character, the first particle position of the current special effects particle object, and the character position of the virtual character. Based on the preset control intensity coefficient, the first particle position, and the character position, the control vector for the current special effects particle object being controlled by the virtual character is determined, thus achieving precise quantification and dynamic simulation of the control relationship between the special effects particle object and the virtual character. Using this technical solution, the direction and degree of movement of the special effects particle object after being controlled can be accurately calculated based on the position of the virtual character and the preset control intensity. This makes the performance of the special effects particles in the virtual scene more closely match the control intention of the virtual character, enhancing the realism of the interaction between the character and the special effects in the virtual scene, thereby improving the immersion and fun of the interaction between the character and the special effects in the game scene.
[0102] Figure 12 This is a flowchart illustrating another special effects processing method provided in this embodiment. The technical solution of this embodiment can be combined with other embodiments; for the same or related parts, they can be described in conjunction with the descriptions of other embodiments, and will not be repeated here. Figure 12 As shown, the method in this embodiment may specifically include:
[0103] S310, in response to an item release operation targeting a virtual character, releases special effect items in the game scene to generate multiple special effect particle objects.
[0104] S320. For each of the multiple special effect particle objects, in response to the generation event of the current special effect particle object, determine the control vector of the current special effect particle object controlled by the virtual character, and determine the separation vector, aggregation vector and convergence vector of the current special effect particle object affected by the associated special effect particle objects.
[0105] The separation vector can be used to control the current special effects particle object to avoid colliding with associated special effects particle objects. In this technical solution, the separation vector can cause the current special effects particle object to move away from the associated special effects particle vector, avoiding excessive overlap between special effects particle objects and making the distribution of special effects particle objects more uniform. The aggregation vector can be used to control the current special effects particle object to move closer to associated special effects particle objects. In this technical solution, the distance vector can guide the current special effects particle object to move closer to associated special effects particle objects, forming a cluster or clump-like distribution effect. The convergence vector can be used to control the movement direction of the current special effects particle object to be consistent with the movement direction of associated special effects particle objects. In this technical solution, the convergence vector allows the current special effects particle object to move towards a common direction or target position, achieving coordinated movement of multiple special effects particle objects as a whole. In this embodiment, the separation vector, aggregation vector, and convergence vector obtained by the influence of associated special effects particle objects on the current special effects particle object can be vectors, which can be pre-configured vectors or calculated in real time according to preset logic.
[0106] In this embodiment of the disclosure, determining the separation vector of the current special effects particle object influenced by associated special effects particle objects may include: determining the repulsion vector of each associated special effects particle object to the current special effects particle object, and summing the repulsion vectors to obtain a first summation result. Thus, the total repulsion vector of all associated special effects particle objects to the current special effects particle object can be determined based on the first summation result. Furthermore, based on the total repulsion vector, a preset particle separation intensity coefficient, and a preset particle motion direction, the separation vector of the current special effects particle object influenced by associated particle objects can be determined.
[0107] The exclusion vector can be understood as the vector generated by the repulsion of a single associated special effect particle object by the current special effect particle object. The first summation result can be understood as the result of the repulsion of the current special effect particle object by multiple associated special effect particle objects, i.e., the total repulsion vector. The preset particle motion direction can be used to control the current special effect particle object to move away from all associated special effect particle objects. The preset particle separation intensity coefficient can be set according to actual needs and is not specifically limited here. In this embodiment, the setting method of the particle separation intensity coefficient and the setting method of the control intensity coefficient can be the same or different.
[0108] Specifically, the repulsion vector of each associated special effects particle object to the current special effects particle object is determined. These repulsion vectors are then summed to obtain a first summation result, which is the total repulsion vector of all associated special effects particle objects to the current special effects particle object. Based on this total repulsion vector, a preset particle separation intensity coefficient, and a preset particle motion direction, the separation vector resulting from the influence of associated special effects particle objects on the current special effects particle object can be determined.
[0109] Optionally, determining the repulsion vector of each associated special effects particle object relative to the current special effects particle object can include: for each associated special effects particle object, determining the unit direction vector and particle distance of the associated special effects particle object relative to the current special effects particle object. The ratio of the unit direction vector to the particle distance can then be calculated. This ratio can then be used as the repulsion vector of the associated special effects particle object relative to the current special effects particle object.
[0110] Optionally, the separation vector obtained by the influence of associated special effects particle objects on the current special effects particle object is determined in the following way:
[0111]
[0112] in, It can be represented as the separation vector obtained by the current special effect particle object i being affected by the j-th associated special effect particle object. K seq It can be represented as the preset particle separation intensity coefficient. j can be represented as the j-th associated special effect particle object. k can be represented as the number of all associated special effect particle objects. It can represent the unit direction vector of the j-th associated special effects particle object relative to the current special effects particle object i. ij It can be represented as the particle distance of the j-th associated effect particle object relative to the current effect particle object i. - It can be represented as the preset particle motion direction.
[0113] In this embodiment, determining the aggregation vector resulting from the influence of associated special effects particle objects on the current special effects particle object may include: determining the aggregation vector resulting from the influence of associated special effects particle objects on the current special effects particle object based on the movement speed of each associated special effects particle object and a preset particle aggregation intensity coefficient. The preset particle aggregation intensity coefficient can be set according to actual needs and is not specifically limited here. In this embodiment, the method for setting the particle aggregation intensity coefficient and the method for setting the control intensity coefficient may be the same or different.
[0114] Specifically, the velocity of each associated special effects particle object at the current moment is determined. Then, based on the velocity of each associated special effects particle object at the current moment and the preset particle aggregation intensity coefficient, the aggregation vector obtained by the current special effects particle object being affected by the associated special effects particle objects is determined.
[0115] Optionally, determining the aggregation vector of the current special effects particle object affected by the associated special effects particle objects based on the motion speed of each associated special effects particle object and the preset particle aggregation intensity coefficient may include: summing the motion speeds of all associated special effects particle objects to obtain a second summation result; and determining the aggregation vector of the current special effects particle object affected by the associated special effects particle objects based on the second summation result and the preset particle aggregation intensity coefficient.
[0116] The second summation result can be obtained by summing the motion velocities of all associated special effects particle objects. Optionally, based on the second summation result and a preset particle aggregation intensity coefficient, determining the aggregation vector of the current special effects particle object affected by associated special effects particle objects includes: multiplying the second summation result and the preset particle aggregation intensity coefficient to obtain the multiplication result, which is the aggregation vector of the current special effects particle object affected by associated special effects particle objects.
[0117] Alternatively, the aggregation vector resulting from the influence of associated special effects particle objects on the current special effects particle object can be determined using the following formula:
[0118]
[0119] in, It can be represented as the aggregation vector obtained by the influence of the current special effect particle object i on the associated special effect particle object j. K align It can be expressed as a preset particle aggregation intensity coefficient. It can be represented as the velocity of the associated special effects particle object j at the current moment.
[0120] In this embodiment of the disclosure, determining the convergence vector obtained by the influence of associated special effects particle objects on the current special effects particle object may include: determining the second particle position of each associated special effects particle object, and determining the center position of the group center of the special effects particle object group obtained based on each associated special effects particle object according to the second particle position; determining the third particle position of the current special effects particle object, and determining the movement direction vector of the current special effects particle object towards the group center according to the center position and the third particle position; and determining the convergence vector obtained by the influence of associated special effects particle objects on the current special effects particle object according to the movement direction vector and a preset particle convergence intensity coefficient.
[0121] The second particle position can be understood as the location of the associated special effects particle object in the game scene. The special effects particle object group can be understood as a group composed of various associated special effects particle objects. The center position can be understood as the position located at the center of the group composed of various associated special effects particle objects. The third particle position can be understood as the current special effects particle object's location in the game scene. The movement direction vector can be used to determine the current special effects particle object's movement towards the group center.
[0122] Specifically, the position of each associated special effect particle object in the game scene is determined, i.e., the position of each second particle. Then, based on the positions of each second particle, the center position of the group of special effect particle objects is determined. Next, the third particle position of the current special effect particle object can be determined. Then, based on the center position and the third particle position, the movement direction vector of the current special effect particle object towards the group center is determined. Finally, the movement direction vector and a preset particle convergence intensity coefficient are multiplied to obtain the multiplication result, which is the convergence vector obtained by the current special effect particle object under the influence of associated special effect particle objects.
[0123] Optionally, the convergence vector obtained by the influence of associated special effects particle objects on the current special effects particle object is determined by the following formula:
[0124]
[0125] in, It can be represented as the convergence vector obtained by the influence of the current special effect particle object i on the associated special effect particle objects. K coh It can be represented as a preset particle convergence intensity coefficient. P J This can represent the position of the associated special effects particle object j in the game scene. i This can be represented as the position of the current special effect particle object i in the game scene. k can be represented as the number of all associated special effect particle objects.
[0126] S330. Based on the separation vector, aggregation vector, and convergence vector, determine the behavior vector obtained by the influence of the current special effects particle object on the associated special effects particle object.
[0127] Specifically, the separation vector, aggregation vector, and convergence vector are summed to obtain the summation result, which is the behavior vector of the current special effects particle object affected by the associated special effects particle objects.
[0128] S340. Determine the motion vector of the current special effects particle object based on the control vector and behavior vector, and control the movement of the current special effects particle object relative to the virtual character based on the motion vector.
[0129] Optionally, the motion vector of the current special effects particle object can be determined using the following formula:
[0130]
[0131] in, It can be represented as the motion vector of the current special effects particle object i. It can be represented as the separation vector obtained by the influence of the current special effect particle object i on the associated special effect particle objects. It can be represented as the aggregation vector obtained by the influence of the current special effect particle object i on the associated special effect particle objects. It can be represented as the convergence vector obtained by the influence of the current special effect particle object i on the associated special effect particle objects. It can be represented as the control vector of the current special effects particle object i being controlled by the virtual character.
[0132] Specifically, we can first sum the separation vector, aggregation vector, and convergence vector obtained by the current special effects particle object from the influence of associated special effects particle objects to obtain the behavior vector of the current special effects particle object under the influence of associated special effects particle objects. Then, we sum the behavior vector and the control vector of the current special effects particle object controlled by the virtual character to obtain the motion vector of the current special effects particle object at the current moment.
[0133] Alternatively, the motion of the current special effects particle object relative to the virtual character can be represented by the following formula:
[0134]
[0135] in This can be understood as the position of the current special effect particle object i in the game scene at the next moment. i This can be understood as the position of the current special effect particle object i in the game scene at the current moment. This can be understood as the motion vector that the special effects particle object should experience at the current moment.
[0136] The technical solution of this disclosure determines the separation vector, aggregation vector, and convergence vector of the current special effects particle object affected by the associated special effects particle object; based on the separation vector, aggregation vector, and convergence vector, it determines the behavior vector of the current special effects particle object affected by the associated special effects particle object, so that when the associated special effects particle object moves relative to the virtual character, it can not only exhibit intelligent reactions with local obstacle avoidance function, but also present the coordination and consistency of global movement, while effectively maintaining a dynamic balance state.
[0137] Figure 13 This is a schematic diagram of a special effects processing device provided in an embodiment of this disclosure. The special effects processing device can be used in a terminal device, which provides a graphical user interface (GUI) that displays a game scene. The game scene includes a virtual character controlled and operated via the terminal device. Figure 13 As shown, the special effects processing device includes: a particle generation module 410, an event response module 420, and a particle control module 430.
[0138] The particle generation module 410 is used to release special effect items in the game scene in response to the item release operation for the virtual character, so as to generate multiple special effect particle objects; the event response module 420 is used to determine the control vector of the current special effect particle object controlled by the virtual character and the behavior vector of the current special effect particle object affected by the associated special effect particle objects for each of the multiple special effect particle objects in response to the generation event of the current special effect particle object; wherein the associated special effect particle objects are at least some of the other special effect particle objects; the particle control module 430 is used to determine the motion vector of the current special effect particle object based on the control vector and the behavior vector, and control the movement of the current special effect particle object relative to the virtual character based on the motion vector.
[0139] The technical solution of this embodiment utilizes a particle generation module 410 to release special effect items in a game scene in response to an item release operation targeting a virtual character, thereby generating multiple special effect particle objects. An event response module 420, for each of the multiple special effect particle objects, determines the control vector controlled by the virtual character and the behavior vector influenced by associated special effect particle objects in response to the current special effect particle object's generation event. This technical solution precisely controls the movement of the special effect particle objects through control vectors, ensuring that the special effect particle objects closely follow the virtual character's control intentions, enhancing the correlation and coordination between the special effects and the virtual character. Furthermore, the behavior vectors can more accurately simulate the interactions between particles, making the particle effects more delicate and realistic, effectively improving the overall quality of the particle effects. The particle control module 430 determines the motion vector of the current special effect particle object based on the control vector and behavior vectors, and controls the movement of the current special effect particle object relative to the virtual character based on the motion vectors. In this way, special effects particles can change accordingly based on the virtual character's movements, making the interaction between particle effects and the virtual character more natural and realistic. This improves the matching accuracy between particle movement and character actions, and enhances the coordination of the scene. The technical solution in this embodiment solves the problems in related technologies where particle movement control rules in particle systems are fixed and singular, making it difficult for particles to respond naturally and reasonably based on the virtual character's controlled actions, resulting in a disconnect between special effects and character behavior, and an inability to accurately simulate complex interactions between particles, leading to less refined and realistic special effects.
[0140] In some embodiments of this disclosure, the particle control module 430 is used to control the current special effects particle object to move along a preset direction under the action of the motion vector, so as to move away from the virtual character; wherein, the preset direction and the direction of the control vector are the same.
[0141] In some embodiments of this disclosure, the event response module 420 includes a control vector determination submodule; wherein, the control vector determination submodule is used to determine the preset control intensity coefficient of the current special effects particle object being controlled by the virtual character, the first particle position of the current special effects particle object, and the character position of the virtual character; and to determine the control vector of the current special effects particle object being controlled by the virtual character based on the preset control intensity coefficient, the first particle position, and the character position.
[0142] In some embodiments of this disclosure, the event response module 420 includes a behavior vector determination submodule; wherein, the behavior vector determination submodule is used to determine the separation vector, aggregation vector, and convergence vector obtained by the current special effects particle object being affected by the associated special effects particle object; wherein, the separation vector is used to control the current special effects particle object to avoid colliding with the associated special effects particle object, the aggregation vector is used to control the current special effects particle object to move closer to the associated special effects particle object, and the convergence vector is used to control the movement direction of the current special effects particle object to tend to be consistent with the movement direction of the associated special effects particle object; based on the separation vector, aggregation vector, and convergence vector, the behavior vector obtained by the current special effects particle object being affected by the associated special effects particle object is determined.
[0143] In some embodiments of this disclosure, the behavior vector determination submodule includes a separation vector determination unit; the separation vector determination unit includes a total repulsion vector determination subunit and a separation vector determination subunit. The total repulsion vector determination subunit is used to determine the repulsion vector of each associated special effect particle object to the current special effect particle object, summing the repulsion vectors to obtain a first summation result, and determining the total repulsion vector of all associated special effect particle objects to the current special effect particle object based on the first summation result. The separation vector determination subunit is used to determine the separation vector of the current special effect particle object affected by the associated special effect particle objects based on the total repulsion vector, a preset particle separation intensity coefficient, and a preset particle motion direction; wherein the preset particle motion direction is used to control the current special effect particle object to move away from each associated special effect particle object.
[0144] In some embodiments of this disclosure, a total repulsion vector determination subunit is used to determine, for each associated special effects particle object, the unit direction vector and particle distance of the associated special effects particle object relative to the current special effects particle object, calculate the ratio of the unit direction vector and particle distance, and use the ratio result as the repulsion vector of the associated special effects particle object to the current special effects particle object.
[0145] In some embodiments of this disclosure, the behavior vector determination submodule includes an aggregation vector determination unit. The aggregation vector determination unit is used to determine the aggregation vector resulting from the influence of associated special effects particle objects on the current special effects particle object, based on the movement speed of each associated special effects particle object and a preset particle aggregation intensity coefficient.
[0146] In some embodiments of this disclosure, the aggregation vector determination unit is used to sum the motion velocities of all associated special effects particle objects to obtain a second summation result, and based on the second summation result and a preset particle aggregation intensity coefficient, to determine the aggregation vector obtained by the current special effects particle object being affected by the associated special effects particle objects.
[0147] In some embodiments of this disclosure, the behavior vector determination submodule includes a convergence vector determination unit. The convergence vector determination unit is used to determine the second particle position of each associated special effects particle object; determine the center position of the group center of the special effects particle object group based on each associated special effects particle object according to the second particle position; determine the third particle position of the current special effects particle object; determine the movement direction vector of the current special effects particle object moving towards the group center according to the center position and the third particle position; and determine the convergence vector obtained by the current special effects particle object being influenced by the associated special effects particle objects based on the movement direction vector and a preset particle convergence intensity coefficient.
[0148] In some embodiments of this disclosure, the special effects processing apparatus further includes a vertex offset processing module. This vertex offset processing module is configured to, in response to a generation event of a current special effects particle object, determine a vertex offset map of the particle model of the current special effects particle object, determine the vertex offset of each model vertex on the particle model based on the vertex offset map, and adjust the vertex offset of each model vertex for each model particle based on a preset offset intensity coefficient, a motion vector, and the vertex position of the model vertex in model space.
[0149] In some embodiments of this disclosure, a vertex offset processing module is used to sample the vertex offset map to determine the sampled value of each model vertex on the particle model on the vertex offset map; based on the sampled value and a preset sampling intensity coefficient, the vertex offset of the model vertex along its own normal direction is determined.
[0150] In some embodiments of this disclosure, the special effects processing apparatus further includes a particle feathering processing module. The particle feathering processing module is configured to, in response to a generation event of a current special effects particle object, determine the particle depth value of the current special effects particle object and the scene depth value of the game scene, calculate the difference between the particle depth value and the scene depth value; based on the difference and a first particle feathering intensity coefficient, obtain the particle feathering intensity of the current special effects particle object, and perform feathering processing on the current special effects particle object based on the particle feathering intensity.
[0151] In some embodiments of this disclosure, the special effects processing apparatus further includes a particle feathering update module; wherein, after feathering the current special effects particle object, the method further includes: updating the feathering processing result of the current special effects particle object based on the motion vector of the current special effects particle object, the second particle feathering intensity coefficient, and the vertex position of each model vertex on the particle model of the current special effects particle object.
[0152] In some embodiments of this disclosure, the special effects processing device further includes a special effects particle object parameter configuration module; wherein, the special effects particle object parameter configuration module is used to determine special effects particle object configuration information through a particle information configuration interface before responding to an item release operation for a virtual character, wherein the special effects particle object configuration information includes the number of special effects particle objects and particle motion attribute information.
[0153] The special effects processing apparatus provided in this disclosure can execute the special effects processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method.
[0154] It is worth noting that the various units and modules included in the above-mentioned special effects processing device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.
[0155] Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0156] like Figure 14As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0157] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0158] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as special effects processing methods.
[0159] In some embodiments, the special effects processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via read-only memory (ROM) 12 and / or communication unit 19. When the computer program is loaded into random access memory (RAM) 13 and executed by processor 11, one or more steps of the special effects processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the special effects processing method by any other suitable means (e.g., by means of firmware).
[0160] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0161] Computer programs used to implement the special effects processing methods of this disclosure can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0162] This disclosure provides a computer-readable storage medium storing computer instructions for causing a processor to execute a special effects processing method. The method provides a graphical user interface (GUI) via a terminal device, displaying a game scene. The game scene includes a virtual character controlled by the terminal device. In response to an item release operation targeting the virtual character, a special effects item is released in the game scene to generate multiple special effects particle objects. For each of the multiple special effects particle objects, in response to a generation event of the current special effects particle object, a control vector controlled by the virtual character is determined for the current special effects particle object, and a behavior vector is determined for the current special effects particle object influenced by associated special effects particle objects. The associated special effects particle objects are at least some of the remaining special effects particle objects. Based on the control vector and the behavior vector, a motion vector for the current special effects particle object is determined, and the motion vector is used to control the movement of the current special effects particle object relative to the virtual character.
[0163] In the context of this disclosure, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0164] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0165] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0166] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0167] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of embodiments of this disclosure.
[0168] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements a special effects processing method according to any embodiment of this disclosure.
[0169] In implementing a computer program product, computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0170] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this disclosure can be achieved, and this is not limited herein.
[0171] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A special effects processing method, characterized in that, A graphical user interface is provided through a terminal device, which displays the game scene; The game scene includes a virtual character controlled and operated via the terminal device, and the method includes: In response to an item release operation targeting the virtual character, special effect items are released in the game scene to generate multiple special effect particle objects; For each of the plurality of special effect particle objects, in response to the generation event of the current special effect particle object, a control vector controlled by the virtual character for the current special effect particle object is determined, and a behavior vector obtained by the influence of associated special effect particle objects on the current special effect particle object is determined; wherein, the associated special effect particle objects are at least some of the other special effect particle objects; The motion vector of the current special effects particle object is determined based on the control vector and the behavior vector, and the motion of the current special effects particle object relative to the virtual character is controlled based on the motion vector.
2. The method according to claim 1, characterized in that, The step of controlling the movement of the current special effects particle object relative to the virtual character based on the motion vector includes: The current special effects particle object is controlled to move along a preset direction under the action of the motion vector, so as to move away from the virtual character; wherein the preset direction and the direction of the control vector are the same.
3. The method according to claim 1, characterized in that, The step of determining the control vector by which the current special effects particle object is controlled by the virtual character includes: Determine the preset control intensity coefficient of the current special effects particle object being controlled by the virtual character, the first particle position of the current special effects particle object, and the character position of the virtual character; Based on the preset control intensity coefficient, the position of the first particle, and the position of the character, the control vector of the current special effect particle object being controlled by the virtual character is determined.
4. The method according to claim 1, characterized in that, The determination of the behavior vector obtained by the influence of the current special effects particle object on the associated special effects particle object includes: Determine the separation vector, aggregation vector, and convergence vector obtained by the influence of the current special effects particle object on the associated special effects particle object; wherein, the separation vector is used to control the current special effects particle object to avoid colliding with the associated special effects particle object, the aggregation vector is used to control the current special effects particle object to move closer to the associated special effects particle object, and the convergence vector is used to control the movement direction of the current special effects particle object to tend to be consistent with the movement direction of the associated special effects particle object; Based on the separation vector, the aggregation vector, and the convergence vector, the behavior vector of the current special effects particle object is determined by the influence of the associated special effects particle object.
5. The method according to claim 4, characterized in that, The step of determining the separation vector obtained by the influence of the current special effects particle object on the associated special effects particle object includes: Determine the repulsion vector of each associated special effects particle object to the current special effects particle object, sum the repulsion vectors to obtain a first summation result, and determine the total repulsion vector of all associated special effects particle objects to the current special effects particle object based on the first summation result; Based on the total repulsion vector, the preset particle separation intensity coefficient, and the preset particle motion direction, the separation vector obtained by the influence of the current special effects particle object on the associated special effects particle objects is determined; wherein, the preset particle motion direction is used to control the current special effects particle object to move away from each of the associated special effects particle objects.
6. The method according to claim 5, characterized in that, Determining the repulsion vector of each associated special effects particle object to the current special effects particle object includes: For each associated special effects particle object, determine the unit direction vector and particle distance of the associated special effects particle object relative to the current special effects particle object, calculate the ratio of the unit direction vector and the particle distance, and use the ratio result as the repulsion vector of the associated special effects particle object to the current special effects particle object.
7. The method according to claim 4, characterized in that, Determining the aggregation vector obtained by the influence of the current special effects particle object on the associated special effects particle objects includes: Based on the movement speed of each associated special effects particle object and the preset particle aggregation intensity coefficient, the aggregation vector obtained by the current special effects particle object being affected by the associated special effects particle objects is determined.
8. The method according to claim 7, characterized in that, The step of determining the aggregation vector of the current special effects particle object affected by the associated special effects particle objects based on the movement speed of each associated special effects particle object and a preset particle aggregation intensity coefficient includes: The motion velocities of all the associated special effects particle objects are summed to obtain a second summation result. Based on the second summation result and the preset particle aggregation intensity coefficient, the aggregation vector obtained by the current special effects particle object being affected by the associated special effects particle objects is determined.
9. The method according to claim 4, characterized in that, Determining the convergence vector obtained by the influence of the current special effects particle object on the associated special effects particle objects includes: Determine the second particle position of each of the associated special effects particle objects, and determine the center position of the group center of the group of special effects particle objects based on each of the associated special effects particle objects according to the second particle position; Determine the position of the third particle of the current special effects particle object, and determine the movement direction vector of the current special effects particle object towards the center of the group based on the center position and the position of the third particle; Based on the movement direction vector and the preset particle convergence intensity coefficient, the convergence vector obtained by the current special effect particle object being affected by the associated special effect particle object is determined.
10. The method according to claim 1, characterized in that, Following the event of generating the current special effects particle object, the method further includes: Determine the vertex offset texture of the particle model of the current special effects particle object, and determine the vertex offset of each model vertex on the particle model based on the vertex offset texture; For each model vertex of the model particle, the vertex offset is adjusted based on a preset offset intensity coefficient, the motion vector, and the vertex position of the model vertex in the model space.
11. The method according to claim 10, characterized in that, The process of determining the vertex offset of each model vertex on the particle model based on the vertex offset map includes: The vertex offset map is sampled to determine the sampled value of each model vertex on the particle model in the vertex offset map; Based on the sampled values and the preset sampling intensity coefficient, the vertex offset of the model vertex along its own normal direction is determined.
12. The method according to claim 1, characterized in that, Following the event of generating the current special effects particle object, the method further includes: Determine the particle depth value of the current special effects particle object and the scene depth value of the game scene, and calculate the difference between the particle depth value and the scene depth value; Based on the difference and the first particle feathering intensity coefficient, the particle feathering intensity of the current special effects particle object is obtained, and the current special effects particle object is feathered based on the particle feathering intensity.
13. The method according to claim 12, characterized in that, After feathering the current special effects particle object, the method further includes: The feathering result of the current special effects particle object is updated based on the motion vector of the current special effects particle object, the second particle feathering intensity coefficient, and the vertex position of each model vertex on the particle model of the current special effects particle object.
14. The method according to claim 1, characterized in that, Prior to the response to the item release operation for the virtual character, the method further includes: The configuration information of special effects particle objects is determined through the particle information configuration interface; wherein, the configuration information of special effects particle objects includes the number of special effects particle objects and particle motion attribute information.
15. A special effects processing device, characterized in that, Applied to a terminal device, the terminal device provides a graphical user interface that displays a game scene; The game scene includes a virtual character controlled and operated via the terminal device, and the device includes: The particle generation module is used to release special effect items in the game scene in response to the item release operation for the virtual character, so as to generate multiple special effect particle objects. An event response module is configured to, for each of the plurality of special effect particle objects, in response to the generation event of the current special effect particle object, determine the control vector of the current special effect particle object controlled by the virtual character, and determine the behavior vector of the current special effect particle object affected by associated special effect particle objects; wherein, the associated special effect particle objects are at least some of the other special effect particle objects; The particle control module is used to determine the motion vector of the current special effects particle object based on the control vector and the behavior vector, and to control the movement of the current special effects particle object relative to the virtual character based on the motion vector.
16. An electronic device, characterized in that, Its features are, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the special effects processing method as described in any one of claims 1-14.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the special effects processing method according to any one of claims 1-14.
18. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the special effects processing method according to any one of claims 1-14.