Inspiration
RTX on.
What it does
Renders multiple spheres in 3D space, and illuminates them based on the relative position of a light source.
How we built it
Split into two teams, The first team tackled output from Arduino to a monitor over VGA in 4-bit 'colour' by writing C++ and Assembly Code. The second team represented objects in 3D space and calculated ray bounces to render crystal clear scenes (including support for camera panning and rotation) using ray tracing all within the terminal.
Challenges we ran into
A single Arduino Uno lacks the memory to both push images to a VGA output and perform ray-trace calculations simultaneously. The memory optimisations we could perform would exceed the scope of the hackathon and strain the already overwhelmed processor, and reducing processor load would use far too much memory. Additionally, we did not have access to a VGA shield, so we had to drive it manually. Already available libraries for an Arduino to use VGA use significant memory and are not very good, unable to represent our desired output. As a result, we were forced to amend these implementations to add support for grayscale by sacrificing colour. Even then, our resolution was limited to 120x60 if we wanted 3 bits of colour. This VGA library we constructed used 97% of the Arduino's memory, leaving ~55 bytes in which to perform our ray-tracing calculations.
Accomplishments that we're proud of
Creating a ray-tracing algorithm with camera panning and rotation support and multiple overlapping objects. Creating a grayscale VGA driver. Making the two work together to display an image.
What we learned
Assembly and ray tracing techniques and the maths behind them. How vectors apply to image rendering. Creating driver interfaces is very difficult.
What's next for Arduino Ray Tracing
Using an Arduino Duo and extra funding. Buying a VGA shield for better displaying. Implementing more polygons to render beyond the proof-of-concept sphere. Full-colour images. A graphics card company?
Log in or sign up for Devpost to join the conversation.