项目作者: matboivin

项目描述 :
Convert .obj files to .rt files to render a triangle mesh effect for ray tracer school project
高级语言: Python
项目地址: git://github.com/matboivin/minirt_mesh_converter.git
创建时间: 2020-08-30T15:42:52Z
项目社区:https://github.com/matboivin/minirt_mesh_converter

开源协议:Other

下载


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:

    1. $ poetry install

Usage

  1. minirt_converter [-h] filename color
  2. Convert .obj files to .rt files to render a triangle mesh effect for miniRT project at 42.
  3. positional arguments:
  4. filename obj file to convert.
  5. color the color in RGB format (e.g., 255,255,255).
  6. optional arguments:
  7. -h, --help show this help message and exit
  8. example usage:
  9. minirt_converter file.obj 255,255,255
  1. Activate the virtual environment:

    1. $ source `poetry env info --path`/bin/activate
  2. Run the project:

    1. $ minirt_converter file.obj 255,255,255
  3. 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.