Skip to content

Latest commit

 

History

History
77 lines (49 loc) · 2.43 KB

README.md

File metadata and controls

77 lines (49 loc) · 2.43 KB

Convert .obj files for 42's miniRT

Code style: black pre-commit security: bandit

Convert .obj files to .rt files to render a triangle mesh effect for miniRT project at 42.

deer

Requirements

  • Python 3.9 or greater
  • poetry
  • Learn more about .obj files formatting here.

Installation

  1. Clone the repository and change it to your working directory.

  2. Install the project:

$ poetry install

Usage

minirt_converter [-h] filename color

Convert .obj files to .rt files to render a triangle mesh effect for miniRT project at 42.

positional arguments:
  filename    obj file to convert.
  color       the color in RGB format (e.g., 255,255,255).

optional arguments:
  -h, --help  show this help message and exit

example usage:
  minirt_converter file.obj 255,255,255
  1. Activate the virtual environment:
$ source `poetry env info --path`/bin/activate
  1. Run the project:
$ minirt_converter file.obj 255,255,255
  1. Then, add Resolution, Ambient Light, cameras and light points to your scene.

Examples

The deer.rt, dragon.rt and wolf3d.rt scenes can be found here.

dragon wolf

Acknowledgements

Many thanks to MrMoustach for contributing by adding a polygon support!

License

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.