WO2022033446A1 - 动态流体效果处理方法、装置、电子设备和可读介质 - Google Patents

动态流体效果处理方法、装置、电子设备和可读介质 Download PDF

Info

Publication number
WO2022033446A1
WO2022033446A1 PCT/CN2021/111609 CN2021111609W WO2022033446A1 WO 2022033446 A1 WO2022033446 A1 WO 2022033446A1 CN 2021111609 W CN2021111609 W CN 2021111609W WO 2022033446 A1 WO2022033446 A1 WO 2022033446A1
Authority
WO
WIPO (PCT)
Prior art keywords
fluid
particle
particles
fluid particle
neighbor
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.)
Ceased
Application number
PCT/CN2021/111609
Other languages
English (en)
French (fr)
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Publication of WO2022033446A1 publication Critical patent/WO2022033446A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/20Three-dimensional [3D] animation

Definitions

  • the present disclosure relates to the field of computer technology, and in particular, the present disclosure relates to a dynamic fluid effect processing method, apparatus, electronic device and readable medium.
  • Computer Graphics is the science of using mathematical algorithms to convert two-dimensional or three-dimensional graphics into grid form for computer displays. Simply put, the main research content of computer graphics is to study how to represent graphics in computers, and to use computers to calculate, process and display related principles and algorithms of graphics.
  • Fluid simulation based on physics animation is an important research area in computer graphics.
  • mobile terminals have been widely used. Since the fluid simulation method in the prior art requires a very large amount of calculation, if the method is applied to a mobile terminal, since the computing and storage resources on the mobile terminal are very limited, the calculation speed of the method in the prior art is slow and cannot be meet real-time requirements.
  • the present disclosure provides a dynamic fluid effect processing method, device, electronic device and readable medium, which are used to solve the problems existing in the prior art.
  • a dynamic fluid effect processing method comprising:
  • each thread corresponds to part of the fluid particles of the fluid, and different threads correspond to different fluid particles;
  • the positions of the fluid particles corresponding to each thread are adjusted in parallel through at least two threads, so as to dynamically display the motion change of the fluid on the user display interface.
  • a dynamic fluid effect processing device comprising:
  • a startup module for starting at least two threads, each thread corresponds to part of the fluid particles of the fluid, and different threads correspond to different fluid particles;
  • the adjustment module is used for adjusting the position of the fluid particle corresponding to each thread in parallel through at least two threads when the fluid is acted by an external force, so as to dynamically display the motion change of the fluid on the user display interface.
  • the present disclosure provides an electronic device, the electronic device comprising:
  • processors one or more processors
  • the memory stores one or more application programs, wherein when the one or more application programs are executed by the one or more processors, the electronic device performs operations corresponding to the dynamic fluid effect processing method shown in the first aspect of the present disclosure.
  • the present disclosure provides a computer-readable medium for storing computer instructions, which, when executed by a computer, enables the computer to perform the dynamic fluid effect shown in the first aspect of the present disclosure Approach.
  • each thread corresponds to part of the fluid particles of the fluid, and different threads correspond to different fluid particles;
  • at least two threads are used to adjust the positions of the fluid particles corresponding to each thread in parallel, so as to dynamically display the motion change of the fluid on the user display interface.
  • the positions of fluid particles are calculated in parallel by at least two threads, which improves the calculation speed, so that the mobile terminal can display the movement changes of the fluid in real time.
  • FIG. 1 is a schematic flowchart of a dynamic fluid effect processing method provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of an execution process of a dynamic fluid effect processing method provided by an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of a dynamic fluid effect processing device according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • the term “including” and variations thereof are open-ended inclusions, ie, "including but not limited to”.
  • the term “based on” is “based at least in part on.”
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
  • the technical solutions of the present disclosure can be applied to applications involving the production, application, and use of dynamic fluid effects.
  • the technical solutions of the present disclosure can be applied to terminal equipment, and the terminal equipment can include a mobile terminal or a computer equipment, wherein the mobile terminal can include, for example, a smart phone, a palmtop computer, a tablet computer, a wearable device with a display screen, etc.; the computer equipment This may include, for example, desktops, laptops, all-in-ones, smart TVs, and the like.
  • the fluid is modeled in three-dimensional space through the technical solution of the present disclosure, and the effect image after the fluid model is rendered is displayed in the two-dimensional user display interface (for the sake of simplicity, hereinafter, the fluid displayed in the user display interface will be
  • the model rendering effect image is abbreviated as "fluid" when displaying the dynamic effect of the fluid, it can be displayed in the form of video or dynamic diagram.
  • FIG. 1 is a schematic flowchart of a dynamic fluid effect processing method provided by an embodiment of the present disclosure. As shown in FIG. 1 , the method may include:
  • Step S101 start at least two threads, each thread corresponds to part of the fluid particles of the fluid, and different threads correspond to different fluid particles;
  • a graphics processor (Graphics Processing Unit, GPU) in a terminal device.
  • a GPU can include multiple cores, and each core can be a computing unit corresponding to a thread.
  • the terminal device starts threads corresponding to at least two cores of the GPU, and distributes the fluid particles to the at least two threads, each thread corresponds to a part of the fluid particles of the fluid, and different threads correspond to different fluid particles.
  • Step S102 when the fluid is affected by an external force, adjust the position of the fluid particle corresponding to each thread in parallel through at least two threads, so as to dynamically display the motion change of the fluid on the user display interface.
  • each fluid particle When the fluid is affected by external force, the position of each fluid particle will change according to the external force. Through each thread in at least two threads, the position of the fluid particle corresponding to the thread is adjusted, so that the terminal device can control the fluid particle from the external force. The position before the action is moved to the adjusted position, and the motion change of the fluid is dynamically displayed on the user display interface.
  • the positions of the fluid particles are calculated in parallel by at least two threads, which improves the calculation speed of the terminal device, so that the terminal device can display the movement changes of the fluid in real time.
  • each thread adjusts the position of its corresponding fluid particle by:
  • the position of the fluid particle is adjusted according to the position of each neighboring particle of the fluid particle.
  • the terminal device obtains the current position and current velocity of each fluid particle of the fluid.
  • the terminal device determines the acceleration of each fluid particle according to the magnitude of the external force.
  • the current velocity, acceleration, and motion time of each fluid particle can determine the distance and direction of each fluid particle motion.
  • the terminal device can determine the position of each fluid particle after being acted by external force according to the distance and direction of each fluid particle motion, which is used as each fluid particle. The respective positions p' of the particles.
  • the terminal device determines the corresponding neighbor particles of each fluid particle according to the respective positions of the fluid particles.
  • the neighbor particle may be a fluid particle within a preset distance from the current fluid particle.
  • Each fluid particle may have no neighbor particle or at least one particle.
  • the terminal device adjusts the position of the fluid particle according to the position p' of the fluid particle and the positions of the neighbor particles of the fluid particle.
  • the fluid particle may also have no neighbor particles. In this case, the position of the fluid particle will not be affected by the neighbor particle. Therefore, the terminal device may not adjust the position of the particle.
  • the corresponding neighbor particles of each fluid particle are determined, including:
  • the respective neighbor particles corresponding to the respective fluid particles are determined.
  • the respective action radii corresponding to each fluid particle are pre-configured, and the specific value of the action radius can be configured according to specific needs or practical applications.
  • the pre-configured action radius corresponding to each fluid particle is obtained.
  • the fluid particle whose distance from the fluid particle is less than or equal to the action radius is determined as the neighbor of the fluid particle. particle.
  • the terminal device when acquiring the neighbor particles of any fluid particle O, calculates the distance between each fluid particle and the fluid particle O, and defines the fluid particle whose distance from the fluid particle O is less than or equal to the action radius as the fluid particle of the fluid particle O. Neighbor particles, that is to say, the terminal device takes the fluid particle O as the center of the circle, and determines the fluid particles A, B, C, and D in the sphere with the action radius h as the neighbor particles of the fluid particle O. It can be understood that when determining the neighbor particles of other fluid particles, the fluid particles in the sphere with the other fluid particles as the center and h as the radius can be used as the neighbor particles of the fluid particle. .
  • the terminal device can also divide the entire space into a cubic lattice, and the lattice side is longer than the action radius.
  • the terminal device can use a hash table to record the fluid particles contained in each grid.
  • the terminal device determines the neighbor particles of each fluid particle
  • the specific implementation of adjusting the position of the fluid particle according to the position p' of the fluid particle and the position of each neighbor particle of the fluid particle is shown in the following embodiments.
  • the position of the fluid particle is adjusted according to the position of each neighboring particle of the fluid particle, including:
  • the position p' of the fluid particle and the position of each neighboring particle of the fluid particle can be a vector in the three-dimensional space
  • the terminal device can calculate the position correction amount according to these vectors
  • the terminal device can calculate the position correction amount according to the position correction amount , adjust the position of the fluid particle, and use the adjusted position as the position of the fluid particle.
  • the terminal device displays on the user display interface that the fluid particle has moved from the position before the external force to the adjusted position, so that the user can The dynamic change effect of the fluid is presented in the display interface.
  • the position correction amount of the fluid particles is determined by the following specific implementation methods:
  • the position correction amount of the fluid particle is determined according to the position of the fluid particle and the position of each neighboring particle of the fluid particle, including:
  • the average density of the fluid is a preconfigured value. For each fluid particle, according to the position of the fluid particle and the positions of the neighboring particles of the fluid particle, the distance between the fluid particle and the neighboring particles of the fluid particle can be determined.
  • the position correction amount corresponding to the fluid particle can be calculated by the following formula (1):
  • ⁇ pi represents the position correction amount corresponding to the ith fluid particle
  • ⁇ 0 represents the average density of the fluid
  • ⁇ i represents the constraint factor corresponding to the ith fluid particle
  • ⁇ j represents the jth neighbor of the ith fluid particle
  • pi represents the position of the ith fluid particle
  • p j represents the position of the jth neighbor particle of the ith fluid particle
  • h represents the radius of action corresponding to the ith fluid particle
  • w() represents The kernel function can be calculated according to the following formulas (2)-(3):
  • the position of the fluid particle can be adjusted by the following formula (4):
  • ⁇ p represents the position correction amount corresponding to the fluid particle
  • p′ represents the position of the fluid particle
  • p represents the adjusted position of the fluid particle.
  • the position p after the fluid particle is adjusted it can also be determined according to the position p after the fluid particle is adjusted, the position p 0 before the fluid particle is affected by the external force, and the pre-configured time interval for calculating the adjusted position.
  • Speed after position adjustment The velocity of the fluid particles can be calculated by the following formula (5):
  • p represents the position of the fluid particle after adjustment
  • p 0 represents the position of the fluid particle before the external force is applied
  • ⁇ t represents the time interval for calculating the adjusted position, which can be a pre-configured value, for example, ⁇ t can be 0.006 seconds
  • ⁇ t can be 0.006 seconds
  • the terminal device calculates the adjusted position and velocity of the fluid particles
  • the final output result can be obtained through multiple iterative calculations, and the specific number of iterations can be pre-configured according to specific needs.
  • the terminal device moves the fluid particles from the position before being acted by the external force to the adjusted position of the final output, so as to present the dynamic change effect of the fluid in the user display interface.
  • a constraint factor corresponding to the fluid particle is obtained, including:
  • the constraint factor corresponding to the fluid particle is determined according to the density constraint value corresponding to the fluid particle, the position of the fluid particle, the position of each neighboring particle of the fluid particle, and the corresponding radius of action of the fluid particle.
  • the average density of the fluid is a preconfigured value. According to the estimated density value corresponding to the fluid particles and the average density of the fluid, the density constraint value corresponding to the fluid particles can be determined.
  • the density constraint value corresponding to the fluid particles can be calculated by the following formula (6):
  • C i (p 1, ..., p n ) represents the density constraint value corresponding to the ith fluid particle
  • ⁇ i represents the estimated density value corresponding to the ith fluid particle
  • ⁇ 0 represents the average density of the fluid.
  • the constraint factor corresponding to the fluid particle can be determined according to the density constraint value corresponding to the fluid particle, the position of the fluid particle, the position of each neighboring particle of the fluid particle, and the action radius corresponding to the fluid particle.
  • the constraint factor corresponding to the fluid particles can be calculated by the following formula (7):
  • ⁇ i represents the constraint factor corresponding to the ith fluid particle
  • p k represents the position of the k th neighbor particle corresponding to the ith fluid particle
  • represents the relaxation parameter, which is a pre-configured constant
  • the estimated density value corresponding to the fluid particle including:
  • the estimated density value corresponding to the fluid particle is determined according to the respective mass of each neighboring particle of the fluid particle, the position of the fluid particle, the position of each neighboring particle of the fluid particle, and the corresponding radius of action of the fluid particle.
  • the respective masses of the neighboring particles of the fluid particle are pre-configured values, and each fluid particle in the fluid may be configured with the same mass.
  • the density corresponding to the fluid particle can be determined according to the respective masses of the adjacent particles of the fluid particle, the position of the fluid particle, the position of each adjacent particle of the fluid particle, and the corresponding radius of action of the fluid particle. estimated value.
  • the estimated density value corresponding to the fluid particles can be calculated by the following formula (9):
  • ⁇ i represents the estimated density value corresponding to the ith fluid particle
  • m j represents the mass of the j th neighbor particle of the ith fluid particle
  • pi represents the position of the ith fluid particle
  • p j represents the ith fluid particle
  • h represents the action radius corresponding to the ith fluid particle
  • w() represents the kernel function, which can be calculated according to formulas (2)-(3).
  • step S201 is performed, and the terminal device obtains the initial velocity and position of each fluid particle ("initialization" as shown in the figure);
  • step S202 determines the respective positions of each fluid particle according to the magnitude of the external force (“processing external force” as shown in the figure);
  • Step S203 is performed, and according to the respective positions of the fluid particles, the respective neighbor particles corresponding to each fluid particle are determined (“Search neighbor particles” as shown in the figure);
  • Step S204 is executed to adjust the position of each fluid particle according to the position of each fluid particle and the position of the neighbor particles of each fluid particle, which specifically includes:
  • Step S2041 calculate the density prediction value of each fluid particle (as shown in the figure "Calculate ⁇ i ");
  • Step S2042 calculating the constraint factor of each fluid particle (as shown in the figure "Calculate ⁇ i ");
  • Step S2043 calculate the position offset of each fluid particle (as shown in the figure "Calculate ⁇ p");
  • Step S2044 adjusting the position of each fluid particle according to the position offset of each fluid particle
  • the final output value can be obtained through N times of iterative calculation.
  • the N times can be a preset value, and the number of iterations can also be adjusted according to actual conditions and applications.
  • Step S205 is executed to output the adjusted position of each fluid particle (“output particle position” as shown in the figure).
  • each thread corresponds to part of the fluid particles of the fluid, and different threads correspond to different fluid particles; when the fluid is affected by an external force, through at least two threads, The positions of the fluid particles corresponding to each thread are adjusted in parallel to dynamically display the fluid motion changes on the user display interface.
  • the positions of fluid particles are calculated in parallel by at least two threads, which improves the calculation speed, so that the mobile terminal can display the movement changes of the fluid in real time.
  • an embodiment of the present disclosure further provides a dynamic fluid effect processing apparatus 30 , as shown in FIG. 3 , the dynamic fluid effect processing apparatus 30 may include:
  • the startup module 31 is used to start at least two threads, and each thread corresponds to part of the fluid particles of the fluid, and the fluid particles corresponding to different threads are different;
  • the adjustment module 32 is configured to adjust the position of the fluid particle corresponding to each thread in parallel through at least two threads when the fluid is acted by an external force, so as to dynamically display the motion change of the fluid on the user display interface.
  • each thread adjusts the position of the corresponding fluid particle in the following manner:
  • the position of the fluid particle is adjusted according to the position of each neighboring particle of the fluid particle.
  • the adjustment module 32 determines the respective neighbor particles corresponding to each fluid particle according to the respective positions of the fluid particles, the adjustment module 32 is used to:
  • the respective neighbor particles corresponding to the respective fluid particles are determined.
  • the adjustment module 32 when adjusting the position of the fluid particle according to the position of each neighboring particle of the fluid particle, the adjustment module 32 is used to:
  • the adjustment module 32 when determining the position correction amount of the fluid particle according to the position of the fluid particle and the position of each neighboring particle of the fluid particle, the adjustment module 32 is used to:
  • the adjustment module 32 is used to:
  • the constraint factor corresponding to the fluid particle is determined according to the density constraint value corresponding to the fluid particle, the position of the fluid particle, the position of each neighboring particle of the fluid particle, and the corresponding radius of action of the fluid particle.
  • the adjustment module 32 obtains the estimated density value corresponding to the fluid particle, it is used to:
  • the estimated density value corresponding to the fluid particle is determined according to the respective mass of each neighboring particle of the fluid particle, the position of the fluid particle, the position of each neighboring particle of the fluid particle, and the corresponding radius of action of the fluid particle.
  • the dynamic fluid effect processing apparatus of the embodiments of the present disclosure can execute the dynamic fluid effect processing method provided by the embodiments of the present disclosure, and the implementation principle is similar.
  • the actions corresponding to the steps in the dynamic fluid effect processing method in each embodiment of the present disclosure For the detailed functional description of each module of the dynamic fluid effect processing device, please refer to the corresponding dynamic fluid effect processing shown above. The description in the method will not be repeated here.
  • the dynamic fluid effect processing device starts at least two threads, each thread corresponds to a part of the fluid particles of the fluid, and different threads correspond to different fluid particles; when the fluid is affected by an external force, through at least two threads, The positions of the fluid particles corresponding to each thread are adjusted in parallel to dynamically display the fluid motion changes on the user display interface.
  • the positions of fluid particles are calculated in parallel by at least two threads, which improves the calculation speed, so that the mobile terminal can display the movement changes of the fluid in real time.
  • FIG. 4 it shows a schematic structural diagram of an electronic device 600 suitable for implementing an embodiment of the present disclosure.
  • the execution body of the technical solutions of the embodiments of the present disclosure may include, but not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals ( For example, mobile terminals such as car navigation terminals) and the like, and stationary terminals such as digital TVs, desktop computers, and the like.
  • the electronic device shown in FIG. 4 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
  • the electronic device includes: a memory and a processor, wherein the processor here may be referred to as a processing device 601 described below, and the memory may include a read-only memory (ROM) 602, a random access memory (RAM) 603, and a storage device hereinafter At least one of 608 as follows:
  • an electronic device 600 may include a processing device (eg, a central processing unit, a graphics processor, etc.) 601 that may be loaded into random access according to a program stored in a read only memory (ROM) 602 or from a storage device 608 Various appropriate actions and processes are executed by the programs in the memory (RAM) 603 . In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored.
  • the processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604.
  • An input/output (I/O) interface 605 is also connected to bus 604 .
  • I/O interface 605 input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 607 of a computer, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609.
  • Communication means 609 may allow electronic device 600 to communicate wirelessly or by wire with other devices to exchange data. While FIG. 4 shows electronic device 600 having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via the communication device 609, or from the storage device 608, or from the ROM 602.
  • the processing apparatus 601 the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus 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 Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
  • the client and server can use any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) to communicate, and can communicate with digital data in any form or medium Communication (eg, a communication network) interconnects.
  • HTTP HyperText Transfer Protocol
  • Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (eg, the Internet), and peer-to-peer networks (eg, ad hoc peer-to-peer networks), as well as any currently known or future development network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: starts at least two threads, each thread corresponds to part of the fluid particles of the fluid, different The fluid particles corresponding to the threads are different; when the fluid is affected by an external force, the positions of the fluid particles corresponding to each thread are adjusted in parallel through at least two threads, so as to dynamically display the motion changes of the fluid on the user display interface.
  • Computer program code for performing operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and This includes conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may 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 may be connected to an external computer (eg, using an Internet service provider through Internet connection).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the modules or units involved in the embodiments of the present disclosure may be implemented in software or hardware. Among them, the name of the module or unit does not constitute a limitation of the unit itself under certain circumstances.
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical Devices (CPLDs) and more.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs Systems on Chips
  • CPLDs Complex Programmable Logical Devices
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with the instruction execution system, apparatus or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • the present disclosure provides a dynamic fluid effect processing method, the method comprising:
  • the positions of the fluid particles corresponding to each thread are adjusted in parallel through the at least two threads, so as to dynamically display the motion change of the fluid on the user display interface.
  • each thread adjusts the position of its corresponding fluid particle by:
  • the position of the fluid particle is adjusted according to the position of each neighbor particle of the fluid particle.
  • the determining, according to the respective positions of the fluid particles, the respective neighbor particles corresponding to each of the fluid particles includes:
  • the corresponding neighbor particles of each of the fluid particles are determined.
  • adjusting the position of the fluid particle according to the position of each neighboring particle of the fluid particle includes:
  • the position of the fluid particle is adjusted according to the position correction amount.
  • determining the position correction amount of the fluid particle according to the position of the fluid particle and the position of each neighboring particle of the fluid particle including:
  • the position of the fluid particle the position of each neighbor particle of the fluid particle, the action radius corresponding to the fluid particle, the constraint factor corresponding to the fluid particle, and the constraint factor corresponding to each neighbor particle of the fluid particle , and the average density of the fluid to determine the position correction of the fluid particles.
  • the acquiring a constraint factor corresponding to the fluid particle includes:
  • the constraint factor corresponding to the fluid particle is determined according to the density constraint value corresponding to the fluid particle, the position of the fluid particle, the position of each neighbor particle of the fluid particle, and the action radius corresponding to the fluid particle.
  • the obtaining the estimated density value corresponding to the fluid particle includes:
  • the position of the fluid particle, the position of each neighbor particle of the fluid particle, and the corresponding radius of action of the fluid particle determine the density prediction corresponding to the fluid particle. Valuation.
  • the present disclosure provides a dynamic fluid effect processing device comprising:
  • a startup module for starting at least two threads, each of which corresponds to part of the fluid particles of the fluid, and different threads correspond to different fluid particles;
  • the adjustment module is configured to adjust the position of the fluid particle corresponding to each thread in parallel through the at least two threads when the fluid is acted by an external force, so as to dynamically display the motion change of the fluid on the user display interface.
  • each thread adjusts the position of the corresponding fluid particle in the following manner:
  • the position of the fluid particle is adjusted according to the position of each neighbor particle of the fluid particle.
  • the adjustment module determines the respective neighbor particles corresponding to each of the fluid particles according to the respective positions of the fluid particles, the adjustment module is configured to:
  • the corresponding neighbor particles of each of the fluid particles are determined.
  • the adjustment module when adjusting the position of the fluid particle according to the position of each neighboring particle of the fluid particle, the adjustment module is configured to:
  • the position of the fluid particle is adjusted according to the position correction amount.
  • the adjustment module determines the position correction of the fluid particle according to the position of the fluid particle and the position of each neighbor particle of the fluid particle When measuring, it is used for:
  • the position of the fluid particle the position of each neighbor particle of the fluid particle, the action radius corresponding to the fluid particle, the constraint factor corresponding to the fluid particle, and the constraint factor corresponding to each neighbor particle of the fluid particle , and the average density of the fluid to determine the position correction of the fluid particles.
  • the adjustment module is used to:
  • the constraint factor corresponding to the fluid particle is determined according to the density constraint value corresponding to the fluid particle, the position of the fluid particle, the position of each neighbor particle of the fluid particle, and the action radius corresponding to the fluid particle.
  • the adjustment module For each fluid particle, when the adjustment module obtains the estimated density value corresponding to the fluid particle, the adjustment module is configured to:
  • the position of the fluid particle, the position of each neighbor particle of the fluid particle, and the corresponding radius of action of the fluid particle determine the density prediction corresponding to the fluid particle. Valuation.
  • the present disclosure provides an electronic device, comprising:
  • processors one or more processors
  • a memory storing one or more application programs, wherein when the one or more application programs are executed by the one or more processors, the electronic device is caused to execute the dynamic fluid effect processing method.
  • the present disclosure provides a computer-readable medium for storing computer instructions that, when executed by a computer, cause the computer to execute the above-mentioned Dynamic fluid effect processing method.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种动态流体效果处理方法、装置、电子设备及可读介质,涉及计算机技术领域。该方法包括:启动至少两个线程,每个线程对应流体的部分流体粒子,不同的线程对应的流体粒子不同(S101);当流体受到外力作用时,通过至少两个线程,并行调整每个线程各自对应的流体粒子的位置,以在用户显示界面动态展示流体的运动变化(S102)。本方法通过至少两个线程并行计算流体粒子的位置,提高了计算速度,使得移动终端可以实时展示流体的运动变化。

Description

动态流体效果处理方法、装置、电子设备和可读介质
相关申请的交叉引用
本申请要求于2020年08月10日提交的、申请号为202010796955.8、发明名称为“动态流体效果处理方法、装置、电子设备和可读介质”的中国专利申请的优先权,该申请的全文通过引用结合在本申请中。
技术领域
本公开涉及计算机技术领域,具体而言,本公开涉及一种动态流体效果处理方法、装置、电子设备和可读介质。
背景技术
计算机图形学(Computer Graphics,CG)是一种使用数学算法将二维或三维图形转化为计算机显示器的栅格形式的科学。简单地说,计算机图形学的主要研究内容就是研究如何在计算机中表示图形、以及利用计算机进行图形的计算、处理和显示的相关原理与算法。
基于物理动画的流体模拟是计算机图形学的一个重要的研究领域。随着移动通信和计算机技术的发展,移动终端得到了广泛应用。由于现有技术中的流体模拟方法需要非常大的计算量,若将该方法应用到移动终端,由于移动终端上的计算和存储资源都非常有限,采用现有技术中的方法计算速度慢,不能满足实时性的要求。
发明内容
本公开提供了一种动态流体效果处理方法、装置、电子设备和可读介质,用于解决现有技术中存在的问题。
第一方面,提供了一种动态流体效果处理方法,该方法包括:
启动至少两个线程,每个线程对应流体的部分流体粒子,不同的线程 对应的流体粒子不同;
当流体受到外力作用时,通过至少两个线程,并行调整每个线程各自对应的流体粒子的位置,以在用户显示界面动态展示流体的运动变化。
第二方面,提供了一种动态流体效果处理装置,该装置包括:
启动模块,用于启动至少两个线程,每个线程对应流体的部分流体粒子,不同的线程对应的流体粒子不同;
调整模块,用于当流体受到外力作用时,通过至少两个线程,并行调整每个线程各自对应的流体粒子的位置,以在用户显示界面动态展示流体的运动变化。
第三方面,本公开提供了一种电子设备,该电子设备包括:
一个或多个处理器;
存储器,存储一个或多个应用程序,其中一个或多个应用程序被一个或多个处理器执行时,使得电子设备执行如本公开的第一方面所示的动态流体效果处理方法对应的操作。
第四方面,本公开提供了一种计算机可读介质,计算机可读介质用于存储计算机指令,当计算机指令被计算机执行时,使得计算机可以执行如本公开的第一方面所示的动态流体效果处理方法。
本公开提供的技术方案带来的有益效果可以包括:
在本公开实施例提供的动态流体效果处理方法、装置、电子设备和可读介质,启动至少两个线程,每个线程对应流体的部分流体粒子,不同的线程对应的流体粒子不同;当流体受到外力作用时,通过至少两个线程,并行调整每个线程各自对应的流体粒子的位置,以在用户显示界面动态展示流体的运动变化。本公开提供的技术方案,通过至少两个线程并行计算流体粒子的位置,提高了计算速度,使得移动终端可以实时展示流体的运动变化。
附图说明
为了更清楚地说明本公开实施例中的技术方案,下面将对本公开实施例描述中所需要使用的附图作简单地介绍。
图1为本公开实施例提供的一种动态流体效果处理方法的流程示意图;
图2为本公开实施例提供的动态流体效果处理方法的执行过程的示意图;
图3为本公开实施例提供的一种动态流体效果处理装置的结构示意图;
图4为本公开实施例提供的一种电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对装置、模块或单元进行区分,并非用于限定这些装置、模块或单元一定为不同的装置、模块或单元,也并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
下面以具体地实施例对本公开的技术方案以及本公开的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本公开的实施例进行描述。
本公开技术方案可以应用在涉及动态流体效果制作、应用以及使用等的应用程序中。本公开的技术方案可以应用在终端设备中,终端设备可以包括移动终端或者计算机设备,其中,移动终端可以包括例如智能手机、掌上电脑、平板电脑、带显示屏的可穿戴设备等等;计算机设备可以包括例如台式机、笔记本电脑、一体机、智能电视等。通过本公开技术方案对流体在三维空间中进行建模,将流体模型渲染之后的效果图像在二维的用户显示界面中进行显示(为简明起见,在下文中,将用户显示界面中显示的流体的模型渲染效果图像简称为“流体”)在展示流体的动态效果时,可以通过视频或者动态图的形式进行展示。
图1为本公开实施例提供的一种动态流体效果处理方法的流程示意图,如图1所示,该方法可以包括:
步骤S101,启动至少两个线程,每个线程对应流体的部分流体粒子,不同的线程对应的流体粒子不同;
本公开技术方案可以通过终端设备中的图形处理器(Graphics Processing Unit,GPU)来实现。GPU可以包括多个核心,每个核心可以为一个计算单元,对应一个线程。终端设备启动GPU的至少两个核心对应的线程,将流体粒子分配到至少两个线程中,每个线程对应流体的部分流体粒子,不同线程对应不同的流体粒子不同。
步骤S102,当流体受到外力作用时,通过至少两个线程,并行调整每个线程各自对应的流体粒子的位置,以在用户显示界面动态展示流体的运动变化。
当流体受到外力作用时,各流体粒子会根据外力作用,发生位置变化,通过至少两个线程中的每个线程,来调整该线程对应的流体粒子的位置, 使得终端设备可以控制流体粒子从外力作用前的位置移动到调整后的位置,在用户显示界面动态展示流体的运动变化。
本公开技术方案中,通过至少两个线程并行计算流体粒子的位置,提高了终端设备的计算速度,使得终端设备可以实时展示流体的运动变化。
通过每个线程调整对应的流体粒子的位置,具体实现方式见如下实施例。
在一种可能的实现方式中,每个线程通过以下方式调整各自对应的流体粒子的位置:
根据外力作用的大小,确定各流体粒子各自的位置p′;
根据流体粒子各自的位置,确定各流体粒子各自对应的邻居粒子;
针对每一流体粒子,根据流体粒子的各邻居粒子的位置,调整流体粒子的位置。
在实际应用中,首先,终端设备获取流体的各流体粒子的当前位置和当前速度,当流体受到外力(例如,重力)作用时,终端设备根据外力作用的大小,确定各流体粒子的加速度,根据各流体粒子的当前速度、加速度、运动时间,可以确定各流体粒子运动的距离和方向,终端设备根据各流体粒子运动的距离和方向,可以确定各流体粒子受到外力作用之后的位置,作为各流体粒子各自的位置p′。
终端设备根据流体粒子各自的位置,确定各流体粒子各自对应的邻居粒子,邻居粒子可以是距离当前流体粒子预设距离范围内的流体粒子,每个流体粒子可以没有邻居粒子,也可以有至少一个邻居粒子,终端设备根据流体粒子的位置p′,以及流体粒子的邻居粒子的位置,来调整流体粒子的位置。在一个实施例中,流体粒子也可以没有邻居粒子,在这种情况下,该流体粒子的位置将不会受到邻居粒子的影响,因此,终端设备可以不对该粒子的位置进行调整。
本公开实施例中,在对流体粒子进行位置调整时,通过考虑邻居粒子的位置,可以尽量保证流体运动后密度保持不变,从而保证流体在运动过程中的不可压缩性,使得模拟出的流体动态效果更接近现实中流体的运动状态。
对于流体粒子的邻居粒子的具体获取方式,见如下实施例。
在一种可能的实现方式中,根据流体粒子各自的位置,确定各流体粒子各自对应的邻居粒子,包括:
获取各流体粒子各自对应的作用半径;
根据各流体粒子各自的位置以及各流体粒子各自对应的作用半径,确定各流体粒子各自对应的邻居粒子。
在实际应用中,预先配置各流体粒子各自对应的作用半径,作用半径的具体值可以根据具体需要或者实际应用进行配置。在确定各流体粒子的邻居粒子时,获取预先配置的各流体粒子各自对应的作用半径,对于每一流体粒子,与该流体粒子的距离小于等于作用半径的流体粒子,确定为该流体粒子的邻居粒子。
在一示例中,在获取任一流体粒子O的邻居粒子时,终端设备计算各流体粒子与流体粒子O的距离,并将与流体粒子O的距离小于等于作用半径的流体粒子为流体粒子O的邻居粒子,也就是说,终端设备以流体粒子O作为圆心,将作用半径为h的球体内的流体粒子A、B、C、D确定为流体粒子O的邻居粒子。可以理解的是,在确定其他流体粒子的邻居粒子时,可以以其他流体粒子为圆心、以h为半径的球体内的流体粒子作为该流体粒子的邻居粒子,为简明目的,在此不再赘述。
在确定流体粒子的邻居粒子时,终端设备还可以将整个空间划分成立方体格子,格子边长于作用半径。终端设备可以用一个哈希表记录每个格子中包含的流体粒子。终端设备在计算当前流体粒子O的邻居粒子时,只需要计算与流体粒子O所在格子以及相邻格子中的流体粒子之间的距离,不需要计算流体粒子O与所有粒子之间的距离,从而减小了计算量,提升了计算性能。
终端设备确定了各流体粒子的邻居粒子之后,根据流体粒子的位置p′、以及流体粒子的各邻居粒子的位置,对流体粒子的位置进行调整的具体实现方式见如下实施例。
在一种可能的实现方式中,针对每一流体粒子,根据流体粒子的各邻居粒子的位置,调整流体粒子的位置,包括:
根据流体粒子的位置、以及流体粒子的各邻居粒子的位置,确定流体粒子的位置修正量;以及
根据位置修正量,调整流体粒子的位置。
在实际应用中,流体粒子的位置p′、流体粒子的各邻居粒子的位置均可以为三维空间中的一个向量,终端设备可以根据这些向量计算位置修正量,并且,终端设备根据该位置修正量,对流体粒子的位置进行调整,并将调整后的位置作为该流体粒子的位置,终端设备在用户显示界面中显示该流体粒子从受到外力作用之前的位置移动到调整后的位置,从而在用户显示界面中呈现流体的动态的变化效果。
在本公开技术方案中,通过以下具体实现方式确定流体粒子的位置修正量:
在一种可能的实现方式中,针对每一流体粒子,根据流体粒子的位置、以及流体粒子的各邻居粒子的位置,确定流体粒子的位置修正量,包括:
获取流体的平均密度、流体粒子对应的约束因子、以及流体粒子的各邻居粒子各自对应的约束因子;
根据流体粒子的位置、流体粒子的各邻居粒子的位置、流体粒子对应的作用半径、流体粒子对应的约束因子、流体粒子的各邻居粒子各自对应的约束因子、以及流体的平均密度,确定流体粒子的位置修正量。
其中,流体的平均密度为预先配置的值。针对每一流体粒子,根据该流体粒子的位置、该流体粒子的各邻居粒子的位置,可以确定该流体粒子和该流体粒子的各邻居粒子之间的距离。
在一示例中,可以通过如下公式(1)计算流体粒子对应的位置修正量:
Figure PCTCN2021111609-appb-000001
其中,Δp i表示第i个流体粒子对应的位置修正量;ρ 0表示流体的平均密度;λ i表示第i个流体粒子对应的约束因子;λ j表示第i个流体粒子的第j个邻居粒子对应的约束因子;p i表示第i个流体粒子的位置;p j表示第i个流体粒子的第j个邻居粒子的位置;h表示第i个流体粒子对应 的作用半径;w()表示核函数,可以按照如下公式(2)-(3)来计算:
Figure PCTCN2021111609-appb-000002
Figure PCTCN2021111609-appb-000003
其中,r=p i-p j;h表示第i个流体粒子对应的作用半径。
在得到各流体粒子对应的位置修正量之后,针对每一流体粒子,可以通过如下公式(4)对流体粒子的位置进行调整:
p=p′+Δp         (4)
其中,Δp表示流体粒子对应的位置修正量;p′表示流体粒子的位置;p表示流体粒子经过调整之后的位置。
另外,本公开技术方案中,还可以根据流体粒子调整之后的位置p、流体粒子受到外力作用之前的位置p 0和预先配置的、计算调整之后的位置的时间间隔,确定流体粒子受到外力作用并进行位置调整之后的速度。可以通过如下公式(5)计算流体粒子的速度:
Figure PCTCN2021111609-appb-000004
其中,p表示流体粒子经过调整之后的位置;p 0表示流体粒子受到外力作用之前的位置,Δt表示计算调整之后的位置的时间间隔,可以为预先配置的值,例如,Δt可以为0.006秒,由于在较短的时间内计算流体粒子的速度,因此,可以按照匀速运动的方式确定流体粒子的速度;v表示流体粒子受到外力作用并进行位置调整、经过Δt时间之后的速度。
终端设备在计算流体粒子的调整后的位置以及速度时,还可以经过多次迭代计算,得到最终的输出结果,具体的迭代次数可以根据具体需要预先进行配置。在显示流体粒子的运动过程时,终端设备将流体粒子从受到外力作用之前的位置移动到最终输出的调整后的位置,从而在用户显示界 面中呈现流体的动态的变化效果。
其中,对于获取约束因子的具体实现方式,具体见如下实施例:
在一种可能的实现方式中,针对每一流体粒子,获取流体粒子对应的约束因子,包括:
获取流体粒子对应的密度预估值;
根据流体粒子对应的密度预估值、以及流体的平均密度,确定流体粒子对应的密度约束值;
根据流体粒子对应的密度约束值、流体粒子的位置、流体粒子的各邻居粒子的位置、以及流体粒子对应的作用半径,确定流体粒子对应的约束因子。
其中,流体的平均密度为预先配置的值。根据流体粒子对应的密度预估值、以及流体的平均密度,可以确定流体粒子对应的密度约束值。
在一示例中,可以通过如下公式(6)计算流体粒子对应的密度约束值:
Figure PCTCN2021111609-appb-000005
其中,C i(p 1,...,p n)表示第i个流体粒子对应的密度约束值;ρ i表示第i个流体粒子对应的密度预估值;ρ 0表示流体的平均密度。
另外,根据流体粒子对应的密度约束值、流体粒子的位置、流体粒子的各邻居粒子的位置、以及流体粒子对应的作用半径,可以确定流体粒子对应的约束因子。
在一示例中,可以通过如下公式(7)计算流体粒子对应的约束因子:
Figure PCTCN2021111609-appb-000006
其中,λ i表示第i个流体粒子对应的约束因子;p k表示第i个流体粒子对应的第k个邻居粒子的位置;ε表示松弛参数,为预先配置的常数;
Figure PCTCN2021111609-appb-000007
表示C i(p 1,...,p n)相对于第k个邻居粒子的位置的梯度,可以通过公式(8)来计算:
Figure PCTCN2021111609-appb-000008
其中,w()表示核函数,可以按照公式(2)-(3)来计算;当k=i时,表示该流体粒子本身作为自己的邻居粒子的情况,除此之外,均为k=j的情况,表示该流体粒子还具有其他的邻居粒子。
其中,对于获取密度预估值的具体实现方式,具体见如下实施例:
在一种可能的实现方式中,针对每一流体粒子,获取流体粒子对应的密度预估值,包括:
获取流体粒子的各邻居粒子各自的质量;
根据流体粒子的各邻居粒子各自的质量、流体粒子的位置、流体粒子的各邻居粒子的位置、以及流体粒子对应的作用半径,确定流体粒子对应的密度预估值。
其中,流体粒子的各邻居粒子各自的质量为预先配置的值,流体中的各流体粒子可以配置相同的质量。针对每一流体粒子,根据该流体粒子的各邻居粒子各自的质量、该流体粒子的位置、该流体粒子的各邻居粒子的位置、以及该流体粒子对应的作用半径,可以确定流体粒子对应的密度预估值。
在一示例中,可以通过如下公式(9)计算流体粒子对应的密度预估值:
Figure PCTCN2021111609-appb-000009
其中,ρ i表示第i个流体粒子对应的密度预估值;m j表示第i个流体粒子的第j个邻居粒子的质量;p i表示第i个流体粒子的位置;p j表示第i个流体粒子的第j个邻居粒子的位置;h表示第i个流体粒子对应的作用半径;w()表示核函数,可以按照公式(2)-(3)来计算。
基于上述本公开所提供的技术方案,下面以一个具体实施例对该技术方案进行阐释,该具体实施例及其内容仅是为了说明本公开方案的一种可能的实现方式,并不代表本公开方案的全部实现方式。
如图2所示,执行步骤S201,终端设备获取各流体粒子的初始速度 和位置(如图中所示的“初始化”);
当流体受到外力作用时,终端设备执行步骤S202,根据外力作用的大小,确定各流体粒子各自的位置(如图中所示的“处理外部力作用”);
执行步骤S203,根据流体粒子各自的位置,确定各流体粒子各自对应的邻居粒子(如图中所示的“查找邻居粒子”);
执行步骤S204,根据各流体粒子的位置、以及各流体粒子的邻居粒子的位置,调整各流体粒子的位置,具体包括:
步骤S2041,计算各流体粒子的密度预估值(如图中所示的“计算ρ i”);
步骤S2042,计算各流体粒子的约束因子(如图中所示的“计算λ i”);
步骤S2043,计算各流体粒子的位置偏移量(如图中所示的“计算Δp”);
步骤S2044,根据各流体粒子的位置偏移量对各流体粒子进行位置调整;
其中,步骤S2041-步骤S2044,可以通过N次迭代计算,得到最终的输出值。此处的N次可以为预先设置的值,且还可以根据实际情况和应用调整迭代次数。
执行步骤S205,输出各流体粒子调整后的位置(如图中所示的“输出粒子位置”)。
本公开实施例提供的动态流体效果处理方法,启动至少两个线程,每个线程对应流体的部分流体粒子,不同的线程对应的流体粒子不同;当流体受到外力作用时,通过至少两个线程,并行调整每个线程各自对应的流体粒子的位置,以在用户显示界面动态展示流体的运动变化。本公开提供的技术方案,通过至少两个线程并行计算流体粒子的位置,提高了计算速度,使得移动终端可以实时展示流体的运动变化。
基于与图1中所示方法相同的原理,本公开的实施例中还提供了一种动态流体效果处理装置30,如图3所示,该动态流体效果处理装置30可以包括:
启动模块31,用于启动至少两个线程,每个线程对应流体的部分流 体粒子,不同的线程对应的流体粒子不同;
调整模块32,用于在流体受到外力作用时,通过至少两个线程,并行调整每个线程各自对应的流体粒子的位置,以在用户显示界面动态展示流体的运动变化。
在一种可能的实现方式中,调整模块32在通过至少两个线程,并行调整每个线程各自对应的流体粒子的位置时,每个线程是通过以下方式调整各自对应的流体粒子的位置的:
根据外力作用的大小,确定各流体粒子各自的位置;
根据流体粒子各自的位置,确定各流体粒子各自对应的邻居粒子;
针对每一流体粒子,根据流体粒子的各邻居粒子的位置,调整流体粒子的位置。
在一种可能的实现方式中,调整模块32在根据流体粒子各自的位置,确定各流体粒子各自对应的邻居粒子时,用于:
获取各流体粒子各自对应的作用半径;
根据各流体粒子各自的位置以及各流体粒子各自对应的作用半径,确定各流体粒子各自对应的邻居粒子。
在一种可能的实现方式中,针对每一流体粒子,调整模块32在根据流体粒子的各邻居粒子的位置,调整流体粒子的位置时,用于:
根据流体粒子的位置、以及流体粒子的各邻居粒子的位置,确定流体粒子的位置修正量;
根据位置修正量,调整流体粒子的位置。
在一种可能的实现方式中,针对每一流体粒子,调整模块32在根据流体粒子的位置、以及流体粒子的各邻居粒子的位置,确定流体粒子的位置修正量时,用于:
获取流体的平均密度、流体粒子对应的约束因子、以及流体粒子的各邻居粒子各自对应的约束因子;
根据流体粒子的位置、流体粒子的各邻居粒子的位置、流体粒子对应的作用半径、流体粒子对应的约束因子、流体粒子的各邻居粒子各自对应的约束因子、以及流体的平均密度,确定流体粒子的位置修正量。
在一种可能的实现方式中,针对每一流体粒子,调整模块32在获取流体粒子对应的约束因子时,用于:
获取流体粒子对应的密度预估值;
根据流体粒子对应的密度预估值、以及流体的平均密度,确定流体粒子对应的密度约束值;
根据流体粒子对应的密度约束值、流体粒子的位置、流体粒子的各邻居粒子的位置、以及流体粒子对应的作用半径,确定流体粒子对应的约束因子。
在一种可能的实现方式中,针对每一流体粒子,调整模块32在获取流体粒子对应的密度预估值时,用于:
获取流体粒子的各邻居粒子各自的质量;
根据流体粒子的各邻居粒子各自的质量、流体粒子的位置、流体粒子的各邻居粒子的位置、以及流体粒子对应的作用半径,确定流体粒子对应的密度预估值。
本公开实施例的动态流体效果处理装置可执行本公开的实施例所提供的动态流体效果处理方法,其实现原理相类似,本公开各实施例中的动态流体效果处理装置中的各模块所执行的动作是与本公开各实施例中的动态流体效果处理方法中的步骤相对应的,对于动态流体效果处理装置的各模块的详细功能描述具体可以参见前文中所示的对应的动态流体效果处理方法中的描述,此处不再赘述。
本公开实施例提供的动态流体效果处理装置,启动至少两个线程,每个线程对应流体的部分流体粒子,不同的线程对应的流体粒子不同;当流体受到外力作用时,通过至少两个线程,并行调整每个线程各自对应的流体粒子的位置,以在用户显示界面动态展示流体的运动变化。本公开提供的技术方案,通过至少两个线程并行计算流体粒子的位置,提高了计算速度,使得移动终端可以实时展示流体的运动变化。
下面参考图4,其示出了适于用来实现本公开实施例的电子设备600的结构示意图。本公开实施例技术方案的执行主体可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD (平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图4示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
电子设备包括:存储器以及处理器,其中,这里的处理器可以称为下文所述的处理装置601,存储器可以包括下文中的只读存储器(ROM)602、随机访问存储器(RAM)603以及存储装置608中的至少一项,具体如下所示:
如图4所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。
通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图4示出了具有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号 介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:启动至少两个线程,每个线程对应流体的部分流体粒子,不同的线程对应的流体粒子不同;当流体受到外力作用时,通过至少两个线程,并行调整每个线程各自对应的流体粒 子的位置,以在用户显示界面动态展示流体的运动变化。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的模块或单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块或单元的名称在某种情况下并不构成对该单元本身的限定。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,本公开提供了一种动态流体效果处理方法,所述方法包括:
启动至少两个线程,每个所述线程对应流体的部分流体粒子,不同的线程对应的流体粒子不同;
当所述流体受到外力作用时,通过所述至少两个线程,并行调整每个线程各自对应的流体粒子的位置,以在用户显示界面动态展示所述流体的运动变化。
在一种可能的实现方式中,每个线程通过以下方式调整各自对应的流体粒子的位置:
根据所述外力作用的大小,确定各所述流体粒子各自的位置;
根据所述流体粒子各自的位置,确定各所述流体粒子各自对应的邻居粒子;
针对每一流体粒子,根据所述流体粒子的各邻居粒子的位置,调整所述流体粒子的位置。
在一种可能的实现方式中,所述根据所述流体粒子各自的位置,确定各所述流体粒子各自对应的邻居粒子,包括:
获取各所述流体粒子各自对应的作用半径;
根据各所述流体粒子各自的位置以及各所述流体粒子各自对应的作用半径,确定各所述流体粒子各自对应的邻居粒子。
在一种可能的实现方式中,针对每一流体粒子,所述根据所述流体粒子的各邻居粒子的位置,调整所述流体粒子的位置,包括:
根据所述流体粒子的位置、以及所述流体粒子的各邻居粒子的位置,确定所述流体粒子的位置修正量;
根据所述位置修正量,调整所述流体粒子的位置。
在一种可能的实现方式中,针对每一流体粒子,所述根据所述流体粒子的位置、以及所述流体粒子的各邻居粒子的位置,确定所述流体粒子的位置修正量,包括:
获取所述流体的平均密度、所述流体粒子对应的约束因子、以及所述流体粒子的各邻居粒子各自对应的约束因子;
根据所述流体粒子的位置、所述流体粒子的各邻居粒子的位置、所述流体粒子对应的作用半径、所述流体粒子对应的约束因子、所述流体粒子的各邻居粒子各自对应的约束因子、以及所述流体的平均密度,确定所述流体粒子的位置修正量。
在一种可能的实现方式中,针对每一流体粒子,所述获取所述流体粒子对应的约束因子,包括:
获取所述流体粒子对应的密度预估值;
根据所述流体粒子对应的密度预估值、以及所述流体的平均密度,确定所述流体粒子对应的密度约束值;
根据所述流体粒子对应的密度约束值、所述流体粒子的位置、所述流体粒子的各邻居粒子的位置、以及所述流体粒子对应的作用半径,确定所述流体粒子对应的约束因子。
在一种可能的实现方式中,针对每一流体粒子,所述获取所述流体粒子对应的密度预估值,包括:
获取所述流体粒子的各邻居粒子各自的质量;
根据所述流体粒子的各邻居粒子各自的质量、所述流体粒子的位置、所述流体粒子的各邻居粒子的位置、以及所述流体粒子对应的作用半径,确定所述流体粒子对应的密度预估值。
根据本公开的一个或多个实施例,本公开提供了一种动态流体效果处 理装置,所述装置包括:
启动模块,用于启动至少两个线程,每个所述线程对应流体的部分流体粒子,不同的线程对应的流体粒子不同;
调整模块,用于当所述流体受到外力作用时,通过所述至少两个线程,并行调整每个线程各自对应的流体粒子的位置,以在用户显示界面动态展示所述流体的运动变化。
在一种可能的实现方式中,所述调整模块在通过至少两个线程,并行调整每个线程各自对应的流体粒子的位置时,每个线程是通过以下方式调整各自对应的流体粒子的位置的:
根据所述外力作用的大小,确定各所述流体粒子各自的位置;
根据所述流体粒子各自的位置,确定各所述流体粒子各自对应的邻居粒子;
针对每一流体粒子,根据所述流体粒子的各邻居粒子的位置,调整所述流体粒子的位置。
在一种可能的实现方式中,所述调整模块在所述根据所述流体粒子各自的位置,确定各所述流体粒子各自对应的邻居粒子时,用于:
获取各所述流体粒子各自对应的作用半径;
根据各所述流体粒子各自的位置以及各所述流体粒子各自对应的作用半径,确定各所述流体粒子各自对应的邻居粒子。
在一种可能的实现方式中,针对每一流体粒子,所述调整模块在所述根据所述流体粒子的各邻居粒子的位置,调整所述流体粒子的位置时,用于:
根据所述流体粒子的位置、以及所述流体粒子的各邻居粒子的位置,确定所述流体粒子的位置修正量;
根据所述位置修正量,调整所述流体粒子的位置。
在一种可能的实现方式中,针对每一流体粒子,所述调整模块在所述根据所述流体粒子的位置、以及所述流体粒子的各邻居粒子的位置,确定所述流体粒子的位置修正量时,用于:
获取所述流体的平均密度、所述流体粒子对应的约束因子、以及所述 流体粒子的各邻居粒子各自对应的约束因子;
根据所述流体粒子的位置、所述流体粒子的各邻居粒子的位置、所述流体粒子对应的作用半径、所述流体粒子对应的约束因子、所述流体粒子的各邻居粒子各自对应的约束因子、以及所述流体的平均密度,确定所述流体粒子的位置修正量。
在一种可能的实现方式中,针对每一流体粒子,所述调整模块在获取所述流体粒子对应的约束因子时,用于:
获取所述流体粒子对应的密度预估值;
根据所述流体粒子对应的密度预估值、以及所述流体的平均密度,确定所述流体粒子对应的密度约束值;
根据所述流体粒子对应的密度约束值、所述流体粒子的位置、所述流体粒子的各邻居粒子的位置、以及所述流体粒子对应的作用半径,确定所述流体粒子对应的约束因子。
在一种可能的实现方式中,针对每一流体粒子,所述调整模块在获取所述流体粒子对应的密度预估值时,用于:
获取所述流体粒子的各邻居粒子各自的质量;
根据所述流体粒子的各邻居粒子各自的质量、所述流体粒子的位置、所述流体粒子的各邻居粒子的位置、以及所述流体粒子对应的作用半径,确定所述流体粒子对应的密度预估值。
根据本公开的一个或多个实施例,本公开提供了一种电子设备,包括:
一个或多个处理器;
存储器,存储一个或多个应用程序,其中,当所述一个或多个应用程序被所述一个或多个处理器执行时,使得所述电子设备执行所述动态流体效果处理方法。
根据本公开的一个或多个实施例,本公开提供了一种计算机可读介质,所述计算机可读介质用于存储计算机指令,当所述计算机指令被计算机执行时,使得所述计算机执行上述动态流体效果处理方法。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术 特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (10)

  1. 一种动态流体效果处理方法,其特征在于,所述方法包括:
    启动至少两个线程,每个所述线程对应流体的部分流体粒子,不同的线程对应的流体粒子不同;
    当所述流体受到外力作用时,通过所述至少两个线程,并行调整每个线程各自对应的流体粒子的位置,以在用户显示界面动态展示所述流体的运动变化。
  2. 根据权利要求1所述的动态流体效果处理方法,其特征在于,每个线程通过以下方式调整各自对应的流体粒子的位置:
    根据所述外力作用的大小,确定各所述流体粒子各自的位置;
    根据所述流体粒子各自的位置,确定各所述流体粒子各自对应的邻居粒子;
    针对每一流体粒子,根据所述流体粒子的各邻居粒子的位置,调整所述流体粒子的位置。
  3. 根据权利要求2所述的动态流体效果处理方法,其特征在于,所述根据所述流体粒子各自的位置,确定各所述流体粒子各自对应的邻居粒子,包括:
    获取各所述流体粒子各自对应的作用半径;
    根据各所述流体粒子各自的位置以及各所述流体粒子各自对应的作用半径,确定各所述流体粒子各自对应的邻居粒子。
  4. 根据权利要求2所述的动态流体效果处理方法,其特征在于,针对每一流体粒子,所述根据所述流体粒子的各邻居粒子的位置,调整所述流体粒子的位置,包括:
    根据所述流体粒子的位置、以及所述流体粒子的各邻居粒子的位置,确定所述流体粒子的位置修正量;
    根据所述位置修正量,调整所述流体粒子的位置。
  5. 根据权利要求4所述的动态流体效果处理方法,其特征在于,针对每一流体粒子,所述根据所述流体粒子的位置、以及所述流体粒子的各 邻居粒子的位置,确定所述流体粒子的位置修正量,包括:
    获取所述流体的平均密度、所述流体粒子对应的约束因子、以及所述流体粒子的各邻居粒子各自对应的约束因子;
    根据所述流体粒子的位置、所述流体粒子的各邻居粒子的位置、所述流体粒子对应的作用半径、所述流体粒子对应的约束因子、所述流体粒子的各邻居粒子各自对应的约束因子、以及所述流体的平均密度,确定所述流体粒子的位置修正量。
  6. 根据权利要求5所述的动态流体效果处理方法,其特征在于,针对每一流体粒子,所述获取所述流体粒子对应的约束因子,包括:
    获取所述流体粒子对应的密度预估值;
    根据所述流体粒子对应的密度预估值、以及所述流体的平均密度,确定所述流体粒子对应的密度约束值;
    根据所述流体粒子对应的密度约束值、所述流体粒子的位置、所述流体粒子的各邻居粒子的位置、以及所述流体粒子对应的作用半径,确定所述流体粒子对应的约束因子。
  7. 根据权利要求6所述的动态流体效果处理方法,其特征在于,针对每一流体粒子,所述获取所述流体粒子对应的密度预估值,包括:
    获取所述流体粒子的各邻居粒子各自的质量;
    根据所述流体粒子的各邻居粒子各自的质量、所述流体粒子的位置、所述流体粒子的各邻居粒子的位置、以及所述流体粒子对应的作用半径,确定所述流体粒子对应的密度预估值。
  8. 一种动态流体效果处理装置,其特征在于,所述装置包括:
    启动模块,用于启动至少两个线程,每个所述线程对应流体的部分流体粒子,不同的线程对应的流体粒子不同;
    调整模块,用于当所述流体受到外力作用时,通过所述至少两个线程,并行调整每个线程各自对应的流体粒子的位置,以在用户显示界面动态展示所述流体的运动变化。
  9. 一种电子设备,其特征在于,包括:
    一个或多个处理器;
    存储器,存储一个或多个应用程序,其中,当所述一个或多个应用程序被所述一个或多个处理器执行时,使得所述电子设备执行根据权利要求1-7任一项所述的动态流体效果处理方法。
  10. 一种计算机可读介质,其特征在于,所述计算机可读介质用于存储计算机指令,当所述计算机指令被计算机执行时,使得所述计算机执行上述权利要求1-7中任一项所述的动态流体效果处理方法。
PCT/CN2021/111609 2020-08-10 2021-08-09 动态流体效果处理方法、装置、电子设备和可读介质 Ceased WO2022033446A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010796955.8 2020-08-10
CN202010796955.8A CN114078177B (zh) 2020-08-10 2020-08-10 动态流体效果处理方法、装置、电子设备和可读介质

Publications (1)

Publication Number Publication Date
WO2022033446A1 true WO2022033446A1 (zh) 2022-02-17

Family

ID=80246955

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/111609 Ceased WO2022033446A1 (zh) 2020-08-10 2021-08-09 动态流体效果处理方法、装置、电子设备和可读介质

Country Status (2)

Country Link
CN (1) CN114078177B (zh)
WO (1) WO2022033446A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106096215A (zh) * 2016-07-28 2016-11-09 华东师范大学 一种涉及热传导与动态黏度的真实感流体仿真方法
CN106484532A (zh) * 2016-09-19 2017-03-08 华东师范大学 面向sph流体模拟的gpgpu并行计算方法
WO2017124809A1 (zh) * 2016-01-21 2017-07-27 上海斐讯数据通信技术有限公司 一种基于移动终端gpu运行的粒子群优化方法和系统
CN107248188A (zh) * 2017-05-24 2017-10-13 上海交通大学 动态粒子集合的表面渲染方法及系统
CN107633123A (zh) * 2017-09-13 2018-01-26 浙江工业大学 一种用于光滑粒子流体动力学模拟出血及处理加速的方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150161810A1 (en) * 2013-12-10 2015-06-11 Nvidia Corporation Position based fluid dynamics simulation
CN109960841B (zh) * 2017-12-26 2022-11-01 中国科学院深圳先进技术研究院 一种流体表面张力的仿真方法、终端设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017124809A1 (zh) * 2016-01-21 2017-07-27 上海斐讯数据通信技术有限公司 一种基于移动终端gpu运行的粒子群优化方法和系统
CN106096215A (zh) * 2016-07-28 2016-11-09 华东师范大学 一种涉及热传导与动态黏度的真实感流体仿真方法
CN106484532A (zh) * 2016-09-19 2017-03-08 华东师范大学 面向sph流体模拟的gpgpu并行计算方法
CN107248188A (zh) * 2017-05-24 2017-10-13 上海交通大学 动态粒子集合的表面渲染方法及系统
CN107633123A (zh) * 2017-09-13 2018-01-26 浙江工业大学 一种用于光滑粒子流体动力学模拟出血及处理加速的方法

Also Published As

Publication number Publication date
CN114078177B (zh) 2025-06-24
CN114078177A (zh) 2022-02-22

Similar Documents

Publication Publication Date Title
CN111967467B (zh) 图像目标检测方法、装置、电子设备和计算机可读介质
CN112364860B (zh) 字符识别模型的训练方法、装置和电子设备
US20250191299A1 (en) Rendering method and apparatus for 3d material, and device and storage medium
CN110069191B (zh) 基于终端的图像拖拽变形实现方法和装置
CN114693876A (zh) 数字人生成方法、装置、存储介质和电子设备
WO2022089087A1 (zh) 图像处理方法、装置、电子设备及计算机可读介质
CN114419298B (zh) 虚拟物体的生成方法、装置、设备及存储介质
WO2022033444A1 (zh) 动态流体效果处理方法、装置、电子设备和可读介质
CN110069195B (zh) 图像拖拽变形方法和装置
WO2023174087A1 (zh) 特效视频生成方法、装置、设备及存储介质
WO2023045870A1 (zh) 网络模型的压缩方法、图像生成方法、装置、设备及介质
WO2022033446A1 (zh) 动态流体效果处理方法、装置、电子设备和可读介质
CN111754423A (zh) 高模gpu蒙皮平滑处理方法、装置及电子设备
CN113741749B (zh) 光标位置更新方法、装置和电子设备
CN111275799B (zh) 动画的生成方法、装置和电子设备
CN113744379B (zh) 图像生成方法、装置和电子设备
WO2022135022A1 (zh) 动态流体显示方法、装置、电子设备和可读介质
CN111968028A (zh) 图像生成方法、装置、设备和计算机可读介质
CN111767513A (zh) 数据处理方法及装置、电子设备和计算机可读存储介质
CN113808050B (zh) 3d点云的去噪方法、装置、设备及存储介质
CN112488094B (zh) 光学字符识别方法、装置和电子设备
CN114066721B (zh) 显示方法、装置和电子设备
CN111582376B (zh) 神经网络的可视化方法、装置、电子设备和介质
CN118115654A (zh) 三维包围框的生成方法、装置和电子设备
CN118034551A (zh) 显示方法、装置和电子设备

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: 21855498

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: 21855498

Country of ref document: EP

Kind code of ref document: A1