Banding rendering method and device, computer readable storage medium and electronic device
Patent Information
- Application Number
- CN202310275552.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-14
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-03-14
AI Technical Summary
[0005]本公开提供一种飘带渲染方法及装置、计算机可读存储介质及电子设备,可以解决相关技术中制作飘带特效效率较差的问题
[0014] In one embodiment of the ribbon rendering method disclosed herein, particles are emitted into a virtual scene using a first particle emitter. The particles are controlled to move within the virtual scene according to their motion logic. The particles are then bound to a ribbon to be rendered using a second particle emitter. The ribbon generation position on a static mesh in the virtual scene is obtained, and the ribbon is rendered at that position using the second particle emitter. This disclosed solution eliminates the need to reprocess vertex data for different static meshes, is simple to operate, has versatility, and is highly efficient in creating ribbon effects.
Smart Images

Figure CN116452716B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to ribbon rendering methods, ribbon rendering apparatus, computer-readable storage media, and electronic devices. Background Technology
[0002] With the development of terminal devices and the gaming industry, a large number of games and works of different themes have emerged to meet user needs. Some games or films require dynamic ribbon effects that grow along the surface of a static mesh.
[0003] In related technologies, the vertices of a static mesh can be sorted, a particle emitter can be created, the coordinate information of the static mesh vertices can be sampled, and the obtained coordinate information can be bound to the position of the ribbon. The growth effect is achieved by offsetting the index value of the vertices. However, the solutions in these technologies require reprocessing the vertices for different static meshes, which is cumbersome, lacks universality, and has poor efficiency in creating ribbon effects.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] This disclosure provides a ribbon rendering method and apparatus, a computer-readable storage medium and an electronic device, which can solve the problem of poor efficiency in creating ribbon effects in related technologies.
[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.
[0007] According to a first aspect of this disclosure, a ribbon rendering method is provided, characterized in that the method includes: emitting particles in a virtual scene through a first particle emitter; controlling the particles to move in the virtual scene according to the particle's motion logic; binding the particles to a ribbon to be rendered through a second particle emitter; obtaining the ribbon generation position on a static mesh in the virtual scene, and rendering the ribbon at the ribbon generation position on the static mesh in the virtual scene through the second particle emitter; wherein the motion logic of the ribbon is the same as the motion logic of the particles.
[0008] According to a second aspect of this disclosure, a ribbon rendering apparatus is provided, characterized in that the apparatus comprises: a first emitter module for emitting particles in a virtual scene via a first particle emitter; a particle motion control module for controlling the movement of particles in the virtual scene according to particle motion logic; a second emitter module for binding particles to ribbons to be rendered via the second particle emitter; and a ribbon rendering module for obtaining the ribbon generation position on a static mesh in the virtual scene and rendering the ribbon at the ribbon generation position on the static mesh in the virtual scene via the second particle emitter; wherein the motion logic of the ribbon is the same as the motion logic of the particles.
[0009] According to a third aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the ribbon rendering method of the first aspect of the above embodiments.
[0010] According to a fourth aspect of this disclosure, an electronic device is provided, comprising:
[0011] One or more processors; and
[0012] A memory is used to store one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the ribbon rendering method as described in the first aspect of the above embodiments.
[0013] The technical solutions provided in this disclosure may have the following beneficial effects:
[0014] In one embodiment of the ribbon rendering method disclosed herein, particles are emitted into a virtual scene using a first particle emitter. The particles are controlled to move within the virtual scene according to their motion logic. The particles are then bound to a ribbon to be rendered using a second particle emitter. The ribbon generation position on a static mesh in the virtual scene is obtained, and the ribbon is rendered at that position using the second particle emitter. This disclosed solution eliminates the need to reprocess vertex data for different static meshes, is simple to operate, has versatility, and is highly efficient in creating ribbon effects.
[0015] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0017] Figure 1 The schematic diagram illustrates an exemplary system architecture of the ribbon rendering method in an exemplary embodiment of the present disclosure;
[0018] Figure 2 A flowchart illustrating a ribbon rendering method in an exemplary embodiment of this disclosure is shown schematically.
[0019] Figure 3 This schematically illustrates a flowchart of a process for controlling the motion trend of particles in a virtual scene using a particle trend adjustment vector in an exemplary embodiment of the present disclosure.
[0020] Figure 4 This schematically illustrates a flowchart of a position rendering process for a ribbon generated on a static mesh in a virtual scene using a second particle emitter, as described in an exemplary embodiment of this disclosure.
[0021] Figure 5 This schematically illustrates a flowchart of determining the ribbon generation position on a static mesh based on distance and direction in an exemplary embodiment of this disclosure;
[0022] Figure 6 This schematically illustrates a flowchart of obtaining the distance between a particle and a target vertex, and obtaining the direction in which the particle points towards the target vertex, in an exemplary embodiment of this disclosure.
[0023] Figure 7 This schematic diagram illustrates the composition of a ribbon rendering apparatus according to an exemplary embodiment of the present disclosure;
[0024] Figure 8 The schematic diagram illustrates a structural schematic of a computer system suitable for implementing an electronic device according to exemplary embodiments of the present disclosure. Detailed Implementation
[0025] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., may be employed. In other instances, well-known structures, methods, apparatuses, implementations, materials, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0026] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, or in one or more software-hardened modules, or in different network and / or processor devices and / or microcontroller devices.
[0027] Figure 1 A schematic diagram of an exemplary system architecture to which the ribbon rendering method of embodiments of the present disclosure can be applied is shown.
[0028] like Figure 1 As shown, system architecture 1000 may include one or more of terminal devices 1001, 1002, and 1003, network 1004, and server 1005. Network 1004 is used as a medium to provide a communication link between terminal devices 1001, 1002, and 1003 and server 1005. Network 1004 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0029] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included. For example, server 1005 could be a server cluster composed of multiple servers.
[0030] Users can use terminal devices 1001, 1002, and 1003 to interact with server 1005 via network 1004 to receive or send messages, etc. Terminal devices 1001, 1002, and 1003 can be various electronic devices with displays, including but not limited to smartphones, tablets, laptops, and desktop computers. Additionally, server 1005 can be a server providing various services.
[0031] In one embodiment, the execution entity of the ribbon rendering method disclosed herein may be a server 1005. The server 1005 may obtain a first particle emitter and a second particle emitter sent by terminal devices 1001, 1002, and 1003, emit particles in the virtual scene through the first particle emitter, control the movement of the particles in the virtual scene according to the particle motion logic, bind the particles to the ribbon to be rendered through the second particle emitter, obtain the ribbon generation position on the static mesh in the virtual scene, and render the ribbon at the ribbon generation position on the static mesh in the virtual scene through the second particle emitter.
[0032] In addition, the ribbon rendering method disclosed herein can also be executed through terminal devices 1001, 1002, 1003, etc., to achieve the following: particles are emitted in the virtual scene through the first particle emitter, the particles are controlled to move in the virtual scene according to the particle motion logic, the particles are bound to the ribbon to be rendered through the second particle emitter, the ribbon generation position on the static mesh in the virtual scene is obtained, and the ribbon is rendered at the ribbon generation position on the static mesh in the virtual scene through the second particle emitter; wherein, the motion logic of the ribbon is the same as the motion logic of the particles.
[0033] Furthermore, the implementation process of the visual effects generation method disclosed herein can also be jointly implemented by terminal devices 1001, 1002, and 1003 and server 1005. For example, terminal devices 1001, 1002, and 1003 can emit particles in the virtual scene through a first particle emitter, and control the movement of the particles in the virtual scene according to the particle motion logic. Server 1005 can bind the particles to the ribbons to be rendered through a second particle emitter, obtain the ribbon generation position on the static mesh in the virtual scene, and render the ribbons at the ribbon generation position on the static mesh in the virtual scene through the second particle emitter; wherein, the motion logic of the ribbons is the same as the motion logic of the particles.
[0034] With the development of terminal devices and the gaming industry, a large number of games and works of different themes have emerged to meet user needs. Some games or films require dynamic ribbon effects that grow along the surface of a static mesh.
[0035] In related technologies, the vertices of a static mesh can be sorted, a particle emitter can be created, the coordinate information of the static mesh vertices can be sampled, and the obtained coordinate information can be bound to the position of the ribbon. The growth effect is achieved by offsetting the index value of the vertices. However, the solutions in these technologies require reprocessing the vertices for different static meshes, which is cumbersome, lacks universality, and has poor efficiency in creating ribbon effects.
[0036] In one example embodiment of this disclosure, particles can be emitted into a virtual scene using a first particle emitter. The particles' movement logic is controlled to move within the virtual scene. The particles are then bound to a ribbon to be rendered using a second particle emitter. The ribbon's generation position on a static mesh in the virtual scene is obtained, and the ribbon is rendered at that position using the second particle emitter. The ribbon's movement logic is the same as the particle's movement logic. (See reference...) Figure 2 The diagram illustrates a flowchart of a ribbon rendering method in this exemplary embodiment, which may include the following steps:
[0037] Step S210: Emit particles in the virtual scene using the first particle emitter;
[0038] Step S220: Control the movement of particles in the virtual scene according to the particle's motion logic;
[0039] Step S230: Bind the particles to the ribbons to be rendered via the second particle emitter;
[0040] Step S240: Obtain the ribbon generation position on the static mesh in the virtual scene, and render the ribbon at the ribbon generation position on the static mesh in the virtual scene using the second particle emitter; wherein, the motion logic of the ribbon is the same as the motion logic of the particles.
[0041] In one embodiment of the ribbon rendering method disclosed herein, particles are emitted into a virtual scene using a first particle emitter. The particles are controlled to move within the virtual scene according to their motion logic. The particles are then bound to a ribbon to be rendered using a second particle emitter. The ribbon generation position on a static mesh in the virtual scene is obtained, and the ribbon is rendered at that position using the second particle emitter. This disclosed solution eliminates the need to reprocess vertex data for different static meshes, is simple to operate, has versatility, and is highly efficient in creating ribbon effects.
[0042] Below, we will combine Figure 2 The steps S210 to S240 of the ribbon rendering method in this exemplary embodiment will be described in more detail below.
[0043] Step S210: Emit particles in the virtual scene using the first particle emitter;
[0044] In one exemplary embodiment of this disclosure, particles can be emitted in a virtual scene using a first particle emitter. Specifically, particles can be emitted in a virtual scene using a first particle emitter, where randomly generated particles are given an initial displacement and velocity, and the particle's range of motion is limited. For example, Maya provides five types of particle emitters, such as point-emitting particle emitters, directional particle emitters, surface-emitting particle emitters, and curve-emitting particle emitters. It should be noted that this disclosure does not impose any special limitations on the specific method of emitting particles in a virtual scene using a first particle emitter.
[0045] In one example embodiment of this disclosure, the solution can be implemented in Niagara (a next-generation VFX system for Unreal Engine).
[0046] Furthermore, the first particle emitter can be simulated using a GPU (graphics processing unit).
[0047] Step S220: Control the movement of particles in the virtual scene according to the particle's motion logic;
[0048] In one example embodiment of this disclosure, after particles are emitted into a virtual scene through the first particle emitter via the above steps, the movement of the particles in the virtual scene can be controlled according to the particle motion logic. Specifically, the particle motion logic can be used to indicate the movement mode of the particles in the virtual scene. The particle motion logic can be written into the first particle emitter, that is, the particles emitted through the first particle emitter move in the virtual scene according to the particle motion logic.
[0049] For example, the motion logic of a particle can be circular motion within a virtual scene according to a preset radius; or, the motion logic of a particle can be deceleration motion within a virtual scene with decreasing acceleration; or, the motion logic of a particle can be circular motion with a gradually increasing radius.
[0050] It should be noted that this disclosure does not impose any special limitations on the specific type of particle motion logic or the specific method of controlling the particle's motion in the virtual scene based on the particle motion logic.
[0051] In one example embodiment of this disclosure, the particle's motion logic may include circular motion according to a preset radius, and the trajectory of the circular motion conforms to a trigonometric function. Specifically, the size of the preset radius can be set to adjust the radius of the particle's circular motion in the virtual scene. The trigonometric function may include sine and cosine functions, that is, when the particle performs circular motion, the particle's trajectory also conforms to a sine or cosine function. The values in the sine or cosine function can be adjusted to adjust the trajectory of the particle during circular motion.
[0052] In one example embodiment of this disclosure, one or more of a preset radius, angle value, and particle trend adjustment vector can be adjusted to adjust the particle's motion logic.
[0053] In one exemplary embodiment of this disclosure, particles can be controlled to move in a circular motion according to a preset radius in a virtual scene, and the movement trend of the particles in the virtual scene can be controlled by a particle trend adjustment vector. (Refer to...) Figure 3 As shown, controlling the movement trend of particles in a virtual scene by adjusting the particle trend vector can include the following steps S310 to S320:
[0054] Step S310: Control the particles to perform circular motion in the virtual scene according to a preset radius;
[0055] In one example embodiment of this disclosure, particles can be controlled to perform circular motion within a virtual scene according to a preset radius. The trajectory of this circular motion conforms to a trigonometric function. Specifically, after particles are emitted into the virtual scene via a first particle emitter, their movement within the virtual scene can be controlled according to particle motion logic. This motion logic includes performing circular motion according to a preset radius, and the trajectory of the circular motion conforming to a trigonometric function.
[0056] Step S320: Control the movement trend of particles in the virtual scene by adjusting the particle trend vector.
[0057] In one exemplary embodiment of this disclosure, after controlling the particles to move in a circular motion according to a preset radius in the virtual scene through the above steps, the particle trend adjustment vector can be used to control the movement trend of the particles in the virtual scene. The movement trend indicates the overall direction of particle movement in the virtual scene.
[0058] Specifically, particles move in a circle within a virtual scene according to a preset radius, and the trajectory of the circular motion conforms to a trigonometric function. When particles move within the preset scene, a particle trend adjustment vector can be input to control the overall direction of particle movement within the virtual scene.
[0059] For example, if a particle is controlled to move in a circle within a virtual scene according to a preset radius, and the trajectory of this circle conforms to a trigonometric function, without controlling the particle's movement trend in the virtual scene, the particle will continue to move in a circle without any deviation, and thus the particle will not have an overall direction of motion in the virtual scene. However, if the particle's movement trend is controlled through a particle trend adjustment vector, the particle will deviate while moving in a circle, thus giving the particle an overall direction of motion in the virtual scene. For instance, when the particle trend adjustment vector is upward, the particle can be controlled to deviate upward while moving in a circle, making the particle's overall direction of motion in the virtual scene upward.
[0060] Furthermore, when controlling the movement trend of particles in a virtual scene through particle trend adjustment vectors, the particle trend adjustment vector can be input for each frame of the particle to change the particle's trajectory, thereby achieving the effect of controlling the movement trend of particles in the virtual scene.
[0061] It should be noted that this disclosure does not impose any special limitations on the specific method of controlling the motion trend of particles in a virtual scene through particle trend adjustment vectors.
[0062] Specifically, the particles are controlled to move in a circle in the virtual scene according to a preset radius. The movement trend of the particles in the virtual scene is controlled by the particle trend adjustment vector. The particles are bound to the ribbons rendered by the second particle emitter. After obtaining the ribbon generation position on the static mesh in the virtual scene, the ribbons can be rendered at the ribbon generation position on the static mesh in the virtual scene by the second particle emitter, which can render the ribbon effect of growing in a ring on the static mesh.
[0063] Through the above steps S310 to S320, the particles can be controlled to move in a circle according to a preset radius in the virtual scene, and the movement trend of the particles in the virtual scene can be controlled by the particle trend adjustment vector.
[0064] Step S230: Bind the particles to the ribbons to be rendered via the second particle emitter;
[0065] In one example embodiment of this disclosure, after emitting particles in a virtual scene through the above steps and controlling the movement of the particles in the virtual scene according to the particle motion logic, the particles can be bound to a ribbon to be rendered by a second particle emitter. Specifically, the second particle emitter can be used to emit ribbon particles, which can be used to render the ribbon to achieve a ribbon effect.
[0066] Furthermore, the second particle emitter can be simulated using a GPU (graphics processing unit).
[0067] In one example embodiment of this disclosure, particle identifiers can be obtained, and the particles can be bound to a ribbon to be rendered by a second particle emitter using these identifiers. Specifically, in the second particle emitter, particle identifiers can be obtained, and particles emitted by the first particle emitter can be bound to a ribbon rendered by the second particle emitter using these identifiers. After binding the particles emitted by the first particle emitter to the ribbon rendered by the second particle emitter, the ribbon rendered by the second particle emitter moves according to the motion logic of the particles emitted by the first particle emitter.
[0068] Specifically, the particle identifier can be used to uniquely indicate each particle emitted by the first particle emitter. For example, when emitting particles through the first particle emitter, the emitted particles can be numbered and the particle number can be used as the particle identifier; or, when emitting particles through the first particle emitter, the emission time of the particles can be recorded and the emission time can be determined as the particle identifier.
[0069] It should be noted that this disclosure does not impose any special restrictions on the specific type of particle identifier or the specific method of obtaining the particle identifier.
[0070] In one example embodiment of this disclosure, the generation time of a particle can be obtained and used as the particle's identifier. Specifically, when particles are emitted through a first particle emitter, the emission time of each particle can be recorded and used as the particle's identifier.
[0071] It should be noted that this disclosure does not impose any special restrictions on the specific method for obtaining the generation time of particles.
[0072] In one example embodiment of this disclosure, the particle identifier can be determined using the editor time at which the particle is generated. Specifically, editor time refers to the time the editor runs.
[0073] It should be noted that this disclosure does not impose any special restrictions on the specific type of particle identification.
[0074] Step S240: Obtain the ribbon generation position on the static mesh in the virtual scene, and render the ribbon at the ribbon generation position on the static mesh in the virtual scene using the second particle emitter; wherein, the motion logic of the ribbon is the same as the motion logic of the particles.
[0075] In one example embodiment of this disclosure, after binding the particles to the ribbon to be rendered by the second particle emitter through the above steps, the ribbon generation position on the static mesh in the virtual scene can be obtained. Specifically, the ribbon generation position on the static mesh refers to the location where the ribbon is generated. For example, the ribbon generation position can be set in advance on the static mesh; or, multiple vertices on the surface of the static mesh can be obtained, and a target vertex can be determined among the multiple vertices, and this target vertex can be determined as the ribbon generation position on the static mesh.
[0076] It should be noted that this disclosure does not impose any special restrictions on the method for determining the position of the ribbon generation on the static mesh.
[0077] In one example embodiment of this disclosure, a ribbon is generated and rendered at a position on a static mesh in a virtual scene using a second particle emitter. The motion logic of this ribbon is the same as that of the particles. Specifically, the ribbon rendered by the second particle emitter moves according to the motion logic of the particles emitted by the first particle emitter.
[0078] Specifically, by using a second particle emitter to generate and render ribbons on a static mesh in a virtual scene, a ribbon effect that appears to grow on the static mesh can be rendered.
[0079] In one example embodiment of this disclosure, a static mesh can be created in a virtual scene. Specifically, the static mesh can be a virtual mesh created through a 3D interactive content creation platform. For example, a static mesh can be created using Unity3D; or, a static mesh can be created using UE. It should be noted that this disclosure does not impose any special limitations on the specific method of creating the static mesh.
[0080] In one example embodiment, the number of particles emitted by the first particle emitter is obtained, and the position of the ribbon is rendered by generating a ribbon on a static mesh in the virtual scene using a second particle emitter. (See also...) Figure 4 As shown, generating position rendering ribbons on static meshes in a virtual scene using a second particle emitter can include the following steps S410 to S420:
[0081] Step S410: Obtain the number of particles emitted by the first particle emitter;
[0082] Step S420: Use the second particle emitter to generate and render the ribbons on the static mesh in the virtual scene.
[0083] In one example embodiment of this disclosure, after emitting particles using a first particle emitter through the above steps, the number of particles emitted by the first particle emitter can be obtained. Then, a second particle emitter is used to render the ribbons at their positions on a static mesh in the virtual scene. The number of rendered ribbons is the same as the number of particles emitted by the first particle emitter. Specifically, the number of particles emitted by the first particle emitter can be obtained. When rendering the ribbons at their positions on the static mesh in the virtual scene using the second particle emitter, the same number of ribbons as the number of particles emitted by the first particle emitter can be rendered at the ribbon positions on the static mesh, with each ribbon corresponding to one particle.
[0084] Furthermore, the motion logic of each particle can be adjusted by adjusting the motion logic of each particle's corresponding ribbon.
[0085] Through the above steps S410 to S420, the number of particles emitted by the first particle emitter can be obtained, and the position of the ribbon generated on the static mesh in the virtual scene can be rendered by the second particle emitter.
[0086] In one example embodiment of this disclosure, the distance between the particle and the static mesh can be obtained, the direction in which the particle points towards the static mesh can be obtained, and the position where the ribbon is generated on the static mesh can be determined based on the distance and direction. (Refer to...) Figure 5 As shown, determining the ribbon generation position on the static mesh based on distance and direction can include the following steps S510 to S520:
[0087] Step S510: Obtain the distance between the particle and the static mesh, and obtain the direction in which the particle points to the static mesh;
[0088] In one exemplary embodiment of this disclosure, after creating a static mesh in the virtual scene through the above steps and emitting particles in the virtual scene through a first particle emitter, the distance between the particles and the static mesh, and the direction in which the particles point towards the static mesh, can be obtained. Specifically, the distance between the particles and the static mesh can be the distance between the particles and the surface of the static mesh. For example, the distance between the particles and the static mesh can be the distance between the particles and any point on the surface of the static mesh. Specifically, the direction in which the particles point towards the static mesh can be the direction in which the particles point towards the surface of the static mesh. For example, the direction in which the particles point towards the static mesh can be the direction in which the particles point towards any point on the surface of the static mesh.
[0089] It should be noted that this disclosure does not impose any special limitations on the specific methods for obtaining the distance between the particle and the static mesh, or on obtaining the direction in which the particle points to the static mesh.
[0090] Step S520: Determine the position where the ribbons are generated on the static mesh based on the distance and direction.
[0091] In one exemplary embodiment of this disclosure, after obtaining the distance between the particle and the static mesh and the direction in which the particle points towards the static mesh through the above steps, the position where the ribbon is generated on the static mesh can be determined based on the distance between the particle and the static mesh and the direction in which the particle points towards the static mesh. Specifically, the distance between the particle and the static mesh can be offset according to the direction in which the particle points towards the static mesh to determine the position where the ribbon is generated on the static mesh.
[0092] It should be noted that this disclosure does not impose any special limitations on the specific method for determining the position of the ribbons generated on the static mesh based on distance and direction.
[0093] In one example embodiment of this disclosure, a distance field can be enabled in a virtual scene to determine the distance between particles and static meshes, as well as the direction in which particles point towards the static meshes. Specifically, the distance field can be used to indicate the distance per unit distance from the virtual camera in the virtual scene.
[0094] It should be noted that this disclosure does not impose any special limitations on the specific method by which the distance between the particle and the static grid is determined through the distance field, or on the direction in which the particle points toward the static grid.
[0095] Furthermore, after enabling the distance field in the virtual scene, the precision of the distance field can be set.
[0096] Through the above steps S510 to S520, the distance between the particle and the static mesh can be obtained, the direction in which the particle points to the static mesh can be obtained, and the position where the ribbon is generated on the static mesh can be determined based on the distance and direction.
[0097] In one example embodiment of this disclosure, multiple vertices on a static mesh can be obtained, a target vertex closest to the particle can be determined among the multiple vertices, the distance between the particle and the target vertex can be obtained, and the direction in which the particle points to the target vertex can be obtained. (Refer to...) Figure 6 As shown, obtaining the distance between the particle and the target vertex, and obtaining the direction in which the particle points to the target vertex, may include the following steps S610 to S620:
[0098] Step S610: Obtain multiple vertices on the static mesh, and determine the target vertex that is closest to the particle among the multiple vertices;
[0099] Step S620: Obtain the distance between the particle and the target vertex, and obtain the direction in which the particle points to the target vertex.
[0100] In one example embodiment of this disclosure, after creating a static mesh in the virtual scene through the above steps and emitting particles in the virtual scene through a first particle emitter, multiple vertices on the static mesh can be acquired, and the target vertex closest to the particle can be determined among these multiple vertices. Specifically, multiple vertices on the static mesh can be acquired, and the distances between these vertices and the particles can be acquired. The vertex closest to the particle can be determined as the target vertex, and the distance between the particle and the target vertex and the direction in which the particle points to the target vertex can be acquired.
[0101] Specifically, the distance between the particle and the target vertex can be obtained, and the distance between the particle and the target vertex can be determined as the distance between the particle and the static mesh; the direction in which the particle points to the target vertex can be obtained, and the direction in which the particle points to the target vertex can be determined as the direction in which the particle points to the static mesh.
[0102] It should be noted that this disclosure does not impose any special limitations on the specific methods for obtaining the distance between the particle and the target vertex, or on obtaining the direction in which the particle points to the target vertex.
[0103] Through the above steps S610 to S620, multiple vertices on the static mesh can be obtained, the target vertex closest to the particle can be determined among the multiple vertices, the distance between the particle and the target vertex can be obtained, and the direction in which the particle points to the target vertex can be obtained.
[0104] In one example embodiment of this disclosure, the motion logic of the particles can be adjusted in response to an adjustment command for the particle motion logic, thereby adjusting the motion logic of the ribbon. Specifically, after the ribbon is rendered at its position on a static mesh in the virtual scene through the above steps, the particle motion logic can be adjusted. Since the particles emitted by the first particle emitter are bound to the ribbon rendered by the second particle emitter, the adjustment of the particle motion logic will also affect the ribbon motion logic. That is, the ribbon motion logic can be adjusted by adjusting the particle motion logic.
[0105] Furthermore, the particle's motion logic involves circular motion based on a preset radius, with the trajectory conforming to a trigonometric function. This allows for adjustments to the particle's motion logic in response to adjustment commands, thereby adjusting the ribbon's motion logic. Specifically, the preset radius or the trigonometric function value can be adjusted.
[0106] Furthermore, the particle motion logic also includes controlling the particle's motion trend in the virtual scene through a particle trend adjustment vector. The motion trend indicates the overall direction of particle movement in the virtual scene. Specifically, the particle trend adjustment vector can be adjusted to adjust the particle's motion trend in the virtual scene, that is, to adjust the overall direction of particle movement in the virtual scene, thereby adjusting the motion trend of the ribbon in the virtual scene.
[0107] In one example embodiment of this disclosure, a first particle emitter may be created, and programming modules A, B, and C may be created in the first particle emitter; and a second particle emitter may be created, and programming module D may be created in the second particle emitter.
[0108] In programming module A, create a new Particle attribute SpawnTickCount (a tag composed of editor time and particle ID). Through the program programming interface, store the Acquire Tag (editor time) of the Niagara ID (an identifier used to indicate a unique particle) of the particle emitted through the first particle emitter as the particle identifier.
[0109] In programming module B, the particle motion logic is acquired, and the particle's movement is controlled within the virtual scene based on this logic. Furthermore, the particle's motion trend is controlled via a particle trend adjustment vector. Specifically, the particle's motion logic involves circular motion based on a preset radius, with the trajectory conforming to either a sine or cosine function.
[0110] In programming module C, the distance between the particle and the static mesh is obtained, as is the direction the particle points towards the static mesh. Based on the distance and direction, the position where the ribbon on the static mesh is generated is determined. Furthermore, the particle's velocity can be multiplied by the direction the particle points towards the static mesh, and the cross product result can be multiplied by the opposite direction the particle points towards the static mesh. The result of these multiplications is then used as a quaternion to represent the particle's velocity attribute. The result of the multiplication can be used to indicate the particle's velocity direction.
[0111] In programming module D, the particle identifier (particle editor time) and the number of particles emitted by the first particle emitter can be obtained. The identifier and the number are combined to form a Niagara ID. The Niagara ID is used to determine the ribbon generation position on the static mesh. The second particle emitter is used to render the ribbon at the ribbon generation position on the static mesh in the virtual scene. The number of rendered ribbons is the same as the number of particles emitted by the first particle emitter.
[0112] In one embodiment of the ribbon rendering method provided by this disclosure, particles are emitted into a virtual scene using a first particle emitter. The particles are controlled to move within the virtual scene according to their motion logic. The particles are then bound to a ribbon to be rendered using a second particle emitter. The ribbon generation position on a static mesh in the virtual scene is obtained, and the ribbon is rendered at that position using the second particle emitter. This disclosed solution eliminates the need to reprocess vertex data for different static meshes, is simple to operate, has versatility, and is highly efficient in creating ribbon effects.
[0113] It should be noted that the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0114] Furthermore, in an exemplary embodiment of this disclosure, a ribbon rendering apparatus is also provided. (Refer to...) Figure 7 As shown, a ribbon rendering device 700 includes a first emitter module 710, a particle motion control module 720, a second emitter module 730, and a ribbon rendering module 740.
[0115] The system comprises: a first emitter module for emitting particles in a virtual scene using a first particle emitter; a particle motion control module for controlling the movement of particles in the virtual scene according to their motion logic; a second emitter module for binding particles to ribbons to be rendered using the second particle emitter; and a ribbon rendering module for obtaining the ribbon generation position on a static mesh in the virtual scene and rendering the ribbon at that position using the second particle emitter. The motion logic of the ribbons is the same as that of the particles.
[0116] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, the motion logic of the particle is to perform circular motion according to a preset radius, and the trajectory of the circular motion conforms to a trigonometric function.
[0117] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, the particle is controlled to move in a virtual scene according to the particle's motion logic. The device further includes: a circular motion control unit for controlling the particle to perform circular motion in the virtual scene according to a preset radius; and a motion trend adjustment unit for controlling the particle's motion trend in the virtual scene through a particle trend adjustment vector; wherein the motion trend is used to indicate the overall motion direction of the particle in the virtual scene.
[0118] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, particles are bound to ribbons to be rendered by the second particle emitter. The apparatus further includes a binding unit for acquiring the identifier of the particles and binding the particles to the ribbons to be rendered by the second particle emitter using the particle identifier.
[0119] In one exemplary embodiment of this disclosure, based on the foregoing scheme, the apparatus for obtaining the particle's identifier further includes: a generation time acquisition unit, used to acquire the particle's generation time and determine the particle's generation time as the particle's identifier.
[0120] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, the ribbon generation position on a static mesh in a virtual scene is obtained, and the ribbon is rendered at the ribbon generation position on the static mesh in the virtual scene using a second particle emitter. The apparatus further includes: a quantity acquisition unit for acquiring the number of particles emitted by the first particle emitter; and a ribbon rendering unit for rendering the ribbon at the ribbon generation position on the static mesh in the virtual scene using the second particle emitter; wherein the number of rendered ribbons is the same as the number of particles emitted by the first particle emitter.
[0121] In one exemplary embodiment of this disclosure, based on the foregoing scheme, the apparatus further includes: a first distance acquisition unit, configured to acquire the distance between the particle and the static grid, and acquire the direction in which the particle points to the static grid; and a ribbon generation position determination unit, configured to determine the ribbon generation position on the static grid based on the distance and direction.
[0122] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, the distance between the particle and the static mesh is obtained, and the direction in which the particle points to the static mesh is obtained. The apparatus further includes: a target vertex determination unit, used to obtain multiple vertices on the static mesh and determine the target vertex closest to the particle among the multiple vertices; and a second distance acquisition unit, used to obtain the distance between the particle and the target vertex and obtain the direction in which the particle points to the target vertex.
[0123] In one exemplary embodiment of this disclosure, based on the foregoing scheme, the apparatus further includes: an adjustment instruction receiving unit, configured to adjust the motion logic of the particle in response to an adjustment instruction for the motion logic of the particle, so as to adjust the motion logic of the ribbon.
[0124] One embodiment of this disclosure provides a ribbon rendering apparatus that emits particles in a virtual scene using a first particle emitter. The particles are controlled to move within the virtual scene according to their motion logic. The particles are then bound to a ribbon to be rendered via a second particle emitter. The ribbon generation position on a static mesh in the virtual scene is obtained, and the ribbon is rendered at that position using the second particle emitter. This disclosed solution eliminates the need to reprocess vertex data for different static meshes, is easy to operate, has versatility, and is highly efficient in creating ribbon effects.
[0125] Since the functional modules of the ribbon rendering apparatus in the example embodiments of this disclosure correspond to the steps of the example embodiments of the ribbon rendering method described above, for details not disclosed in the apparatus embodiments of this disclosure, please refer to the embodiments of the ribbon rendering method described above.
[0126] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0127] Furthermore, in an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described ribbon rendering method is also provided.
[0128] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be embodied in the following forms: a completely hardware embodiment, a completely software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."
[0129] The following reference Figure 8 To describe an electronic device 800 according to such an embodiment of the present disclosure. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0130] like Figure 8 As shown, the electronic device 800 is presented in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, a bus 830 connecting different system components (including storage unit 820 and processing unit 810), and a display unit 840.
[0131] The storage unit stores program code, which can be executed by the processing unit 810 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processing unit 810 can perform actions such as... Figure 2 In step S210, particles are emitted into the virtual scene using the first particle emitter; in step S220, the particles are controlled to move within the virtual scene according to their motion logic; in step S230, the particles are bound to a ribbon to be rendered using the second particle emitter; in step S240, the ribbon generation position on the static mesh in the virtual scene is obtained, and the ribbon is rendered at the same position using the second particle emitter; wherein, the motion logic of the ribbon is the same as that of the particles.
[0132] Based on the embodiments of this disclosure, the following solutions can also be implemented:
[0133] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, the motion logic of the particle is to perform circular motion according to a preset radius, and the trajectory of the circular motion conforms to a trigonometric function.
[0134] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, controlling the movement of particles in a virtual scene according to the particle's motion logic includes: controlling the particles to perform circular motion in the virtual scene according to a preset radius; controlling the movement trend of the particles in the virtual scene through a particle trend adjustment vector; wherein the movement trend is used to indicate the overall movement direction of the particles in the virtual scene.
[0135] In one exemplary embodiment of this disclosure, binding a particle to a ribbon to be rendered by a second particle emitter, based on the aforementioned scheme, includes: obtaining the particle's identifier and binding the particle to the ribbon to be rendered by the second particle emitter using the particle's identifier.
[0136] In one exemplary embodiment of this disclosure, obtaining the particle's identifier based on the foregoing scheme includes: obtaining the particle's generation time and determining the particle's generation time as the particle's identifier.
[0137] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, obtaining the ribbon generation position on a static mesh in a virtual scene, and rendering the ribbon at the ribbon generation position on the static mesh in the virtual scene using a second particle emitter, includes: obtaining the number of particles emitted by a first particle emitter; rendering the ribbon at the ribbon generation position on the static mesh in the virtual scene using a second particle emitter; wherein the number of rendered ribbons is the same as the number of particles emitted by the first particle emitter.
[0138] In one exemplary embodiment of this disclosure, based on the foregoing scheme, the method further includes: obtaining the distance between the particle and the static mesh, obtaining the direction in which the particle points to the static mesh, and determining the position where the ribbon is generated on the static mesh based on the distance and direction.
[0139] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, obtaining the distance between the particle and the static mesh, and obtaining the direction in which the particle points to the static mesh, includes: obtaining multiple vertices on the static mesh, determining the target vertex closest to the particle among the multiple vertices; obtaining the distance between the particle and the target vertex, and obtaining the direction in which the particle points to the target vertex.
[0140] In one exemplary embodiment of this disclosure, based on the foregoing scheme, the method further includes: adjusting the motion logic of the particle in response to an adjustment instruction for the motion logic of the particle, so as to adjust the motion logic of the ribbon.
[0141] One embodiment of this disclosure provides an electronic device that can emit particles in a virtual scene using a first particle emitter, control the particles' movement within the virtual scene according to particle motion logic, bind the particles to a ribbon to be rendered using a second particle emitter, obtain the ribbon generation position on a static mesh in the virtual scene, and render the ribbon at that position using the second particle emitter. This disclosed solution eliminates the need to reprocess vertex data for different static meshes, is simple to operate, has versatility, and is highly efficient in creating ribbon effects.
[0142] Storage unit 820 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 821 and / or cache memory 822, and may further include a read-only memory (ROM) 823.
[0143] The storage unit 820 may also include a program / utility 824 having a set (at least one) of program modules 825, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0144] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0145] Electronic device 800 can also communicate with one or more external devices 870 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 800, and / or with any device that enables electronic device 800 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 850. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID (Redundant Arrays of Independent Disks) systems, tape drives, and data backup storage systems, etc.
[0146] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0147] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of this disclosure may also be implemented as a program product including program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.
[0148] In one exemplary embodiment of this disclosure, particles can be emitted in a virtual scene using a first particle emitter; the particles are controlled to move in the virtual scene according to their motion logic; the particles are bound to a ribbon to be rendered using a second particle emitter; the ribbon generation position on a static mesh in the virtual scene is obtained, and the ribbon is rendered at the ribbon generation position on the static mesh in the virtual scene using the second particle emitter; wherein the motion logic of the ribbon is the same as the motion logic of the particles.
[0149] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, the motion logic of the particle is to perform circular motion according to a preset radius, and the trajectory of the circular motion conforms to a trigonometric function.
[0150] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, controlling the movement of particles in a virtual scene according to the particle's motion logic includes: controlling the particles to perform circular motion in the virtual scene according to a preset radius; controlling the movement trend of the particles in the virtual scene through a particle trend adjustment vector; wherein the movement trend is used to indicate the overall movement direction of the particles in the virtual scene.
[0151] In one exemplary embodiment of this disclosure, binding a particle to a ribbon to be rendered by a second particle emitter, based on the aforementioned scheme, includes: obtaining the particle's identifier and binding the particle to the ribbon to be rendered by the second particle emitter using the particle's identifier.
[0152] In one exemplary embodiment of this disclosure, obtaining the particle's identifier based on the foregoing scheme includes: obtaining the particle's generation time and determining the particle's generation time as the particle's identifier.
[0153] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, obtaining the ribbon generation position on a static mesh in a virtual scene, and rendering the ribbon at the ribbon generation position on the static mesh in the virtual scene using a second particle emitter, includes: obtaining the number of particles emitted by a first particle emitter; rendering the ribbon at the ribbon generation position on the static mesh in the virtual scene using a second particle emitter; wherein the number of rendered ribbons is the same as the number of particles emitted by the first particle emitter.
[0154] In one exemplary embodiment of this disclosure, based on the foregoing scheme, the method further includes: obtaining the distance between the particle and the static mesh, obtaining the direction in which the particle points to the static mesh, and determining the position where the ribbon is generated on the static mesh based on the distance and direction.
[0155] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, obtaining the distance between the particle and the static mesh, and obtaining the direction in which the particle points to the static mesh, includes: obtaining multiple vertices on the static mesh, determining the target vertex closest to the particle among the multiple vertices; obtaining the distance between the particle and the target vertex, and obtaining the direction in which the particle points to the target vertex.
[0156] In one exemplary embodiment of this disclosure, based on the foregoing scheme, the method further includes: adjusting the motion logic of the particle in response to an adjustment instruction for the motion logic of the particle, so as to adjust the motion logic of the ribbon.
[0157] One embodiment of this disclosure provides a computer-readable signal medium that can emit particles in a virtual scene using a first particle emitter. The particles are controlled to move within the virtual scene according to their motion logic. The particles are then bound to ribbons to be rendered using a second particle emitter. The ribbon generation position on a static mesh in the virtual scene is obtained, and the ribbon is rendered at that position using the second particle emitter. This disclosed solution eliminates the need to reprocess vertex data for different static meshes, is simple to operate, has versatility, and is highly efficient in creating ribbon effects.
[0158] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0159] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF (Radio Frequency), etc., or any suitable combination thereof.
[0160] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0161] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0162] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
Claims
1. A method for rendering ribbons, characterized in that, The method includes: Particles are emitted in the virtual scene using the first particle emitter; The particle's motion logic is used to control the particle's movement within the virtual scene; The particles are bound to the ribbon to be rendered by the second particle emitter, which emits ribbon particles and renders the ribbon. The position of the ribbon generation on the static mesh in the virtual scene is obtained, and the ribbon is rendered at the position of the ribbon generation on the static mesh in the virtual scene through the second particle emitter; wherein, the motion logic of the ribbon is the same as the motion logic of the particles, so that the ribbon rendered by the second particle emitter moves according to the motion logic of the particles emitted by the first particle emitter.
2. The method according to claim 1, characterized in that, The motion logic of the particle is to perform circular motion according to a preset radius, and the trajectory of the circular motion conforms to a trigonometric function.
3. The method according to claim 2, characterized in that, The step of controlling the movement of the particles in the virtual scene according to the particle's motion logic includes: The particles are controlled to perform circular motion according to a preset radius in the virtual scene; The particle's motion trend in the virtual scene is controlled by the particle trend adjustment vector; The motion trend is used to indicate the overall motion direction of the particle in the virtual scene.
4. The method according to claim 1, characterized in that, The step of binding the particles to the ribbons rendered by the second particle emitter includes: Obtain the identifier of the particle, and bind the particle to the ribbon rendered by the second particle emitter using the particle identifier.
5. The method according to claim 4, characterized in that, The step of obtaining the identifier of the particle includes: The generation time of the particle is obtained, and the generation time of the particle is determined as the identifier of the particle.
6. The method according to claim 1, characterized in that, The step of obtaining the ribbon generation position on the static mesh in the virtual scene and rendering the ribbon at the ribbon generation position on the static mesh in the virtual scene using a second particle emitter includes: Obtain the number of particles emitted by the first particle emitter; The second particle emitter generates and renders the ribbons on the static mesh in the virtual scene, creating their positions. The number of ribbons obtained from the rendering is the same as the number of particles emitted by the first particle emitter.
7. The method according to claim 1, characterized in that, The method further includes: Obtain the distance between the particle and the static mesh, and obtain the direction in which the particle points towards the static mesh; The position where the ribbon is generated on the static mesh is determined based on the distance and the direction.
8. The method according to claim 7, characterized in that, The step of obtaining the distance between the particle and the static mesh, and obtaining the direction in which the particle points to the static mesh, includes: Obtain multiple vertices on the static mesh, and determine the target vertex that is closest to the particle among the multiple vertices; Obtain the distance between the particle and the target vertex, and obtain the direction in which the particle points towards the target vertex.
9. The method according to claim 1, characterized in that, The method further includes: In response to an adjustment command for the motion logic of the particle, the motion logic of the particle is adjusted to adjust the motion logic of the ribbon.
10. A ribbon rendering device, characterized in that, The device includes: The first emitter module is used to emit particles in a virtual scene via the first particle emitter; A particle motion control module is used to control the movement of the particles in the virtual scene according to the particle motion logic. The second emitter module is used to bind the particles to the ribbon rendered by the second particle emitter, the second particle emitter being used to emit ribbon particles, and the ribbon particles being used to render the ribbon; The ribbon rendering module is used to obtain the ribbon generation position on the static mesh in the virtual scene, and render the ribbon at the ribbon generation position on the static mesh in the virtual scene through the second particle emitter; wherein, the motion logic of the ribbon is the same as the motion logic of the particles, so that the ribbon rendered by the second particle emitter moves according to the motion logic of the particles emitted by the first particle emitter.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 9.
12. An electronic device, characterized in that, include: One or more processors; as well as A memory for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Raindrop special effect display method and device and computer readable storage medium
CN111367605A
Method for generating firework visual effect, electronic equipment and storage medium
CN112700517A