GithubHelp home page GithubHelp logo

fumeng's Introduction

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

fumeng's People

Contributors

hietwll avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

sfordj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.