Skip to content

ppwwyyxx/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 id>, show demo scene (0~10) 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 in DOF demo)

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages