Skip to content

3D model rending engine built from scratch based on the concept of Z-buffer and Phong illumination model.

Notifications You must be signed in to change notification settings

Bipinoli/Rasterization-3D-Renderer

Repository files navigation

Rastarization-3D-Renderer

Rastarization based 3D Renderer with Z-buffer and Phong illumination.

How to run?

Requirements: C++11, Python

  • run Makefile make
  • clean obj file with objParser.py python objParser gun.obj
  • objParser will produce .clean file, run that as a command line argument main gun.obj.clean This will auto adjust camera and light in the scene.
  • output will be produced as the .ppm image. You can open it using Photoshop or other tools.
  • For manual adjustments, provide more command line args.

    It takes the form:
    main objFile camPosX camPosY camPosZ lightPosX lightPosY lightPosZ rotateDegreeX rotateDegreeY rotateDegreeZ

    e.g. main gun.obj.clean 100 100 100 200 200 200 -30 30 60

current progress

dragon4 gun2 dragon2 dragon1 harrypotter2

Shield of a warrior: after bug fix on translate function :)

rastercapturekabach

car model displayed after normalization

raycapturecar

after polygon face is converted to triangular faces

all triangular faces are found ( no black triangles )

rastercapturetriangular

before polygon face is converted to triangular faces

some faces are missing ( black triangles )

raycapturewithshadow

parsed from obj file

rastercapture3

depth buffer with phong illumination

rastercapture2

Authors

About

3D model rending engine built from scratch based on the concept of Z-buffer and Phong illumination model.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published