Skip to content

qiqisteve/Ray-Tracing-Engine

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

allpttiny

This is an 3D Rendering Engine written in C++. For the details of this project, please see report.pdf. See my blog post (in Chinese) for other interesting stories..

Features

  • Phong Model and Monte Carlo Path Tracing Model
  • rendering of plane, sphere and mesh
  • read mesh from a simple obj file
  • fast SAH-Based KDtree
  • depth of field
  • custom texture
  • mesh smoothing
  • mesh simplification with polygon reduction
  • qt-based gui

Usage

Dependencies

Compile

$ make	(command line)
$ make gui   (gui)

Use

Command line:

./ray-tracing <demo/small id>, show demo/small scene defined in main.cc.

The display is based on OpenCV, allowing keyboard control of the viewpoint:

  • Left/Right Arrow - Orbit around the center.
  • Up/Down Arrow - Rotate the output picture.
  • < - Rotate viewpoint direction.

  • = - - Zoom in/out.
  • h j k l - Move viewpoint, keep direction.
  • - Move focal plane (only available when DOF mode is on)

GUI:

GUI is only an objviewer with some simple control.

gui

Examples

Obj and ground texture:

pict

Depth of field (There is also a video in demo/small/):

dof

Caustic using path tracing:

caustic

A Large scene:

allpt

About

A Photorealistic 3D Rendering Engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 72.2%
  • TeX 23.1%
  • Python 3.0%
  • Makefile 1.2%
  • Other 0.5%