Patent attributes
A liquid simulation method is provided for a graphics processing unit (GPU). The method includes obtaining initial information; determining two-dimensional meshes according to the initial information; mapping a plane of a to-be-simulated three-dimensional liquid into the two-dimensional meshes, and determining corresponding target meshes to which the plane of the to-be-simulated three-dimensional liquid is mapped in the two-dimensional meshes. The method also includes recording, in mesh points of the target meshes, corresponding liquid levels of plane coordinates of the to-be-simulated three-dimensional liquid, and obtaining a corresponding height field of the to-be-simulated three-dimensional liquid in the two-dimensional meshes; and rendering a three-dimensional liquid according to updating of the height field, to obtain a liquid simulation result.