GitPedia

NRHints

Official Code Release for [SIGGRAPH 2023] Relighting Neural Radiance Fields with Shadow and Highlight Hints

From iamNCJ·Updated May 8, 2026·View on GitHub·

Relighting Neural Radiance Fields with Shadow and Highlight Hints The project is written primarily in Python, distributed under the MIT License license, first published in 2023. Key topics include: nerf, neural-rendering, neural-representation, relighting, siggraph.

<p align="center"> <h1 align="center">Relighting Neural Radiance Fields with Shadow and Highlight Hints</h1> <p align="center"> <a href="https://www.chong-zeng.com/"><strong>Chong Zeng</strong></a> · <a href="https://www.microsoft.com/en-us/research/people/guoch/"><strong>Guojun Chen</strong></a> · <a href="https://yuedong.shading.me/"><strong>Yue Dong</strong></a> · <a href="https://www.cs.wm.edu/~ppeers/"><strong>Pieter Peers</strong></a> · <a href="https://svbrdf.github.io/"><strong>Hongzhi Wu</strong></a> · <a href="https://www.microsoft.com/en-us/research/people/xtong/"><strong>Xin Tong</strong></a> </p> <h2 align="center">SIGGRAPH 2023 Conference Proceedings</h2> <div align="center"> <img src="nrhints-teaser.png"> </div> <p align="center"> <br> <a href="https://nrhints.github.io/"><strong>Project Page</strong></a> | <a href="https://nrhints.github.io/pdfs/nrhints-sig23.pdf"><strong>Paper</strong></a> | <a href="https://arxiv.org/abs/2308.13404"><strong>arXiv</strong></a> | <a href="#data-and-models"><strong>Data</strong></a> </p> </p>

Setup

Environment

The code is developed and tested on Linux servers with NVIDIA GPU(s). We support Python 3.8+ and PyTorch 1.11+. After getting a required Python environment, you can setup the rest of requirements by running:

bash
git clone https://github.com/iamNCJ/NRHints.git cd NRHints pip install -r requirements.txt

Data

Our data is compatible with NeRF Blender Dataset, except that we have extra fields in each frame for point light position.

You can download our data here.

Usage

Configuration System

We use tyro for configuration management. Description to all configurations can be found by running python main.py -h.

Training

bash
python3 main.py config:nr-hints --config.data.path /path/to/data/ --config.scene-name XXX

Refer to train_synthetic.sh and train_real.sh for training on synthetic and real data, respectively.

Note:

  1. Our code automatically detects the number of GPUs and uses all of them for training. If you want to use a subset of GPUs, you can set the CUDA_VISIBLE_DEVICES environment variable.
  2. For training on real captured scenes, we recommend turning on camera optimization by using config:nr-hints-cam-opt, which can significantly reduce the blurry effects. Since this is an improvement after the paper submission, details are described in the author's version.

Testing

bash
python3 main.py config:nr-hints --config.data.path /path/to/data/ --config.scene-name XXX --config.evaluation-only True

Refer to eval_synthetic.sh and eval_real.sh for testing on synthetic and real data, respectively.

Our pretrained models can be downloaded here.

Data and Models

Real Captured Scenes

ObjectDataPre-trained model
CatLinkLink
Cluttered SceneLinkLink
Pixiu StatuetteLinkLink
Ornamental FishLinkLink
Cat on DecorLinkLink
Cup and FabricLinkLink
Pikachu StatuetteLinkLink

Synthetic Rendered Scenes

Note:
Our synthetic data rendering scripts are released at here.

ObjectDataPre-trained model
DiffuseLinkLink
MetallicLinkLink
Glossy-MetalLinkLink
Rough-MetalLinkLink
Anisotropic-MetalLinkLink
PlasticLinkLink
Glossy-PlasticLinkLink
Rough-PlasticLinkLink
Short-FurLinkLink
Long-FurLinkLink
TranslucentLinkLink
Fur-BallLinkLink
BasketLinkLink
Layered Woven BallLinkLink
DrumsLinkLink
HotdogLinkLink
LegoLinkLink

You can use the script download_data.sh to download all data.

Citation

Cite as below if you find this repository is helpful to your project:

@inproceedings {zeng2023nrhints,
    title      = {Relighting Neural Radiance Fields with Shadow and Highlight Hints},
    author     = {Chong Zeng and Guojun Chen and Yue Dong and Pieter Peers and Hongzhi Wu and Xin Tong},
    booktitle  = {ACM SIGGRAPH 2023 Conference Proceedings},
    year       = {2023}
}

Acknowledgement

Some code snippets are borrowed from NeuS and Nerfstudio. Thanks for these great projects.

Contributors

Showing top 3 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from iamNCJ/NRHints via the GitHub API.Last fetched: 6/14/2026