Skip to content

This project is an introduction to the beautiful world of Raytracing. Once completed you will be able to render simple Computer-Generated-Images

Notifications You must be signed in to change notification settings

josephcheel/42-MiniRT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MiniRT |  42 Cursus Complete

A project on Ray-Tracing and rendering three-dimensional computer-generated images. Using MiniLibX, the 42 graphical library.

Caution

If you need more technical info, go check our Github-Wiki

What is the project about

MiniRT is a project that introduces the basics of Ray tracing, focusing on 3D computer-generated images from a configuration file. It includes ambient light, lights, camera, and three geometrical figures (Plane, Sphere, Cylinder). The bonus part introduces multiple lights, cones as a geometrical figure, and additional elements.

General Instrucctions

  • Makefile will compile your source files. It must include 'all' and 'bonus' rules for the Mandatory and Bonus parts, respectively. It should not relink.
  • You are required to use MiniLibX for this project.
  • The program should be compiled using the following commands:
> ./miniRT <filename>.rt
> ./miniRT_bonus <filename>.rt

Warning

Maps must have the .rt extension

Mandatory Instrucctions

Configuration file has three mandatory elements: Camera, Light and Ambient Light. And three optional geomtrical figures: Plane, Sphere, Cylinder. Each element has the following identifier:

Name Identifier Name Identifier
Ambient Light A Plane pl
Camera C Sphere sp
Light L Cylinder cy

Keyboard Commands

Displacement Camera

  • MAC Option ⌥ + Right Clickand swip with the mouse
  • LINUX Alt + Left Click and swip with the mouse

Zoom Camera

  • MAC Option ⌥ + Mouse Wheel
  • LINUX Alt + Mouse Wheel

Rotation Camera

  • Shift ⇧ + Left Click and swip with the mouse

Displacement Light

  • Ctrl ^

Reset settings

  • R Reset Camera Position
  • L Reset Light Position

File configuration

Mandatory Elements
  • Ambient Light: Ambient light line
    • Identifier: A
    • Ambient lighting ratio in range [0.0,1.0]: 0.2
    • Colors in RGB in range [0-255]: 255, 255, 255
  • Camera Camera line
    • Identifier: C
    • XYZ coordinates of the view point: 60,0,0
    • 3D normalized orientation vector. In range [-1,1] for each x,y,z axis: 1.0,0.0,0.0
    • FOV : Horizontal field of view in degrees in range [0,180]: 170
  • Light Light line
    • Identifier: L
    • XYZ coordinates of the light point: 90,50,70
    • The light brightness ratio in range [0.0,1.0]: 0.7
    • (unused in mandatory part)R,G,B colors in range [0-255]: 255, 255, 255
Optional Elements
  • Plane Plane line
    • Identifier: pl
    • XYZ coordinates of a point in the plane: 0.0,0.0,-500.0
    • 3D normalized vector. In range [-1,1] for each x,y,z axis: -1.0,1.0,1.0
    • Colors in RGB in range [0-255]: 0,0,225
  • Sphere Sphere line
    • Identifier: sp
    • XYZ coordinates of the sphere center: 90,0.0,0.0
    • Diameter: 60
    • Colors in RGB in range [0-255]: 0, 0, 255
  • Cylinder Cylinder line
    • Identifier: cy
    • XYZ coordinates of the center of the cylinder: 90.0,0.0,0.0
    • 3D normalized vector of axis of cylinder. In range [-1,1] for each x,y,z axis: 0.0,1,1.0
    • Diameter: 30
    • Height: 210.42
    • Colors in RGB in range [0,255]: 0, 0, 255

Bonus Instrucctions

Resources