Language:EN
Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
the amount attenuation controlled scale value

The amount attenua-tion controlled scale value

VII.6 SHADOW ATTENUATION FOR RAY TRACING TRANSPARENT OBJECTS

A trick I prefer is to attenuate the intensity of the light source based on the cosine of the incident angle of the shadow ray with the transparent object at each intersection along the shadow ray. The amount of attenua-tion is controlled by a scale value, which has a range from 0.0 to 1.0. The rationale for this trick is that shadows from glasses of water or crystal balls tend to focus light more toward the center of the shadow where the angle between the light rays and the surface normal is small. This is not always true; the focus can be totally outside of the shadow altogether, usually seen from objects with a high index of refraction. This trick is good enough to fool the eye on objects with small indices of refraction, such as glass ashtrays, plastic marbles, or bottles of beer.

tm = MAX[0, 1 + (

r
S is the normalized shadow ray direction vector

r
Nisthe surface normal vector (facing the eye)

The term tm is computed for every transparent surface intersected by the shadow ray and factored into ′kt , which is initialized to 1.0 for the shadow ray. Of course all of this work is wasted if the shadow ray strikes

GRAPHICS GEMS I Edited by ANDREW S. GLASSNER 398

GRAPHICS GEMS I Edited by ANDREW S. GLASSNER 399

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Prerak Varkey

PageId: ELI3222468