/3d-object-viewer

A bare-metal 3D object viewer for the Raspberry Pi

Primary LanguageC

3DOVE: 3D Object Viewer

A 3D object viewer that runs on a bare-metal Raspberry Pi (no standard libraries).

Created for the Stanford CS107e final project (Winter 2021).

Contributors

Ari Webb (AriWebb)

Tejas Narayanan (tnarayanan)

Features

  • Fast triangle rendering using z-buffers
  • Directional lighting
  • Loading .obj files from file system
  • Moving camera around model using arrow keys

Upcoming

  • GPU acceleration

Dependencies

Requires the libpi set of libraries built in CS107e, which includes implementations of standard library methods as well as some extras:

  • Strings (strlen, strlcat, printf)
  • Memory (memset, memcpy, malloc)
  • GPIO
  • Graphics (mailbox, framebuffer, drawing)
  • Keyboard (PS2 interface)

References

Rendering concepts/math

Math library

3D Models

GPU Library

Photos

Video demo: https://drive.google.com/file/d/1jsQI91-H1OuIeEY4wmy1Li1u-xQmRkDC/view?usp=sharing

Suzanne, the default Blender monkey: Monkey

An orange-colored wolf: Orange wolf

A z-buffer demonstration on the wolf model. Lighter colors are closer to the camera than darker colors. Z-buffer of wolf

A deer: Deer