The entire disclosure of the application recited above is hereby incorporated by reference, as if set forth in full in this document, for all purposes.

FIELD

The present disclosure generally relates to modeling surface features of fluids and more particularly to efficient computation and specification of level sets and other fluid surface features.

BACKGROUND

Visual representations of scenes intended to reflect real-world scenarios are common in animation and other fields. For example, a computer-generated imagery scene could be created by having an artist manually draw a sequence of frames to form a video sequence. For simple cartoons, for example, this is a feasible approach. However, as viewers have come to expect more complex visuals, there is a need for computer-driven imagery generation.

The complex visuals might be derived from an output of a simulation and/or or use manually specified details. Manually specifying a large number of details can be tedious. In some scenes, it might be desirable to include some simulation output with manually specified details and it might be desirable to have some high-resolution details and some lower-resolution details in the same scene. As a result, a renderer or other portion of an image generation system might require tedious specification of smoothed details from an artist or other user.

A scene might be specified in terms of objects present in a three-dimensional (3D) virtual space, a camera location and orientation in that 3D virtual space, and a camera view frame positioned in that virtual space. Some objects might include light sources. Details of the objects might be specified using outputs of a simulation. For example, a scene might comprise an image of a ship on a body of water and where an image is to be generated of the scene from a camera position, a computer image generation system might determine an appearance of the ship and the water based on a simulation of where the ship might be in the 3D virtual space and where the surface of the water might be.

In one approach, the surface of the water is represented by a large collection of connected polygons that form a fine mesh. The positions of vertices and edges of the polygons might be determined from an output of a simulator or might be determined by artist input. Where a fine mesh is present, it might be computationally expensive to deal with all of the vertices when determining a water surface and if input by an artist, might be tedious. Where a coarse mesh is used, while that might be computationally easier to deal with and maybe easier for an artist to input, the result might be undesirably crude. Another disadvantage of a mesh is that information can be lost as a surface is discretized into a mesh.

Improved methods and apparatus that might reduce an amount of computing power needed and/or provide an improved user interface for user specification of details might be desired.

SUMMARY

A computer-implemented method and apparatus for sampling surface features, wherein the surface features represent features of a virtual fluid, might comprise, under the control of one or more computer systems configured with executable instructions, obtaining a first digital representation of the virtual fluid defined at least in part by an implicit surface, obtaining a second digital representation of a collection of points defined relative to at least a portion of the implicit surface whereat the surface features are to be determined, wherein a point of the collection of points has associated therewith a plurality of attribute values specifying a property of the surface features, determining, for an input point, a corresponding implicit surface point, determining, for the corresponding implicit surface point, a subset of the collection of points within a search region relative to the corresponding implicit surface point, obtaining a set of interpolated attribute values by interpolating attributes of the plurality of attribute values associated with points of the subset of the collection of points, computing a surface displacement value from the set of interpolated attribute values, generating a dataset corresponding to the surface features on at least computed surface displacement values.

The property of the surface features might be a displacement from the implicit surface. Determining the corresponding implicit surface point for the input point might comprise determining a first signed distance field value for the input point, determining a first field gradient value for the input point, and determining the corresponding implicit surface point from a position of the input point, the first signed distance field value, and the first field gradient value.

The collection of points might be a collection of vertices that represents a mesh region might comprise a plurality of vertices defining a plurality of polygons. The first digital representation might represent the virtual fluid in an Eulerian grid representation and the second digital representation represents the mesh region as a plurality of Lagrangian points.

One or more visual representations of the surface features might depict capillary waves on a surface of the virtual fluid.

The collection of points might be defined at a higher resolution than the implicit surface. The plurality of attribute values might comprise a phase value and/or an amplitude value. The collection of points might represent a mesh, and determining the subset of the collection of points within the search region relative to the corresponding implicit surface point might comprise (a) using ray casting to cast a ray from the input point through the corresponding implicit surface point, (b) identifying one or more intersected polygons of a plurality of polygons of the mesh that are intersected by the ray, (c) determining a plurality of vertices corresponding to vertices of one or more polygon of the one or more intersected polygons, and (d) processing the plurality of vertices as the subset of the collection of points.

The ray might extend from the input point passing through the corresponding implicit surface point to a ray endpoint that might be a predetermined distance from the corresponding implicit surface point along the ray. The ray might extend to a sample position for which a signed distance between the sample position and the implicit surface meets a maximum-displacement threshold.

Methods and apparatus might further comprise obtaining a second plurality of distances for a second plurality of sample positions, wherein the second plurality of sample positions includes a particular sample position for which the signed distance between the particular sample position and the implicit surface does not meet the maximum-displacement threshold, each distance of the second plurality of distances being equal to the signed distance between the particular sample position and the implicit surface, and wherein the generating one or more visual representations might be based on at least some of the second plurality of distances.

A computer system for generating one or more visual representations of surface features of a virtual fluid might comprise at least one processor, and a computer-readable medium having stored instructions that when executed by the at least one processor cause the computer system to carry out one or more of the methods described herein.

A non-transitory computer-readable storage medium storing instructions might be provided, which when executed by at least one processor of a computer system, might cause the computer system to carry out one or more of the methods described herein.

A computer-readable medium might be provided carrying instructions, which when executed by at least one processor of a computer system, causes the computer system to carry out one or more of the methods described herein.

This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter. A more extensive presentation of features, details, utilities, and advantages of the surface computation method, as defined in the claims, is provided in the following written description of various embodiments of the disclosure and illustrated in the accompanying drawings.

