Interactive horizon mapping
First Claim
1. A method for determining shadowing cast onto a bump mapped surface by one or more bumps thereon, where the bump mapped surface is represented by a plurality of polygons each having a plurality of vertices, each vertex defining a point in a tangent plane of the bump mapped surface, where a normal vector at each said vertex is perturbed to define a bump map of the bump mapped surface that includes a plurality of bumps on the surface, the method comprising:
- defining a horizon map of the surface including, for each of a plurality of radial directions in the tangent plane around each said vertex, the largest angle between the normal vector and any direct ray of light to the vertex;
storing the horizon map as a set of texture maps corresponding to the surface on the three-dimensional graphical object; and
wherein for each said vertex, each said texture map has a plurality of color channels, each said color channel having encoded therein the largest angle between the normal vector and any direct ray of light to the vertex that does not contact any of the bumps on the surface.
3 Assignments
0 Petitions
Accused Products
Abstract
Shadows, which play an important role in perceiving the shape and texture of an object, are simulated interactively in a real time, self-shadowing of a bump mapped surface for a computer rendered object. A computer graphics textured object function defines a horizon map over an orientation in a tangent space of the object using different textures or basis functions. The implementation can be performed using commodity graphics hardware by precomputing the horizon map for limited visibility for each point on the bump mapped surface given light in each of a plurality of radial directions. The horizon map is used to produce self-shadowing of the bump mapped surface of the object.
49 Citations
10 Claims
-
1. A method for determining shadowing cast onto a bump mapped surface by one or more bumps thereon, where the bump mapped surface is represented by a plurality of polygons each having a plurality of vertices, each vertex defining a point in a tangent plane of the bump mapped surface, where a normal vector at each said vertex is perturbed to define a bump map of the bump mapped surface that includes a plurality of bumps on the surface, the method comprising:
-
defining a horizon map of the surface including, for each of a plurality of radial directions in the tangent plane around each said vertex, the largest angle between the normal vector and any direct ray of light to the vertex;
storing the horizon map as a set of texture maps corresponding to the surface on the three-dimensional graphical object; and
wherein for each said vertex, each said texture map has a plurality of color channels, each said color channel having encoded therein the largest angle between the normal vector and any direct ray of light to the vertex that does not contact any of the bumps on the surface. - View Dependent Claims (2, 3)
-
-
4. A method for rendering a frame in a frame buffer represented by a plurality of pixels, the frame depicting a three dimensional graphical object that is defined by surfaces each having a surface geometry defined by a parameterization of a plurality of polygons, each polygon being defined by vertices, each vertex (u,v) having a bump map scalar value F(u,v) defining a bump, each vertex (u,v) having a perturbed normal map vector value N′
- (u,v) from the bump map scalar value F(u,v), each vertex (u,v) having M basis maps (Bk=1 . . . M(s, t)), each vertex (u,v) having M horizon maps for each of M radial directions (θ
k=1 . . . M) in the tangent plane of the vertex (u, v), wherein each of the M horizon maps includes the largest angle Φ
(u,v,θ
k=1 . . . M) between the perturbed normal map vector value N′
(u, v) and any direct ray to the vertex (u, v), the method comprising;(i) defining a light vector (L) having a direction defined by;
the angle θ
L between the light vector (L) and the plane formed by coordinates (u,v); and
the angle Φ
L between the light vector (L) and the perturbed normal map vector value N′
(u,v);
(ii) inverting a local tangent frame by [Pu, Pv,N]−
1=[ST, TT, NT] to obtain an inverted tangent frame (S,T);
(iii) taking the dot product of the light vector(L);
with the first two components of the inverted frame (S,T) to obtain the projection of the light vector (L) into the coordinate space in the tangent plane at a coordinate pair (s,t); and
with the perturbed normal map vector value N′
(u, v) at the vertex to obtain cosine (Φ
L);
(iv) setting the camera angle of the rendering to a point of view to be rendered for the frame to write into the space of a texture map;
(v) computing first and second texture effects on each pixel in the frame buffer, respectively, from first and second sets of the M directions stored as texture maps, wherein each said largest angle Φ
(u,v,θ
k) is in one of a plurality of color channels of a texture map, wherein one of the M directions corresponds to each said color channel of the texture map, and wherein the first and second texture effects are defined, respectively by;
a basis map B1(s, t) of said M basis maps (Bk=1 . . . M(s, t)), and a horizon map, Φ
1(u, v) of said M horizon maps; and
a basis map B2(s, t) of said M basis maps (Bk=1 . . . M(s, t)), and a horizon map, Φ
2(u, v) of said M horizon maps;
(vi) storing the first and second texture effects for each pixel in the frame buffer in a texture map Φ
(θ
LIGHT);
(vii) for a given camera perspective view;
on a first operation, rendering a model of the three dimensional graphical object with an ambient low level lighting term only;
on a second operation;
setting an alpha test and a stencil function to accept only those pixels in the frame buffer that have a non-zero alpha test result;
setting a color mask upon the frame buffer, wherein the color mask will not write to the color channels of the texture maps, whereby the ambient low level lighting term previously rendered is preserved;
drawing, using multi-texturing, for the angle (Φ
L) and the angle to the horizon (θ
L), the first and second texture effects on each pixel in the frame buffer, which are, respectively, cosine(Φ
L) that is greater than Φ
L, and Φ
(θ
LIGHT);
on a third operation;
setting the alpha test off;
setting the color mask upon the frame buffer to allow writing to the color channels of the texture maps;
setting the stencil function to only draw pixels in the frame buffer that have a non-zero alpha test result;
setting a blending function to accumulate into the frame buffer with the ambient low level lighting term;
drawing the vector valued perturbed normal map N′
(u,v); and
displaying the three dimensional graphical object defined by pixels in the frame buffer, wherein the displayed object has an ambient only term in shadowed regions and normal bump mapping in non-shadowed regions. - View Dependent Claims (5)
- (u,v) from the bump map scalar value F(u,v), each vertex (u,v) having M basis maps (Bk=1 . . . M(s, t)), each vertex (u,v) having M horizon maps for each of M radial directions (θ
-
6. One or more computer-readable media comprising computer-executable instructions for determining shadowing cast onto a bump mapped surface by one or more bumps thereon, where the bump mapped surface is represented by a plurality of polygons each having a plurality of vertices, each vertex defining a point in a tangent plane of the bump mapped surface, where a normal vector at each said vertex is perturbed to define a bump map of the bump mapped surface that includes a plurality of bumps on the surface, the computer-executable instructions comprising instructions for:
-
defining a horizon map of the surface including, for each of a plurality of radial directions in the tangent plane around each said vertex, the largest angle between the normal vector and any direct ray of light to the vertex;
storing the horizon map as a set of texture maps corresponding to the surface on the three-dimensional graphical object; and
wherein for each said vertex, each said texture map has a plurality of color channels, each said color channel having encoded therein the largest angle between the normal vector and any direct ray of light to the vertex that does not contact any of the bumps on the surface. - View Dependent Claims (7, 8)
-
-
9. One or more computer-readable media comprising computer-executable instruction for rendering a frame in a frame buffer represented by a plurality of pixels, of the frame depicting a three dimensional graphical object that is defined by surfaces each having a surface geometry defined by a parameterization of a plurality of polygons, each polygon being defined by vertices, each vertex (u,v) having a bump map scalar value F(u,v) defining a bump, each vertex (u,v) having a perturbed normal map vector value N′
- (u,v) from the bump map scalar value F(u,v), each vertex (u,v) having M basis maps (Bk=1 . . . M (s,t)), each vertex (u,v) having M horizon maps for each of M radial directions (θ
k=1 . . . M) in the tangent plane of the vertex (u, v), wherein each of the M horizon maps includes the largest angle Φ
(u,v,θ
k=1 . . . M) between the perturbed normal map vector value N′
(u, v) and any direct ray to the vertex (u, v), the computer-executable instruction comprising instruction for;(i) defining a light vector (L) having a direction defined by;
the angle θ
L between the light vector (L) and the plane formed by coordinates (u,v); and
the angle Φ
L between the light vector (L) and the perturbed normal map vector value N′
(u,v);
(ii) inverting a local tangent frame by [Pu, Pv,N]−
1=[ST, TT, NT] to obtain an inverted tangent frame (S,T);
(iii) taking the dot product of the light vector(L);
with the first two components of the inverted frame (S,T) to obtain the projection of the light vector (L) into the coordinate space in the tangent plane at a coordinate pair (s,t); and
with the perturbed normal map vector value N′
(u, v) at the vertex to obtain cosine(Φ
L);
(iv) setting the camera angle of the rendering to a point of view to be rendered for the frame to write into the space of a texture map;
(v) computing first and second texture effects on each pixel in the frame buffer, respectively, from first and second sets of the M directions stored as texture maps, wherein each said largest angle Φ
(u,v,θ
k) is in one of a plurality of color channels of a texture map, wherein one of the M directions corresponds to each said color channel of the texture map, and wherein the first and second texture effects are defined, respectively by;
a basis map B1(s, t) of said M basis maps (Bk=1 . . . M(s, t)), and a horizon map, Φ
1(u, v) of said M horizon maps; and
a basis map B2(s,t) of said M basis maps (Bk=1 . . . M(s, t)), and a horizon map, Φ
2(u, v) of said M horizon maps;
(vi) storing the first and second texture effects for each pixel in the frame buffer in a texture map Φ
(θ
LIGHT);
(vii) for a given camera perspective view;
on a first operation, rendering a model of the three dimensional graphical object with an ambient low level lighting term only;
on a second operation;
setting an alpha test and a stencil function to accept only those pixels in the frame buffer that have a non-zero alpha test results;
setting a color mask upon the frame buffer, wherein the color mask will not write to the color channels of the texture maps, whereby the ambient low level lighting term previously rendered is preserved;
drawing, using multi-texturing, for the angle (Φ
L) and the angle to the horizon (θ
L), the first and second texture effects on each pixel in the frame buffer, which are, respectively, cosine(Φ
L) that is greater than Φ
L and Φ
(θ
LIGHT);
on a third operation;
setting the alpha test off;
setting the color mask upon the frame buffer to allow writing to the color channels of the texture maps;
setting the stencil function to only draw pixels in the frame buffer that have a non-zero alpha test result;
setting a blending function to accumulate into the frame buffer with the ambient low level lighting term;
drawing the vector valued perturbed normal map N′
(u,v); and
displaying the three dimensional graphical object defined by pixels in the frame buffer, wherein the displayed object has an ambient only term in shadowed regions and normal bump mapping in non-shadowed regions. - View Dependent Claims (10)
- (u,v) from the bump map scalar value F(u,v), each vertex (u,v) having M basis maps (Bk=1 . . . M (s,t)), each vertex (u,v) having M horizon maps for each of M radial directions (θ
Specification