Skip to content

bobboli/svbrdf-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

svbrdf-pipeline

Generating svBRDF textures from photos taken with mobile phone. [arxiv]

Usage

System Requirements

The pipeline is implemented in Python 3 with the following packages as additional dependencies:

  • Numpy
  • Scipy
  • matplotlib
  • sklearn
  • cv2
  • exifread

Anaconda distribution is recommended for simplifying the setup of the environment.

Input Images Preparation

The pipeline requires a minimum of two input photos: one under the ambient illumination and one under the flash light. Then place them under the /photos and create a JSON file describing the input images. There is one example photos/green_towel_low, which you can refer to. You should preserve the EXIF of the images, since information like exposure time and focal length is required.

For each camera, you also need to shoot a photo of a 18% gray card to decide the intensity of the flash light, and a series of photos of a generated color palette (./photos/colorcard.jpg) to recover the camera's response curve. These are described as calibration images. Include them in the [list_json_file] (like ./photos/list_low.json) as well as all the folders of the materials you would like to process.

Run the Process Script

Prepare all the required input photos as above, and run

python ./scripts/fit_all.py ./photos/[list_json_file]

For the example contained in the repository

python ./scripts/fit_all.py ./photos/list_low.json

And svBRDF textures will be generated in ./photos/[material_name]/out/

Live Preview in Blender

A Python script ./blender/SetupScene.py can be used to quickly import all the textures into a 3D scene ./blender/material.blend. Tested on Blender 2.80.

About

Generating svBRDF textures from photos taken with mobile phone

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages