Git Product home page Git Product logo

rendeer's Introduction

alt text

Rendeer

A basic 3D renderer made in Python, using the library Pillow.

alt text

Note: This application is currently in development. It has bugs and imperfections.

Getting started

These instructions will guide you through the installation and usage of Rendeer.

Requirements

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

Usage

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.

Note: Please triangulate your mesh before importing it unless you want it to look like this

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

Trees\tree.obj

Note: The four files (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.

Contributors

  • Special thanks to tweakimp for doing a lot of optimization and making the rendering time significantly shorter.

Changelog

What's new in 4.0.0?

  • ALAN (Animation Language) has been added: you can now create animations with ease! (no pun intended)

v3.0.0

Biggest update yet! Here are some key features:

  • You can now set the resolution so you can go Ultra HD (default resolution is 100)
  • calculating hard vertex normals is now up to 1000 times faster
  • Gouraud shading! Now your meshes are as smooth as they can get
  • many parts of the code have been rewritten, others are just gone

v2.3.0

  • shading modes! choose between flat diffuse, unlit and wireframe!
  • progress bars! stop staring into the void for a minute straight, now you can watch the program doing things
  • variables that the user should modify are in a separate file now (settings.py)
  • fixed problem with the mesh being too bright where light doesn't touch it

v2.2.0

  • now it has a Wavefront importer for your 3D models
  • it sorts faces by distance so it can now render them in the (almost) correct order.
  • it can now calculate hard vertex normals
  • I've fixed some of the 0x0BADC0DE.

rendeer's People

Contributors

4e1e0603 avatar c7stef avatar cppjames avatar tweakimp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rendeer's Issues

Replacing a long list with a list comprehension

On line 197 of 3d_2.1.0.py, you have a variable that equals [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
I checked, and it's 80 zeroes long, and it'd be much cleaner if you replaced it with [0 for i in range(80)]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.