Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

181 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miniRT

Introduction

Simple 3D-object renderer based on Raytracing.

Installation

For Mac

  1. Clone the repository:
git clone https://github.com/eldeshue/miniRT.git
  1. Navigate to the project directory:
cd miniRT
  1. Build the project:
make all
  1. Start the project:
./miniRT {scene description file}

For Linux

to run this project on Linux, you need X11 library.

  1. Clone the repository:
git clone https://github.com/eldeshue/miniRT.git
  1. Navigate to the project directory:
cd miniRT
  1. Change branch:
  git switch 49-feat-minirt-for-linux
  1. Build the project:
make all
  1. Start the project:
./miniRT {scene description file}

Usage

Defining Scene

To run miniRT, user need to describe a scene to render. miniRT take as a first argument a scene description file with the .rt extension.

all direction vector's(camera's view, plane normal, cylinder, ... ) must be normalized.

  1. Camera
C {position x},{position y},{position z} {viewing direction vector x},{viewing direction vector y},{viewing direction vector z} {hFOV, degree}
  1. Ambient Light
A {Intensity, 0.0~1.0} {color, R, 0~255},{color, G, 0~255},{color, B, 0~255}
  1. Light Source
L {position x},{position y},{position z} {Intensity, 0.0~1.0} {color, R, 0~255},{color, G, 0~255},{color, B, 0~255}
  1. Plane Object
pl {position x},{position y},{position z} {normal vector x},{normal vector y},{normal vector z} {color, R, 0~255},{color, G, 0~255},{color, B, 0~255}
  1. Sphere Object
sp {center position x},{center position y},{center position z} {diameter} {color, R, 0~255},{color, G, 0~255},{color, B, 0~255}
  1. Cylinder Object
cy  {center position x},{center position y},{center position z} {direction vector x},{direction vector y},{direction vector z} {diameter} {height} {color, R, 0~255},{color, G, 0~255},{color, B, 0~255}
  1. Cone Object
co  {plane center position x},{plane center position y},{plane center position z}  {tip position x},{tip position y},{tip position z} {color, R, 0~255},{color, G, 0~255},{color, B, 0~255}

For further information, please refer to the files in the scene directory.

Run

./miniRT {scene description file}

Authors and Acknowledgment

miniRT was created by eldeshue and HyWChoi.

Contact

If you have any questions or comments about miniRT, please contact eldeshue.

About

miniRT project for 42school.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages