-
Notifications
You must be signed in to change notification settings - Fork 7
PBRT Mappings
RenderToolbox allows you to specify mappings that directly modify PBRT scene files as they are generated. These mappings must use the destination
PBRT
.
These mappings will apply to the object-oriented representation of the PBRT scene provided by the mPbrt tool that RenderToolbox uses internally.
Here are several examples of PBRT scene elements that you can specify in the mappings file, with destination
PBRT
.
Each element is presented as a JSON object which you could copy into your mappings file. You can change the names, types, and values used in these examples to other names, types, and values that you find in the PBRT documentation.
This example modifies properties of the scene perspective camera.
{
"name": "Camera",
"broadType": "Camera",
"specificType": "perspective",
"operation": "update",
"destination": "PBRT",
"properties": [
{
"name": "lensradius",
"valueType": "float",
"value": "0.1"
},
{
"name": "focaldistance",
"valueType": "float",
"value": "5"
}
]
}
It would produce PBRT syntax like this:
# 1_Camera
Camera "perspective"
"float lensradius" [0.1]
"float focaldistance" [5]
...
This example modifies the default scene integrator to do path tracing.
{
"name": "integrator",
"broadType": "SurfaceIntegrator",
"specificType": "path",
"destination": "PBRT",
"operation": "update",
"properties": {
"name": "maxdepth",
"valueType": "integer",
"value": "8"
}
}
It would produce PBRT syntax like this:
# integrator
SurfaceIntegrator "path"
"integer maxdepth" [8]
This example modifies the default scene sampler to use a large number of samples.
{
"name": "sampler",
"broadType": "Sampler",
"specificType": "lowdiscrepancy",
"operation": "update",
"destination": "PBRT",
"properties": {
"name": "pixelsamples",
"valueType": "integer",
"value": 2048
}
}
It would produce PBRT syntax like this:
# sampler
Sampler "lowdiscrepancy"
"integer pixelsamples" [2048]
This example modifies a named material declaration, aka MakeNamedMaterial
, to use a PBRT-specific model for glass.
{
"name": "DragonMaterial",
"broadType": "MakeNamedMaterial",
"specificType": "glass",
"operation": "update",
"destination": "PBRT",
"properties": {
"name": "index",
"valueType": "float",
"value": 1.5
}
}
It would produce PBRT syntax like this:
# 4_DragonMaterial
MakeNamedMaterial "4_DragonMaterial" "string type" "glass"
"float index" [1.500000]
- Home
- Conceptual overview
- How it works
- Installation
- Scene construction and translation
- Rendering
- PBRT file
- PBRT batch
- Mitsuba .... something
- Computation
- Local
- Cloud usage
- About Us