Coder Social home page Coder Social logo

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

View Code? Open in Web Editor NEW

This project forked from josephbakulikira/3d-engine-from-scraph--pygame

0.0 1.0 0.0 380 KB

3D Engine from scratch with python using pygame

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

Python 100.00%

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

3D ENGINE WITH PYTHON FROM SCRATCH

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


Package Requirement

         PYGAME -> pip install pygame
         COLORSYS -> pip install colorsys

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 zsorting isn't working properly

DeerGIF

Directional Light

          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's 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

Watchers

 avatar

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.