Skip to content

Latest commit

 

History

History
101 lines (85 loc) · 2.93 KB

README.md

File metadata and controls

101 lines (85 loc) · 2.93 KB

Fumeng (浮梦)

Fumeng is a hobby project which implements a monte-carlo path tracer from scratch. Fumeng means illusory dream in English.

Features

Camera

  • Pin-hole camera
  • Thin-lens camera (with depth of field)

Shape

  • Sphere
  • Rectangle
  • Triangle
  • OBJ mesh

Material

  • Lambert diffuse
  • Specular reflection
  • Specular transmission
  • Disney BSDF
  • Subsurface scatering
  • Volumetric media

Light

  • Directional light
  • Area light
  • Image-based light (HDR)

Accelerator

  • Built-in BVH
  • Embree BVH (opitional, but highly recommended)

Ray Tracer

  • Basic monte-carlo path tracer
  • Bidirectional path tracer

Sampling

  • Multiple importance sampling

Denoise

  • OIDN denoise (opitional, but highly recommended)

Post process

  • Tonemapping

Texture

  • Image texture
  • Constant texture
  • Checkerboard

Scene format

  • Custom description using json

Build and Run

1. Download source code

git clone --recursive https://github.com/hietwll/Fumeng.git

2. Install third-party libraries

Both Embree and OIDN are optional for Fumeng, but it's strongly recommended to use them. You can just download the pre-built packages from their websites, and extract the packages.

Embree: windows and linux

OIDN: windows and linux

3. Config

cd /path/to/fumeng
cmake -B build -DCMAKE_BUILD_TYPE=Release -DUSE_FLOAT=TRUE -DUSE_EMBREE=TRUE -DUSE_OIDN=TRUE -Dembree_DIR=/path/to/embree/lib/cmake/embree-x.x.x -DOpenImageDenoise_DIR=/path/to/oidn/lib/cmake/OpenImageDenoise-x.x.x
  • -DUSE_FLOAT: use single precision if TRUE, use double precision if FALSE
  • -Dembree_DIR: directory of embree cmake config file
  • -DOpenImageDenoise_DIR: directory of embree cmake config file

4. Build

cmake --build build --parallel 4 --target CMD_EXE

Supported complier:

  • VS 2017/2019 for windows
  • gcc and clang for linux

5. Run

cd /path/to/fumeng/scenes
../build/src/cmd/CMD_EXE DamagedHelmet/DamagedHelmet.json

result can be found in the same directory of the scene file.

Scenes

Damaged Helmet: pic

DoF Camera: pic

Substance Boy: pic

Hyperion: pic

Storm Trooper: pic

Dining Room: pic

Classroom: pic