Method, device and electronic equipment for controlling particle animation effects

By determining the particle orientation based on the positional information of the virtual character and the virtual camera in the game, the problem of mismatch between the particle release orientation and the virtual character orientation is solved, thereby improving the realism of the particle animation effect and the user's visual experience.

CN116236780BActive Publication Date: 2026-03-20NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-08
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In game scenarios, changes in the virtual character's posture can cause a mismatch between the direction in which particles are released and the direction in which the character is facing, affecting the user's visual experience.

Method used

By receiving instructions from a virtual character to release particle animation effects, the orientation of the particles is determined using the positional information of the virtual character and the virtual camera. Combined with cross product operations and matrix transformations, the release direction of the particle animation effects is controlled to match the orientation of the virtual character.

Benefits of technology

It improves the realism of particle animation effects and enhances the user's visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116236780B_ABST
    Figure CN116236780B_ABST
Patent Text Reader

Abstract

The present application provides a kind of particle animation effect control method, device and electronic equipment, wherein the method comprises: receiving the release instruction of target particle animation effect released by virtual character;Determine the particle orientation information of target particle animation effect based on the first position information of virtual character and the specified position information of virtual camera corresponding to virtual character;Wherein, specified position information includes: the specified position information of the position with specified distance from virtual camera in specified direction;Based on particle orientation information, control release target particle animation effect.In this way, based on the related parameters of virtual character and virtual camera, the particle orientation is determined, and then the particle animation is released based on the particle orientation;This way can control the direction of particle animation release and the orientation of virtual character match, and follow the orientation change of virtual character, thereby improving the realism of particle animation effect, improve the user visual experience.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of games, and in particular to a particle animation effect control method and device and electronic equipment. BACKGROUND

[0002] A particle special effect is a combination of numerous individual particles to present a fixed form, and the motion of the whole or individual particles is controlled by a controller to simulate a real effect. In related technologies, a virtual engine can implement the connection of a particle special effect to a virtual character. After the connection, the virtual character has the function of triggering and releasing the particle special effect. After the particle special effect is triggered, the particles are released in a specific direction, thereby displaying the particle special effect. However, in a game scene, the virtual character constantly changes poses and has multiple orientations, and the orientation of the particle release may not match the orientation of the virtual character, which affects the visual experience of a user. SUMMARY

[0003] Therefore, the present application aims to provide a particle animation effect control method and device and electronic equipment to control the orientation of a particle animation release to match the orientation of a virtual character and follow the orientation change of the virtual character, improve the realism of the particle animation effect, and improve the visual experience of a user.

[0004] In a first aspect, an embodiment of the present application provides a particle animation effect control method, which includes: receiving a release instruction of a target particle animation effect released by a virtual character; determining particle orientation information of the target particle animation effect based on first position information of the virtual character and specified position information of a virtual camera corresponding to the virtual character; wherein the specified position information includes specified position information of a position having a specified distance from the virtual camera in a specified direction; and controlling the release of the target particle animation effect based on the particle orientation information.

[0005] The step of determining the particle orientation information of the target particle animation effect based on the first position information of the virtual character and the specified position information of the virtual camera corresponding to the virtual character includes: determining front direction information of the target particle animation effect according to the first position information of the virtual character and the specified position information of the virtual camera corresponding to the virtual character; wherein the front direction information includes direction information of a front direction based on the orientation of the target particle animation effect; and determining the particle orientation information of the target particle animation effect based on the front direction information.

[0006] The step of determining the front direction information of the target particle animation effect according to the first position information of the virtual role and the specified position information of the virtual camera corresponding to the virtual role comprises: determining the specified position information of the position with the specified distance from the virtual camera in the orientation direction of the virtual camera; and determining the front direction information of the target particle animation effect based on the specified position information and the first position information of the virtual role.

[0007] The step of determining the particle orientation information of the target particle animation effect based on the front direction information comprises: performing cross product operation on the front direction information and preset upper direction information to obtain right direction information of the target particle animation effect; the right direction information comprises direction information of the right side direction based on the orientation of the target particle animation effect; and the front direction information, the right direction information and the preset upper direction information are determined as the particle orientation information of the target particle animation effect.

[0008] The particle orientation information comprises particle orientation information in a world space coordinate system in which the virtual role is located; and the step of controlling the release of the target particle animation effect based on the particle orientation information comprises: obtaining orientation offset information of the virtual role; the orientation offset information comprises orientation offset information between a first orientation of the virtual role in the world space coordinate system and a second orientation of the virtual role in a role model space coordinate system; converting the particle orientation information in the world space coordinate system to particle orientation information in the role model space coordinate system based on the orientation offset information; and controlling the release of the target particle animation effect based on the particle orientation information in the role model space coordinate system.

[0009] The step of converting the particle orientation information in the world space coordinate system to the particle orientation information in the role model space coordinate system based on the orientation offset information comprises: performing matrix calculation on the particle orientation information in the world space coordinate system, the first orientation of the virtual role in the world space coordinate system and the orientation offset information to obtain the particle orientation information in the role model space coordinate system.

[0010] The step of controlling the release of the target particle animation effect based on the particle orientation information comprises: controlling the release of the particle along the direction indicated by the particle orientation information, and displaying the target particle animation effect generated by the particle in the release process.

[0011] In a second aspect, the embodiments of the present application further provide a particle animation effect control device, comprising: a release instruction receiving module configured to receive a release instruction of a virtual character releasing a target particle animation effect; a particle orientation information determining module configured to determine particle orientation information of the target particle animation effect based on first position information of the virtual character and specified position information of a virtual camera corresponding to the virtual character; wherein the specified position information comprises specified position information of a position having a specified distance from the virtual camera in a specified direction; and a control module configured to control the release of the target particle animation effect based on the particle orientation information.

[0012] In a third aspect, the embodiments of the present application further provide an electronic device, comprising a processor and a memory, wherein the memory stores machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to implement the particle animation effect control method described above.

[0013] In a fourth aspect, the embodiments of the present application further provide a machine readable storage medium, wherein the machine readable storage medium stores machine executable instructions, and the machine executable instructions, when invoked and executed by a processor, cause the processor to implement the particle animation effect control method described above.

[0014] The embodiments of the present application bring the following beneficial effects:

[0015] The particle animation effect control method, device and electronic device described above receive a release instruction of a virtual character releasing a target particle animation effect; determine particle orientation information of the target particle animation effect based on first position information of the virtual character and specified position information of a virtual camera corresponding to the virtual character; wherein the specified position information comprises specified position information of a position having a specified distance from the virtual camera in a specified direction; and control the release of the target particle animation effect based on the particle orientation information. In this way, the particle orientation is determined based on the relevant parameters of the virtual character and the virtual camera, and then the particle animation is released based on the particle orientation; this way can control the direction of the particle animation release to match the orientation of the virtual character and follow the changes in the orientation of the virtual character, thereby improving the realism of the particle animation effect and improving the user visual experience.

[0016] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application will be realized and achieved by the structure particularly pointed out in the description, claims and drawings.

[0017] In order to make the above objectives, characteristics and advantages of the present application more apparent and easy to understand, the following preferred embodiments are specifically described below, and the accompanying drawings are referred to. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the specific embodiments of the present application or the prior art, the accompanying drawings required to be used in the description of the specific embodiments or the prior art will be briefly introduced. Obviously, the accompanying drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0019] Figure 1 A flow chart of a particle animation effect control method provided for an embodiment of the present application is shown in

[0020] Figure 2 A flow chart of another particle animation effect control method provided for an embodiment of the present application is shown in

[0021] Figure 3 A structural schematic diagram of a particle animation effect control device provided for an embodiment of the present application is shown in

[0022] Figure 4 A structural schematic diagram of an electronic device provided for an embodiment of the present application is shown in DETAILED DESCRIPTION

[0023] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort fall within the protection scope of the present application.

[0024] At present, special effects in game characters are usually hung on the characters by art workers, and the special effects are oriented in advance, usually in a certain direction, and the special effect orientation cannot be changed with the character orientation. On the other hand, the special effects can also be hung by program workers, but the hung special effects are not convenient to modify and debug, and need repeated communication and modification between art workers and program workers, which increases the communication and time cost.

[0025] Based on the above, the embodiments of the present application provide a particle animation effect control method, device and electronic device, which can be applied to game engines and animation film and television engines, and used in games or other three-dimensional scenes for particle animation effect control and display.

[0026] In order to facilitate the understanding of the present embodiment, first, a particle animation effect control method disclosed by the present embodiment will be introduced in detail, as shown in the figure, the method comprises: Figure 1

[0027] ​Step S102, receiving a release instruction of a virtual character releasing a target particle animation effect;

[0028] In games and other virtual scenes, virtual characters are created by constructing three-dimensional models. The game world includes various elements such as environment, virtual characters, NPC (Non-Player Character), etc., and each virtual character has its specific identity and unique skills. When using skills, it will be accompanied by the release of animation effects. Animation effects include: sequence frame animation effects, skeletal animation effects, and particle animation effects, etc. Among them, the effects realized by sequence frame animation and skeletal animation are similar, while particle animation effects are generally used for special effects, such as fire, flash, etc. Particle animation effects can be specific light effects in a virtual world, which consist of an emitter, an effector, and a destroyer. The emitter can be bound to a virtual object and move with the virtual object while emitting particles; the effector acts on the emitted particles and can affect the color, brightness, position, and other attributes of the particles; the destroyer is responsible for destroying the particles.

[0029] In an implementation manner, when a user clicks on a specified operation position corresponding to a skill, the system receives a release instruction of a virtual character releasing a target particle animation effect, and after receiving the release instruction, the system releases the animation effect of the target particle based on a preset particle animation effect. In the game world, the user controls the virtual character to participate in the plot task and interact with the NPC. Since each virtual character has a different identity or character, the skills they have are also different. Usually, each skill corresponds to at least one animation effect, and when the user uses a certain skill, the virtual character will release the animation effect of the skill, providing the user with a better visual experience.

[0030] Step S104, determining particle orientation information of the target particle animation effect based on the first position information of the virtual character and specified position information of a virtual camera corresponding to the virtual character; wherein the specified position information includes specified position information of a position having a specified distance from the virtual camera in a specified direction;

[0031] In all scenes, each object carries a transformation matrix to record its position and orientation information. When a point is first defined in a scene, its coordinates are defined in the world space, and the coordinates of the point are defined relative to the global or world Cartesian coordinate system. The coordinate system has an origin with coordinates [0, 0, 0], and the coordinates of any point defined in the space are defined relative to the origin. The world coordinate system is a convention for defining the coordinates [0, 0, 0] and three unit axes orthogonal to each other in a 3D virtual space, which is a reference for measuring any other point or any other arbitrary coordinate system.

[0032] The virtual camera shoots in the world space, and the obtained scene picture is displayed on the terminal device. The user observes the scene in the world space through the virtual camera. The virtual camera is equivalent to the eyes of the user, and controls the position of the view point of the user and the size of the view of the user. In the third-person game, the virtual camera is located at a certain position behind the virtual character. In the scene picture, the shadow of the virtual character is displayed, that is, the position of the view point of the user is placed at a certain distance behind the virtual character. The game that needs to be observed globally places the position of the view point of the user at a very high position from the ground.

[0033] In a specific implementation manner, when the virtual character issues the release instruction, the position information of the virtual character in the game world space, that is, the first position information, can be obtained from the change matrix of the virtual character.

[0034] In the general third-person game, the virtual camera keeps a certain distance from the virtual character, and the virtual camera is always aimed at the virtual character played by the user. Therefore, the orientation of the virtual camera is associated with the orientation of the virtual character. The specified position information of the virtual camera corresponding to the virtual character can be determined based on the position and the orientation of the virtual camera. It should be noted that if the position information of the virtual camera is referred to when the particle orientation information is determined, because the virtual camera has multiple orientations at the same position, the single position information of the virtual camera cannot indicate the orientation of the virtual character, which may cause the obtained particle orientation information to be inconsistent with the orientation of the virtual character. The specified position information includes a position having a specified distance from the virtual camera in a specified direction. The specified direction can be related to the orientation of the virtual camera, for example, the specified direction has a certain angle with the orientation direction of the virtual camera, or the specified direction is the orientation of the virtual camera. In this way, the obtained particle orientation can be matched with the orientation of the virtual character.

[0035] After the first position information of the virtual character and the specified position information of the virtual character and the corresponding virtual camera are determined, the first position information and the specified position information are subjected to matrix operation or vector operation to obtain the particle orientation information.

[0036] In step S106, the target particle animation effect is controlled based on the particle orientation information.

[0037] When the target particle animation effect is released, the particle orientation information can control the release direction of the target particle, so that the release direction of the target particle is matched with the particle orientation information. In addition, other control parameters can be set, for example, the color, distance, display duration, etc. of the particle release, so as to accurately control the display effect of the target particle animation.

[0038] The control method of the particle animation effect receives a release instruction of a virtual character releasing a target particle animation effect; determines particle orientation information of the target particle animation effect based on first position information of the virtual character and specified position information of a virtual camera corresponding to the virtual character; wherein the specified position information includes specified position information of a position having a specified distance from the virtual camera in a specified direction; and controls the release of the target particle animation effect based on the particle orientation information. In this way, the particle orientation is determined based on relevant parameters of the virtual character and the virtual camera, and the particle animation is released based on the particle orientation; the direction of the release of the particle animation can be controlled to match the orientation of the virtual character and to change with the orientation of the virtual character, thereby improving the realism of the particle animation effect and improving the visual experience of the user.

[0039] The following embodiments provide a specific implementation of determining particle orientation information.

[0040] Specifically, the front direction information of the target particle animation effect is determined based on the first position information of the virtual character and the specified position information of the virtual camera corresponding to the virtual character; wherein the front direction information includes direction information of a front direction based on the orientation of the target particle animation effect; and the particle orientation information of the target particle animation effect is determined based on the front direction information.

[0041] The first position information of the virtual character and the specified position information of the virtual camera corresponding to the virtual character can be obtained through a transformation matrix carried by the virtual character and the virtual camera in a game world space; each object carries a transformation matrix in all scenes in the game world space, and the position vector and the orientation information of the object in the world space can be obtained through the transformation matrix. In actual implementation, the front direction information of the target particle animation effect can be obtained by subtracting the vector corresponding to the first position information of the virtual character from the specified position information of the virtual camera. The front direction information includes direction information of a front direction based on the orientation of the target particle animation effect.

[0042] Based on the above-obtained front direction information, the right direction vector and the upper direction vector of the target particle orientation can be obtained through cross product operation in sequence, and finally the three direction vectors are normalized and combined to determine the particle orientation information of the target particle animation effect.

[0043] The following embodiments provide a specific implementation of determining the front direction of the target particle animation effect.

[0044] Specifically, the specified position information of a position having a specified distance from the virtual camera in the orientation direction of the virtual camera is determined; and the front direction information of the target particle animation effect is determined based on the specified position information and the first position information of the virtual character.

[0045] In the manner, the specified direction in the specified position information of the virtual camera is specifically a direction of the virtual camera, and a position is obtained along the direction, the position has the specified distance from the virtual setting, and the position is the specified position; the specified position information is position information of the specified position in the world space.

[0046] Generally, the virtual camera can have multiple directions, for example, in a situation, the virtual character stands in the front direction, when the virtual camera is in the front direction, the user can see the back of the virtual character and information in front of the virtual character, when the virtual camera is in the downward direction, the user can observe the virtual character from above, and when the virtual camera is in the left direction, the user can observe the information on the right side of the virtual character.

[0047] The above embodiment provides a front direction information of a target particle animation effect, and the following embodiment will provide a particle direction information of the target particle animation effect based on the front direction information.

[0048] Specifically, the front direction information and the preset upward direction information are cross product operated to obtain right direction information of the target particle animation effect; the right direction information includes direction information of the right side direction based on the direction of the target particle animation effect; the front direction information, the right direction information and the preset upward direction information are determined as the particle direction information of the target particle animation effect.

[0049] Based on the obtained front direction information of the target particle animation effect, the right direction information of the target particle animation effect can be obtained through cross product operation. Specifically, when performing vector operation, the front direction information can be expressed in the form of a front direction vector, and the upward direction information can be expressed in the form of a vertical direction vector. The front direction vector and the vertical direction vector are cross product operated to obtain a right direction vector of the target particle animation effect; the right direction vector is the right direction information.

[0050] The preset upward direction information can be specifically (0, 0, 1). Then, the front direction information, the right direction information and the upward direction information are normalized to obtain the particle direction of the target particle animation effect, which is expressed by a world space matrix of the target particle as follows:

[0051]

[0052] In the above matrix, R worldis the particle orientation matrix in the world coordinate system, that is, the particle orientation information described above, wherein, in the three-dimensional vector, x represents the front direction of the particle, y represents the right direction of the particle, and z represents the up direction of the particle. Wherein, (x1, x2, x3) is the particle front direction vector, that is, the aforementioned front direction information, (y1, y2, y3) is the particle right direction vector, that is, the aforementioned right direction information, and (z1, z2, z3) is the particle up direction vector, that is, the aforementioned up direction information. Based on this, the particle orientation information of the target particle animation effect can be determined.

[0053] The following embodiments provide an implementation for controlling the release of the target particle animation effect.

[0054] The particle orientation information includes: particle orientation information in a world space coordinate system in which the virtual character is located; obtaining orientation offset information of the virtual character; wherein the orientation offset information includes: orientation offset information of a first orientation of the virtual character in the world space coordinate system and a second orientation of the virtual character in a character model space coordinate system; converting the particle orientation information in the world space coordinate system to particle orientation information in the character model space coordinate system based on the orientation offset information; and controlling the release of the target particle animation effect based on the particle orientation information in the character model space coordinate system.

[0055] Specifically, relative to the character model space, the world space is the outermost parent space in which the character model space is located, and in the world space, the origin is the center of the game space, and the X, Y and Z axes are fixed. Each character model has its own independent coordinate space, and when the character model moves and rotates, the character model space also moves and rotates.

[0056] The particle orientation information is determined based on the position of the virtual character in the world space and the position and orientation of the virtual camera and other factors, so the particle orientation information is information in the world space coordinate system. Since the particle animation effect needs to be attached to the virtual character, in order to facilitate control, the particle orientation information needs to be converted to the character model space. Based on this, the orientation offset information of the virtual character needs to be obtained first, which can be understood as the difference between the orientation of the virtual character in the actual space coordinate system and the orientation of the virtual character in the character module control coordinate system. Specifically, the first orientation of the virtual character in the world space coordinate system is obtained first, which can be obtained from the transformation matrix of the virtual character in the world space, and the second orientation of the virtual character in the character model space coordinate system is obtained, which can be obtained from the transformation matrix of the virtual character in the character model space. As described above, each virtual character carries a transformation matrix to represent the position, orientation and other information of the virtual character in the world space and the character module space.

[0057] Based on the above orientation offset information, the particle orientation information in the world space coordinate system can be converted to the particle orientation information in the character model space, and then the particle orientation information in the character model space coordinate system is obtained. After obtaining the particle orientation information in the character model space coordinate system, the target particle is controlled to release the animation effect. Based on this, the orientation of the target particle can be kept consistent with the orientation of the virtual character, and when the orientation of the virtual character changes, the orientation of the animation effect released by the target particle will also change.

[0058] The following embodiments provide a specific implementation of converting the particle orientation information in the world space coordinate system to the particle orientation information in the character model space coordinate system.

[0059] The particle orientation information in the world space coordinate system, the first orientation of the virtual character in the world space coordinate system, and the orientation offset information are subjected to matrix calculation to obtain the particle orientation information in the character model space coordinate system.

[0060] Specifically, the transformation method of transforming the orientation information in the world space coordinate system to the particle orientation information in the character model space coordinate system is as follows:

[0061] R particle = R offset × R -1 character × R world

[0062] Wherein, R particle is the orientation matrix of the target particle, that is, the above particle orientation information in the character model space coordinate system; R offset is the offset matrix of the orientation in the character model space coordinate system relative to the orientation in the world space coordinate system, that is, the above orientation offset information; R -1 character is the inverse matrix of the first orientation of the virtual character in the world space coordinate system, R world is the particle orientation matrix in the world space coordinate system, that is, the particle orientation information in the world space coordinate system.

[0063] Since a column matrix is used, it is necessary to perform right multiplication operation, that is, R world right multiplies R -1 character An intermediate result is obtained, and the intermediate result is right multiplied by R offset , that is, the orientation matrix of the target particle is obtained.

[0064] The following provides a specific implementation method of controlling the release of the target particle animation effect.

[0065] Specifically, the particle is controlled to release along the direction indicated by the particle orientation information, and the target particle animation effect generated by the particle in the release process is displayed.

[0066] The target particle orientation matrix calculated above determines the attribute of the target particle, and a target particle special effect with the attribute is attached to the virtual character. When the virtual character releases the particle special effect, the orientation of the particle special effect is controlled by the target particle orientation matrix.

[0067] Based on the above, the embodiment provides another specific method for controlling a particle animation effect, as shown in Figure 2 The method includes the following steps:

[0068] In step S202, a release instruction for releasing a target particle animation effect is received.

[0069] In step S204, front direction information of the target particle animation effect is determined according to first position information of the virtual character and specified position information of a virtual camera corresponding to the virtual character. The front direction information includes direction information of a front direction based on an orientation of the target particle animation effect.

[0070] In step S206, particle orientation information of the target particle animation effect is determined based on the front direction information.

[0071] In step S208, orientation offset information of the virtual character is obtained. The orientation offset information includes orientation offset information between a first orientation of the virtual character in a world space coordinate system and a second orientation of the virtual character in a character model space coordinate system.

[0072] In step S210, the particle orientation information in the world space coordinate system is converted to particle orientation information in the character model space coordinate system based on the orientation offset information.

[0073] In step S212, the target particle animation effect is controlled based on the particle orientation information in the character model space coordinate system.

[0074] When the particle special effect is attached to the virtual character, the special effect can be attached using a montage, which is a multifunctional tool that can realize various animation effects, mainly related to animation controls in the public code or blueprint visual script. In the montage notification menu interface, a new AO attachment can be created by right-clicking the notification. After creation, clicking this AO can open detailed parameters. Before opening the detailed parameters, the particle special effect needs to be attached to the interface of the particle special effect. In one way, the particle special effect is attached to the interface of Niagara. In the animation notification panel interface, the particle special effect is added in NiagaraParticle, and then the values of MaxPitch and MinPitch are set to limit the up-down rotation angle, so that it can match the action of the virtual character, so as to achieve the target effect. If the target effect cannot be achieved by setting the value of Pitch, the mixed AO can also be opened, UseLerpwithAO is clicked, and the values of LerpStart and LerpEnd are set to achieve the target effect.

[0075] In the above-mentioned particle animation effect control method, the special effect orientation changes with the character orientation. This method can be applied to the attachment of cascade and niagara particle effects. In the above-mentioned method, the function of changing the particle orientation with the character orientation is added. Specifically, when the particle is played, the position, direction and other parameters of the virtual character and the virtual camera in the world space coordinate system are obtained. Based on these parameters, the particle orientation information in the world space coordinate system is determined, and then the particle orientation information is converted to the character model space coordinate system, so as to attach the particle special effect to the virtual character. Through the above-mentioned way, the virtual object can realize the attachment of the particle special effect with orientation offset without adjusting the particle special effect through the program. At the same time, the staff can also preview and adjust the particle special effect effect in the editor.

[0076] For the above-mentioned method embodiment, refer to Figure 3 The particle animation effect control device shown in

[0077] The release instruction receiving module 300 is configured to receive a release instruction of a virtual character releasing a target particle animation effect;

[0078] The particle orientation information determining module 302 is configured to determine particle orientation information of the target particle animation effect based on first position information of the virtual character and specified position information of a virtual camera corresponding to the virtual character; and the specified position information includes specified position information of a position having a specified distance from the virtual camera in a specified direction.

[0079] The control module 304 is configured to control the release of the target particle animation effect based on the particle orientation information.

[0080] The control device of the particle animation effect receives a release instruction of a target particle animation effect released by a virtual character; determines particle orientation information of the target particle animation effect based on first position information of the virtual character and specified position information of a virtual camera corresponding to the virtual character; and controls release of the target particle animation effect based on the particle orientation information. In this way, the particle orientation is determined based on relevant parameters of the virtual character and the virtual camera, and the particle animation is released based on the particle orientation. This way can control the direction of the particle animation release to match the orientation of the virtual character and follow the changes in the orientation of the virtual character, thereby improving the realism of the particle animation effect and improving the user visual experience.

[0081] The particle orientation information determination module is further configured to determine front direction information of the target particle animation effect according to the first position information of the virtual character and the specified position information of the virtual camera corresponding to the virtual character; and determine the particle orientation information of the target particle animation effect based on the front direction information.

[0082] The particle orientation information determination module is further configured to determine specified position information of a position having a specified distance from the virtual camera in the orientation direction of the virtual camera; and determine front direction information of the target particle animation effect based on the specified position information and the first position information of the virtual character.

[0083] The particle orientation information determination module is further configured to perform cross product operation on the front direction information and preset upper direction information to obtain right direction information of the target particle animation effect; and determine the particle orientation information of the target particle animation effect based on the front direction information, the right direction information, and the preset upper direction information.

[0084] The particle orientation information includes particle orientation information in a world space coordinate system in which the virtual character is located; the control module is further configured to obtain orientation offset information of the virtual character; the orientation offset information includes orientation offset information between a first orientation of the virtual character in the world space coordinate system and a second orientation of the virtual character in a character model space coordinate system; convert the particle orientation information in the world space coordinate system to particle orientation information in the character model space coordinate system based on the orientation offset information; and control release of the target particle animation effect based on the particle orientation information in the character model space coordinate system.

[0085] The control module is further configured to perform matrix calculation on the particle orientation information in the world space coordinate system, the first orientation of the virtual character in the world space coordinate system, and the orientation offset information, to obtain particle orientation information in a character model space coordinate system.

[0086] The control module is further configured to control the particle to be released along a direction indicated by the particle orientation information, and display a target particle animation effect generated by the particle during the releasing process.

[0087] The embodiment also provides an electronic device including a processor and a memory. The memory stores machine executable instructions capable of being executed by the processor. The processor executes the machine executable instructions to implement the control method of the particle animation effect.

[0088] Referring to Figure 4 The electronic device includes a processor 100 and a memory 101. The memory 101 stores machine executable instructions capable of being executed by the processor 100. The processor 100 executes the machine executable instructions to implement the control method of the particle animation effect.

[0089] Further, Figure 4 The electronic device also includes a bus 102 and a communication interface 103. The processor 100, the communication interface 103, and the memory 101 are connected through the bus 102.

[0090] The memory 101 can include a high-speed random access memory (RAM) and can also include a non-volatile memory such as at least one disk memory. The communication between the system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless). The communication can be achieved through the Internet, a wide area network, a local area network, a metropolitan area network, etc. The bus 102 can be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, Figure 4 Only one bidirectional arrow is used in the figure to represent the bus, but it does not mean that there is only one bus or only one type of bus.

[0091] The processor 100 can be an integrated circuit chip with processing capability. In implementation process, each step of the above method can be completed by integrated logic circuit of hardware in the processor 100 or instruction in the form of software. The processor 100 described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Each method, step and logic block diagram disclosed in the embodiment of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiment of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register, etc. The storage medium in the art. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101, and combines the hardware to complete the steps of the method of the above embodiment.

[0092] The embodiment of the present application also provides a machine readable storage medium, the machine readable storage medium stores machine executable instructions, when the machine executable instructions are called and executed by the processor, the machine executable instructions cause the processor to realize the control method of the particle animation effect.

[0093] The computer program product of the particle animation effect control method, device and electronic equipment provided by the embodiment of the present application includes a computer readable storage medium storing program codes, the instructions included in the program codes can be used to execute the method described in the foregoing method embodiment, and the specific implementation can be referred to the method embodiment, which will not be described here.

[0094] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the foregoing method embodiment, which will not be described here.

[0095] In addition, in the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connecting" should be understood in a broad sense, for example, can be fixedly connected, can be detachably connected, or integrally connected; can be mechanically connected, can be electrically connected; can be directly connected, can be indirectly connected through an intermediate medium, or can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0096] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the part of the present application that essentially contributes to the prior art or the part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0097] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third" are only for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0098] Finally, it should be noted that: the above embodiments are only specific embodiments of the present application, which are used to illustrate the technical solutions of the present application, and are not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can make modifications or easily think of changes to the technical solutions recorded in the foregoing embodiments within the technical scope disclosed by the present application, or make equivalent replacements to some of the technical features; and these modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for controlling particle animation effects, characterized in that, The method includes: Receive the release command from the virtual character to release the target particle animation effect; Based on the first position information of the virtual character and the specified position information of the virtual camera corresponding to the virtual character, the particle orientation information of the target particle animation effect is determined; wherein, the specified position information includes: specified position information of a position having a specified distance from the virtual camera in a specified direction; Based on the particle orientation information, the target particle animation effect is controlled to be released; wherein, the particle orientation information includes: particle orientation information in the world space coordinate system where the virtual character is located; the particle orientation matches the orientation of the virtual character; The step of determining the particle orientation information of the target particle animation effect based on the first position information of the virtual character and the specified position information of the virtual camera corresponding to the virtual character includes: Based on the first position information of the virtual character and the specified position information of the virtual camera corresponding to the virtual character, the forward direction information of the target particle animation effect is determined; wherein, the forward direction information includes: forward direction information based on the orientation of the target particle animation effect; Based on the forward direction information, the particle orientation information of the target particle animation effect is determined.

2. The method according to claim 1, characterized in that, The step of determining the forward direction information of the target particle animation effect based on the first position information of the virtual character and the specified position information of the virtual camera corresponding to the virtual character includes: In the orientation direction of the virtual camera, determine the specified location information of a position at a specified distance from the virtual camera; Based on the specified location information and the first location information of the virtual character, the forward direction information of the target particle animation effect is determined.

3. The method according to claim 1, characterized in that, The step of determining the particle orientation information of the target particle animation effect based on the forward orientation information includes: The forward direction information is cross-producted with the preset upward direction information to obtain the right direction information of the target particle animation effect; wherein, the right direction information includes: the direction information of the right side based on the orientation of the target particle animation effect; The forward direction information, the right direction information, and the preset upward direction information are determined as the particle orientation information for the target particle animation effect.

4. The method according to claim 1, characterized in that, The step of controlling the release of the target particle animation effect based on the particle orientation information includes: Obtain the orientation offset information of the virtual character; wherein, the orientation offset information includes: the orientation offset information between the first orientation of the virtual character in the world space coordinate system and the second orientation of the virtual character in the character model space coordinate system; Based on the orientation offset information, the particle orientation information in the world space coordinate system is transformed into the particle orientation information in the character model space coordinate system; Based on the particle orientation information in the character model's spatial coordinate system, control the release of the target particle animation effect.

5. The method according to claim 4, characterized in that, The step of converting particle orientation information in the world space coordinate system to particle orientation information in the character model space coordinate system based on the orientation offset information includes: The particle orientation information in the world space coordinate system, the first orientation of the virtual character in the world space coordinate system, and the orientation offset information are calculated by matrix calculation to obtain the particle orientation information in the character model space coordinate system.

6. The method according to claim 1, characterized in that, The steps for controlling the release of the target particle animation effect based on the particle orientation information include: Control the release of particles along the direction indicated by the particle orientation information, and display the target particle animation effect generated during the release process.

7. A control device for particle animation effects, characterized in that, The device includes: The release command receiving module is used to receive release commands from the virtual character to release the target particle animation effect; The particle orientation information determination module is used to determine the particle orientation information of the target particle animation effect based on the first position information of the virtual character and the specified position information of the virtual camera corresponding to the virtual character; wherein, the specified position information includes: specified position information of a position having a specified distance from the virtual camera in a specified direction; A control module is used to control the release of the target particle animation effect based on the particle orientation information; wherein, the particle orientation information includes: particle orientation information in the world space coordinate system where the virtual character is located; the particle orientation matches the orientation of the virtual character; The particle orientation information determination module is used to determine the forward direction information of the target particle animation effect based on the first position information of the virtual character and the specified position information of the virtual camera corresponding to the virtual character; wherein, the forward direction information includes: the direction information of the forward direction based on the orientation of the target particle animation effect; and the particle orientation information of the target particle animation effect is determined based on the forward direction information.

8. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the particle animation effect control method according to any one of claims 1-6.

9. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the particle animation effect control method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Game skill animation processing method and device

    CN112156462A

  • Particle animation processing method and device, storage medium and computer equipment

    CN112215932A