errata for REALISTIC RAY TRACING by Peter Shirley, published by AK Peters. Last updated 4/19/03 The first list of errors are the serious ones you should definitely mark in your book. The second list is more for my information if the book gets a second printing and we can fix problems. Thanks to all for the help. ------------------------------------------------------------------------ Part 1: errors of technical content Chapter 1, page 11, the matrix for transforming normal vectors can have the bottom row (0, 0, 0, 1). However, it works as is for vectors represented with a 0 in the homogeneous coordinate. (Niels Holm Olsen) Chapter 2, page 22, "just check discriminant" isn't strictly true - sphere could be behind ray (Eric Haines) Chapter 2, page 26, "the ray t = o + td" should be "the ray p(t) = o + td" (Bobby Bodenheimer) Chapter 2, page 27, last equation should be for "t = ..." (Ray Jones) Chapter 2, page 29, pseudocode should be function sphere.hit( ray o+td, t0, t1, prim ) float A <- dot(d,d) float B <- 2*dot(d,o-c) float C <- dot(o-c,o-c) - R^2 discriminant <- B*B - 4*A*C if discriminant >= epsilon then sqrtd <- sqrt( discriminant ) t_val <- ( -B - sqrtd ) / (2*A) if t_val > t0 and t_val < t1 then prim <- this t <- t_val return true t_val <- ( -B + sqrtd ) / (2*A) if t_val > t0 and t_val < t1 then prim <- this t <- t_val return true return false # No hits within ray's t interval (Randall Hopper) Chapter 3, page 31, theta is the angle between surface normal and direction to light. (Randall Hopper) Chapter 3, page 32, vector n is a unit length vector (Matt Ownby) Chapter 4, page 38, Figure 4.2, short legs of F on image plane pointing the wrong way. Should be flipped horizontally. (Phil Dutre) Chapter 4, page 40, "make-ONB-from-WV(g,v_up)" needs to be "make-ONB-from-WV(-g,v_up)", to be consistent with Figure 4.5 and with the w= equation above. (Randall Hopper) Chapter 4, page 41, "the ratio of b_u-a_u to s is the tangent of half [fov]" should begin with the work "half". (Randall Hopper) Chapter 4, page 41, "vertical field-of-view" should be "horizontal field-of-view" (Nelson Max) Chapter 4, page 41, example scene 4.6 The vector g should be (0, 0, -2) instead of being (0, 0, 2). The parameters are given are pointing the camera away from the sphere, which will result in a black picture. (Phil Dutre) Chapter 4, page 42. Ambient factor is not defined. It is a constant term added to the incident lighting which is then multiplied by the reflectance (Nelson Max) Chapter 4, page 42. Moving e will change the image because of v_up and the light vector (Nelson Max) Chapter 5, page 44, top equation (d*n) r = d + 2*a = d - ------- * n ||n||^2 ^------------- this is the change (Randall Hopper) Chapter 5, page 44, just below Eqn 5.1 "when d is parallel to n" should be "when d is exactly opposite to n" (Nelson Max) Chapter 5, page 46, first equation, there's a spurious theta under the sqrt. (Bobby Bodenheimer) Chapter 5, page 46, k is a constant of integration, so k' is not needed (Nelson Max) Chapter 5, page 46. The formula should be I(s) = I(0)e^{ln(a)s} (Nelson Max) Chapter 5, page 46, code, R_0 is given without explanation. It is from the Fresnel Equations for normal incidence light (Nelson Max) Chapter 6, page 53, first paragraph of Section 6.1. c_0 and_c_1 should be s_0 and s_1. (Bobby Bodenheimer) Chapter 6, pp. 54-55, capital rho is a vector and should be bold. (Nelson Max) Chapter 6, page 56, section 6.3, first formula. "(2^i x)" should be "n(2^i x)". (Bill Martin) Chapter 6, page 57. Second line of pseudocode should be n += k1*vectorTurbulence(k2*x) third line should be deleted (Tylene Garrett) Chapter 7, page 62, middle of page. (u',v') = (nu - floor(nu), nv - floor(nv)) should be (u',v') = (n_x u - floor(n_x u), n_y v - floor(n_y v)) (Randall Hopper) Chpater 9, page 69, end of second paragraph. (M^{-1})^Tx should be (M^{-1})^Tn (Nelson Max) Chapter 9, page 69, in the pseudo-code for "hit-instance": The object is transformed by "M^{-1}", not "M". Also the M in "M^{-1}" should be bold. (Tomas Moller) Also p <- M^(-1) * pp should be p <- M * pp (Brian Budge) Chapter 10, page 74, "v_x" should be "d_x" (for y and z too). (Tomas Moller) Chapter 10, page 75, in computing dtx, dty, dtz, tx1 should be t_{xmax} and tx0 should be "t_{xmin}" and so on. (Tomas Moller) Chapter 10, page 76, in the while loop, first if statement, "txnextandtynext" should be "txnext and tynext". Same loop, the three upsidedown question marks should be ">". (Tomas Moller) Chapter 11, page 89. Poisson disk sampling should be defined. It is a set of random sampled selected sequentially with a rejection if the new sample is within a set distance of previous samples. (Nelson Max) Chapter 12, page 98. Line after eqn 12.4. cos theta should be sin theta (two times) (Nelson Max) Chapter 12, page 104. The discussion only applies to region 1. Chapter 13, page 108. Formula 13.3 breaks with convention and uses + instead of -. This is not consistent with the defintion of convolution (Nelson Max) Chapter 13, page 109, first sentence, "w(x, y) = a(x)(b)" should be "w(x, y) = a(x) b(y)" (Alexander Keller) Chapter 13, page 110, formula. Inconsistent notation: replace L by f, and f on rhs by C. (Nelson Max) Chapter 14, page 113, f is not defined. It is the distance behind lens that points infinitely in front of lens are focused. (Nelson Max) Chapter 14, page 114, R is not defined. It is the radius of the aperture (Nelson Max) Chapter 14, page 114, u_1 and v_1 are not defined. (u_0,v_0) is the bottom left corner of film, and (u_1,v_1) is top right. The origin is along the gaze center. (Nelson Max) Chapter 14. The formulas for constructing rays is not given. This will be expanded upon later. In the meantime, the idea is to find a plane out in space where everything is in focus, i.e. the plane out in space in Figure 14.1. Divide that up into pixels and sample it with ray origins being random points on the lens, and ray directions being toward sample points on that plane out in space (Nelson Max) Chapter 14, page 114, Figure 14.1, short legs of F on image plane pointing the wrong way. Should be flipped horizontally. (Phil Dutre) Chapter 15, page 119, Equation 15.1. The integration should be over "omega toward luminaire". (Nelson Max) Chapter 15, page 119, Equation 15.1. L_e(x, w) should be L_{in}(x, w), the incident luminance at x from directtion w (Nelson Max) Chapter 15, page 121, pseudocode should include a factor R/pi as in eqn 15.5 (Nelson Max) Chapter 15, page 123, Equation 15.6 q(omega) and p(x') should be swapped (Erik Reinhard's students) Chapter 15, page 124. Incomplete discussion. When sampling many lights we re-use the random numbers to choose which light and to sample that light to improve stratification. For example, if we have 100 stratified (x,y) and we use the "left half" to sample the first light, then (2x,y) is still a reasonably well stratified pattern. (Nelson Max) Chapter 15, page 125, the equation in section 5.3: the exponent for cos is wrong. Should be "cos^{(n-1)} theta'. (Tomas Moller, Jason Smith) Chapter 16, pages 130, 133, add "from p" after "generate random ray rn" (Nelson Max) Chapter 16, page 132, Figure 16.3, right. Isolated white pixel is a bug (Nelson Max) Chapter 16, page 133, pseudocode, "L_d R(p)..." should be "L_d + R(p)..." (Alexander Keller) Chapter 17, page 138, R_d is not defined-- it is the albedo of the surface (total reflectance). (Nelson Max) Chapter 17, page 139. alpha and beta_1 are only defined in Figure 17.1. beta_2 is never defined-- it is analogous to beta_1. (Nelson Max) Chapter 17, page 142. h is the unit half-vector between k_1 and k_2. k with no subscript indicates either k_1 or k_2-- either gives the same result. (Nelson Max) Chapter 18, page 150, "white point" is not defined. It is the value where all phosphors are fully on. X_r,Y_r,Z_r are the tristimulous values when the red phosphor is fully on and the other phosphors are off (Nelson Max) Chapter 18, page 151, formula in middle of page has left column vector having r,b,g. Should be r,g,b. (Bill Martin) Chapter 18, page 151, formula in middle of page. Full matrix is 34.83 -15.22 -5.59 -10.71 19.66 0.367 0.635 -2.002 8.107 (most elements off by factor of 10) (William Martin) ------------------------------------------------------------------------ Part 2: typos and other such errors Acknowledgements: add "Sarah Gillis acted as editor for the book and greatly improved the initial manuscript. She was also a pleasure to work with." Chapter 1, page 4, book says RGB=(1,1,1) is white, but interval for RGB components is [0,1) (doesn't include 1.0). (Eric Haines) Chapter 1, page 11, "anothor" should be "another" (Eric Haines) Chapter 1, page 11, third matrix equation (n' = (M-1)T ... ) The element in the 1st row, 2nd column is printed as n_11, should be n_10 (Phil Dutre) Chapter 1, page 12, "There is a nice way to code described..." is not a sentence (Bobby Bodenheimer) Chapter 2, page 17, 'vector formi' should be 'vector form' (Phil Dutre) Chapter 2, page 17, "In a parametric 3D line might be" should be "A parametric 3D line might be" (Eric Haines) Chapter 2, page 23, first sentence of last paragraph should have "...to code this..." in place of "...to code..." (Bobby Bodenheimer) Chapter 2, page 24, "ray tracing news" should be "Ray Tracing News" in italics (Eric Haines) Chapter 2, page 29, "orthographics camera" should be "orthographic camera" (Eric Haines) Chapter 3, page 33, "aritmetic" should be "arithmetic" (Luv Kohli) Chapter 4, page 41, first equation "+ -sw" should be "- sw" (Alexander Keller) Chapter 5, page 46, says "Beer's lawi". Should be "Beer's law" (Tomas Moller) Chapter 5, page 46, last line, first k should be bold (Nelson Max) Chapter 6, page 53, cosine used in text, but sine in code (Nelson Max) Chapter 6, page 58, in the equation the "omega"s should be greek letter omegas (Alexander Keller) Chapter 7, page 61, sentence after eqn 7.1, move comma to before "way" (Nelson Max) Chapter 7, page 62, 'a "alpha-map"' should be 'an "alpha-map"' (Eric Haines) Chapter 9, page 69, first sentence of second paragraph "glocal" should be "global" (Shaun Ramsey). Chapter 11, page 11, "definte" -> "definite" (Luv Kohli) Chapter 11, page 84, equation after equation 11.3, bounds on p(\xi)=1 should be 0 <= \xi < 1 (Ray Jones) Chapter 11, page 84, replace "[a,b] member of [0,1)" with "[a,b) subset of [0,1)" (Nelson Max) Chapter 12, page 97, line of text after first equation, the "xi" should be a greek letter xi. (Ray Jones) Chapter 12, page 97, last equation, spaces missing around "and" (Ray Jones) Chapter 12, page 98, zonal caculations and distributed ray tracing mentioned without definition. (Nelson Max) Chapter 12, page 100, first occurrence of the word "Bicontinuous" should be a subheading. (Ray Jones) Chapter 12, page 102, reference to appendix should be to section 12.5.2 (Nelson Max) Chapter 13, page 111, "vex member of Omega" the "vex" should be bold-face x (Alexander Keller) Chapter 13, caption for figure 13.4 "alaising" should "aliasing". (Tomas Moller) Chpater 15, page 123, lower-case r in formulas is too small (Nelson Max) Chapter 15, page 125, e_i/\alpha i should be e_i/\alpha_i Chapter 15, page 126, Figure 15.5, apostrophies should be primes (Nelson Max) Chapter 15, page 126, Section 15.4.1, last sentence in the parenthesis, Li should be L_i (Tomas Moller) Chapter 16, page 129, equation 16.1, missing parenthesis for R(p). Also, in the last equation on that page, the is an extra "," for L(p,w) (Tomas Moller) Chapter 16, page 130, pseudocode, "Le(p)" should have the "e" as a subscript and the "p" as bold. (Alexander Keller) Chapter 16, page 132, Figure 16.3, right. Isolated white pixel is a bug (Nelson Max) Chapter 17, page 138, first equation, missing "," on the right side for p. (Tomas Moller) Chapter 18, page 148, "protraying" should be "portraying" (Alexander Keller) Chapter 18, page 149, caption to Table 18.1. "trisimulous" should be "tristimulous" (Bill Martin) Chapter 18, page 150, "red channel" is repeated twice. Second one should be green channel. (Alexander Keller) Chapter 18, page 150, "seperately" -> "separately" (Bill Martin) Chapter 18, page 150, "chromiticity" -> "chromaticity" two places (Bill Martin) Chapter 18, page 150, "brightness now" -> "brightness knob" (Bill Martin) Chapter 18, page 150, last line, should be no parenthesis (Bill Martin) Bibliography, page 155, title for [3] is not right. Should be "RenderMan", and there should be a colon, i.e. "RenderMan:". (Eric haines) Bilbiography, page 156, references [16] and [17] the same. Bibliography, page 156, "sysnthesis" -> "synthesis" (Nelson Max) Bibliography, page 159, Capitalization typo in paper title [52] (Ray Jones)