-
Notifications
You must be signed in to change notification settings - Fork 7
Read Write functions
The iset3D logical flow is
(a) read in the PBRT scene and its auxiliary files,
(b) specify the rendering parameters, and
(c) write out the PBRT scene with adjusted parameters into a directory that will be mounted and rendered by the docker container.
The piRead function takes the name of the PBRT scene file as input and returns a rendering recipe (@recipe) as output.
pbrtFile = fullfile(piRootPath,'data','teapot-area','teapot-area-light.pbrt');
thisR = piRead(pbrtFile);
Typically, after the rendering recipe is returned the user specifies, say, the camera position, the lens properties, and the directory that will be mounted by the docker container (outFile). Once these properties are set, the modified recipe is called with the piWrite function.
The piWrite function takes the recipe object as an input and writes out a new scene PBRT file into the directory that will be mounted by the docker image. The function also copies the resources that are needed to render the file from the original data directory to the new directory. A typical example is
[p,n,e] = fileparts(pbrtFile);
thisR.set('outputFile',fullfile(piRootPath,'local','testworld',[n,e]));
piWrite(thisR);
The piWrite function performs one additional change: The text lines between the WorldBegin/WorldEnd commands is written out to a separate file, world.pbrt. The main scene PBRT file includes these commands via an Include directive that is added at the end of the scene PBRT file
WorldBegin
Include "world.pbrt"
WorldEnd
We make this adjustment because we frequently upload these scene files to the Cloud for rendering. The differences between the files that we render are often no more than changes in the camera lookAt or the lens properties or the lighting properties. The WorldBegin/End text is constant, and yet it can be quite large. By writing it out as a separate file, we need to upload it to the cloud only once. This saves both on transfer time and disk usage.
ISET3d development is led by Brian Wandell's Vistalab group at Stanford University and supported by contributors from other research institutions and industry.
- Introduction
- Installation
- Workflow
- Camera
- Assets
- Materials Overview
- Textures
- Lights
- Rendering
- Scene data
- Programming overview
- [General Notes on moving to v4]
- Dockerized pbrt-v4 on the GPU