+
Skip to content

lwwu2/glint24

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Position-Normal Manifold for Efficient Glint Rendering on High-Resolution Normal Maps

This repo contains the implementation of the SIGGRAPH 2025 paper: Position-Normal Manifold for Efficient Glint Rendering on High-Resolution Normal Maps.

  • src/bsdfs/ contains the Mitsuba 0.6 implementation of specular glint BRDF and diffuse BRDF.

  • convert.py converts input normal map to the cluster and bounding box hierarchy.

  • convert_G.py converts input normal map into GGX roughness and tangent frame for fast shadow-masking approximation.

Setup

  • Mitsuba 0.6
  • CUDA 11.7
  • Python 3.8
  • pytorch 2.0.8
  • opencv-python 4.8.0.76

Usage

BSDF plugin in Mitsuba 0.6's XML format:

<bsdf type="glintconductor">
            <string name="micro_normal" value=$normalmap_folder/>
            <float name="sigma" value=$footprint_scale/>
            <float name="thresh" value="0.0004"/> <!--cluster error threshold-->
            <boolean name="fix_sigma" value="false"/> <!--use ray differential for footprint estimation-->
            <float name="texture_scale" value="16.0"/> <!--scale of the texture-->
            <integer name="res" value="1024"/> <!--normal map resolution-->
            <string name="filter" value="gaussian"/> <!--footpint kernel type (gaussian|disk|box)-->
</bsdf>

<bsdf type="glintdiffuse">
            <rgb value="0.8 0.8 0.8" name="reflectance"/>
            <string name="micro_normal" value=$normalmap_folder/>
            <float name="sigma" value=$footprint_scale/>
            <boolean name="fix_sigma" value="false"/> 
            <float name="texture_scale" value="16.0"/>
            <integer name="res" value="1024"/>
</bsdf>

Normal map to cluster and bounding box hierarchy:

python convert.py --input <normal-or-height-map-file> --output <output-folder>

An example is provided in demo/ that reproduces Fig. 11 of the paper:

  1. Download Mitsuba 0.6.
  2. Copy src/bsdfs/ to the Mitsuba 0.6 folder and add lines below to src/bsdfs/SConscript
plugins += env.SharedLibrary('glintdiffuse', ['glintdiffuse.cpp'])
plugins += env.SharedLibrary('glintconductor', ['glintconductor.cpp'])
  1. Compile according to the documentation.
  2. In this folder, cd demo and run sh demo.sh.
  3. The rendering results will be saved as scene1_isotropic.exr, scene1_brush.exr, scene1_scratched.exr.

Citation

@inproceedings{wu2025position,
	author = {Liwen Wu and Fujun Luan and Miloš Hašan and Ravi Ramamoorthi},
	title = {Position-Normal Manifold for Efficient Glint Rendering on High-Resolution Normal Map},
	booktitle = {SIGGRAPH},
	year = {2025}
}

About

Position-Normal Manifold for Efficient Glint Rendering on High-Resolution Normal Maps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载