This list is currently based off the changes made up to this commit- https://github.com/mmp/pbrt-v4/tree/cdccb7
- Preamble
- Base Scene Description
- Camera
- Film
- Filter
- Sampler
- Integrator
- Light
- Material
- Texture
- Shape
- Medium
This is not meant to be the official document representing the changes between pbrt-v3 and pbrt-v4, I'll leave that to Matt's much more capable hands. These are my notes during the process of updating an exporter from v3 to v4. I am making these public to aid others in the transition until a formal page is created by Matt. The changes listed are deduced from reading through the source code of https://github.com/mmp/pbrt-v4. As pbrt-v4 is still an early release and changing rapidly expect these notes to be out of sync at times. When in doubt, trust the code! :)
Yup, I'm an idiot. But its exciting to follow the developments and try out the changes!
A few emoji are used to call attention for the reasons listed below-
Icon | Reasoning |
---|---|
❗ | Significant change to scene description structure |
- ❗
WorldEnd
has been removed - ❗
TransformBegin
andTransformEnd
are deprecated, useAttributeBegin
andAttributeEnd
instead. - New
Import
statement, similar to theInclude
but does not maintain graphics state (but does maintain defined objects). - New
ColorSpace "name"
graphics state Attribute(?)
Sets the ColorSpace to be "name" which defines the color space of spectrum parameters. Accepts the following builtin names -- srgb (default)
- dci-p3
- rec2020
- aces2065-1
- New
Attribute "target" "parm" [ value ]
for setting parameter "overrides" for various targets which include -- shape
- light
- material
- medium
- texture
- New
Option "name" "value"
call added
This sets some global options includingbool disablepixeljitter
(false)bool disablewavelengthjitter
(false)bool disabletexturefiltering
(false)float displacementedgescale
(1.0)string rendercoordsys
valid values are:- camera
- cameraworld (default)
- world
string msereferenceimage
("")string msereferenceout
("")integer seed
(0)bool forcediffuse
(false)bool pixelstats
(false)bool wavefront
(false)
- Type Changes
- ❗ bool types are no longer quoted
- pbrt-v3
"bool parm" ["true"]
- pbrt-v4
"bool parm" [true]
- pbrt-v3
- ❗ spectrum type changes
- spectrum blackbody parameters should no longer specify an intensity value
- pbrt-v3
"blackbody parm" [6500 0.5]
- pbrt-v4
"blackbody parm" [6500]
- pbrt-v3
- spectrum xyz parameters are no longer supporter
- pbrt-v3
"xyz parm" [ 0.2 0.5 0.8 ]
- pbrt-v4 not supported
- pbrt-v3
- spectrum blackbody parameters should no longer specify an intensity value
- ❗ bool types are no longer quoted
- Declaration is now "spherical" (was "environment")
- New
string mapping
parameter with possible values of- equalarea (default)
- equirectangle
- Remove
float halffov
parameter (just use "fov" parameter)
- New
string aperture
parameter (defaults to "")
This parameter supports a image file path or one of the following built-ins- gaussian
- square
- pentagon
- star
- Default film is "rgb"
- Currently both RGBFilm and GBufferFilm have the same parameters.
- New Sensor Parameters:
float iso
defaults to 100float whitebalance
defaults to 0
If your whitebalance is 0, and your sensor is something other than cie1931, pbrt will automatically default the sensor to 6500string sensor
defaults to "cie1931"
The sensor parameter accepts any of the following camera sensors.
Parm Value | Common Name |
---|---|
cie1931 | CIE 1931 |
canon_eos_100d | Canon EOS 100D |
canon_eos_1dx_mkii | Canon EOS 1D X Mark II |
canon_eos_200d | Canon EOS-200D |
canon_eos_200d_mkii | Canon EOS 200D Mark II |
canon_eos_5d | Canon EOS 5D |
canon_eos_5d_mkii | Canon EOS 5D Mark II |
canon_eos_5d_mkiii | Canon EOS 5D Mark III |
canon_eos_5d_mkiv | Canon EOS 5D Mark IV |
canon_eos_5ds | Canon EOS 5DS |
canon_eos_m | Canon EOS M |
hasselblad_l1d_20c | Hasselblad L1D-20C |
nikon_d810 | Nikon D810 |
nikon_d850 | Nikon D850 |
sony_ilce_6400 | Sony A6400 |
sony_ilce_7m3 | Sony A7 Mark III |
sony_ilce_7rm3 | Sony A7R Mark III |
sony_ilce_9 | Sony A9 |
- Declaration is now "rgb" (was "image")
xresolution
andyresolution
defaults have changed to (1280x720) respectively.integer[4] pixelbounds
parameter added. If crop region is specificed it will override this.
(this previously lived on certain integrators)float maxsampleluminance
changed tofloat maxcomponentvalue
- New
bool savefp16
parameter for saving half images. (default true)
- Declaration is "gbuffer"
- Parameters are the same as RGBFilm with the additional -
string coordinatesystem
defaults to "camera"
Possible values include:- "camera"
- "world"
- Declaration is "spectral"
- Parameters are the same as RGBFilm with the additional -
integer buckets
defaults to 16float lambdamin
defaults to 360float lambdamax
defaults to 830
- Rename
float xwidth
tofloat xradius
- Rename
float ywidth
tofloat yradius
float xradius
andfloat yradius
defaults are now 1.5float alpha
is nowfloat sigma
default is 0.5
The default sampler is "zsobol"
- All samplers have a
int seed
parameter that defaults to a globalOption "seed" value
- Declared with "independent"
- Declared with "pmj02bn"
- Parameters:
integer pixelsamples
parameter (defaults to 16)
- Declared with "zsobol"
- This has the same parameters as the Sobol Sampler
- Declared with "paddedsobol"
- This has the same parameters as the Sobol Sampler
- New
string randomization
parameter with the following options- none
- owen
- fastowen (default)
- permutedigits
- Remove
integer dimensions
parameter
- Remove
bool samplepixelcenter
parameter - New
string randomization
parameter with the following options- none
- owen
- permutedigits (default)
integer[4] pixelbounds
that existed on the various Integrators has been removed and now live on Film- Default integrator is now VolumePath
- Declared with "lightpath"
- Parameters:
integer maxdepth
defaults to 5
- Declared with "randomwalk"
- Parameters:
integer maxdepth
defaults to 5
- Declared with "function"
- Parameters:
string function
The following options are supported- step (default)
- diagonal
- disk
- checkerboard
- rotatedcheckerboard
- gaussian
bool skipbad
(true)string filename
defaults to Options->imageFile if supplied otherwise {function}-mse.txtstring imagefilename
("")
- Declared with "simplepath"
- Parameters:
integer maxdepth
defaults to 5bool samplelights
defaults to truebool samplebsdf
defaults to true
- Declared with "simplevolapath"
- Parameters:
integer maxdepth
defaults to 5
- Type name is now "ambientocclusion", previously it was "ao"
- Remove
integer maxsamples
parameter - New
float maxdistance
parameter, defaults to Inf
- Replace
string lightsamplestrategy
withstring lightsampler
The following options are supported- uniform
- ❗ power (default)
BDPT's lightsampler default is different from Path/VolPath - bvh
- exhaustive (new)
- New
bool regularize
parameter, defaults to false
- New
bool regularize
parameter, defaults to false
- Replace
string lightsamplestrategy
withstring lightsampler
The following options are supported- uniform
- power
- bvh (default)
- exhaustive (new)
- New
bool regularize
parameter, defaults to false - Remove
float rrthreshold
parameter
- New
integer seed
parameter, defaults to 6502
(This does not lookup the seed value stored inOptions
) - Remove
integer iterations
parameter
- Replace
string lightsamplestrategy
withstring lightsampler
The following options are supported- uniform
- power
- bvh (default)
- exhaustive (new)
- New
bool regularize
parameter, defaults to false - Remove
float rrthreshold
parameter
spectrum scale
is nowfloat scale
- New
float power
parameter defaults to -1
string mapname
is nowstring filename
- Remove
integer samples
parameter string mapname
is nowstring filename
- New
float illuminance
parameter, defaults to -1 - New
point[4] portal
parameter spectrum L
andstring filename
are mutually exclusive and should not be declared together. Ifportal
andL
are used,L
is converted to an RGB texture.
string mapname
is nowstring filename
- Remove
spectrum I
parameter
Spectrum values come only from the supplied image - New
float power
parameter, defaults to -1 float fov
default has changed from 45 to 90
- Remove
integer samples
parameter - New "string filename" parameter, defaults to ""
- New
float power
parameter, defaults to -1 spectrum L
andstring filename
are mutually exclusive and should not be declared together.- Alpha textures act on emission similar to visiblity. A special case when alpha is a constant 0 will result in an emissive invisible light source.
- New
float illuminance
parameter, defaults to -1
float texture bumpmap
has been renamed tofloat texture displacement
string normalmap
has been added, defaults to ""
- Uber
- Translucent
- Substrate
- Plastic
- Mirror
- Metal
- Matte
- KdSubsurface
- Glass
- Fourier
- Disney
- Declared with "interface", lights with an interface material are ignored.
Type name: "coatedconductor"
float texture displacement
defaults to nullspectrum interface.eta
defaults to 1.5float texture thickness
defaults to 0.01float texture interface.roughness
defaults to 0float texture interface.uroughness
defaults tointerface.roughness
float texture interface.vroughness
defaults tointerface.roughness
spectrum texture conductor.eta
defaults to "metal-Cu-eta"spectrum texture conductor.k
defaults to "metal-Cu-k"spectrum texture reflectance
defaults to null, not to be used withconductor.eta
andconductor.k
float texture conductor.roughness
defaults to 0float texture conductor.uroughness
defaults toconductor.roughness
float texture conductor.vroughness
defaults toconductor.roughness
bool remaproughness
defaults to trueinteger maxdepth
defaults to 10integer nsamples
defaults to 1float texture g
defaults to 0spectrum texture albedo
defaults to 0
Type name: "coateddiffuse"
float texture displacement
defaultsto nullspectrum texture reflectance
defaults to 0.5spectrum eta
default 1.5float texture thickness
default 0.01float texture roughness
defaults to 0float texture uroughness
defaults toroughness
float texture vroughness
defaults toroughness
bool remaproughness
defaults to trueinteger maxdepth
defaults to 10integer nsamples
defaults to 1float texture g
defaults to 0spectrum texture albedo
defaults to 0
Type name: "conductor"
float texture displacement
defaults to nullspectrum texture eta
defaults to "metal-Cu-eta"spectrum texture k
defaults to "metal-Cu-k"spectrum texture reflectance
defaults to null, not to be used witheta
andk
float texture roughness
defaults to 0float texture uroughness
defaults toroughness
float texture vroughness
defaults toroughness
bool remaproughness
defaults to true
Type name: "diffuse"
float texture displacement
defaults to nullspectrum texture reflectance
defaults to 0.5
Type name: "diffusetransmission"
float texture displacement
defaults to nullspectrum texture reflectance
defaults to 0.25spectrum texture transmittance
defaults to 0.25float scale
defaults to 1
Type name: "measured"
float texture displacement
defaults to nullstring filename
defaults to ""
Type name: "thindielectric"
float texture displacement
defaults to nullspectrum eta
defaults to 1.5
Type name: "dielectric"
float texture displacement
defaults to nullspectrum eta
defaults to 1.5float texture roughness
defaults to 0float texture uroughness
defaults toroughness
float texture vroughness
defaults toroughness
bool remaproughness
defaults to true
- Remove
spectrum Kr
parameter - Remove
spectrum Kt
parameter - New
spectrum texture reflectance
defaults to 1 - New
spectrum texture mfp
defaults to 1 - New
float g
defaults to 0 - New
float texture roughness
defaults to 0
- Change
spectrum texture amount
tofloat texture amount
- Remove
string namedmaterial1
andstring namedmaterial2
- Add
string[2] materials
- Change
spectrum texture color
tospectrum texture reflectance
(color still works if reflectance isn't specified)
- Supports both float and spectrum
- Parameters are
float|spectrum texture tex1
defaults to 0.0float|specturm texture tex2
defaults to 1.0vector3 dir
defaults to (0.0, 1.0, 0.0)
- Output is now only float, in pbrt-v3 it was float and spectrum.
- New
float scale
parmeter, defaults to 1 - New "octahedralsphere" mode for
string wrap
- Remove
bool trilinear
parameter - New
string filter
parameter, options include- point
- bilinear (default)
- trilinear
- ewa
- Remove
bool gamma
parameter - New
bool invert
parameter, defaults to false - New
string encoding
parameter, this accepts either a builtin name or a "gamma value".
One of the following options can be specified. (The default is based on the file extension of the texture.)- linear
- sRGB
- gamma float_value
- Output is now only spectrum, in pbrt-v3 it was float and spectrum
texture tex1
is now justtexture tex
texture tex2
has been replaced withfloat scale
, defaults to 1
- Output is now only float, in pbrt-v3 it was float and spectrum.
- Output is now only float, in pbrt-v3 it was float and spectrum.
- New
float scale
parameter, defaults to 1
- All shapes now support an
float texture alpha
parameter. - ❗ Shapes no longer support overriding of a Material's parameters as described here https://www.pbrt.org/fileformat-v3.html#materials
- Cone
- HeightField
- NURBS
- Hyperboloid
- Paraboloid
- Declared with "bilinearmesh"
- Parameters:
point3[] P
integer[] indices
point2[] uv
optionalnormal3[] N
optionalinteger[] faceIndices
optionalstring emissionfilename
optional
- Remove
texture shadowalpha
parameter - ❗Change uv parameter from
float[] uv
topoint2[] uv
- Remove
texture shadowalpha
parameter - Add
float texture displacement
parameter, defaults to null (deactivated) - Add
float edgelength
parameter, defaults to 1.0
- New
spectrum Le
parameter, defaults to 0 string preset
default ("") Only exists on Homogeneous Medium- The list of presets scattering properties has not changed since pbrt-v3*
This was previously the Heterogeneous Medium in pbrt-v3
- Declare with "uniformgrid"
- Parameters:
- General Medium parameters described above
float[] density
float[] temperature
float[] Lescale
- Only one combination of Le or temperature is allowed
spectrum sigma_a
defaults to (1, 1, 1)spectrum sigma_s
defaults to (1, 1, 1)spectrum Le
defaults to 0float scale
defaults to 1.0float g
defaults to 0.0integer nx
defaults to 1integer ny
defaults to 1integer nz
defaults to 1point3 p0
defaults to (0,0,0)point3 p1
defaults to (1,1,1)
- Declare with "rgbgrid"
- Parameters:
rgb[] sigma_a
rgb[] sigma_s
rgb[] Le
- Can specify sigma_a and/or sigma_s. But if Le is used then sigma_a is required.
float LeScale
defaults to 0float scale
defaults to 1.0float g
defaults to 0.0integer nx
defaults to 1integer ny
defaults to 1integer nz
defaults to 1point3 p0
defaults to (0,0,0)point3 p1
defaults to (1,1,1)
- Declare with "cloud"
- Parameters:
float density
defaults to 1float wispiness
defaults to 1float frequency
defauts to 5spectrum sigma_a
defaults to (1, 1, 1)spectrum sigma_s
defaults to (1, 1, 1)spectrum Le
defaults to 0float g
defaults to 0.0point3 p0
defaults to (0,0,0)point3 p1
defaults to (1,1,1)
- Declare with "nanovdb"
Looks for fields within the VDB of the name "density" and "temperature" - Parameters:
- General Medium parameters described above
string filename
defaults to ""float LeScale
defaults to 1.0float temperaturecutoff
defaults to 0.0float temperaturescale
defaults to 1.0spectrum sigma_a
defaults to (1, 1, 1)spectrum sigma_s
defaults to (1, 1, 1)float scale
defaults to 1.0