Code Monkey home page Code Monkey logo

Comments (3)

mmp avatar mmp commented on August 15, 2024

Sorry for the lack of documentation.. Just do:

Film "gbuffer" "string filename" "foo.exr" "integer xresolution" 1234 # etc...

You'll get a "deep" EXR file, where all of that additional stuff is in additional image channels.

from pbrt-v4.

UHFT avatar UHFT commented on August 15, 2024

Thanks for your quick response.

It seems the Albedo channel in EXR file seems strange.
It should not be affected by the number of pixel samples. (I expected the original Kd reflectance)

Screenshot 2020-09-10 at 23 10 01

"""
Integrator "path"
"integer maxdepth" [ 3 ]
Sampler "halton"
"integer pixelsamples" [ 2 ]
PixelFilter "box"
"float xradius" [ 0.5 ]
"float yradius" [ 0.5 ]

Film "gbuffer"
"string filename" [ "cornell-box.exr" ]
"integer yresolution" [ 512 ]
"integer xresolution" [ 512 ]

Camera "perspective"
"float fov" [ 45 ]

WorldBegin
AttributeBegin
AreaLightSource "diffuse"
"rgb L" [ 10 10 10 ]
NamedMaterial "Light"
Shape "trianglemesh"
"point2 uv" [ 0 0 1 0 1 1 0 1
]
"normal N" [ -8.74228e-8 -1 1.86006e-7 -8.74228e-8 -1 1.86006e-7 -8.74228e-8
-1 1.86006e-7 -8.74228e-8 -1 1.86006e-7 ]
"point3 P" [ -0.24 1.98 -0.22 0.23 1.98 -0.22 0.23 1.98 0.16 -0.24 1.98 0.16 ]
"integer indices" [ 0 1 2 0 2 3 ]
AttributeEnd
MakeNamedMaterial "LeftWall"
"string type" [ "diffuse" ]
"rgb reflectance" [ 1 0 0 ]
MakeNamedMaterial "RightWall"
"string type" [ "diffuse" ]
"rgb reflectance" [ 0 1 0 ]
MakeNamedMaterial "Floor"
"string type" [ "diffuse" ]
"rgb reflectance" [ 1 1 1 ]
MakeNamedMaterial "Ceiling"
"string type" [ "diffuse" ]
"rgb reflectance" [ 1 1 1 ]
MakeNamedMaterial "BackWall"
"string type" [ "diffuse" ]
"rgb reflectance" [ 1 1 1 ]
MakeNamedMaterial "ShortBox"
"string type" [ "diffuse" ]
"rgb reflectance" [ 1 1 1 ]
MakeNamedMaterial "TallBox"
"string type" [ "diffuse" ]
"rgb reflectance" [ 1 1 1 ]
MakeNamedMaterial "Light"
"string type" [ "diffuse" ]
"rgb reflectance" [ 0 0 0 ]
NamedMaterial "Floor"
Shape "trianglemesh"
"point2 uv" [ 0 0 1 0 1 1 0 1
]
"normal N" [ 4.37114e-8 1 1.91069e-15 4.37114e-8 1 1.91069e-15 4.37114e-8 1 1.91069e-15
4.37114e-8 1 1.91069e-15 ]
"point3 P" [ -1 1.74846e-7 -1 -1 1.74846e-7 1 1 -1.74846e-7 1 1 -1.74846e-7 -1 ]
"integer indices" [ 0 1 2 0 2 3 ]
NamedMaterial "Ceiling"
Shape "trianglemesh"
"point2 uv" [ 0 0 1 0 1 1 0 1
]
"normal N" [ -8.74228e-8 -1 -4.37114e-8 -8.74228e-8 -1 -4.37114e-8 -8.74228e-8
-1 -4.37114e-8 -8.74228e-8 -1 -4.37114e-8 ]
"point3 P" [ 1 2 1 -1 2 1 -1 2 -1 1 2 -1 ]
"integer indices" [ 0 1 2 0 2 3 ]
NamedMaterial "BackWall"
Shape "trianglemesh"
"point2 uv" [ 0 0 1 0 1 1 0 1
]
"normal N" [ 8.74228e-8 -4.37114e-8 -1 8.74228e-8 -4.37114e-8 -1 8.74228e-8 -4.37114e-8
-1 8.74228e-8 -4.37114e-8 -1 ]
"point3 P" [ -1 0 -1 -1 2 -1 1 2 -1 1 0 -1 ]
"integer indices" [ 0 1 2 0 2 3 ]
NamedMaterial "RightWall"
Shape "trianglemesh"
"point2 uv" [ 0 0 1 0 1 1 0 1
]
"normal N" [ 1 -4.37114e-8 1.31134e-7 1 -4.37114e-8 1.31134e-7 1 -4.37114e-8
1.31134e-7 1 -4.37114e-8 1.31134e-7 ]
"point3 P" [ 1 0 -1 1 2 -1 1 2 1 1 0 1 ]
"integer indices" [ 0 1 2 0 2 3 ]
NamedMaterial "LeftWall"
Shape "trianglemesh"
"point2 uv" [ 0 0 1 0 1 1 0 1
]
"normal N" [ -1 -4.37114e-8 -4.37114e-8 -1 -4.37114e-8 -4.37114e-8 -1 -4.37114e-8
-4.37114e-8 -1 -4.37114e-8 -4.37114e-8 ]
"point3 P" [ -1 0 1 -1 2 1 -1 2 -1 -1 0 -1 ]
"integer indices" [ 0 1 2 0 2 3 ]
"""

from pbrt-v4.

mmp avatar mmp commented on August 15, 2024

Ah, the joys of spectral rendering. It is expected that there will be some noise at low sampling rates here since at each pixel sample, pbrt picks 4 random wavelengths and does all of its computations at those wavelengths. Then, when the image is output, the RGB spectral matching functions are used to compute back to RGB. So, there's some inherent Monte Carlo noise in that round-trip from the original RGB colors. This is moderately annoying, but I think worth it for the advantages of doing the spectral stuff properly.

from pbrt-v4.

Related Issues (20)

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.