Method and apparatus for generating non-homogenous fog
First Claim
1. A method of generating linear fog effects in an image on a display using a computer system comprising the steps of:
- defining a start position for a linear fog model;
defining an end position for said linear fog model;
computing a fog distance, wherein said fog distance is a distance from a first reference position to a second reference position at which visibility is a predetermined value, said fog distance being equal to (0.63*end position)+(0.37*start position);
determining a fog ratio comprising a ratio of a fog density at said first reference position to a fog density at said second reference position beyond the fog distance;
computing a distance, D, from a sample point on an object to be displayed, to said first reference position;
determining a visibility value at said sample point, wherein said visibility value is equal to ##EQU56## wherein K5 is a curve fitting parameter;
mixing a fog color and a background color to obtain a pixel color based on at least one of said visibility values.
4 Assignments
0 Petitions
Accused Products
Abstract
The present invention simulates the effect of non-homogenous fog in computer graphics images. The non-homogenous fog visibility equation includes four parameters. A distance scaling parameter K1. A variable fog parameter K2. A normalization constant K3, and a scaling constant K4. The visibility at a sample point can be determined using the visibility equation: ##EQU1## where Zns is a normalized and scaled image distance which is equal to (K4*K1*Z)+(K4*K2). To improve computational efficiency the visibility function can be evaluated using a lookup table. The lookup table of the present invention has an efficient addressing scheme and a minimum number of output steps. The visibility function can be expressed as a function of a fog ratio and a fog distance. The fog distance is a distance from the viewpoint to the point where the visibility is reduced to 37% of full visibility. The fog ratio is the square root of the ratio of "near fog" density to "far fog" density. The visibility function expressed as a function of fog ratio and fog distance is ##EQU2##
61 Citations
4 Claims
-
1. A method of generating linear fog effects in an image on a display using a computer system comprising the steps of:
-
defining a start position for a linear fog model; defining an end position for said linear fog model; computing a fog distance, wherein said fog distance is a distance from a first reference position to a second reference position at which visibility is a predetermined value, said fog distance being equal to (0.63*end position)+(0.37*start position); determining a fog ratio comprising a ratio of a fog density at said first reference position to a fog density at said second reference position beyond the fog distance; computing a distance, D, from a sample point on an object to be displayed, to said first reference position; determining a visibility value at said sample point, wherein said visibility value is equal to ##EQU56## wherein K5 is a curve fitting parameter;
mixing a fog color and a background color to obtain a pixel color based on at least one of said visibility values. - View Dependent Claims (2, 3, 4)
-
Specification