mmp / pbrt-v3

Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
http://pbrt.org
BSD 2-Clause "Simplified" License
4.87k stars 1.18k forks source link

visible triangles with disney material #213

Open wahn opened 5 years ago

wahn commented 5 years ago

H.P. has an example scene using the disney material in his repo:

# repo
> grep git ../../.git/config
    url = https://github.com/hpd/PBRTForMaya.git
# test scene
> rg disney
pbrt_feature_demo_material_disney.pbrt
53: MakeNamedMaterial "pbrt_disney"
68:     "string type" ["disney"]
97:     NamedMaterial "pbrt_disney"
154:        NamedMaterial "pbrt_disney"
192:        NamedMaterial "pbrt_disney"

Rendering it with the latest source code results in:

pbrt

Where are those visible triangles coming from?

> ~/builds/pbrt/release/pbrt pbrt_feature_demo_material_disney.pbrt
pbrt version 3 (built Dec  4 2018 at 10:10:06) [Detected 8 cores]
Copyright (c)1998-2018 Matt Pharr, Greg Humphreys, and Wenzel Jakob.
The source code to pbrt (but *not* the book contents) is covered by the BSD License.
See the file LICENSE.txt for the conditions of the license.
Rendering: [+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]  (1192.6s)         
Statistics:
  BVH
    Interior nodes                                                  65476
    Leaf nodes                                                      65484
    Primitives per leaf node                         73955 /        65484 (1.13x)
  Integrator
    Camera rays traced                                          537001984
    Path length                                                     1.348 avg [range 0 - 5]
    Zero-radiance paths                          222349321 /    745009777 (29.85%)
  Intersections
    Regular ray intersection tests                             1829619897
    Shadow ray intersection tests                               563258022
    Ray-triangle intersection tests             1225023016 /  12353480165 (9.92%)
  Memory
    BVH tree                                                         5.13 MiB
    Film pixels                                                     15.82 MiB
    Primitives                                                       5.08 MiB
    Texture MIP maps                                                32.00 MiB
    TransformCache                                                 260.00 kB
    Triangle meshes                                                 11.16 MiB
  Scene
    Lights                                                              1
    Materials created                                                  12
    Object instances created                                            7
    Object instances used                                               7
    Shapes created                                                  73948
    Probes per TransformCache lookup                                1.000 avg [range 1 - 1]
    TransformCache hits                                 22 /           30 (73.33%)
    Triangles per triangle mesh                      73948 /            7 (10564.00x)
  Texture
    Trilinear lookups                                          1261027555
  Profile
    Integrator::Render()                                            99.98% (   0:19:53.41)
      Camera::GenerateRay[Differential]()                            1.86% (   0:00:22.20)
      Film::AddSample()                                              1.49% (   0:00:17.83)
      Film::MergeTile()                                              0.00% (   0:00:00.00)
      Sampler::GetSample[12]D()                                      2.56% (   0:00:30.58)
      Sampler::StartPixelSample()                                    0.00% (   0:00:00.01)
      SamplerIntegrator::Li()                                       92.55% (   0:18:24.63)
        Accelerator::Intersect()                                    34.71% (   0:06:54.36)
          Triangle::Intersect()                                      9.32% (   0:01:51.18)
        BSDF::Sample_f()                                             4.15% (   0:00:49.48)
        Direct lighting                                             46.55% (   0:09:15.65)
          Accelerator::Intersect()                                  13.39% (   0:02:39.82)
            Triangle::Intersect()                                    2.88% (   0:00:34.34)
          Accelerator::IntersectP()                                  9.69% (   0:01:55.64)
            Triangle::IntersectP()                                   2.03% (   0:00:24.27)
          BSDF::PDF()                                                0.81% (   0:00:09.63)
          BSDF::Sample_f()                                           4.36% (   0:00:52.04)
          BSDF::f()                                                  1.25% (   0:00:14.88)
          Light::Pdf()                                               2.37% (   0:00:28.28)
          Light::Sample_*()                                          4.72% (   0:00:56.33)
            MIPMap::Lookup() (trilinear)                             1.96% (   0:00:23.43)
          MIPMap::Lookup() (trilinear)                               1.26% (   0:00:15.08)
          Sampler::GetSample[12]D()                                  3.08% (   0:00:36.75)
        MIPMap::Lookup() (trilinear)                                 0.13% (   0:00:01.57)
        Material::ComputeScatteringFunctions()                       2.25% (   0:00:26.86)
        Sampler::GetSample[12]D()                                    1.25% (   0:00:14.90)
    Scene parsing and creation                                       0.02% (   0:00:00.20)
      Acceleration structure creation                                0.00% (   0:00:00.01)
      MIP map generation                                             0.00% (   0:00:00.00)
      MIPMap::Lookup() (trilinear)                                   0.01% (   0:00:00.12)
  Profile (flattened)
    Accelerator::Intersect()                                        35.91% (   0:07:08.65)
    Triangle::Intersect()                                           12.19% (   0:02:25.53)
    BSDF::Sample_f()                                                 8.51% (   0:01:41.53)
    Accelerator::IntersectP()                                        7.65% (   0:01:31.37)
    Sampler::GetSample[12]D()                                        6.89% (   0:01:22.24)
    Direct lighting                                                  5.63% (   0:01:07.15)
    SamplerIntegrator::Li()                                          3.50% (   0:00:41.77)
    MIPMap::Lookup() (trilinear)                                     3.37% (   0:00:40.21)
    Light::Sample_*()                                                2.76% (   0:00:32.89)
    Light::Pdf()                                                     2.37% (   0:00:28.28)
    Material::ComputeScatteringFunctions()                           2.25% (   0:00:26.86)
    Triangle::IntersectP()                                           2.03% (   0:00:24.27)
    Camera::GenerateRay[Differential]()                              1.86% (   0:00:22.20)
    Integrator::Render()                                             1.52% (   0:00:18.12)
    Film::AddSample()                                                1.49% (   0:00:17.83)
    BSDF::f()                                                        1.25% (   0:00:14.88)
    BSDF::PDF()                                                      0.81% (   0:00:09.63)
    Scene parsing and creation                                       0.00% (   0:00:00.05)
    Sampler::StartPixelSample()                                      0.00% (   0:00:00.01)
    Acceleration structure creation                                  0.00% (   0:00:00.01)
    MIP map generation                                               0.00% (   0:00:00.00)
    Film::MergeTile()                                                0.00% (   0:00:00.00)