Giter Site home page Giter Site logo

pbr-book-website's Introduction

Physically Based Rendering, Online Edition

This repository contains the content for the online edition of the Physically Based Rendering book.

We are making the repository available in order to make it easier to read the book offline. For example, executing python3 -m http.server 8000 in the top-level directory makes it possible to read the book in a web browser pointed at localhost:8000.

The online version of the book (including the contents of this git repository) is made available under a CC BY-ND-NC 4.0 license.

pbr-book-website's People

Contributors

massile avatar mmp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pbr-book-website's Issues

Definition of "a" missing in Fresnel conductor equations?

Hi,

I was looking at the equations for Fresnel reflectance between a dielectric and a conductor in Eq. 8.3, but cannot find the definition for the term a in the text, which would be needed to implement them.
Only a^2+b^2 is given, but a also appears on its own, so I'm wondering if its definition should be added there, e.g.

$a = \sqrt{\frac{1}{2}\left(\sqrt{(\eta^2-k^2-\sin^2\theta)^2+4\eta^2k^2}+\eta^2-k^2-\sin^2\theta\right)}$

(as in Shirley's Thesis, Eq. 2.6, assuming eta_i = 1)

Thanks for your great work and best regards,
Lukas

3.8.2 Spherical Polygons, Equation 3.6

Formula 3.6 for calculating the area of a spherical triangle: Link

I might be misunderstanding but this formula does not make sense to me. Is this a typo? If it is correct, it would maybe help to add some context for deriving the formula (maybe in the Appendix).

Following from the code, the numerator should be dot(a, cross(b, c)).

errata: rejection sampling a unit disk

Caption of figure 13.6: Rejection Sampling a Circle. One approach to finding uniform points in the unit circle is to sample uniform random points in the unit square and reject all that lie outside the circle (red points). The remaining points will be uniformly distributed within the circle.
The circumscribed square is 2x2.

The title of the example where that figure is located is: Example: Rejection Sampling a Unit Circle
Changing to unit disk would make it clearer, or even to points inside a unit circle to go with the idea of the inside/outside test.

Need help with 2.2.1

The way I understand stratified sampling is this:
stratified0

so naturally
stratified1

but what is this fractional volume doing here?
stratified2

and I don't understand these two at all, each stratum is an integral over lambda i, shouldn't the integrand be f(x) itself?
stratified3

Missing Participating Media Type

Hello!

I was looking through the documentation for participating media for PBRTv3 and PBRTv4 the other day, and noticed that the second scene description example looks wrong:

MakeNamedMedium "mymedium" "homogeneous" "rgb sigma_s" [100 100 100]
MediumInterface "" "mymedium"

Looking at the PBRT code itself, I believe there's a missing "string type" before the "homogeneous", for both the v3 and v4 documentation.

Link references:
V3: https://www.pbrt.org/fileformat-v3#media-world
V4: https://www.pbrt.org/fileformat-v4#media-world

About the sections removed from the 3rd edition

Hi~ I'm very excited about the release of the 4th edtion! Many thanks to all of the authors and contributors. I'm sure it's an excellent book.

I note that some sections from the 3rd edtion are removed after updating. For example, in Chapter 1~8:

  • Animating Transformations
  • Subdivision Surfaces
  • Kd-Tree Accelerator
  • Realistic Cameras
  • (0, 2)-Sequence Sampler
  • Maximized Minimal Distance Sampler

Are there any special reasons for removing them?

Maybe there are some typos

<title id="MathJax-SVG-1-Title">x squared plus y squared minus z squared equals negative 1 comma</title>

I really like this amazing work and thank you for your sharing this book!

I have a problem with the implicit form of the hyperboloid:
It is x^2+y^2-z^2=-1, which means that it is a two-sheet hyperboloid.
But the parametric form shows that it is generated by a rotating line passing through points (x1,y1,z1) and (x2,y2,z2),
which should be a one-sheet hyperboloid.
Maybe the implicit form of the hyperboloid should be changed to x^2+y^2-z^2=1 for consistency.

Reference:https://en.wikipedia.org/wiki/Hyperboloid

Should this be "area density" instead of "solid angle density" in the book?

In PBR-book chapter 16.3, when the book is introducing the function PdfLightOrigin, it says:

<<Return solid angle density for non-infinite light sources>>

The returned value is directly assigned to some_vertex.pdfFwd. Since pdfFwd field in the vertex should store density defined in area measure for MIS uses. Some implementation of Pdf_Le (which returns pdf_pos and is directly used in PdfLightOrigin) also indicate this, for example, diffusive area source returns pdf_pos = 1 / Area().
Upon first reading this, I directly implemented PdfLightOrigin to return solid angle density for all light sources, but latter I think it doesn't make any sense... Could this be a mistake? Like, it were copy-pasted from the introduction of infinite light source procedure above?

Code on the website that will lead to confusion

In chapter 15.2 - Sampling Volume Scattering, for H-G phase function sampling:

<<Compute  for Henyey–Greenstein sample>>= 
Float cosTheta;
if (std::abs(g) < 1e-3)
    cosTheta = 1 - 2 * u[0];
else {
    Float sqrTerm = (1 - g * g) /
                    (1 - g + 2 * g * u[0]);
    cosTheta = (1 + g * g - sqrTerm * sqrTerm) / (2 * g);                         // HERE
}

There should be a negative sign in front of cosTheta RHS.

The code block is not consistent with , and is not consistent with

  • PhaseHG function definition: Float denom = 1 + g * g + 2 * g * cosTheta;, if no minus sign given, denom should be 1 + g * g - 2 * g * cosTheta. According to the ray direction convention in PBRT-v3, all 'incident ray' points outwards, therefore cosTheta RHS should have a minus sign.
  • The formula in that chapter, listed right above the code block.
  • Actual experiments... Initially I implemented h-g sampling based on the code above, which costed me two days to debug my code. The following experiments are based on pbrt-v3, and the code doesn't have the problem mentioned above. You will notice that we can not really distinguish between these two the incorrect results, even though one exhibits forward scattering and the other is backward.
correct g = 0.5 correct g = -0.5 incorrect g = 0.5 incorrect g =-0.5
cornell-correct-pos05 cornell-correct-neg05 cornell-pos05 cornell-neg05

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.