1984 ray tracing aa blur etc

9
Computer Grap hics Volume 18, Number 3 July 1984 Distributed Ray Tracing Robert L. Cook Thomas Porter Loren Carpenter Computer Division Lucasfilm Ltd. Abstract Ray tracing is one of the most elegant techniques in com- puter graphics. Many phenomena that are difficult or impossible with other techniques are simple with ray trac- ing, including shadows, reflections, and refracted l ig h t. Ray directions, however, have been determined precisely, and this has limited the capabilities of ray tracing. By distributing the directions of the rays according to the analytic function they sample, ray tracing can incorporate fuzzy phenomena. This provides correct and easy solu- tions to some previously unsolved or partially solved prob- lems, including m otion blur, depth of field, penumbras, translucency, and fuzzy reflections. Motion blur and depth of field calculations can be integrated with the visi- ble surface calculations, avoiding the problems found in previous methods. CR CATEGORIES AND SUBJECT DESCRIPTORS: 1.3.7 [Computer Graphics]: Three-Dimensional Graphics and Realism; ADDITIONAL KEY WORDS AND PHRASES: camera, constructive solid geometry, depth of field, focus, gloss, motion blur, penumbras, ray tracing, shadows, translucency, transparency 1. Introduction Ray tracing algorithms are elegant, simple, and powerful. They can render shadows, reflections, and refracted light, phenomena that are difficult or impossible with other techniques[Ill. But ray tracing is currently limited to sharp shadows, sharp reflec tions, and sharp refraction. Permission o copy without fee all or part of this material s granted provided tha t the copies are not made or distribu ted for direct commerci al advantage, the ACM copyright notice and the t itle of the publication and its date appear, and notice is given that copying s by permission of the Association or Computing Ma chinery. To copy otherw ise, or to republish, requires a fee and/ or specific permission. © 1984 ACM 0-89791 -138-5/84/007/0137 $00.75 Ray traced images are sharp because ray directions are determined precisely from geometry. Fuzzy phenomenon would seem to require large numbers of additional sam- ples per ray. By distributing the rays rather than adding more of them, however, fuzzy phenomena can be ren- dered with no additional rays beyond those required for spatially oversampled ray tracing. This approach pro- vides correct and easy solutions to some previously unsolved problems. This approach has not been possible before because of aliasi ng. Ray tracing is a form of point sampling and, as such, has been subject to aliasing artifacts. This aliasing is not inherent, however, and ray tracing can be filtered as effectively as any analyt ic method[4]. The filtering does incur the expense of additional rays, but it is not merely oversampling or adaptive oversampling, which in themselves cannot solve the aliasing problem. This antialiasin g is based on an approach proposed by Rodney Stock. It is the subject of a forthcoming paper. Antiali asing opens up new possibilities for ray tr acing. Ray tracing need not be restricted to spatial sampling. If done with proper antialiasing, the rays can sample motion, the camera lens, and the entire shading function. This is called distributed ray tracing. Distributed ray tracing is a new approach to image syn- thesis. The key is that no extra rays are needed beyond those used for oversampling in space. For example, rather than taking multiple time samples at every spatial location, the rays are distributed in time so that rays at different spatial locations are traced at different instants of time. Once we accept the expense of oversampling in space, distributing the rays offers substantial benefits at little addi tional cost. Sampling the reflected ray according to the spec- ular distribution function produces gloss (blurred reflection). Sampling the transmitted ray produces translu- cency (blurred transparency). Sampling the solid angle of the light sources pro- duces penumbras. 137

Upload: jonas-hopp-ludwig

Post on 07-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

8/3/2019 1984 Ray Tracing Aa Blur Etc

http://slidepdf.com/reader/full/1984-ray-tracing-aa-blur-etc 1/9

Computer Grap hics Volum e18, Num ber 3 July 1984

D i s t r i b u t e d R a y T r a c i n g

R o b e r t L . C o o k

T h o m a s P o r t e r

L o r e n C a r p e n t e r

Computer DivisionLucasfilm Ltd.

A b s t r a c t

R a y t r a c i n g i s o n e o f t h e m o s t e l e g a nt t e c h n i q u e s i n c o m -

p u t e r g r a p h i c s. M a n y p h e n o m e n a t h a t a re d i f f ic u l t o r

i m p o s s i b l e w i t h o t h e r t e c h n i q u e s a r e s im p l e w i t h r a y t r a c -

i ng , i n c l u d i n g s h a d o w s , r e f l e c t i o n s , a n d r e f r a c t e d l ig h t.

R a y d i r e c t i o n s , h o w e v e r , h a v e b e e n d e t e r m i n e d p r e c i s e l y ,

a n d t h i s h a s l i m i t e d t h e c a p a b i l i ti e s o f r a y t r a c i n g . B y

d i s t r i b u t i n g t h e d i r e c t i o n s o f t h e r a y s a c c o r d i n g t o t h e

a n a l y t i c f u n c t i o n t h e y s a m p l e , r a y t r a c i n g c a n i n c o r p o r a t e

f u z z y p h e n o m e n a . T h i s p r o v i d e s c o r r e c t a n d e a s y s o lu -

t i o n s t o s o m e p r e v i o u s l y u n s o l v e d o r p a r t i a l l y s o l v e d p r o b -

l e m s , i n c l u d i n g m o t i o n b lu r , d e p t h o f f i e ld , p e n u m b r a s ,

t r a n s l u c e n c y , a n d f u z z y r e f l e c t io n s . M o t i o n b l ur a n d

d e p t h o f f i e l d c a l c u l a t i o n s c a n b e i n t e g r a t e d w i t h t h e v i s i -

b le s u r f a c e c a l c u l a t i o n s , a v o i d i n g t h e p r o b l e m s f o u n d i n

p r e v i o u s m e t h o d s .

CR CATEGORIES AND SUBJECT DESCRIPTORS:1.3.7 [Computer Graphics]: Three-Dimensional

Graphics and Realism;

ADDITIONAL KEY WORDS AND PHRASES: camera,

constructive solid geometry, depth of field, focus,

gloss, motion blur, penumbras, ray tracing, shadows,translucency, transparency

1 . In trod u ct ion

Ray tracing algorithms are elegant, simple, and powerful.They can render shadows, reflections, and refracted light,

phenomena that are difficult or impossible with othertechniques [Ill. But ray tracing is currently limited tosharp shadows, sharp reflections, and sharp refraction.

Permission o copy without fee all or part of this material s grantedprovidedthat the copies are not made or distributed for directcommercial advantage, the ACM copyright notice and the title of thepublicationand its date appear, and notice is given that copying s bypermission of the Association or Computing Machinery.To copyotherwise, or to republish, requires a fee and/or specific permission.

© 1984 ACM 0-89791 -138-5/ 84/007/0 137 $00.75

Ray traced images are sharp because ray directions aredetermined precisely from geometry. Fuzzy phenomenon

would seem to require large numbers of additional sam-

ples per ray. By distrib uting the rays rather th an addingmore of them, however, fuzzy phenomena can be ren-dered with no additional rays beyond those required forspatially oversampled ray tracing. This approach pro-

vides correct and easy solutions to some previouslyunsolved problems.

This approach has not been possible before because of

aliasing. Ray tracing is a form of point sampling and, as

such, has been subject to aliasing artifacts. This aliasing

is not inherent, however, and ray tracing can be filteredas effectively as any analyt ic method[4]. The filt eringdoes incur the expense of additional rays, but it is not

merely oversampling or adaptive oversampling, which inthemselves cannot solve the aliasing problem. This

antialiasin g is based on an approach proposed by Rodn eyStock. It is the subject of a forthcoming paper.

Antiali asing opens up new possibilities for ray tr acing.Ray tracin g need not be restricted to spatial sampling. If

done with proper antialiasing, the rays can sample

motion, the camera lens, and the entire shading function.This is called d i s t r i b u t e d r a y t r a c i n g .

Distributed ray tracing is a new approach to image syn-thesis. The key is that no extra rays are needed beyond

those used for oversampling in space. For example,

rather than taking multiple time samples at every spatiallocation, the rays are distributed in time so that rays at

different spatial locations are traced at different instantsof time. Once we accept the expense of oversampling inspace, distributing the rays offers substantial benefits atlittle addi tional cost.

• Sampling the reflected ray according to the spec-

ular distribution function produces gloss (blurredreflection).

• Sampling the tran smitt ed ray produces translu -cency (blurred transparency).

• Sampling the solid angle of the light sources pro-duces penumbras.

137

8/3/2019 1984 Ray Tracing Aa Blur Etc

http://slidepdf.com/reader/full/1984-ray-tracing-aa-blur-etc 2/9

@SIGGRAPH'84

* S a m p l i n g t h e c a m e r a le n s a r e a p r o d u c e s d e p t h o f

f ie ld .

• S a m p l i n g i n t i m e p r o d u c e s m o t i o n b l u r.

2 . S h a d i n g

T h e i n t e n s i t y I o f t h e r e f l e c t e d l i g h t a t a p o i n t o n a s u r -

f a c e i s a n i n t e g r a l o v e r t h e h e m i s p h e r e a b o v e t h e s u r f a c e

o f a n i l l u m i n a t i o n f u n c t i o n L a n d a r e f l e c t i o n f u n c t i o n

R[1].

/ ( ¢ , , 0 , ) = f f L ( ¢ i , O i ) R ( ~ i , O i , ~ r , O r ) d 4 b id O i

w h e r e

(¢~ .,0; ) i s the ang le o f inc idenc e , and

(¢~ ,0 , ) i s the ang le o f re f lec t ion .

T h e c o m p l e x i t y o f p e r f o r m i n g t h i s i n t e g r a t i o n h a s b e e na v o i d e d b y m a k i n g so m e s i m p l i f y i n g a s s u m p t i o n s . T h e

f o l l ow i n g a r e s o m e o f t h e s e s i m p l i f i c a ti o n s :

• A s s u m e t h a t L i s a 6 f u n c t i o n , i . e ., t h a t L i s z e r o

e x c e p t f o r l i g h t s o u r c e d i r e c t i o n s a n d t h a t t h e l i g h t

s o u r c e s c an b e t r e a t e d a s p o i n ts . T h e i n t e g r a l is n o w

r e p l a c e d b y a s u m o v e r c e r t a i n d i s c r e t e d i r e c t i o n s .

T h i s a s s u m p t i o n c a u s e s s h a r p s h a d o w s .

• A s s u m e t h a t a l l o f t h e d ir e c t i o n s t h a t a r e n o t l i g h t

s o u r c e d i r e c t i o n s c a n b e g r o u p e d t o g e t h e r i n t o a n

a m b i e n t l i g h t so u r c e . T h i s a m b i e n t l i g h t i s t h e s a m e

i n a l l d i r e c ti o n s , s o t h a t L i s in d e p e n d e n t o f ¢ i a n d 0

a n d m a y b e r e m o v e d f r o m t h e i n t e g r a l . T h e i n t e g r a l

o f R m a y t h e n b e r e p l a c e d b y a n a v e r a g e , o r

a m b i e n t , r e f l e c t a n c e .

• A s s u m e t h a t t h e r e fl e c t a n c e f u n c t i o n R i s a 6 f u n c -

t i o n , i . e . , t h a t t h e s u r f a c e i s a m i r r o r a n d r e f l e c t s

l i g h t o n ly f r o m th e m i r r o r d i re c t i o n . T h i s a s s u m p -

t i o n c a u s e s s h a r p r e f l e c t i o n s. A c o r r e s p o n d i n g

a s s u m p t i o n f o r t r a n s m i t t e d l i g h t c a u s e s s h a r p r e f r a c -

t i o n .

T h e s h a d i n g f u n c t i o n m a y b e t o o c o m p l e x t o c o m p u t e

a n a l y t i c a l l y , b u t w e c a n p o i n t s a m p l e i t s v a l u e b y d i s t r i -

b u t i n g t h e r a y s , t h u s a v o i d i n g th e s e s i m p l i f y i n g a s s u m p -

t i o n s . I l l u m i n a t i o n r a y s a re n o t t r a c e d t o w a r d a s in g l e

l i g h t d i r e c t i o n , b u t a r e d i s t r i b u t e d a c c o r d i n g t o t h e

i l l u m i n a t i o n f u n c t i o n L . R e f l e c t e d r a y s a r e n o t t r a c e d i n

a s i n g l e m i r r o r d i r e c t i o n b u t a r e d i s t r i b u t e d a c c o r d i n g t o

t h e r e f l e c t a n c e f u n c t i o n R .

2 . 1 . G l o s s

R e f l e c t io n s a r e m i r r o r - l i k e in c o m p u t e r g r a p h i c s , b u t i n

r e a l l i fe r e f l e c t i o n s a r e o f t e n b l u r r e d o r h a z y . T h e d i s -

t i n c t n e s s w i t h w h i c h a s u r f a c e r e f le c t s i t s e n v i r o n m e n t i s

c a l l e d g l o s s [ 5 ] . B l u r r e d r e f l ec t i o n s h a v e b e e n d i s c u s s e d b y

W h i t t e d [ l l ] a n d b y C o ok [2 ]. A n y a n a l y t i c s i m u l a t i o n o f

t h e s e r e f l e c ti o n s m u s t b e b a s e d o n t h e i n t e g r a l o f t h e

r e f l e c t a n c e o v e r s o m e s o l id a n g l e .

M i r r o r r e f l e c t i o n s a r e d e t e r m i n e d b y t r a c i n g r a y s f r o m t h e

s u r f a c e in t h e m i r r o r d i r e c t i o n . G l o s s c a n b e c a l c u l a t e d

b y d i s t r i b u t i n g t h e s e s e c o n d a r y r a y s a b o u t t h e m i r r o r

d i r e c t i o n . T h e d i s t r i b u t i o n i s w e i g h t e d a c c o r d i n g t o t h e

s a m e d i s t r i b u t i o n f u n c t i o n t h a t d e t e r m i n e s t h e h i g h l i g h t s .

T h i s m e t h o d w a s o r i g i n a l l y s u g g e s t e d b y W h i t t e d [ 1 1 ] ,

a n d i t re p l a c e s t h e u s u a l s p e c u l a r c o m p o n e n t . R a y s t h a t

r e f le c t l i g h t s o u r c e s p r o d u c e h i g h l i g h t s .

2 . 2 . T r a n s l u c e n c y

L i g h t t r a n s m i t t e d t h r o u g h a n o b j e c t is d e s c r i b e d b y a n

e q u a t i o n s i m i l a r t o t h a t f o r r e f l e c t e d l i g h t , e x c e p t t h a t

t h e r e f l e c t a n c e f u n c t i o n R i s r e p l a c e d b y a t r a n s m i t t a n c e

f u n c t i o n T a n d t h e i n t e g r a l i s p e r f o r m e d o v e r t h e h e m i -

s p h e r e b e h i n d t h e s u rf a c e . T h e t r a n s m i t t e d l i g h t c a n

h a v e a m b i e n t , d i ff u se , a n d s p e c u l a r c o m p o n e n t s [ 5 ].

C o m p u t e r g r a p h i c s h a s i n c l u d e d t r a n s p a r e n c y , i n w h i c h T

i s a s s u m e d t o b e a 6 f u n c t i o n a n d t h e i m a g e s s e e n

t h r o u g h t r a n s p a r e n t o b j e c t s ar e s h a r p. T r a n s l u c e n c y

d i ff e rs f r o m t r a n s p a r e n c y i n t h a t t h e i m a g e s s e e n th r o u g h

t r a n s l u c e n t o b j e c t s a r e n o t d i s t i n c t. T h e p r o b l e m o f

t r a n s l u c e n c y i s a n a l o g o u s t o t h e p r o b l e m o f g lo s s. G l o s s

r e q u i re s a n i n t e g r a l o f t h e r e f l e c t ed l i g h t , a n d t r a n s l u -

c e n c y r e q u ir e s a c o r r e s p o n d i n g i n t e g r a l o f t h e t r a n s m i t t e d

l i g h t .

T r a n s l u c e n c y i s c a l c u l a t e d b y d i s t r i b u t i n g t h e s e c o n d a r y

r a y s a b o u t t h e m a i n d i r e c t i o n o f t h e t r a n s m i t t e d l i g h t .

J u s t a s t h e d i s t r i b u t i o n o f t h e r e f l e c t e d r a y s i s d e f i n e d b y

t h e s p e c u l a r r e f l e c t a n c e f u n c t i o n , t h e d i s t r i b u t i o n o f t h et r a n s m i t t e d r a y s i s d e f i n e d b y a s p e c u l a r t r a n s m i t t a n c e

f u n c t i o n .

2 . 3. P e n u m b r a s

P e n u m b r a s o c c u r w h e r e a l ig h t s o u rc e is p a r t i a l l y

o b s c u r e d . T h e r e f l ec t e d i n t e n s i t y d u e t o s uc h a l i g h t i s

p r o p o r t i o n a l t o t h e s o l i d a n g l e o f t h e v i s i b l e p o r t i o n o f

t h e l i g h t . T h e s o l i d a n g le h a s b e e n e x p l i c i t l y i n c l u d e d i n

a s h a d i n g m o d e l[ 3 ], b u t n o a l g o r i t h m s h a v e b e e n s u g -

g e s t e d f o r d e t e r m i n i n g t h i s s o l i d a n g l e b e c a u s e o f t h e

c o m p l e x i t y o f t h e c o m p u t a t i o n i n v o l v e d . T h e o n l y

a t t e m p t a t p e n u m b r a s k n o w n t o t h e a u t h o rs s e e m s t o

s o l v e o n l y a v e r y s p e c i a l c a s e [ 7] .

S h a d o w s c a n b e c a l c u l a t e d b y t r a c i n g r a y s f r o m t h e s u r -

f a c e t o t h e l i g h t s o u r c e s , a n d p e n u m b r a s c a n b e c a l c u -

l a t e d b y d i s t r i b u t i n g t h e s e s e c o n d a r y r a y s . T h e s h a d o w

r a y c a n b e t r a c e d t o a n y p o i n t o n t h e l i g h t s o u r c e, n o t

j u s t n o t t o a s i n g le li g h t s o u rc e l o c a ti o n . T h e d i s t r i b u -

t i o n o f t h e s h a d o w r a y s m u s t b e w e i g h t e d a c c o r d i n g t h e

p r o j e c t e d a r e a a n d b r i g h t n e s s o f d i f fe r e n t p a r t s o f t h e

l i g h t s o u r c e. T h e n u m b e r o f r a y s t r a c e d t o ea c h r e g io n

s h o u l d b e p r o p o r t i o n a l to t h e a m o u n t o f t h e l i g h t ' s

e n e r g y t h a t w o u l d c o m e f r o m t h a t r e g i o n i f t h e l i g h t w a s

138

8/3/2019 1984 Ray Tracing Aa Blur Etc

http://slidepdf.com/reader/full/1984-ray-tracing-aa-blur-etc 3/9

Computer Graphics Vo lume18, Num ber 3 July 1984

VD D: < . . . . . . . . . . . . - - - a . - . . < - . . . . . . . . . . . . . . . . . . . . . . . . . .

!::i C

image )lane lens focal plane

Figure 1. Circle of Confusion.

completely unobscured. The prop ortion of lighted sample

points in a region of the surface is then equal to the pro-portion of that light's intensity that is visible in thatregion.

3 . D e p t h o f F i e ld

Cameras and the eye have a finite lens aperture, and

hence their images have a finite depth of field. Eachpoint in the scene appears as a circle on the image plane.

This circle is called the circle of confusion, and its sizedepends on the distance to the point and on the lensoptics. Depth of field can be an unw anted artifact, bu t itcan also be a desirable effect.

Most computer graphics has been based on a pinholecamera model with every object in sharp focus. Potme sil

simulated depth of field with a postprocessing technique.Each object is first rendered in sharp focus (i.e., with a

pinhole camera model), and later each sharply renderedobject is convolved with a filter the size of the circle of

confusion[8]. The program spends most of its time in thefocus postprocessor, and this time increases dramaticallyas the aperture decreases.

Such a postprocessing approach can never be completely

correct. This is because visibility is calculate d from a sin-gle point, the center of tile lens. The view of the environ-ment is different from different parts of the lens, and the

differences include changes in visibili ty and shading thatcannot be accounted for by a postprocessing approach.

For example, consider an object that is extremely out offocus in fron t of an object th at is in focus. Visible sur-face calculations done with the pinhole model determine

the visibility from the center of the lens. Because thefront object is not in focus, parts of the focused object

that are not visible from the center of the lens will bevisible from other parts of the lens. Infor mation about

those parts will not available for the postprocessor, so thepostprocessor cannot possibly get the correct result.

There is another way to approach the depth of field prob-

lem. Depth of field occurs because the l ens is a finite size.

Each point on the lens "looks" at the same point on thefocal plane. The visible surfaces and the shading may bedifferent as seen from different part s of the lens. The

depth of field calculations should account for this and bean integral part of the visible surface and shading calcu-

lations.

Depth of field can be calculated by starting with thetraditional ray from the center of the lens through point

p on the focal plane. A poin t on the surface of the lens isselected and the ray from that point to p is traced. The

camera specifications required for this calculation are the

focal distance and the diameter of the lens F where F isn

the focal length of the lens and n is the aperture number.

This gives exactly the same circle of confusion aspresented by Potmesil[8]. Because it integrates the depth

of field calculations with the shading and visible surface

calculations, this method gives a more accurate solutionto the depth of field problem, with the exception that itdoes not account for diffraction effects.

Figure 1 shows why this method gives the correct circle

of confusion. The lens has a diameter of F and isn

focused at a distance P so that the image plane is at adistance Vp, where

F PVp = ~ for P> F.

Points on the plane that is a distance D from the lens willfocus at

F DV D - ~ ~ for D > F

and have a circle of confusion with diameter C of[8]

FC= IVD-V~I .v D

For a point I on the image plane, the rays we trace lieinside the cone whose radius at D is

13 9

8/3/2019 1984 Ray Tracing Aa Blur Etc

http://slidepdf.com/reader/full/1984-ray-tracing-aa-blur-etc 4/9

@SIGGRAPH'84

1 F I D - P I

2 n P

T h e i m a g e p l a n e d i s t a n c e f r o m a p o i n t o n t h i s c o n e t o a

p o i n t o n t h e a x i s o f t h e c o n e i s r m u l t i p l i e d b y t h e

m a g n i f i c a t i o n o f t h e l e ns .

R = r - - - - ~ .

I t i s e a s i ly s h o w n t h a t

R = c ' "2

H e n c e a n y p o i n t s o n t h e c o n e h a v e a c i r c l e o f c o n f u s io n

t h a t j u s t t o u c he s t h e i m a g e p o i n t /. P o i n t s o u t s i d e t h e

c o n e d o n o t a f fe c t t h e i m a g e p o i n t a n d p o i n t s i n s i d e t h e

c o n e d o .

4 . M o t i o n B l u r

D i s t r i b u t i n g t h e r a y s o r s a m p l e p o i n t s i n t i m e s o l v e s t h e

m o t i o n b l u r p r o b l e m . B e f o r e w e d is c u s s t h i s m e t h o d a n d

h o w i t w o r k s , l e t u s f i r s t l o o k i n m o r e d e t a i l a t t h e

m o t i o n b l u r p r o b l e m a n d a t p r e v i o u s a t t e m p t s t o s o l v e i t .

T h e m o t i o n b l u r m e t h o d d e s c r i b e d b y P o t m e s i l [9 ] i s n o t

o n l y e x p e n s i v e, i t a l so s e p a r a t e s t h e v i s i b l e s u r f a c e c a l c u -

l a t i o n fr o m t h e m o t i o n b l u r c a l c u l a t i o n . T h i s i s a c c e p t -

a b l e i n s o m e s i t u a t i o n s , b u t i n m o s t c a s e s w e c a n n o t j u s t

c a l c u l a t e a s t i l l f r a m e a n d b l u r t h e r e s u l t. S o m e o b j e c t

e n t i r e l y h i d d e n i n t h e s t i l l f r a m e m i g h t b e u n c o v e r e d f o r

p a r t o f t h e t h e t i m e s a m p l e d b y t h e b l u r . I f w e a r e t o

b l u r a n o b j e c t a c r o s s a b a c k g r o u n d , w e h a v e t o k n o ww h a t t h e b a c k g r o u n d i s .

E v e n i f w e k n o w w h a t t h e b a c k g r o u n d i s , t h e r e a r e p r o b -

l e m s . F o r e x a m p l e , c o n s i d e r a b i p l a n e v i e w e d f r o m

a b o v e , s o t h a t t h e l o w e r w i n g i s c o m p l e t e l y o b s c u r e d b y

t h e u p p e r w i n g . B e c a u s e t h e u p p e r w i n g is m o v i n g , t h e

s c e n e r y b e l o w i t w o u l d b e s e e n t h r o u g h i t s b l u r , b u t

u n f o r t u n a t e l y t h e l o w e r w i n g w o u l d s h o w t h r o u g h t o o .

T h e l o w e r w i n g s h o u l d b e h i d d e n c o m p l e t e l y b e c a u s e i t

m o v e s w i t h t h e t h e u p p e r w i n g a n d i s o b s c u r e d b y i t o v e r

t h e e n t i r e t i m e i n t e r v a l .

T h i s p a r t i c u l a r p r o b l e m c a n b e s o l v e d b y r e n d e r i n g t h e

p l a n e a n d b a c k g r o u n d a s s e p a r a t e e le m e n t s , b u t n o t a l l

p i c t u r e s c a n e a s i l y b e s e p a r a t e d i n t o e l e m e n t s . T h i s s o l u -

t i o n a l s o d o e s n o t a l l o w f o r c h a n g e s i n v i s i b i l i t y w i t h i n a

s i n g l e o b j e c t . T h i s i s p a r t i c u l a r l y i m p o r t a n t f o r r o t a t i n g

o b j e c t s .

T h e s i t u a t i o n i s f u r t h e r c o m p l i c a t e d b y t h e c h a n g e i n

s h a d i n g w i t h i n a f r a m e t i m e . C o n s i d e r a t e x t u r e d t o p

s p i n n i n g o n a t a b l e . I f w e c a l c u l a t e o n l y o n e s h a d e p e r

f r a m e , t h e t e x t u r e w o u l d b e b l u r r e d p r o p e r l y , b u t

u n f o r t u n a t e l y t h e h i g h l i g h t s a n d s h a d o w s w o u l d b e

b l u r r e d t o o . O n a r e a l t o p , t h e h i g h l i g h t s a n d s h a d o w s

a r e n o t b l u r r e d a t a l l b y t h e s p i n n i n g . T h e y a r e b l u r re d ,

o f c o u r se , b y a n y l a t e r a l m o t i o n o f t h e t o p a l o n g t h e

t a b l e o r b y t h e m o t i o n o f a l i g h t s o u r c e o r t h e c a m e r a .

T h e h i g h l i g h t s s h o u l d b e b l u r r e d b y t h e m o t i o n o f t h e

l i g h t a n d t h e c a m e r a , b y t h e t r a v e l o f t h e t o p a l o n g t h e

t a b l e , a n d b y t h e p r e c e s s i o n o f t h e t o p , b u t n o t b y t h er o t a t i o n o f t h e t o p .

M o t i o n b l u r r e d s h a d o w s a r e al s o i m p o r t a n t a n d a r e n o t

r e n d e r e d c o r r e c t l y i f w e c a l c u l a t e o n l y o n e s h a d e p e r

f r a m e . O t h e r w i s e , f o r e x a m p l e , th e b l a d e s o f a f a n c o u ld

b e m o t i o n b l u r r e d , b u t t h e s h a d o w s o f t h o s e b l a d e s w o u l d

s t r o b e .

A l l o f t h i s i s s i m p l y t o e m p h a s i z e t h e t r e m e n d o u s c o m -

p l e x i t y o f t h e m o t i o n b l u r p r o b l e m . T h e p r o s p e c t s f or a n

a n a l y t i c s o l u t i o n a r e d i m . S u c h a s o l u t io n w o u l d r e q u i r e

s o l v i n g t h e v i s i b l e s u r f a c e p r o b l e m a s a f u n c t i o n o f t i m e

a s w e l l a s s p a c e . I t w o u l d a l s o i n v o l v e i n t e g r a t i n g t h e

t e x t u r e a n d s h a d i n g f u n c t i o n o f t h e v i s ib l e s u r f a c e s o v e r

t i m e . P o i n t s a m p l i n g s e em s t o b e t h e o n l y a p p r o a c h t h a t

o f fe r s a n y p r o m i s e o f s o l v i n g t h e m o t i o n b l u r p r o b l e m .

O n e p o i n t s a m p l i n g s o l u t i o n w a s p r o p o s e d b y K o r e i n a n d

B a d l e r[ 6 ] . T h e i r m e t h o d , h o w e v e r , p o i n t s a m p l e s o n l y i n

s p a c e , n o t in t i m e . C h a n g e s i n s h a d i n g a r e n o t m o t i o n

b l u r r e d . T h e m e t h o d i n v o l v e s k e e p i n g a l i s t o f a l l o b j e c t s

t h a t c r o s s e a c h s a m p l e p o i n t d u r i n g t h e f r a m e t i m e , a l i s t

t h a t c o u l d b e q u i t e l o n g f o r a f a s t m o v i n g c o m p l e x s c e n e .

T h e y a l s o i m p o s e t h e u n f o r t u n a t e r e s t r i c t i o n t h a t b o t h

v e r t i c e s o f a n e d g e m u s t m o v e a t t h e s a m e v e l o c i t y . T h i s

c r e a t e s h o l e s in o b j e c t s t h a t c h a n g e p e r s p e c t i v e s e v e r e l y

d u r i n g o n e f r a m e , b e c a u s e t h e v e r t i c e s m o v e a t d r a s t i -

c a l l y d i f f e re n t r a te s . P o l y g o n s w i t h e d g e s t h a t s h a r et h e s e v e r t i c e s c a n n o t r e m a i n a d j o i n i n g . T h e a l g o r i t h m i s

a l s o l i m i t e d t o l i n e a r m o t i o n . I f t h e m o t i o n i s c u r v e d o r

i f t h e v e r t i c e s a r e a l l o w e d t o m o v e i n d e p e n d e n t l y , t h e

l i n e a r i n t e r s e c t i o n e q u a t i o n b e c o m e s a h i g h e r o r d e r e q u a -

t i o n . T h e r e s u l t i n g e q u a t i o n i s e x p e n s i v e t o s o l ve a n d h a s

m u l t i p l e r o o t s .

D i s t r i b u t i n g t h e s a m p l e p o i n t s i n t i m e s o l v e s t h e m o t i o n

b l u r p r o b le m . T h e p a t h o f m o t i o n c an b e a r b i tr a r i l y

c o m p l e x . T h e o n l y r e q u i r e m e n t i s t h e a b i l i t y t o c a l c u l a t e

t h e p o s i t i o n o f t h e o b j e c t a t a s p e ci f ic t i m e . C h a n g e s i n

v i s i b i l i t y a n d s h a d i n g a r e c o r r e c t l y a c c o u n t e d f o r . S h a -

d o w s ( u m b r a s a n d p e n u m b r a s ) , d e p t h o f fi e ld , r e f l e c ti o n s

a n d i n t e r s e c t i o n s a r e a l l c o r r e c t l y m o t i o n b l u r r e d . B yu s i n g d i f f e r en t d i s t r i b u t i o n s o f r a y s , t h e m o t i o n c a n b e

b l u r r e d w i t h a b o x f i l t e r o r a w e i g h t e d f i l t e r o r c a n b e

s t r o b e d .

T h i s d i s t r i b u t i o n o f t h e s a m p l e p o i n t s i n t i m e d o e s n o t

i n v o lv e a d d i n g a n y m o r e s a m p l e p o i n ts . U p d a t i n g t h e

o b j e c t p o s i t i o n s f or e a c h t i m e i s th e o n l y e x t r a c a l c u l a t i o n

n e e d e d f o r m o t i o n b l u r . P r o p e r a n t i a l i a s i n g is r e q u i r e d o r

t h e p i c t u r e w i l l l o o k s t r o b e d o r h a v e h o le s [4 ] .

140

8/3/2019 1984 Ray Tracing Aa Blur Etc

http://slidepdf.com/reader/full/1984-ray-tracing-aa-blur-etc 5/9

Computer Graphics Vo lum e18, Num ber 3 July 1984

5 . Other Impl ica t ions o f the Algor i thm

Visible surface calculation is straightforward. Since each

ray occurs at a single instant of time, the first step is toupdate the positions of the objects for that instant oftime. The next is to construct a ray from the lens to thesample point and find the closest object that the rayintersects. Care must be taken in bou ndin g moving"objects. The bo und should depend on time so that th enumber of potentially visible objects does not grow unac-

ceptably with their speed.

Intersecting surfaces are handled trivially because wenever have to calculate the line of intersection; we merelyhave to determine which is in front at a given locationand time. At each sample point only one of the surfacesis visible. The intersections can even be motion blurred,a problem that would be terrifying with an analyticmethod.

The union, intersection, difference problem is easilysolved with r ay traci ng or poi nt sampling[10]. These cal-culations are also correctly motion blurred.

Transparency is easy even if the transparency is textured

or varies with time. Let r be the transparenc y of a sur-face at the time and location it is pierced by the ray, and

let R be the reflectance. R and r are wavelength depen-

dent, and the color of the transparency is not necessarilythe same as the color of the reflected light; for example,

a red transparent plastic object may have a whitehighlight. If there are n-I tran spar ent surfaces in frontof the opaque surface, the light reaching the viewer is

n-1 n-2 ~ i-1

R n n r i + R n - l l - I r l + " " " + R2rl + RI = ~] R i H r i .i = l i = l i ~ l i = l

If the surfaces form solid volumes, then each object has a

r, and that r is scaled by the distance that the transmit-

ted ray travels through tha t object. The motion blur and

depth of field calculations work correctly for these tran-sparency calculations.

The distributed approach can be adapted to a scanlinealgorithm as well as to ray tracing. The general motion

blur and depth of field calculations have been incor-porated into a scanline algorithm using distributed sam-

pling for the visible surface calcul ations. Special cases ofpenumbras, fuzzy reflections, and translucency have beensuccessfully incorporated for fiat surfaces.

6 . Summ ary o f the Algor i thm

The intensity of a pixel on the screen is an analytic func-

tion that involves several nested integrals: integrals overtime, over the pixet region, and over the lens area, as well

as an integral of reflectance times illum ination over thereflected hemisphere and an integral of transmittancetimes illumi nation over the tran smitt ed hemisphere. This

integral can be tremendously complicated, but we can

point sample the function regardless of how complicatedit is. If the function depends on n parameters, the func-

tion is sampled in the n dimensions defined by those

parameters. Rather t han addi ng more rays for eachdimension, the existing rays are distributed in eachdimension according to the values of the correspondingparameter.

This summary of the distributed ray tracing algorithm isillustrated in Figure 2 for a single ray.

• Choose a time for the ray and move the objectsaccordingly. The n umbe r of rays at a certain time isproportional to the value of the desired temporalfilter at that time.

Reflected 7 Light

S p~P lte~ A Surface

Film Lens TransmittedPlane Ray

Figure 2. Typical Distributed Ray Path

141

8/3/2019 1984 Ray Tracing Aa Blur Etc

http://slidepdf.com/reader/full/1984-ray-tracing-aa-blur-etc 6/9

@SIGGRAPH'84

* Const ruct a ray from the eye point (center of the

lens) to a poin t on the screen. Choose a location on

the lens, and trace a ray from that location to thefocal point of the original ray. Determine whichobject is visible.

• Calcu late the shadows. For each light source, choosea location on the light and trace a ray from the visi-

ble point to th at location. The nu mber of raystraced to a location on the light should be propor-

tional to the intensity and projected area of that

location as seen from the surface.

• For reflections, choose a direction around the mirror

direction and trace a ray in that direction from thevisible point. The nu mber of rays traced in aspecific direction should be proportional to the

amount of light from that direction that is reflected

toward the viewer. This can replace the specularcomponent.

• For transmi tted light, choose a direction around the

direction of the transmitted light and trace a ray inthat direction from the visible point. The numb er of

rays traced in a specific direction should be propor-tional to the amount of light from that direction

that is transmitted toward the viewer.

7 . E x a m p l e s

Figure 3 illustrates motion blurred intersections. The

blue beveled cube is stationary, and the green beveledcube is moving in a straight line, perpendicular to one of

its faces. Notice tha t t he inter secti on of the faces is

blurred except in in the plane of motion, where it issharp.

Figure s 4 and 5 illu str ate depth of field. In figure 4, thecamera has a 35 mm lens at f2.8. Notice that the rear

sphere, which is out of focus, does not blur over thespheres in front. In figure 5, the camera is focused on the

center of the three wooden spheres.

Figure 6 shows a number of moving spheres, with motion

blurred shadows and reflections.

Figure 7 illustrates fuzzy shadows and reflections. The

paper clip is illuminated by two local light sources which

cast shadows with penumb ras on the table. Each light is

an extended light source (i.e., not a point light source)with a finite solid angle, and the inten sity of its shadowat any point on the table is proportional to the amountof light obscured by the paper clip. The tab le reflects the

paper clip, and the reflection blurs according to the spec-

ular distribution function of the table top. Note thatboth the shadows and the reflection blur with distance

and are sharper close to the paper clip.

142

Figure 3. Motion Blurred Intersection.

Figure 4. Depth of Field.

Figure 5. Depth of Field.

8/3/2019 1984 Ray Tracing Aa Blur Etc

http://slidepdf.com/reader/full/1984-ray-tracing-aa-blur-etc 7/9

Figure 6 . Bal ls in Mot ion.

Computer Graph ics Volum e18, Num ber 3 July 1984

f

J

j

Figure 7 . Pape r C l ip .

14 3

8/3/2019 1984 Ray Tracing Aa Blur Etc

http://slidepdf.com/reader/full/1984-ray-tracing-aa-blur-etc 8/9

@SIGGRAPH'84

F i g u r e 8 s h o w s 5 b i l l i a r d b a l l s w i t h m o t i o n b l u r a n d

p e n u m b r a s . N o t i c e t h a t t h e m o t i o n i s n o t l i n e a r : t h e 9

b a l l c h an g e s d i r e c t i o n a b r u p t l y i n t h e m i d d l e o f t h e

f r a m e , t h e 8 b a l l m o v e s o n l y d u r i n g t h e m i d d l e o f t h e

f r a m e , a n d t h e , l b a l l o n l y s t a r t s t o m o v e n e a r t h e e n d o f

t h e f r a m e . T h e s h a d o w s o n t h e t a b l e a r e s h a r p e r w h e r et h e b a l l s a r e c l o s e r t o t h e t a b l e ; t h i s m o s t a p p a r e n t i n th e

s t a t i o n a r y 1 b al l . T h e r e f l e ct i o n s o f t h e b i l l i a r d b a l l s a n d

t h e r o o m a r e m o t i o n b l u r r e d , a s a r e t h e p e n u m b r a s .

F i g u r e s 3 , 5 , a n d 7 w e r e r e n d e r e d w i t h a s c a n l i n e a d a p t a -

t i o n o f t h i s a l g o r i t h m . F i g u r e s 4 , 6 , a n d 8 w e r e r e n d e r e d

w i t h r a y t r a c i n g .

8 . C o n c l u s i o n s

D i s t r i b u t e d r a y t r a c in g a n e w p a r a d i g m f o r c o m p u t e r

g r a p h i c s w h i c h s o l v e s a n u m b e r o f h i t h e r t o u n s o l v e d o r

p a r t i a l l y s o lv e d p r o b l e m s . T h e a p p r o a c h h a s a l s o b e e ns u c c e s s fu l l y a d a p t e d t o a s c a n li n e a l g o r it h m . I t i n c o r-

p o r a t e s d e p t h o f f i el d c a l c u l a t io n s i n t o t h e v i s i b l e s u r f a c e

c a l c u l a t i o n s , e l i m i n a t i n g p r o b l e m s i n p r e v i o u s m e t h o d s .

I t m a k e s p o s s i b l e b l u r r e d p h e n o m e n a s u c h a s p e n u m b r a s ,

g l o ss , a n d t r a n s l u c e n c y . A l l o f t h e a b o v e c a n b e m o t i o n

b l u r r e d b y d i s t r i b u t i n g t h e r a y s i n t i m e .

T h e s e a r e n o t i s o l a t e d s o l u t i o n s t o i s o l a t e d p r o b l e m s .

T h i s a p p r o a c h t o i m a g e s y n t h e s i s i s p r a c t i c a l l y n o m o r e

e x p e n s i v e t h a n s t a n d a r d r a y t r a c i n g a n d s o l v e s a l l o f

t h e s e p r o b l e m s a t o n c e . T h e p r o b l e m s c o u l d n o t r e a l l y b e

s o l v e d s e p a r a t e l y b e c a u s e t h e y a r e a l l i n t e r r e l a t e d .

D i f f e re n c e s i n s h a d i n g , i n p e n u m b r a s , a n d i n v i s i b i l i t y a r e

a c c o u n t e d f o r i n t h e d e p t h o f fi e ld c a lc u l a t i o n s . C h a n g e s

i n t h e d e p t h o f f ie l d a n d i n v i s i b i l it y a r e m o t i o n b l u r r e d .T h e p e n u m b r a a n d s h a d i n g c a l c u la t i on s a r e m o t io n

b l u r r e d . A l l o f t h e s e p h e n o m e n a a r e r e l a t e d , a n d t h e n e w

a p p r o a c h s o l v e s t h e m a l l t o g e t h e r b y s a m p l i n g t h e m u l -

t i d i m e n s i o n a l s p a c e t h e y d e f in e . T h e k e y t o t h i s is t h e

a b i l i t y t o a n t i a l i a s p o i n t s a m p l i n g .

R e f e r e n c e s

1. COOK, ROBERT L. , TURNER WHITTED, AND

DONALD P . GREENBERG, A Comprehens ive Mode lfor Image Syn thes i s . u n p u b l i s h e d r e p o r t

2 . C O O K , R O B ER T L . , " A R e f l e c t i o n M o d e l f o r R e a l i s t i c

I m a g e S y n t h e s i s , " M a s t e r ' s t h e s i s , C o r n e l l U n i v e r -

s i t y , I t h a c a , N Y , D e c e m b e r 1 98 1.

3 . COOK, ROBERT L . AND KENNETH E . TORRANCE,

" A R e f l e c t i o n M o d e l f o r C o m p u t e r G r a p h i c s , " A C M

Transac t ions on Graph ics , vol . 1 , no . 1 , pp . 7 -24 ,

J a n u a r y 1 9 8 2 .

4 . C O O K , R O BE R T L . , " A n t i a l i a s e d P o i n t S a m p l i n g , "

T e c h n i c a l M e m o # 9 4 , L u c a s f i l m L t d , S a n R a f a e l ,

C A , O c t o b e r 3 , 1 9 8 3 .

5 . HUNTER, RICHARD S . , T h e M e a s u r e m e n t o f A p p e a r -ance , J o h n W i l e y & S o n s , N e w Y o r k , 1 9 7 5.

6 . K O R E IN , J O N A T H AN A N D N O R M A N B A D L E R , " T e m -

p o r a l A n t i - A l ia s i n g i n C o m p u t e r G e n e r a t e d A n i m a -

t i o n , " C o m p u t e r G r a p h i c s , vol . 17 , no . 3 , pp . 377-388 , Ju ly 1983 .

7 . NISHITA, TOMOYUKI, ISAO O KA M UR A, AND

EIHACHIRO NAKAMAE, Siggraph Ar t Show, 1982.

8. POTMESIL, MICHAEL AND INDRANIL CHAKRAVA RTY,

" S y n t h e t i c I m a g e G e n e r a t i o n w i t h a L e n s a n d A p e r -

t u r e C a m e r a M o d e l , " A C M T r a n s a c ti o n s o n Gr a ph -ics , vol . 1 , no . 2 , pp . 85-108 , Apr i l 1982 .

9. POTMESIL, MICHAEL AND INDRANIL CtlAKRAVARTY,

" M o d e l i n g M o t i o n B l u r in C o m p u t e r - G e n e r a t e d

I m a g e s , " C o m p u t e r G r a p h i c s , vol . 17 , no . 3 , pp .

389-399 , Ju ly 1983 .

1 0 . R O T H , S . D . , " R a y C a s t i n g f o r M o d e l i n g S o l i d s , "

Co mp uter Graph ics and Image Process ing , no. 18,

pp . 109-144 , 1982 .1 1. W H I T TE D , T U RN E R , " A n I m p r o v e d I l l u m i n a t i o n

M o d e l f o r S h a d e d D i s p l a y , " C o m m u n i c a t i o n s o f t h eA C M , vol . 23 , pp . 343-349 , 1980 .

9 . A c k n o w l e d g e m e n t s

R o d n e y S t o c k p r o p o s e d t h e a p p r o a c h t o a n t i a l i a s e d p o i n t

s a m p l i n g t h a t f o r m e d t h e b a s i s o f t h e p a r a d i g m e x p l o r e d

i n t h i s p a p e r . J o h n L a s s e t e r d r e w t h e e n v i r o n m e n t m a p

o f t h e p o o l h a l l f o r " 1 9 8 4 " . E d C a t m u l l w o r k e d w i t h u s

i n t h ~ i m a g e s y n t h e s i s w o r k i n g g r o u p a n d h e l p e d d e v e l o p

a n d r e f i ne t h e s e i d e as . H e a n d A l v y R a y S m i t h p r o v i d e d

i n v a l u a b l e s u g g e s t io n s a l o n g t h e w a y . T o m D u f f w r o t e

t h e r a y t r a c i n g p r o g r a m t h a t w e a d a p t e d t o d i s t r i b u t e d

r a y t r a c i n g .

144

8/3/2019 1984 Ray Tracing Aa Blur Etc

http://slidepdf.com/reader/full/1984-ray-tracing-aa-blur-etc 9/9

Computer Grap hics Volum e18, Num ber 3 July 1984

Figure 8. 1984.

14 5