HashGrid Encoder (WIP)

A pytorch implementation of the HashGrid Encoder from instant-ngp, as described in Instant Neural Graphics Primitives with a Multiresolution Hash Encoding.

Note: This repo only tries to implement the hash grid encoder for now, and is far from instant (especially for NeRF experiments).



  • HashGrid Encoder
    • basic pytorch CUDA extension
    • fp16 support
  • Experiments
    • SDF
      • baseline
      • better SDF calculation (especially for non-watertight meshes)
    • NeRF
      • baseline (although much slower)
      • ray marching in CUDA.


We use the same data format as instant-ngp, e.g., armadillo and fox.
Please download the data from instant-ngp and put them under ./data.

# SDF experiment
bash scripts/run_sdf.sh

# NeRF experiment
bash scripts/run_nerf.sh


View Github