# Python-3D-renderer **Repository Path**: zinface/Python-3D-renderer ## Basic Information - **Project Name**: Python-3D-renderer - **Description**: mirror of https://github.com/ICE27182/Python-3D-renderer - **Primary Language**: Python - **License**: MIT - **Default Branch**: main - **Homepage**: https://www.bilibili.com/video/BV1UJ4m1h79P - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2024-03-11 - **Last Updated**: 2024-03-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Python-3D-renderer ## A 3D renderer written completely in Python, without using any 3rd-party libraries - Support loading from .obj file - Support mesh transformation - Support texture - Support normal map - Support smooth shading - Lighting(difused): parallel, spot, point - Shadow: shadow mapping - Anti-aliasing: FXAA (Not recommanded in low resolution) ## Using I just do not want to spend more time on this project, at least for now, so it's pretty messy looking. To use all the classes and funcs, import Readability/pyrender.py and Readability/png.py (I wrote it too and it is required for loading textures and normal maps). You may check Readability/pymain.py and Readability/prefinal.py to have an idea on how to use it. Import Readability/control.py so you can have key input without interupting the real time rendering. You can also try playing around Readability/particles.py. I wrote it initially trying to do the tyndall effect in a kinda primitive way. note.md is a note I took when coding so as to sort out my mind, more or less. Ironically, codes in "Readability" aren't quite readable nor good in performace. At first, I thought I wrote something that was easy to read and understand, and then another version optimized for performance (by putting some functions straight into the code, altering some calculation steps so it takes less multiplications and divisions, copying and pasting code from one loop to get rid of it and its cost on performace and so on)