GithubHelp home page GithubHelp logo

josephbakulikira / 3d-engine-from-scraph--pygame Goto Github PK

View Code? Open in Web Editor NEW
32.0 7.0 8.0 352 KB

3D Engine from scratch with python using pygame

Home Page: https://www.youtube.com/c/Auctux

Python 100.00%
pygame python 3d engine matrix projection algorithm graphic game-development

3d-engine-from-scraph--pygame's Introduction

3D ENGINE WITH PYTHON FROM SCRATCH

ko-fi

Youtube Channel: https://www.youtube.com/c/Auctux [auctux | YouTube]


Package Requirement

pip install -r requirements-dev.txt

Development Setup

pip install -r requirements-dev.txt
pre-commit install

Bugs (unsolved issues)

  • The z sorting of triangles still has some noticeable issues
  • still need some optimization to run faster ( maybe using numpy matrices can help a little bit)
  • issues with translate matrix , gonna fix it later still trying a couple of things

Support .obj files although the z-sorting isn't working properly

DeerGIF

Directional lighting

light = Light(position)
# to disable the light in the scene you can set the light = None
light = None

Directional LightGIF

Controls

Might work on a much better controls later but for now to move around the scene you can use "WASD" and "Arrows". The controls are weird , I'm gonna try to improve them.


Parameters

Screenshot (132)


Display normals:

ShowNormals = True
# you can set the normal lines length in the world.py file

normalsGIF


Camera Clipping

It still has a couple of issues when it comes to the boundary clipping , since it's only clip the faces that are in front of the camera.

clippingGIF


Wireframe Mode

wireframe = True

wireframe


Display Point Vertices

vertices = True

cube


Display Axis

showAxis = True
# red: x axis
# green: y axis
# blue: z axis

ezgif com-gif-maker (4)


icosphereGIG

Utah Teapot

Screenshot (131)


Enjoy✌

Subscribe to my YouTube

3d-engine-from-scraph--pygame's People

Contributors

josephbakulikira 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

3d-engine-from-scraph--pygame's Issues

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.