# US 5,704,024 A · Method and an apparatus for generating reflection vectors which can be unnormalized and for using these reflection vectors to index locations on an environment map

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 5,704,024 A
- Document ID: US5704024A
- Status: Granted
- Kind: A
- Application number: 08/504,773
- Filed: 1995-07-20
- Granted: 1997-12-30
- Earliest claimed: 1995-07-20
- Assignees: Silicon Graphics, Inc.
- Inventors: Douglas Voorhies; James Foran
- Web page: https://patentgrep.com/patent/US5704024A

## CPC

- G06T 15/506: {Illumination models}
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

An apparatus for generating a reflection from a three-dimensional environment map. The apparatus includes a reflection vector generator which receives an eye vector and a normal vector neither of which need be normalized. This reflection vector generator generates a reflection vector without vector normalization. The reflection vector generator then couples to a decoder to supply the generated reflection vector. The decoder, in turn, determines a location where the reflection vector indexes the selected 2-dimensional map which forms part of the environment map.

## Claims

### Claim 1

A method for generating a reflection vector, said method comprising the steps of:
a) receiving an eye vector (E) and a normal vector (N) at least one of which is not normalized; and
b) producing a reflection vector (R) without vector normalization.

### Claim 2 (depends on 1)

The method of claim 1 further comprising the step of determining the location where the reflection vector indexes an environment map.

### Claim 3 (depends on 2)

The method of claim 2 wherein said method is used to render specular highlights.

### Claim 4 (depends on 1)

The method of claim 1, wherein R=2*N*(N.multidot.E)-E*(N.multidot.N).

### Claim 5

A method for generating a reflection vector that indexes one of a plurality of faces of a cubic environment map stored in a memory, said method comprising the steps of:
receiving an eye vector (E) and a normal vector (N);
producing a reflection vector (R) represented by a first coordinate, a second coordinate, and a third coordinate, wherein the reflection vector is unnormalized when one of the normal vector and the eye vector is unnormalized;
determining a largest coordinate having the largest magnitude of said first, second, and third coordinates; and
generating a fourth coordinate, and a fifth coordinate, by dividing two of said first, second, and third coordinates by said largest coordinate, wherein said fourth, and fifth coordinates define the location on the cubic environment map where said reflection vector indexes said cubic environment map in said memory.

### Claim 6 (depends on 5)

The method for generating a reflection vector of claim 5, wherein R=2*N*(N.multidot.E)-E*(N.multidot.N).

### Claim 7

In a data processing system which renders images, a method of generating reflections off a rendered object by using an environment representation comprising a set of 2-dimensional maps which are independent of a viewer's position, said method comprising:
receiving an eye vector (E) and a normal vector (N), at least one of which is not normalized;
producing a reflection vector (R) without vector normalization;
selecting a selected 2-dimensional map which contains a location indexed by said reflection vector;
determining said location on said selected 2-dimensional map; and
sampling a reflection shading value at said location in said selected 2-dimensional map.

### Claim 8 (depends on 7)

The method of claim 7, wherein R=2*N*(N.multidot.E)-E*(N.multidot.N).

### Claim 9 (depends on 7)

A method as in claim 7 wherein said environment representation comprises six 2-dimensional maps arranged as the faces of a cube which is aligned to an axis of a coordinate system, and wherein said step of selecting comprises selecting the 2-dimensional map corresponding to the largest component of said reflection vector and wherein said step of determining comprises dividing the two smaller components of said reflection vector by said largest component.

### Claim 10 (depends on 7)

A method as in claim 7 wherein said environment representation comprises eight 2-dimensional maps arranged as the triangular faces of an octahedron which is aligned to an axis of a coordinate system, and wherein said step of selecting comprises selecting the 2-dimensional map corresponding to the direction indicated by the signs of a plurality of components of said reflection vectors and wherein said step of determining comprises dividing a plurality of magnitudes of said plurality of components by a sum of the magnitudes of said plurality of components.

### Claim 11

A reflection vector generating apparatus for generating a reflection vector indexing one of a plurality of faces of an environment map, said apparatus comprising:
a) a reflection vector generator which receives an eye vector and a normal vector at least one of which is not normalized, said reflection vector generator producing a reflection vector without vector normalization;
b) a decoder coupled to the reflection vector generator to receive the reflection vector, said decoder determining the face of said environment map that said reflection vector indexes.

### Claim 12 (depends on 11)

An apparatus as in claim 11 wherein said reflection vector generator comprises a plurality of multipliers and a shifter.

### Claim 13 (depends on 11)

An apparatus as in claim 11 wherein said decoder comprises a multiplexer and a divider.

### Claim 14 (depends on 11)

An apparatus as in claim 11 wherein said reflection vector generator and said decoder comprise one of a microprocessor or a microcontroller which is controlled by software to generate said reflection vector and to determine the face of said environment map which said reflection vector indexes.

### Claim 15 (depends on 11)

An apparatus as in claim 11 wherein said decoder further determines an indexed location on said face.

### Claim 16 (depends on 11)

An apparatus as in claim 11 further comprising:
memory coupled to said decoder, said memory storing said environment map;
a display, said display displaying a rendered object having reflections which are produced by said reflection generator;
a processor coupled to said display, said processor calculating said eye vector and said normal vector and providing said eye and normal vectors to said reflection vector generator.

### Claim 17 (depends on 7)

A method as in claim 7, wherein said rendered object includes a first pixel, and wherein said method further comprises calculating a pixel shading value for said first pixel using said reflection shading value and displaying on said display device said first pixel having said pixel shading value.

### Claim 18 (depends on 7)

A method as in claim 7 wherein said method is used to render specular highlights.

### Claim 19 (depends on 18)

A method as in claim 18 wherein said environment representation includes a representation of specular highlights.
