DavidBrainard / RenderToolbox3

Matlab toolbox for managing graphics rendering for psychophysics
MIT License
11 stars 4 forks source link

Checkerboard test scene #6

Closed benjamin-heasly closed 11 years ago

benjamin-heasly commented 11 years ago

A rendering of a checkerboard as viewed from a given distance could help calibrating some viewing apparatuses.

The scene would show a view of a grid or checkerboad with "one inch" squares, as viewed from some number of "inches" away. It would be useful to have the viewing distance, the size of the grid squares, and the number of squares in the grid as free parameters.

benjamin-heasly commented 11 years ago

Some thoughts on implementation:

Let's assume the whole grid is modeled as a rectangle with UV coordinates set to 0,0 and 1,1 at opposite corners.

Viewing distance and total board size could be applied as Collada transformations in the mappings file.

Grid squares could be supplied as a texture image with the correct number of squares, generated on the fly. The whole image would be stretched to fill the board. Generating an image on the fly would require writing EXR files, which would be doable but new.

The image might have to be stupidly large, to prevent interpolation from smoothing out the grid square borders. Mitsuba bitmap has a "nearest" filter mode. PBRT has no such mode.

The renderers also have checkerboard textures. Do these have the right parameters to work with this scene?

benjamin-heasly commented 11 years ago

2e4d482190068aa9a3d9c387e6a2e85631d2e9b1 contains a new Checkerboard scene.

I used the "checkerboard" textures that PBRT and Mitsuba implement internally. So I did not have to deal with all the image format and bitmap texture junk above. This led to new "checkerboard" texture generic mappings syntax.

Several parameters are easy to modify in MakeCheckerboard(), which writes a suitable conditions file automatically.

benjamin-heasly commented 11 years ago

The scene should render for stereo viewing. So there should be a new eye-separation parameter and a second rendering condition.

Also, it would be useful to mark the center of the board with a "quarter inch" rectangle.

benjamin-heasly commented 11 years ago

I added a center marker and stereo conditions.

I also adjusted the pixel filter widths for PBRT and Mitsuba, so that borders between checks and center markers would not be blurred out.

I will commit this later today, after another long, slow push to GitHub finishes...

benjamin-heasly commented 11 years ago

Updates committed in 7094ce8945faa476461caccdb9c43dfab57d8977