CN112785722B - System for realizing particle expression diversification - Google Patents

System for realizing particle expression diversification Download PDF

Info

Publication number
CN112785722B
CN112785722B CN202110087173.1A CN202110087173A CN112785722B CN 112785722 B CN112785722 B CN 112785722B CN 202110087173 A CN202110087173 A CN 202110087173A CN 112785722 B CN112785722 B CN 112785722B
Authority
CN
China
Prior art keywords
particle
particles
module
emitter
various types
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110087173.1A
Other languages
Chinese (zh)
Other versions
CN112785722A (en
Inventor
刘德建
游翔宇
涂智业
陈宏展
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Tianqing Online Interactive Technology Co Ltd
Original Assignee
Fujian Tianqing Online Interactive Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Tianqing Online Interactive Technology Co Ltd filed Critical Fujian Tianqing Online Interactive Technology Co Ltd
Priority to CN202110087173.1A priority Critical patent/CN112785722B/en
Publication of CN112785722A publication Critical patent/CN112785722A/en
Application granted granted Critical
Publication of CN112785722B publication Critical patent/CN112785722B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/003Navigation within 3D models or images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Hardware Design (AREA)
  • Image Generation (AREA)

Abstract

The invention provides a system for realizing particle expression diversification, which comprises an initialization module, a renderer module, an emitter module and an influencer module; the transmitter module comprises various types of transmitters, and the affector module comprises various types of affector; adding the particle array initialized by the initialization module into various types of transmitters, modifying the birth position attribute of each particle in the array, transmitting the particles according to the birth position, and completing the work of the transmitter module; creating an object pool, enabling all the opened influencers to enter the object pool, processing the particle attributes according to the serial numbers set by the user in sequence, reading and processing the particle attribute data by the former influencer, and then transmitting the particle attribute data to the next influencer, and gradually iterating to generate particles with various behaviors; finally, the CPU transmits the relevant attribute data of the particles to the GPU, and the GPU renders the particles according to the renderer module to obtain the current particle rendering effect; the expansibility of the particle system is improved.

Description

System for realizing particle expression diversification
Technical Field
The invention relates to the technical field of computer graphics, in particular to a system for realizing particle appearance diversification.
Background
The particle system is almost a necessary module of each game engine, is formed by rendering a large number of simple grids in a scene, in the particle system, each particle has a life cycle, and is used for simulating unique effects or objects in the scene, such as bullets and smoke bullet explosion effects in an FPS game, and the particle system can be used for realizing simple cloud layer flutter, so that the interactivity and the interestingness of the game are greatly improved.
An individual particle system is composed of a group of predefined modules, the system control module comprises an initialization module, an emitter module, a renderer module and the like, the modules control the particle system expression mode at the CPU level, the behavior of the particle system can be changed by opening or closing the modules, parameters in each module are changed, and finally, the position, color, size, shape and material information of particles are integrated and transmitted to a GPU through a rendering pipeline for rendering, so that different expression effects are achieved.
The current mainstream game engine has its own particle system and a relatively perfect architecture design (as shown in fig. 1), but lacks the function of custom particle expression, and the particle expression has insufficient diversity, and each module can influence the particle during the process of generating and updating the particle, but can only edit the particle according to the inherently set module. If the emitter module defines the particle distribution at birth, the initialization module defines the particle emission speed and life cycle (not all attributes), the rendering module defines the material information, and a user-defined module is absent, so that the behavior of each particle in the life cycle can be flexibly controlled. In addition, the emitter module of a particle system is generally only provided with one emitter type, and the emitter type can be a rectangular emitter or a ring emitter, but multiple emitters can not be combined, so that the multiple particle performance is reduced to a certain extent.
Disclosure of Invention
In order to overcome the problems, the invention aims to provide a system for realizing the diversification of the particle performance, solve the problem of single particle performance, provide more performance choices for a particle system and promote the expansibility of the particle system.
The invention is realized by adopting the following scheme: a system for realizing diversification of particle expression, the system comprises an initialization module and a renderer module, wherein the initialization module is used for setting life cycle, speed, color, size, material and emission angle attribute of particles; the renderer renders the particles according to the attribute of the current state of the particles, and obtains the current particle presentation effect; the method is characterized in that: the system also includes a transmitter module and an affector module; the transmitter module includes various types of transmitters, and the affector module includes various types of affector; adding the particle array initialized by the initialization module into various types of transmitters, modifying the birth position attribute of each particle in the array, transmitting the particles according to the birth position, and completing the work of the transmitter module; creating an object pool, enabling all the opened influencers to enter the object pool, processing the particle attributes according to the serial numbers set by the user in sequence, reading and processing the particle attribute data by the former influencer, then transmitting the particle attribute data to the next influencer, iterating step by step, and finally generating particles with various behaviors; and finally, the CPU transmits the relevant attribute data of the particles to the GPU, and the GPU renders the particles according to the renderer module to obtain the current particle rendering effect.
Further, the various types of influencers include a linear influencer that linearly moves the particles or a dither influencer that randomly dithers the particles, the linear influencer being capable of affecting the velocity of the particles at each frame update, thereby shifting the particles as a whole; the shaking effect device can shake particles along a certain direction according to a set shaking frequency; in order to increase the diversity of particles, the influencers process the properties of particles in order according to preset numbers, namely, n influencers are provided, so that n (n-1) particle expressions can be generated.
Further, the various types of emitters include a point emitter, a circular emitter, a rectangular emitter, a linear emitter, or a ring emitter.
Further, the related attribute data of the particles comprise birth position, material quality, shape, rotation, color, size and emission angle attributes.
Further, the particle array initialized by the initialization module is added into various types of transmitters, the birth position attribute of each particle in the array is modified, the particles are transmitted according to the birth position, and the work of the transmitter module is completed, and the specific implementation mode is as follows: each emitter presets parameters of the emission rate and the duration of the particles in the emitter; traversing an emitter array, wherein the emitter array is various types of emitters; multiplying the time elapsed for each frame by the transmitting rate of the transmitter and rounding down to obtain how many particles need to be transmitted by the transmitter per frame, and so on, and the rest particles are distributed to different transmitters according to the value; the modification of the particle birth position is realized according to the requirements of different emitters, namely a circular emitter, a radius parameter r is transmitted into the circular emitter, a percentage a between 0 and 1 and a random degree b are obtained through random numbers, a is multiplied by the radius r to obtain a random length ra, ra is multiplied by sin values and cos values of random angles, and final position information is obtained, so that the birth position of the particle in the emitter is determined.
The invention has the beneficial effects that: the particle system is provided with more performance choices, the expansibility of the particle system is improved, the particle system is enriched in games, on the other hand, as a plurality of transmitters are supported to simultaneously transmit particles, one particle system can realize a plurality of transmitting modes, and the control parameters of the initialization module and the rendering module can be multiplexed under the condition that the particle size is large enough, so that the development efficiency of particle resources is improved.
Drawings
Fig. 1 is a schematic process flow diagram of a prior art particle system.
Fig. 2 is a process flow diagram of the system of the present invention.
Fig. 3 is a schematic view of a particle with linear upward emission without an affector.
Fig. 4 is a schematic illustration of a particle with the addition of a linear force affector of the present invention.
Fig. 5 is a particle schematic of the invention with the addition of line segment dithering (LineDirft) and a linear force affector.
Fig. 6 is a schematic particle diagram of a single point emitter of the present invention.
Fig. 7 is a schematic particle diagram of a circular emitter of the present invention.
Fig. 8 is a schematic diagram of particles in which a point emitter and a circular emitter coexist according to the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Referring to fig. 2, the system for realizing diversification of particle expressions of the present invention includes an initialization module and a renderer module, wherein the initialization module is used for setting life cycle, speed, color, size, material and emission angle properties of particles; the renderer renders the particles according to the attribute of the current state of the particles, and obtains the current particle presentation effect; the method is characterized in that: the system also includes a transmitter module and an affector module; the transmitter module includes various types of transmitters, and the affector module includes various types of affector; adding the particle array initialized by the initialization module into various types of transmitters, modifying the birth position attribute of each particle in the array, transmitting the particles according to the birth position, and completing the work of the transmitter module; creating an object pool, enabling all the opened influencers to enter the object pool, processing the particle attributes according to the serial numbers set by the user in sequence, reading and processing the particle attribute data by the former influencer, then transmitting the particle attribute data to the next influencer, iterating step by step, and finally generating particles with various behaviors; and finally, the CPU transmits the relevant attribute data of the particles to the GPU, and the GPU renders the particles according to the renderer module to obtain the current particle rendering effect.
The technical concept of the direction of the emitter module is to extract the particle array after the initialization is completed, traverse the array to obtain a single particle object, randomly place the particle object into two or more emitters which are preset for processing, and complete the modification of the particle birth position by the emitter module.
The technical concept of the direction of the influencer module is a particle-based rendering process, in which each particle initializes a particle attribute through a set parameter, and the attribute includes: birth location, lifecycle (how long it has disappeared), speed (rate and direction), size, rotation, texture, etc. According to the scheme, an influencer module is added at the end of a CPU processing flow, particle attributes are processed, the attributes of each particle are modified through different influencers, the influencers can be opened and closed according to requirements, and finally the processed particle attributes are transmitted to a GPU for processing. In order to realize diversity, the invention creates an object pool, all the opened influencers enter the object pool, process the particle attributes according to the user-defined numbers in sequence, finally generate particles with various behaviors, the influencer module can be modified according to the user requirements, and the user-defined influencers can be added into the module under the condition that the current requirements cannot be met. The affector module includes multiple affector such as a linear affector for making the particles move linearly, a dithering affector for dithering the particles randomly, and the affector processes the particle attributes sequentially according to the preset number, i.e. n affector, so as to generate n (n-1) particle expressions, which enriches the particle expressions to a certain extent.
The various types of emitters include a point emitter, a circular emitter, a rectangular emitter, a linear emitter, or a circular emitter.
The invention is further described with reference to the following specific examples:
the invention relates to a system for realizing the diversification of particle expression, which mainly provides two directional ideas, one is to support various emitter settings in an emitter module, the other is to add an influencer module, and a custom influencer is added in the module to influence the particle attribute of the particle emission process.
The general implementation of the transmitter module direction steps: based on the basic emitter module, the original setting of a single emitter is changed, a plurality of emitters are realized, the initialized particle array is added into each emitter according to a certain rule, the birth position attribute of each particle in the array is modified, and the work of the emitter module is completed. The specific implementation steps are as follows: each emitter presets parameters such as emission rate, duration of particles in the emitter, etc. Traversing the emitter array, multiplying the time elapsed for each frame by the emitter emission rate and rounding down to obtain how many particles the emitter needs to emit per frame, and so on, and the rest particles are distributed to different emitters according to the value. The modification of the particle birth position is realized according to the requirements of different emitters, such as a circular emitter, a radius parameter r is transmitted to the circular emitter, a percentage a between 0 and 1 and a random degree b are obtained through random numbers, a is multiplied by the radius r to obtain a random length ra, and ra is multiplied by sin values and cos values of random angles to obtain final position information, so that the birth position of the particle in the emitter is determined.
The implementation steps of the direction of the affector module are as follows: firstly, setting three most basic modules of a particle system according to the original flow: the device comprises an initialization module, an emitter module and a rendering module, wherein final attribute data of particles passing through the modules are calculated and stored in a predefined storage medium temporarily. And adding an influencer module, wherein the influencer module comprises various types of influencers, each influencer sequentially reads the particle attribute in the storage medium according to the number, and the previous influencer reads and processes the particle attribute data and then transmits the data to the next influencer for gradual iteration. The order of the influencers in this process will influence the final behavior of the particles. Finally, the CPU transmits the relevant attribute data (position, material, scaling, rotation and color) of the particles to the GPU and draws the data.
The application scene of the invention is as follows:
the implementation of the direction of the affector module takes as an example the rendering of a particle system affected by a plurality of affector, as shown in fig. 3, there is a particle system in the scene that is emitted linearly upwards, the affector module of the particle does not add any affector, the particle already contains the necessary particle properties. The influencer module is turned on and a linear force (linear force) implemented in advance according to an algorithm is added, and as shown in fig. 4, the influencer can influence the movement speed of the particles during each frame update, so that the whole particles are offset. In addition, a line drop effector (line segment dither) is added, which is implemented in advance and can dither particles in a certain direction at a specific dither frequency, and as shown in fig. 5, the two types of effectors are combined to change the existing movement speed of the particles, and a dither effect can be generated.
The implementation of the emitter module direction takes as an example the rendering of a particle system with a plurality of emitters, as shown in fig. 6, a point emitter in the scene that only supports the emission of particles from the origin. After modifying its emitter type to a circular emitter, as shown in fig. 7, the distribution of the particles appears circular, and the emitter module is modified according to the emitter direction scheme to achieve two or more emitter compatibility, as shown in fig. 8, the distribution of the particles is both at the origin and at the circle.
The foregoing description is only of the preferred embodiments of the invention, and all changes and modifications that come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Claims (4)

1. A system for realizing diversification of particle expression, the system comprises an initialization module and a renderer module, wherein the initialization module is used for setting life cycle, speed, color, size, material and emission angle attribute of particles; the renderer renders the particles according to the attribute of the current state of the particles, and obtains the current particle presentation effect; the method is characterized in that: the system also includes a transmitter module and an affector module; the transmitter module includes various types of transmitters, and the affector module includes various types of affector; adding the particle array initialized by the initialization module into various types of transmitters, modifying the birth position attribute of each particle in the array, transmitting the particles according to the birth position, and completing the work of the transmitter module; creating an object pool, enabling all the opened influencers to enter the object pool, processing the particle attributes according to the serial numbers set by the user in sequence, reading and processing the particle attribute data by the former influencer, then transmitting the particle attribute data to the next influencer, iterating step by step, and finally generating particles with various behaviors; finally, the CPU transmits the relevant attribute data of the particles to the GPU, and the GPU renders the particles according to the renderer module to obtain the current particle rendering effect; adding the particle array initialized by the initialization module into various types of transmitters, modifying the birth position attribute of each particle in the array, transmitting the particles according to the birth position, and completing the work of the transmitter module, wherein the specific implementation mode is as follows: each emitter presets parameters of the emission rate and the duration of the particles in the emitter; traversing an emitter array, wherein the emitter array is various types of emitters; multiplying the elapsed time of each frame by the transmitting rate of the transmitter and rounding down to obtain the value of how many particles the transmitter needs to transmit each frame, and the like, and the rest particles are distributed to different transmitters according to the value; the modification of the particle birth position is realized according to the requirements of different transmitters, such as a circular transmitter, a radius parameter r is transmitted to the circular transmitter, a percentage a between 0 and 1 and a random number b are obtained through random numbers, a can be multiplied by the radius r to obtain a random length ra, and ra is multiplied by sin values and cos values of the random angle to obtain final position information, so that the birth position of the particle in the transmitter is determined.
2. A system for achieving diversification of particle representations according to claim 1, wherein: the various types of influencers include a linear influencer that moves the particles linearly or a shaking influencer that shakes the particles randomly, the linear influencer being capable of affecting the velocity of the particles as they are updated every frame, thereby shifting the particles as a whole; the shaking effect device can shake particles along a certain direction according to a set shaking frequency; in order to increase the diversity of particles, the influencers process the properties of particles in order according to preset numbers, namely, n influencers are provided, so that n (n-1) particle expressions can be generated.
3. A system for achieving diversification of particle representations according to claim 1, wherein: the various types of emitters include a point emitter, a circular emitter, a rectangular emitter, a linear emitter, or a circular emitter.
4. A system for achieving diversification of particle representations according to claim 1, wherein: the relevant attribute data of the particles comprise birth position, material quality, shape, rotation, color, size and emission angle attributes.
CN202110087173.1A 2021-01-22 2021-01-22 System for realizing particle expression diversification Active CN112785722B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110087173.1A CN112785722B (en) 2021-01-22 2021-01-22 System for realizing particle expression diversification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110087173.1A CN112785722B (en) 2021-01-22 2021-01-22 System for realizing particle expression diversification

Publications (2)

Publication Number Publication Date
CN112785722A CN112785722A (en) 2021-05-11
CN112785722B true CN112785722B (en) 2023-06-16

Family

ID=75758553

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110087173.1A Active CN112785722B (en) 2021-01-22 2021-01-22 System for realizing particle expression diversification

Country Status (1)

Country Link
CN (1) CN112785722B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103310405A (en) * 2013-05-31 2013-09-18 新奥特(北京)视频技术有限公司 Method and device for controlling particle movement
CN103455323A (en) * 2013-07-05 2013-12-18 新奥特(北京)视频技术有限公司 Implementation method and device of particle effects
CN103714568A (en) * 2013-12-31 2014-04-09 北京像素软件科技股份有限公司 Method for achieving large-scale particle system
CN107392935A (en) * 2017-07-06 2017-11-24 苏州蜗牛数字科技股份有限公司 A kind of particle computational methods and particIe system based on integral formula
CN111367605A (en) * 2020-02-28 2020-07-03 珠海豹趣科技有限公司 Raindrop special effect display method and device and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190114819A1 (en) * 2017-10-13 2019-04-18 Microsoft Technology Licensing, Llc Dimensional content surface rendering

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103310405A (en) * 2013-05-31 2013-09-18 新奥特(北京)视频技术有限公司 Method and device for controlling particle movement
CN103455323A (en) * 2013-07-05 2013-12-18 新奥特(北京)视频技术有限公司 Implementation method and device of particle effects
CN103714568A (en) * 2013-12-31 2014-04-09 北京像素软件科技股份有限公司 Method for achieving large-scale particle system
CN107392935A (en) * 2017-07-06 2017-11-24 苏州蜗牛数字科技股份有限公司 A kind of particle computational methods and particIe system based on integral formula
CN111367605A (en) * 2020-02-28 2020-07-03 珠海豹趣科技有限公司 Raindrop special effect display method and device and computer readable storage medium

Also Published As

Publication number Publication date
CN112785722A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
Risi et al. Increasing generality in machine learning through procedural content generation
Suleyman The coming wave: technology, power, and the twenty-first century's greatest dilemma
CN101013507B (en) Three-dimensional processing device, information terminal, and three-dimensional processing method
KR100459392B1 (en) Toy performance apparatus and method using game
US8823701B2 (en) Apparatus and method for improved presentation of objects in a distributed interactive simulation
CN103714568A (en) Method for achieving large-scale particle system
CN112785722B (en) System for realizing particle expression diversification
Zhang et al. Game special effect simulation based on particle system of Unity3D
CN112132936A (en) Picture rendering method and device, computer equipment and storage medium
Betts Procedural content generation
CN114288662A (en) NPC behavior control method and device and electronic equipment
Kayakoku et al. A Novel Behavioral Strategy for RoboCode Platform Based on Deep Q‐Learning
Patel et al. Improving behavior of computer game bots using fictitious play
CN106110658B (en) A kind of analogy method used in gaming and device
Dong et al. Firework simulation based on particle system in virtual scene
Congdon et al. Gentree: An interactive genetic algorithms system for designing 3d polygonal tree models
Carey Procedural Forest Generation with L-System Instancing
Ashlock et al. The riddle of togelby
CN115518381B (en) Method, system, device and medium for refreshing virtual object and environment object in game
Coles Artificial life as a path from computing to philosophy
Hämäläinen et al. Predictive physics simulation in game mechanics
Singh et al. Natural Selection Simulator using Machine Learning
Phillips Scripted artificially intelligent basic online tactical simulation
Rashidi et al. On Complex Systems and Structure of Emergence in Games-A Survey
Morita Emergence of Complex Phenomena in a Simple Reversible Cellular Space

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant