Skip to content

Software implementation (based on CPU) of a 3D engine from scratch.

Notifications You must be signed in to change notification settings

davidmigloz/3d-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3d engine

Software implementation (based on CPU) of a 3D engine.

Screenshot

Features

  • Three types of rendering (wireframe, shading and texture).
  • User has the control over the camera.
  • Presentation mode (the model rotates automatically).
  • Eight 3D models included:
    • Cube
    • UV Sphere
    • ICO Sphere
    • Cylinder
    • Cone
    • Torus
    • Suzzane
  • Import 3D models in Babylon JSON format.
  • Models can be exported from Blender with Babylon exporter plug-in.

Details

  • Left-handed world.
  • Rendering loop: 60hz.
  • Lines are drawn with Bresenham’s algorithm.
  • Triangles are filled with Scan-Line algorithm.
  • Visibility problem is solved with Z-Buffer.
  • Gouraud Shading for handling lightning.
  • Fixed point of light.
  • UV coordinates for texture mapping.
  • Data loaded from Babylon JSON files:
    • Mesh: Name / Vertices / Faces / Position / Rotation / Texture / UV coordinates
    • Texture: Name / ID / Image file name

Download

Engine-3d.v1.jar

References

  1. https://www.davrous.com/2013/06/13/tutorial-series-learning-how-to-write-a-3d-soft-engine-from-scratch-in-c-typescript-or-javascript/
  2. https://www.codinglabs.net/article_world_view_projection_matrix.aspx
  3. https://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/
  4. https://blog.db-in.com/cameras-on-opengl-es-2-x/
  5. https://msdn.microsoft.com/en-us/library/windows/desktop/bb206269(v=vs.85).aspx
  6. https://inear.se/talk/a_brief_introduction_to_3d.pptx
  7. https://www.songho.ca/opengl/gl_transform.html
  8. https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm
  9. https://en.wikipedia.org/wiki/Scanline_rendering
  10. https://doc.babylonjs.com/
  11. https://en.wikipedia.org/wiki/Z-buffering
  12. https://en.wikipedia.org/wiki/Gouraud_shading
  13. https://en.wikipedia.org/wiki/Normal_(geometry)/
  14. https://en.wikipedia.org/wiki/Dot_product
  15. https://en.wikipedia.org/wiki/Cross_product
  16. https://www.bencloward.com/tutorials_normal_maps2.shtml
  17. https://en.wikipedia.org/wiki/Texture_mapping
  18. https://ogldev.atspace.co.uk/www/tutorial16/tutorial16.html
  19. https://www.blender.org/manual/render/index.html
  20. https://www.real3dtutorials.com/tut00005.php

About

Software implementation (based on CPU) of a 3D engine from scratch.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages