This is the source code for our paper accepted at Siggraph Asia 2023.
The database is available at OpenSVBRDF. Currently, all texture maps are available for download. Due to the large data volume, we are still looking for storage solutions for the neural representations and raw capture images. Currently, we provide the raw images of two samples for users to run this code and reproduce the results of the paper.
We offer an anisotropic satin sample and an isotropic greeting card sample composed of various materials to test the results comprehensively. Download paper0018 and satin0002 and place the data folders in the database_data
folder.
Download the model and place its contents in the database_model/
folder.
Download the device configuration files and place its contents in the data_processing/
folder as device_configuration/
.
- Create a new environment and install the packages listed in
requirements.txt
. - Before running each command, confirm the sample name you want to process. The output of each step will be saved in the
output/
folder.
cd generate_uv/
and runrun.sh
to automatically determine the final texture map area from masks and captured photos.cd parallel-patchmatch-master/
and runrun.sh
to align photos from two cameras using dense patchmatch, finding corresponding pixel positions in the secondary camera for each pixel in the primary camera.cd extract_measurements/
and runrun.sh
to extract all measurement values for each pixel in the texture map from each photo.cd finetune/
and runrun.sh
to infer the neural representations and perform the three finetune steps described in the paper.cd fitting/
and runrun.sh
to fit the neural representation into 6D PBR texture maps ready for rendering.cd visualize_results
and runrun.sh
to render the neural representations and PBR texture maps, compute SSIM, and visualize MSE error against real photos for result validation.
After completing these steps, you can view the reconstructed results in the output/render/
folder within the sample directory.
This code is licensed under GPL-3.0. If you use our data or code in your work, please cite our paper:
@article{ma2023opensvbrdf,
title={OpenSVBRDF: A Database of Measured Spatially-Varying Reflectance},
author={Ma, Xiaohe and Xu, Xianmin and Zhang, Leyao and Zhou, Kun and Wu, Hongzhi},
journal={ACM Transactions on Graphics (TOG)},
volume={42},
number={6},
pages={1--14},
year={2023},
publisher={ACM New York, NY, USA}
}
We also acknowledge the use of code from SIFT-Flow-GPU for camera alignment.