To produce the waves a statistical model based on fourier transform was used, based on Jerry Tessendorf’s work (simulating ocean water). The team precomputed two sets of tiling and cycling wave displacements. These were stored as rgb textures. The water textures were projected from the camera position, thus distant waves are smaller and closer waves larger. The resulting waves are an input for vertex buffers.
We began by doing a Houdini sim of a breaking wave. From that we extracted a cross-section for each frame. The upper image is an example. The cross section line is expressed as a deformation from a flat surface, as shown by the arrows in the lower image. The XYZ offset is converted into RGB, the thin green and purple strip underneath shows the result.
We repeat the process for all the frames of the animation. Each frame gave us a horizontal strip of pixels. They’re assembled into a vertical stack to form a single 2D texture for the whole animation, as shown here. A couple of example frames are shown here, with the corresponding row of the deformation texture outlined.
The two waves shown here are moving left right towards the shore. The lefthand wave is a younger version with has lower animation parameters, the righthand one is older and starting to break. To create the shape we apply the cross-section deformation along the curve of the wavefront. The deformations take a flat water surface and bend it to match their cross section. The cross sections are shown at a few places, the number is the V coordinate of the deformation texture.
Looking at the righthand one, near the camera at 0.27 the water is just starting to rise, further along at 0.4 it starts to steepen, at 0.5 it’s curling over and turning into foam.
To provide the effect the team used a simple SSS test based on viewing position, sun position and surface slope, this would then vary localized ‘shallowness’ or tint/opacity. It is remarkable how effective it is to fake SSS by just making the underside of back lit waves ‘less shallow’ (tint/transparent).
评论区
共 4 条评论热门最新