Dynamic fluid effect processing method and apparatus, and electronic device and readable medium
OwnerQi Li, Xiaoqi Liinventors
Life of this patent
Estimating the term…
Abstract
A method and apparatus for simulating a dynamic fluid effect, an electronic device, and a readable medium are provided. With the method, a first object and a fluid are displayed on a user display interface, a position of each of model particles in an object model corresponding to the first object is acquired, and a position of each of fluid particles corresponding to the fluid is acquired. When the first object collides with the fluid, for each of the fluid particles, the position of the fluid particle is adjusted based on a position of a model particle that collides with the fluid particle, to dynamically display a motion change of the fluid on the user display interface.
Claims11
A method for simulating a dynamic fluid effect, comprising:
- displaying a first object and a fluid on a user display interface;
- acquiring a position of each model particle of a plurality of model particles in an object model corresponding to the first object;
- acquiring a position of each fluid particle of a plurality of fluid particles corresponding to the fluid;
- and
- adjusting, for each fluid particle of the plurality of fluid particles, the position of the fluid particle based on a position of a model particle that collides with the fluid particle when the first object collides with the fluid, to dynamically display a motion change of the fluid on the user display interface;
- wherein for each fluid particle of the plurality of fluid particles, the model particle that collides with the fluid particle is determined by:
- determining the model particle that collides with the fluid particle based on the position of the fluid particle and the position of each model particle of the plurality of model particles, comprising:
- determining a distance between the fluid particle and each model particle of the plurality of model particles based on the position of the fluid particle and the position of each model particle of the plurality of model particles;
- determining a model particle closest to the fluid particle as an adjacent model particle of the fluid particle;
- and
- determining that the adjacent model particle collides with the fluid particle if a distance between the adjacent model particle and the fluid particle is less than a preset distance.
An apparatus for simulating a dynamic fluid effect, comprising:
- at least one processor, and
- at least one memory communicatively coupled to the at least one processor and storing instructions that upon execution by the at least one processor cause the apparatus to:
- display a first object and a fluid on a user display interface;
- acquire a position of each model particle of a plurality of model particles in an object model corresponding to the first object;
- acquire a position of each fluid particle of a plurality of fluid particles corresponding to the fluid;
- and
- adjust, for each fluid particle of the plurality of fluid particles, the position of the fluid particle based on a position of a model particle that collides with the fluid particle when the first object collides with the fluid, to dynamically display a motion change of the fluid on the user display interface;
- wherein for each fluid particle of the plurality of fluid particles, the model particle that collides with the fluid particle is determined by:
- determining the model particle that collides with the fluid particle based on the position of the fluid particle and the position of each model particle of the plurality of model particles, comprising:
- determining a distance between the fluid particle and each model particle of the plurality of model particles based on the position of the fluid particle and the position of each model particle of the plurality of model particles;
- determining a model particle closest to the fluid particle as an adjacent model particle of the fluid particle;
- and
- determining that the adjacent model particle collides with the fluid particle if a distance between the adjacent model particle and the fluid particle is less than a preset distance.
A computer-readable non-transitory medium,
- bearing computer-readable instructions that upon execution on a computing device cause the computing device at least to:
- display a first object and a fluid on a user display interface;
- acquire a position of each model particle of a plurality of model particles in an object model corresponding to the first object;
- acquire a position of each fluid particle of a plurality of fluid particles corresponding to the fluid;
- and
- adjust, for each fluid particle of the plurality of fluid particles, the position of the fluid particle based on a position of a model particle that collides with the fluid particle when the first object collides with the fluid, to dynamically display a motion change of the fluid on the user display interface;
- wherein for each fluid particle of the plurality of fluid particles, the model particle that collides with the fluid particle is determined by:
- determining the model particle that collides with the fluid particle based on the position of the fluid particle and the position of each model particle of the plurality of model particles, comprising:
- determining a distance between the fluid particle and each model particle of the plurality of model particles based on the position of the fluid particle and the position of each model particle of the plurality of model particles;
- determining a model particle closest to the fluid particle as an adjacent model particle of the fluid particle;
- and
- determining that the adjacent model particle collides with the fluid particle if a distance between the adjacent model particle and the fluid particle is less than a preset distance.
Dependencies are inferred from the claim text.