This code base includes the implementation of the EGSR 2022 paper A Microfacet-based Hair Scattering Model in Mitsuba 2.
- Clone the Mitsuba Renderer 2 repository.
- Copy the current folder to the repository.
- Add this line to
src/bsdfs/CMakeLists.txt
:
add_plugin(roughhair roughhair.cpp)
add_plugin(roughcylinder roughcylinder.cpp)
Add to src/shapes/CMakeLists.txt
:
add_plugin(hair hair.cpp)
add_plugin(hairsegment hairsegment.cpp)
add_plugin(cylindersegment cylindersegment.cpp)
Then compile as instructed in the Mitsuba 2 Docs.
in the build
folder, execute dist/mitsuba ../hair_scenes/xxx.xml
- The paper implements
roughhair
material andhair
,hairsegment
shapes.roughcylinder
andcylindersegment
are only used for comparing with brute-force Monte-Carlo tracing. - The paper describes the PDF implementation, but it is disabled by default because of performance issue.
- Checkout ellipse branch for hair with elliptical cross-sections