# Reducing Rendering Time

If the ocean surface modeled has very small facets, it can take a very long time to render a frame of ocean out to the horizon (assuming the horizon is in the camera frame). At long distances, the facets that are very small compared to what the camera can resolve do not strongly affect the final image, although they can influence the glitter in subtle ways. To avoid long rendering times when desired, two things can be done to speed up the rendering by dynamically resampling the ocean surface so that the facet size more closely matches the camera resolution. The first is that beyond a certain distance, we treat the ocean as if it where perfectly flat from that distance to the horizon. In the rendering examples this distance is set very close and the effect is obvious. By carefully choosing the distance, we can cut render time without any noticeable effect on the image. This distance depends upon how big the waves are and how high the camera is. Experience is the best guide.

The second thing that can be done is change our sampling size. When we are looking several kilometers away and the smallest thing we can see is 50cm across, it makes no sense to be working with 3 cm facets. To avoid this waste of computing time, the user has the option of increasing facet sizes as distance grows in an automated procedure. The idea here is that when surface facets are twice as fine as the camera can see, the facet size is doubled. The user specifies the closest distance to perform this doubling for the first time. Then the code automatically makes additional doubling when it makes sense.

An image with a sharp line through it with a distinct increase in ``blurring'' of the water surface on the far side is a sure sign of a doubling distance that is too small.

Contents