A basic 3D renderer made in Python, using the library Pillow.
These instructions will guide you through the installation and usage of Rendeer.
This project was made using Python 3.6. You need to go to the official Python website and install Python 3.6 or a newer version. You also need the Pillow and the tqdm library, which you can install with the command:
pip install pillow tqdm
You should be able to run the program by simply opening rendeer.py
.
It will probably take up to a minute for the mesh to be rendered.
If you want to import a mesh from an .obj file, you now can! Simply open wavefront_importer.py
and specify the path to the .obj file.
If, for example, you want to import a mesh called tree.obj
which is in the same folder as wavefront_importer.py
, you would need to type
tree.obj
If it's in a folder called "Trees" that's in the same folder as wavefront_importer.py
, you would need to type
Treestree.obj
rendeer.py
, meshes.py
, settings.py
, intersection.py
and wavefront_importer.py
) have to be all in the same directory for everything to work properly.The data from the .obj file will be saved in a file called meshes.py
. You can now run the renderer and it will display your mesh in an image. You might have to move/rotate your mesh in order to display it as you like.
Biggest update yet! Here are some key features:
flat diffuse
, unlit
and wireframe
!settings.py
)