GithubHelp home page GithubHelp logo

asztr / svbrdf-remapping Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 2.0 72.4 MB

Code repository for the paper "Image-based remapping of spatially-varying material appearance" (JCGT)

License: BSD 2-Clause "Simplified" License

Python 21.84% C++ 78.16%
brdf reflectance pbr pbr-materials

svbrdf-remapping's Introduction

SVBRDF-Remapping

Code repository for the paper "Image-based remapping of spatially-varying material appearance" (JCGT)

Image-based remapping of spatially-varying material appearance
Alejandro Sztrajman, Jaroslav Krivanek, Alexander Wilkie, Tim Weyrich
Journal of Computer Graphics Techniques (JCGT), 8(4), pp. 1-30, 2019.

hydrant_mitsuward2cyclesggx_svr.mp4
Cross-renderer SVR remapping of hydrant from Mitsuba (Ward) to Cycles (GGX). Left: source material in Mitsuba Ward. Center: remapped in Blender-Cycles (GGX). Right: SSIM difference. Tabac plant environment map rotates from 0 to 360 degrees.

Regression

parametric_remapping.py: Reads uniform remapping data from mitsuba-ward2mitsuba-beck.csv, fits with parametric remapping method and output plots of data and fitting curve (roughness_vs_roughness.jpg and specular_vs_specular.jpg). Also reads specular.exr and roughness.exr textures and outputs remapped versions (roughness_beck_remapped.exr and specular_beck_remapped.exr).

$ python parametric_remapping.py

svr_remapping.py: Reads uniform remapping data from mitsuba-ward2mitsuba-beck.csv, fits with SVR remapping method and uses fitting to remap specular.exr and roughness.exr textures. Fitted SVR models are saved in disk for subsequent runs.

$ python svr_remapping.py

Visualization

For visualisation of the original and remapped SVBRDF assets, install the pbr.cpp plugin in Mitsuba and then run mitsuba on the scene files.

pbr.cpp: Mitsuba PBR BRDF plugin with Schlick's Fresnel term. For usage: copy this file into mitsuba/src/bsdfs and compile Mitsuba. For scons compilation add the following line to mitsuba/src/bsdfs/SConscript:

plugins += env.SharedLibrary('pbr', ['pbr.cpp'])

ward.xml: Mitsuba scene file that uses the Ward BRDF with the original texture maps.

$ mitsuba ward.xml

beck_parametric.xml: Mitsuba scene file that uses the Beckmann BRDF with the parametric remapped texture maps (make sure to run parametric_remapping.py before running this).

$ mitsuba beck_parametric.xml

beck_svr.xml: Mitsuba scene file that uses the Beckmann BRDF with the svr remapped texture maps (make sure to run svr_remapping.py before running this).

$ mitsuba beck_svr.xml

BibTeX

If you find our work useful, please cite:

@article{Sztrajman2019Imagebased,
    author = {Sztrajman, Alejandro and K\v{r}iv\'anek, Jaroslav and Wilkie, Alexander and Weyrich, Tim},
    title = {Image-based Remapping of Spatially-Varying Material Appearance},
    year = 2019,
    month = oct,
    day = 31,
    journal = {Journal of Computer Graphics Techniques (JCGT)},
    volume = 8,
    number = 4,
    pages = {1--30},
    url = {http://jcgt.org/published/0008/04/01/},
    issn = {2331-7418},
    authorurl = {http://reality.cs.ucl.ac.uk/projects/reflectance-remapping/sztrajman2019image-based.html},
}

Contact

If you have any questions, please email Alejandro Sztrajman at [email protected].

svbrdf-remapping's People

Contributors

asztr avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.