WO2021043128A1 - Particle calculation method and apparatus, electronic device, and computer readable storage medium - Google Patents
Particle calculation method and apparatus, electronic device, and computer readable storage medium Download PDFInfo
- Publication number
- WO2021043128A1 WO2021043128A1 PCT/CN2020/112840 CN2020112840W WO2021043128A1 WO 2021043128 A1 WO2021043128 A1 WO 2021043128A1 CN 2020112840 W CN2020112840 W CN 2020112840W WO 2021043128 A1 WO2021043128 A1 WO 2021043128A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- attribute
- function
- particle
- initial
- time
- Prior art date
Links
- 239000002245 particle Substances 0.000 title claims abstract description 308
- 238000004364 calculation method Methods 0.000 title claims abstract description 104
- 230000006870 function Effects 0.000 claims abstract description 394
- 238000006073 displacement reaction Methods 0.000 claims description 73
- 238000004590 computer program Methods 0.000 claims description 5
- 238000000034 method Methods 0.000 abstract description 32
- 239000008186 active pharmaceutical agent Substances 0.000 abstract description 8
- 230000008569 process Effects 0.000 description 17
- 238000010586 diagram Methods 0.000 description 8
- 230000003287 optical effect Effects 0.000 description 7
- 239000000306 component Substances 0.000 description 5
- 230000003068 static effect Effects 0.000 description 5
- 230000001788 irregular Effects 0.000 description 3
- 239000008358 core component Substances 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000001131 transforming effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 239000000779 smoke Substances 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
- G06T13/20—3D [Three Dimensional] animation
- G06T13/60—3D [Three Dimensional] animation of natural phenomena, e.g. rain, snow, water or plants
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
Definitions
- This application relates to the field of particle computing technology. Specifically, this application relates to a particle computing method, device, electronic device, and computer-readable storage medium.
- the particle system is a graphic generation algorithm that effectively simulates irregular fuzzy objects. It uses a unified pattern to generate natural phenomena with irregular shapes such as clouds, smoke, fire, and water.
- the scene is defined as being composed of thousands of irregular and randomly distributed particles.
- the particle system can simulate the motion of uncertain objects, so it has a wide range of applications in the current three-dimensional simulation scenes.
- the current particle calculation generally uses the graphics processing unit (GPU) to calculate the current state of the particle and then writes it to the floating-point texture, and writes the data in the floating-point texture back to the central processing unit (CPU), but this This calculation method is only applicable to the higher version of the graphics application programming interface (API).
- the lower version of the graphics API does not support the writing of GPU data back to the CPU. Therefore, it is necessary to provide a particle calculation that can be applied to the lower version of the graphics API. method.
- the purpose of this application is to at least solve one of the above-mentioned technical defects, especially the technical defect of low particle calculation efficiency.
- a particle calculation method including:
- the graphics processor calculates the real-time attribute parameters corresponding to the particle playing time according to the initial attribute parameters, the attribute function, and the particle playing time.
- sending the initial attribute parameter and the attribute function to the graphics processor includes:
- converting the velocity function in the attribute function input by the user into a displacement function includes:
- the initial attribute parameters include an initial position parameter, an initial rotation parameter, an initial size, and an initial color parameter
- the attribute function sent to the graphics processor includes a displacement function, a rotation function, a size function, and a color function
- the real-time attribute parameters corresponding to the particle playback time are calculated including:
- a particle calculation method including:
- real-time attribute parameters corresponding to the particle playback time are calculated according to the initial attribute parameters, the attribute function, and the particle playback time.
- the initial attribute parameters include an initial position parameter, an initial rotation parameter, an initial size, and an initial color parameter
- the attribute function includes a displacement function, a rotation function, a size function, and a color function
- the real-time attribute parameters corresponding to the particle playback time are calculated including:
- the displacement function is obtained by converting the velocity function received by the central processing unit with respect to the time integral.
- a particle calculation method which includes:
- the central processor receives the initial attribute parameters and attribute functions of the particles input by the user, and the attribute functions correspond to the initial attribute parameters;
- the central processor sends the initial attribute parameters and attribute functions to the graphics processor
- the graphics processor calculates the real-time attribute parameters corresponding to the particle playing time according to the initial attribute parameters, the attribute function, and the particle playing time.
- a particle computing device which includes:
- the first receiving module is configured to receive the initial attribute parameter and attribute function of the particle input by the user; the attribute function corresponds to the initial attribute parameter; and
- the first calculation module is configured to send the initial attribute parameters and attribute functions to the graphics processor, so that the graphics processor calculates real-time attributes corresponding to the particle playback time according to the initial attribute parameters, attribute functions, and particle playback time during particle playback parameter.
- the first calculation module is further configured to, when sending the initial attribute parameters and attribute functions to the graphics processor:
- the initial attribute parameters, displacement function, and other attribute functions except the velocity function are sent to the graphics processor.
- the first calculation module is further configured to convert the velocity function in the attribute function input by the user into a displacement function:
- the initial attribute parameters include an initial position parameter, an initial rotation parameter, an initial size, and an initial color parameter
- the attribute function sent to the graphics processor includes a displacement function, a rotation function, a size function, and a color function
- the first calculation module is also configured to enable the graphics processor to calculate the real-time attribute parameters corresponding to the particle playback time according to the initial attribute parameters, the attribute function, and the particle playback time:
- a particle computing device which includes:
- the second receiving module is configured to receive the initial attribute parameters and attribute functions of the particles sent by the central processing unit, and the attribute functions correspond to the initial attribute parameters;
- the second calculation module is configured to calculate the real-time attribute parameter corresponding to the particle playing time according to the initial attribute parameter, the attribute function, and the particle playing time when the particle is playing.
- the initial attribute parameters include an initial position parameter, an initial rotation parameter, an initial size, and an initial color parameter
- the attribute function includes a displacement function, a rotation function, a size function, and a color function
- the second calculation module is also configured to calculate the real-time attribute parameter corresponding to the particle playing time according to the initial attribute parameter, the attribute function, and the particle playing time:
- the displacement function is obtained based on the integration of the velocity function received by the central processing unit with respect to time.
- an electronic device including:
- One or more processors are One or more processors.
- the memory is configured to store one or more application programs
- the one or more application programs are configured to execute the particle calculation method shown in the first aspect of the present application when being executed by one or more processors.
- a computer-readable storage medium is provided, and a computer program is stored on the computer-readable storage medium, wherein the program is configured to be executed by a processor to implement the method shown in the first aspect of the present application The particle calculation method.
- the initial attribute parameters and attribute functions of the particles input by the user are received through the central processing unit, and the attribute functions correspond to the initial attribute parameters, and then the central processing unit sends the initial attribute parameters and attribute functions to the graphics processing unit.
- the graphics processor calculates the real-time attribute parameters corresponding to the particle playback time according to the initial attribute parameters, attribute functions, and particle playback time during particle playback.
- the central processor directly sends the initial attribute parameters and attribute functions to the graphics processor.
- the graphics processor does not need to write the data back to the central processing unit after the calculation is completed, and it can be applied to the lower version of the graphics API.
- the central processing unit converts the velocity function in the attribute function input by the user into a displacement function, and then sends the initial attribute parameter, the displacement function and other attribute functions except the velocity function to the graphics processor, and the graphics processor performs calculations.
- the central processing unit and the graphics processor carry out the division of labor and cooperation, and the graphics processor performs complex calculations, which can further improve the efficiency of particle calculation.
- FIG. 1 is a schematic flowchart of a particle calculation method according to an embodiment of the present application
- FIG. 2 is a schematic flowchart of a particle calculation method according to an embodiment of the present application
- FIG. 3 is a schematic flowchart of a particle calculation method according to an embodiment of the present application.
- FIG. 4 is a schematic flowchart of a particle calculation method according to an embodiment of the present application.
- Fig. 5 is a schematic structural diagram of a particle computing device according to an embodiment of the present application.
- Fig. 6 is a schematic structural diagram of a particle computing device according to an embodiment of the present application.
- Fig. 7 is a schematic structural diagram of a particle computing device according to an embodiment of the present application.
- Fig. 8 is a schematic structural diagram of an electronic device for particle computing according to an embodiment of the present application.
- the central processing unit is one of the main equipment of an electronic computer and the core component of the computer. Its function is mainly to interpret computer instructions and process data in computer software.
- the CPU is the core component of the computer that is responsible for reading instructions, decoding and executing instructions.
- the graphics processing unit is the processor of the graphics card, similar to the CPU, except that the GPU is designed to perform complex mathematical and geometric calculations, which are necessary for graphics rendering.
- the particle computing method, device, electronic device, and computer-readable storage medium provided in this application are intended to solve the above technical problems in the prior art.
- An embodiment of the present application provides a particle calculation method. As shown in FIG. 1, the method may include the following steps.
- Step S101 Receive initial attribute parameters and attribute functions of particles input by the user, where the attribute functions correspond to the initial attribute parameters.
- the initial attribute parameter of the particle can include the initial position parameter, and the corresponding attribute function can be a velocity function or a displacement function; the initial attribute parameter can also include an initial rotation parameter, for example, angular velocity, and the corresponding attribute function can be a rotation function; the initial attribute The parameter may also include the initial size, that is, the initial size of the particle, and the corresponding attribute function may be a size function; the initial attribute parameter may also include an initial color parameter, and the corresponding attribute function may be a color function.
- users can input initial attribute parameters and corresponding attribute functions into the central processing unit by themselves; they can also pre-store various attribute parameters and various attribute functions in the terminal or server, and users can choose from the pre-stored attribute parameters and attributes. Select the initial attribute parameter and corresponding attribute function for calculation in the function.
- Step S102 Send the initial attribute parameter and the attribute function to the graphics processor, so that the graphics processor calculates the real-time attribute parameter corresponding to the particle playback time according to the initial attribute parameter, the attribute function, and the particle playback time during particle playback.
- the playing time of the particle may be the time that the particle has moved after switching from the static state to the moving state.
- the central processing unit can directly send the initial attribute parameters and attribute functions to the graphics processor, and calculate through the graphics processor during particle playback; the central processing unit can also process the attribute functions first, and then process The latter attribute function is sent to the graphics processor, and the particles are calculated by the graphics processor when the particles are played.
- the real-time position of the particle is calculated according to the initial position parameter, velocity function, and particle playback time of the particle, or the initial position parameter, displacement function, and particle playback time of the particle; the particle is calculated according to the initial rotation parameter, rotation function, and particle playback time
- the real-time rotation parameters of the particles; the real-time size parameters of the particles are calculated according to the initial size, the size function and the particle playback time; the real-time color parameters of the particles are calculated according to the initial color parameters, the color function and the particle playback time.
- the initial attribute parameters and attribute functions of the particles input by the user are received by the central processing unit.
- the attribute functions correspond to the initial attribute parameters, and then the central processing unit sends the initial attribute parameters and attribute functions to the graphics processor.
- the graphics processor calculates the real-time attribute parameters corresponding to the particle playback time according to the initial attribute parameters, attribute functions, and particle playback time during particle playback.
- the central processor directly sends the initial attribute parameters and attribute functions to the graphics processor, and the graphics processor calculates After completion, there is no need to write the data back to the central processor, which can be applied to low-level graphics APIs; and the calculation process does not need to set up other processors, which can save storage space; the graphics processor performs more complex calculations, which can improve the efficiency of particle calculations .
- the embodiment of the present application provides a possible implementation manner.
- the sending of the initial attribute parameter and the attribute function to the graphics processor in step S102 may include:
- the user can directly input the velocity function, that is, the change curve of the particle motion velocity with time, and the central processing unit can convert the velocity function to obtain the displacement function.
- the velocity function that is, the change curve of the particle motion velocity with time
- the velocity function input by the user is integrated with respect to time to obtain the displacement function.
- the central processing unit can recognize whether the attribute function input by the user is a velocity function or a displacement function. If it is recognized as a velocity function, the velocity function is converted; if it is recognized as a displacement function, the displacement function and other attribute functions are directly Send to the graphics processor.
- the initial attribute parameters may include initial position parameters, initial rotation parameters, initial size, and initial color parameters;
- the attribute functions sent to the graphics processor may include displacement functions, rotation functions, size functions, and color functions.
- the calculation of the real-time attribute parameter corresponding to the particle playback time according to the initial attribute parameter, the attribute function, and the particle playback time in step S102 may include:
- S(t) is the real-time position of the particle
- S origin is the initial position of the particle
- v(t) is the velocity function of the particle
- the initial attribute parameters and attribute functions of the particles input by the user are received by the central processing unit.
- the attribute functions correspond to the initial attribute parameters, and then the central processing unit sends the initial attribute parameters and attribute functions to the graphics processor.
- the graphics processor calculates the real-time attribute parameters corresponding to the particle playback time according to the initial attribute parameters, attribute functions, and particle playback time during particle playback.
- the central processor directly sends the initial attribute parameters and attribute functions to the graphics processor and graphics processor. After the calculation is completed, there is no need to write the data back to the central processing unit, which can be applied to low-level graphics APIs.
- the central processing unit converts the velocity function in the attribute function input by the user into a displacement function, and then sends the initial attribute parameter, the displacement function, and other attribute functions except the velocity function to the graphics processor, and the graphics processor
- the central processing unit and the graphics processor perform division of labor and coordination, and the graphics processor performs complex calculations, which can further improve the efficiency of particle calculations.
- This embodiment also provides a particle calculation method. As shown in FIG. 2, the method may include the following steps.
- Step S201 Receive the initial attribute parameter and attribute function of the particle sent by the central processing unit, where the attribute function corresponds to the initial attribute parameter.
- the initial attribute parameter of the particle may include an initial position parameter, and the corresponding attribute function may be a velocity function or a displacement function; the initial attribute parameter may also include an initial rotation parameter, for example, angular velocity, and the corresponding attribute function may be a rotation function;
- the parameter may also include the initial size, that is, the initial size of the particle, and the corresponding attribute function may be a size function; the initial attribute parameter may also include an initial color parameter, and the corresponding attribute function may be a color function.
- Step S202 Calculate real-time attribute parameters corresponding to the particle playing time according to the initial attribute parameter, the attribute function, and the particle playing time during particle playing.
- the playing time of the particle may be the time that the particle has moved after switching from the static state to the moving state.
- the real-time position of the particle is calculated according to the initial position parameter, velocity function, and particle playback time of the particle, or the initial position parameter, displacement function, and particle playback time of the particle; the particle is calculated according to the initial rotation parameter, rotation function, and particle playback time
- the real-time rotation parameters of the particles; the real-time size parameters of the particles are calculated according to the initial size, the size function and the particle playback time; the real-time color parameters of the particles are calculated according to the initial color parameters, the color function and the particle playback time.
- the initial attribute parameters may include initial position parameters, initial rotation parameters, initial size, and initial color parameters;
- the attribute functions include displacement function, rotation function, size function, and color function; in step S202, according to the initial attribute parameters , Attribute function and particle playback time calculation
- the real-time attribute parameters corresponding to the particle playback time can include:
- the displacement function is obtained by transforming the speed function received by the central processing unit with respect to the time integral.
- the central processing unit can recognize whether the attribute function input by the user is a velocity function or a displacement function. If it is recognized as a velocity function, the velocity function is converted; if it is recognized as a displacement function, the displacement function and other attribute functions are directly Send to the graphics processor.
- S(t) is the real-time position of the particle
- S origin is the initial position of the particle
- v(t) is the velocity function of the particle
- the initial attribute parameters and attribute functions of the particles input by the user are received by the central processing unit.
- the attribute functions correspond to the initial attribute parameters, and then the central processing unit sends the initial attribute parameters and attribute functions to the graphics processor.
- the graphics processor calculates the real-time attribute parameters corresponding to the particle playback time according to the initial attribute parameters, attribute functions, and particle playback time during particle playback.
- the central processor directly sends the initial attribute parameters and attribute functions to the graphics processor and graphics processor. After the calculation is completed, there is no need to write the data back to the central processing unit, which can be applied to low-level graphics APIs.
- the central processing unit converts the velocity function in the attribute function input by the user into a displacement function, and then sends the initial attribute parameter, the displacement function, and other attribute functions except the velocity function to the graphics processor, and the graphics processor
- the central processing unit and the graphics processor perform division of labor and coordination, and the graphics processor performs complex calculations, which can further improve the efficiency of particle calculations.
- This embodiment also provides a particle calculation method. As shown in FIG. 3, the method may include the following steps.
- Step S301 the central processor receives the initial attribute parameter and attribute function of the particle input by the user; the attribute function corresponds to the initial attribute parameter.
- the initial attribute parameter of the particle can include the initial position parameter, and the corresponding attribute function can be a velocity function or a displacement function; the initial attribute parameter can also include an initial rotation parameter, for example, angular velocity, and the corresponding attribute function can be a rotation function; the initial attribute The parameter may also include the initial size, that is, the initial size of the particle, and the corresponding attribute function may be a size function; the initial attribute parameter may also include an initial color parameter, and the corresponding attribute function may be a color function.
- step S302 the central processor sends the initial attribute parameters and attribute functions to the graphics processor.
- the central processing unit can directly send the initial attribute parameters and attribute functions to the graphics processor, and the graphics processor performs calculations during particle playback; the central processing unit can also process the attribute functions first, and then process The latter attribute function is sent to the graphics processor, and the particle calculation is performed by the graphics processor during particle playback.
- the central processing unit can also recognize whether the attribute function input by the user is a velocity function or a displacement function. If it is recognized as a velocity function, the velocity function is converted; if it is recognized as a displacement function, the displacement function and other attribute functions are converted. Send directly to the graphics processor.
- step S303 the graphics processor calculates the real-time attribute parameter corresponding to the particle playback time according to the initial attribute parameter, the attribute function, and the particle playback time during particle playback.
- the playing time of the particle may be the time that the particle has moved after switching from the static state to the moving state.
- the real-time position of the particle is calculated according to the initial position parameter, velocity function, and particle playback time of the particle, or the initial position parameter, displacement function, and particle playback time of the particle; the particle is calculated according to the initial rotation parameter, rotation function, and particle playback time
- the real-time rotation parameters of the particles; the real-time size parameters of the particles are calculated according to the initial size, the size function and the particle playback time; the real-time color parameters of the particles are calculated according to the initial color parameters, the color function and the particle playback time.
- the initial attribute parameters and attribute functions of the particles input by the user are received by the central processing unit.
- the attribute functions correspond to the initial attribute parameters, and then the central processing unit sends the initial attribute parameters and attribute functions to the graphics processor.
- the graphics processor calculates the real-time attribute parameters corresponding to the particle playback time according to the initial attribute parameters, attribute functions, and particle playback time during particle playback.
- the central processor directly sends the initial attribute parameters and attribute functions to the graphics processor and graphics processor.
- the particle calculation method provided in this application may include the following steps:
- Step S401 the central processor receives the initial attribute parameter and attribute function of the particle input by the user, and the attribute function corresponds to the initial attribute parameter;
- Step S402 the central processing unit converts the velocity function in the received attribute function into a displacement function
- Step S403 the central processor sends the initial attribute parameter, the displacement function and other attribute functions except the speed function to the graphics processor;
- Step S404 the graphics processor calculates the real-time position of the particle according to the initial position parameter and the displacement function
- Step S405 the graphics processor calculates the real-time rotation parameters of the particles according to the initial rotation parameters and the rotation function
- Step S406 the graphics processor calculates the real-time size of the particle according to the initial size and the size function.
- step S407 the graphics processor calculates the real-time color parameters of the particles according to the initial color parameters and the color function.
- the central processing unit converts the velocity function in the attribute function input by the user into a displacement function, and then sends the initial attribute parameter, the displacement function and other attribute functions except the velocity function to the graphics processor, which will be processed by the graphics
- the central processing unit and the graphics processor perform the calculation, the central processing unit and the graphics processor perform division of labor, and the graphics processor performs complex calculations, which can further improve the particle calculation efficiency.
- the particle computing device 50 may include: a first receiving module 501 and a first computing module 502. among them,
- the first receiving module 501 is configured to receive initial attribute parameters and attribute functions of particles input by a user, and the attribute functions correspond to the initial attribute parameters;
- the first calculation module 502 is configured to send initial attribute parameters and attribute functions to the graphics processor, so that the graphics processor calculates the real-time corresponding to the particle playback time according to the initial attribute parameters, attribute functions, and particle playback time during particle playback. Property parameters.
- the aforementioned particle computing device receives the initial attribute parameters and attribute functions of the particles input by the user through the central processing unit.
- the attribute functions correspond to the initial attribute parameters, and then the central processing unit sends the initial attribute parameters and attribute functions to the graphics processor.
- the graphics processor calculates the real-time attribute parameters corresponding to the particle playback time according to the initial attribute parameters, attribute functions, and particle playback time during particle playback.
- the central processor directly sends the initial attribute parameters and attribute functions to the graphics processor and graphics processor. After the calculation is completed, there is no need to write the data back to the central processing unit, which can be applied to low-level graphics APIs, and no other processors need to be set up during the calculation process, which can save storage space; the graphics processor performs more complex calculations, which can improve particles Computational efficiency.
- the first calculation module 502 is further configured to, when sending the initial attribute parameters and attribute functions to the graphics processor:
- the first calculation module 502 is further configured to convert the velocity function in the attribute function input by the user into a displacement function:
- the initial attribute parameter may include an initial position parameter, an initial rotation parameter, an initial size, and an initial color parameter
- the attribute function sent to the graphics processor includes a displacement function, a rotation function, a size function, and a color function
- the first calculation module 502 is further configured to enable the graphics processor to calculate the real-time attribute parameter corresponding to the particle playback time according to the initial attribute parameter, the attribute function, and the particle playback time:
- the particle computing device 60 may include: a second receiving module 601 and a second computing module 602. among them,
- the second receiving module 601 is configured to receive the initial attribute parameters and attribute functions of the particles sent by the central processing unit, and the attribute functions correspond to the initial attribute parameters;
- the second calculation module 602 is configured to calculate the real-time attribute parameter corresponding to the particle playing time according to the initial attribute parameter, the attribute function, and the particle playing time when the particle is playing.
- the initial attribute parameters may include initial position parameters, initial rotation parameters, initial size, and initial color parameters;
- the attribute functions include displacement function, rotation function, size function, and color function;
- the second calculation module 602 is also configured to calculate the real-time attribute parameter corresponding to the particle playing time according to the initial attribute parameter, the attribute function, and the particle playing time:
- the displacement function is obtained by transforming the speed function received by the central processing unit with respect to the time integral.
- the particle computing device 70 may include: a third receiving module 701, a sending module 702, and a third computing module 703. among them,
- the third receiving module 701 is configured to enable the central processing unit to receive the initial attribute parameters and attribute functions of the particles input by the user, and the attribute functions correspond to the initial attribute parameters;
- the sending module 702 is configured to enable the central processing unit to send initial attribute parameters and attribute functions to the graphics processor;
- the third calculation module 703 is configured to enable the graphics processor to calculate the real-time attribute parameter corresponding to the particle playing time according to the initial attribute parameter, the attribute function, and the particle playing time when the particle is playing.
- the aforementioned particle computing device receives the initial attribute parameters and attribute functions of the particles input by the user through the central processing unit.
- the attribute functions correspond to the initial attribute parameters, and then the central processing unit sends the initial attribute parameters and attribute functions to the graphics processor.
- the graphics processor calculates the real-time attribute parameters corresponding to the particle playback time according to the initial attribute parameters, attribute functions, and particle playback time during particle playback.
- the central processor directly sends the initial attribute parameters and attribute functions to the graphics processor and graphics processor. After the calculation is completed, there is no need to write the data back to the central processing unit, which can be applied to low-level graphics APIs, and no other processors need to be set up during the calculation process, which can save storage space; the graphics processor performs more complex calculations, which can improve particles Computational efficiency.
- the particle computing device for the picture in the embodiment of the present disclosure can execute a particle computing method for the picture provided by the embodiment of the present disclosure, and the implementation principle is similar.
- the modules in the particle computing device for the picture in each embodiment of the present disclosure The actions performed correspond to the steps in the particle calculation method of the picture in each embodiment of the present disclosure.
- an electronic device is also provided in the embodiment of the present disclosure.
- the electronic device may include, but is not limited to: a processor and a memory; and a memory for storing a computer. Operation instruction; processor, used to execute the method shown in the embodiment by invoking a computer operation instruction.
- the electronic device in this application can be adapted to lower version graphics API.
- an electronic device is provided.
- the electronic device 4000 shown in FIG. 8 includes a processor 4001 and a memory 4003. Among them, the processor 4001 and the memory 4003 are connected, such as through a bus 4002.
- the electronic device 4000 may further include a transceiver 4004. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation to the embodiment of the present application.
- the processor 4001 may be a central processing unit (CPU), a general-purpose processor, a data signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, Hardware components or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in conjunction with the disclosure of this application.
- the processor 4001 may also be a combination for realizing computing functions, for example, including a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
- the bus 4002 may include a path for transferring information between the above-mentioned components.
- the bus 4002 may be a Peripheral Component Interconnection Standard (PCI) bus or an Extended Industry Standard Architecture (EISA) bus or the like.
- PCI Peripheral Component Interconnection Standard
- EISA Extended Industry Standard Architecture
- the bus 4002 can be divided into an address bus, a data bus, a control bus, and so on. For ease of representation, only one thick line is used in FIG. 8, but it does not mean that there is only one bus or one type of bus.
- the memory 4003 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electronic device.
- ROM read-only memory
- RAM random access memory
- EEPROM Erasable Programmable Read-Only Memory
- CD-ROM or other optical disc storage optical disc storage (including compact discs, laser discs, optical discs, digital universal discs, Blu-ray discs, etc.), magnetic disk storage media or other Magnetic storage devices, or any other media that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but are not limited thereto.
- the memory 4003 is used to store application program codes for executing the solution of the present application, and is controlled by the processor 4001 to execute.
- the processor 4001 is configured to execute the application program code stored in the memory 4003 to implement the content shown in the foregoing method embodiment.
- electronic devices include but are not limited to: mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDA), tablet computers (PAD), portable multimedia players (PMP), vehicle terminals (for example, vehicle navigation terminals) And so on mobile terminals and fixed terminals such as digital TVs, desktop computers, etc.
- PDA personal digital assistants
- PAD tablet computers
- PMP portable multimedia players
- vehicle terminals for example, vehicle navigation terminals
- FIG. 8 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
- the embodiments of the present application provide a computer-readable storage medium with a computer program stored on the computer-readable storage medium, and when it runs on a computer, the computer can execute the corresponding content in the foregoing method embodiment.
- the computer-readable storage medium provided in this application can be suitable for lower version graphics APIs.
- the aforementioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
- the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable removable Programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
- a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
- a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
- the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
- the computer-readable signal medium may send, propagate or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
- the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, radio frequency (RF), etc., or any suitable combination of the above.
- the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.
- the foregoing computer-readable medium carries one or more programs, and when the foregoing one or more programs are executed by the electronic device, the electronic device is caused to execute the method shown in the foregoing embodiment.
- the computer program code used to perform the operations of the present disclosure may be written in one or more programming languages or a combination thereof.
- the above-mentioned programming languages include object-oriented programming languages—such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language.
- the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
- the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to pass Internet connection).
- LAN local area network
- WAN wide area network
- each block in the flowchart or block diagram may represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logical function Executable instructions.
- the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved.
- each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
- the units involved in the embodiments described in the present disclosure can be implemented in software or hardware. Wherein, the name of the unit does not constitute a limitation on the unit itself under certain circumstances.
- the first obtaining unit can also be described as "a unit for obtaining at least two Internet Protocol addresses.”
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Graphics (AREA)
- Image Generation (AREA)
Abstract
Description
Claims (12)
- 一种粒子计算方法,包括:A particle calculation method, including:接收用户输入的粒子的初始属性参数和属性函数,所述属性函数与所述初始属性参数相对应;Receiving initial attribute parameters and attribute functions of particles input by a user, where the attribute functions correspond to the initial attribute parameters;将所述初始属性参数和所述属性函数发送到图形处理器;以及Sending the initial attribute parameter and the attribute function to the graphics processor; and在粒子播放时,由所述图形处理器根据所述初始属性参数、所述属性函数以及粒子播放时间计算与所述粒子播放时间对应的实时属性参数。During particle playback, the graphics processor calculates real-time attribute parameters corresponding to the particle playback time according to the initial attribute parameter, the attribute function, and the particle playback time.
- 根据权利要求1所述的粒子计算方法,其中,所述将所述初始属性参数和所述属性函数发送到图形处理器包括:The particle calculation method according to claim 1, wherein said sending said initial attribute parameter and said attribute function to a graphics processor comprises:将用户输入的所述属性函数中的速度函数转化为位移函数;以及Converting the velocity function in the attribute function input by the user into a displacement function; and将所述初始属性参数、所述位移函数和除所述速度函数以外的其他属性函数发送到图形处理器。The initial attribute parameter, the displacement function, and other attribute functions other than the velocity function are sent to the graphics processor.
- 根据权利要求2所述的粒子计算方法,其中,所述将用户输入的所述属性函数中的速度函数转化为位移函数包括:The particle calculation method according to claim 2, wherein said converting the velocity function in the attribute function input by the user into a displacement function comprises:将用户输入的所述速度函数相对于时间进行积分转化得到所述位移函数。The speed function input by the user is integrated with respect to time to obtain the displacement function.
- 根据权利要求2所述的粒子计算方法,其中,所述初始属性参数包括初始位置参数、初始旋转参数、初始尺寸和初始颜色参数;发送到图形处理器的所述属性函数包括所述位移函数、旋转函数、尺寸函数和颜色函数;The particle calculation method according to claim 2, wherein the initial attribute parameters include initial position parameters, initial rotation parameters, initial dimensions, and initial color parameters; the attribute function sent to the graphics processor includes the displacement function, Rotation function, size function and color function;所述根据所述初始属性参数、所述属性函数以及粒子播放时间计算与所述粒子播放时间对应的实时属性参数包括:The calculating the real-time attribute parameter corresponding to the particle playing time according to the initial attribute parameter, the attribute function, and the particle playing time includes:根据所述初始位置参数和所述位移函数计算粒子的实时位置;Calculating the real-time position of the particle according to the initial position parameter and the displacement function;根据所述初始旋转参数和所述旋转函数计算粒子的实时旋转参数;Calculating the real-time rotation parameter of the particle according to the initial rotation parameter and the rotation function;根据所述初始尺寸和所述尺寸函数计算粒子的实时尺寸;以及Calculating the real-time size of the particles according to the initial size and the size function; and根据所述初始颜色参数和所述颜色函数计算粒子的实时颜色参数。The real-time color parameters of the particles are calculated according to the initial color parameters and the color function.
- 一种粒子计算方法,包括:A particle calculation method, including:接收中央处理器发送的粒子的初始属性参数和属性函数,所述属性函 数与所述初始属性参数相对应;以及Receiving initial attribute parameters and attribute functions of the particles sent by the central processing unit, where the attribute functions correspond to the initial attribute parameters; and在粒子播放时根据所述初始属性参数、所述属性函数以及粒子播放时间计算与所述粒子播放时间对应的实时属性参数。During particle playback, real-time attribute parameters corresponding to the particle playback time are calculated according to the initial attribute parameter, the attribute function, and the particle playback time.
- 根据权利要求5所述的粒子计算方法,其中,所述初始属性参数包括初始位置参数、初始旋转参数、初始尺寸和初始颜色参数;所述属性函数包括位移函数、旋转函数、尺寸函数和颜色函数;The particle calculation method according to claim 5, wherein the initial attribute parameters include initial position parameters, initial rotation parameters, initial size, and initial color parameters; and the attribute functions include displacement function, rotation function, size function, and color function ;所述根据所述初始属性参数、所述属性函数以及粒子播放时间计算与所述粒子播放时间对应的实时属性参数包括:The calculating the real-time attribute parameter corresponding to the particle playing time according to the initial attribute parameter, the attribute function, and the particle playing time includes:根据所述初始位置参数和所述位移函数计算粒子的实时位置;Calculating the real-time position of the particle according to the initial position parameter and the displacement function;根据所述初始旋转参数和所述旋转函数计算粒子的实时旋转参数;Calculating the real-time rotation parameter of the particle according to the initial rotation parameter and the rotation function;根据所述初始尺寸和所述尺寸函数计算粒子的实时尺寸;以及Calculating the real-time size of the particles according to the initial size and the size function; and根据所述初始颜色参数和所述颜色函数计算粒子的实时颜色参数。The real-time color parameters of the particles are calculated according to the initial color parameters and the color function.
- 根据权利要求6所述的粒子计算方法,其中,所述位移函数基于所述中央处理器接收到的速度函数相对于时间积分转化得到。8. The particle calculation method according to claim 6, wherein the displacement function is obtained by converting the velocity function received by the central processing unit with respect to time integral.
- 一种粒子计算方法,包括:A particle calculation method, including:由中央处理器接收用户输入的粒子的初始属性参数和属性函数,所述属性函数与所述初始属性参数相对应;The central processor receives the initial attribute parameters and attribute functions of the particles input by the user, and the attribute functions correspond to the initial attribute parameters;由所述中央处理器将所述初始属性参数和所述属性函数发送到图形处理器;以及Sending the initial attribute parameter and the attribute function to the graphics processor by the central processing unit; and在粒子播放时,由所述图形处理器根据所述初始属性参数、所述属性函数以及粒子播放时间计算与所述粒子播放时间对应的实时属性参数。During particle playback, the graphics processor calculates real-time attribute parameters corresponding to the particle playback time according to the initial attribute parameter, the attribute function, and the particle playback time.
- 一种粒子计算装置,包括:A particle computing device, including:第一接收模块,被配置为接收用户输入的粒子的初始属性参数和属性函数,所述属性函数与所述初始属性参数相对应;以及The first receiving module is configured to receive the initial attribute parameters and attribute functions of the particles input by the user, the attribute functions corresponding to the initial attribute parameters; and第一计算模块,被配置为将所述初始属性参数和所述属性函数发送到图形处理器,以在粒子播放时由所述图形处理器根据所述初始属性参数、所述属性函数以及粒子播放时间计算与所述粒子播放时间对应的实时属性参数。The first calculation module is configured to send the initial attribute parameter and the attribute function to the graphics processor, so that when the particle is played, the graphics processor will play according to the initial attribute parameter, the attribute function, and the particle playback. Time calculation of real-time attribute parameters corresponding to the particle playing time.
- 一种粒子计算装置,包括:A particle computing device, including:第二接收模块,被配置为接收由中央处理器发送的粒子的初始属性参数和属性函数,所述属性函数与所述初始属性参数相对应;以及The second receiving module is configured to receive the initial attribute parameter and attribute function of the particle sent by the central processing unit, the attribute function corresponding to the initial attribute parameter; and第二计算模块,被配置为在粒子播放时根据所述初始属性参数、所述属性函数以及粒子播放时间计算与所述粒子播放时间对应的实时属性参数。The second calculation module is configured to calculate a real-time attribute parameter corresponding to the particle playing time according to the initial attribute parameter, the attribute function, and the particle playing time during particle playing.
- 一种电子设备,包括:An electronic device including:一个或多个处理器;One or more processors;存储器,所述存储器被配置为存储一个或多个应用程序;A memory, the memory is configured to store one or more application programs;其中所述一个或多个应用程序被配置为由所述一个或多个处理器执行时执行根据权利要求1-8中的任一项所述的粒子计算方法。The one or more application programs are configured to execute the particle calculation method according to any one of claims 1-8 when being executed by the one or more processors.
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,该程序被配置为由处理器执行时实现权利要求1-8中的任一项所述的粒子计算方法。A computer-readable storage medium storing a computer program, wherein the program is configured to implement the particle calculation method according to any one of claims 1-8 when executed by a processor.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910828698.9 | 2019-09-03 | ||
CN201910828698.9A CN111815749A (en) | 2019-09-03 | 2019-09-03 | Particle calculation method, particle calculation device, electronic equipment and computer-readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021043128A1 true WO2021043128A1 (en) | 2021-03-11 |
Family
ID=72844528
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/112840 WO2021043128A1 (en) | 2019-09-03 | 2020-09-01 | Particle calculation method and apparatus, electronic device, and computer readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111815749A (en) |
WO (1) | WO2021043128A1 (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102722859A (en) * | 2012-05-31 | 2012-10-10 | 北京像素软件科技股份有限公司 | Method for rendering computer simulation scene |
CN104867186A (en) * | 2015-04-29 | 2015-08-26 | 中国海洋大学 | GPU-based interactive ocean three-dimensional flow field dynamic visual algorithm |
US20170091983A1 (en) * | 2015-09-30 | 2017-03-30 | Visual Music Systems, Inc. | Four-dimensional path-adaptive anchoring for immersive virtual visualization systems |
CN107392935A (en) * | 2017-07-06 | 2017-11-24 | 苏州蜗牛数字科技股份有限公司 | A kind of particle computational methods and particIe system based on integral formula |
CN107392835A (en) * | 2016-05-16 | 2017-11-24 | 腾讯科技(深圳)有限公司 | A kind of processing method and processing device of particIe system |
CN111540035A (en) * | 2020-05-07 | 2020-08-14 | 支付宝(杭州)信息技术有限公司 | Particle rendering method, device and equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105718998A (en) * | 2016-01-21 | 2016-06-29 | 上海斐讯数据通信技术有限公司 | Particle swarm optimization method based on mobile terminal GPU operation and system thereof |
-
2019
- 2019-09-03 CN CN201910828698.9A patent/CN111815749A/en active Pending
-
2020
- 2020-09-01 WO PCT/CN2020/112840 patent/WO2021043128A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102722859A (en) * | 2012-05-31 | 2012-10-10 | 北京像素软件科技股份有限公司 | Method for rendering computer simulation scene |
CN104867186A (en) * | 2015-04-29 | 2015-08-26 | 中国海洋大学 | GPU-based interactive ocean three-dimensional flow field dynamic visual algorithm |
US20170091983A1 (en) * | 2015-09-30 | 2017-03-30 | Visual Music Systems, Inc. | Four-dimensional path-adaptive anchoring for immersive virtual visualization systems |
CN107392835A (en) * | 2016-05-16 | 2017-11-24 | 腾讯科技(深圳)有限公司 | A kind of processing method and processing device of particIe system |
CN107392935A (en) * | 2017-07-06 | 2017-11-24 | 苏州蜗牛数字科技股份有限公司 | A kind of particle computational methods and particIe system based on integral formula |
CN111540035A (en) * | 2020-05-07 | 2020-08-14 | 支付宝(杭州)信息技术有限公司 | Particle rendering method, device and equipment |
Also Published As
Publication number | Publication date |
---|---|
CN111815749A (en) | 2020-10-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022127278A1 (en) | Method and apparatus for rendering virtual scene | |
WO2020186935A1 (en) | Virtual object displaying method and device, electronic apparatus, and computer-readable storage medium | |
WO2020228406A1 (en) | Image stylization generation method and apparatus, and electronic device | |
WO2022166927A1 (en) | Cursor display method and apparatus based on remote desktop, medium, and electronic device | |
WO2021008627A1 (en) | Game character rendering method and apparatus, electronic device, and computer-readable medium | |
WO2020248900A1 (en) | Panoramic video processing method and apparatus, and storage medium | |
WO2022242379A1 (en) | Stroke-based rendering method and device, storage medium and terminal | |
JP2017526045A (en) | An efficient hardware mechanism to ensure shared resource data coherency across draw calls | |
WO2023103999A1 (en) | 3d target point rendering method and apparatus, and device and storage medium | |
CN111798545A (en) | Method and device for playing skeleton animation, electronic equipment and readable storage medium | |
WO2023029893A1 (en) | Texture mapping method and apparatus, device and storage medium | |
WO2023202358A1 (en) | Virtual object motion control method and device | |
WO2023193639A1 (en) | Image rendering method and apparatus, readable medium and electronic device | |
WO2023172195A2 (en) | Line special effect processing method and apparatus, electronic device, storage medium, and product | |
CN111652675A (en) | Display method and device and electronic equipment | |
CN111355978A (en) | Video file processing method and device, mobile terminal and storage medium | |
WO2020207083A1 (en) | Information sharing method and apparatus, and electronic device and computer-readable storage medium | |
WO2021043128A1 (en) | Particle calculation method and apparatus, electronic device, and computer readable storage medium | |
WO2023197911A1 (en) | Three-dimensional virtual object generation method and apparatus, and device, medium and program product | |
WO2023169287A1 (en) | Beauty makeup special effect generation method and apparatus, device, storage medium, and program product | |
WO2023174087A1 (en) | Method and apparatus for generating special effect video, and device and storage medium | |
CN111355997B (en) | Video file generation method and device, mobile terminal and storage medium | |
CN111862342A (en) | Texture processing method and device for augmented reality, electronic equipment and storage medium | |
WO2023138467A1 (en) | Virtual object generation method and apparatus, device, and storage medium | |
CN110069195B (en) | Image dragging deformation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20861782 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20861782 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 14.06.2023) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20861782 Country of ref document: EP Kind code of ref document: A1 |