Ray-Traced Treasure Chest Project
Student: Kenneth Ramirez
Course: CMPS 3480 – Computer Graphics
Instructor: Gordon Griesel
Semester: Fall 2025
Project Overview
- This project is a ray-traced scene of a treasure chest that opens and reveals a glowing interior.
- The glow lights up the floor and fades smoothly into darkness.
- I started from our Lab 7–8 glow program and expanded it into a full scene.
- I used techniques from class including ray tracing, ray-object intersections, shading, falloff, and animation.
How I Started
This is the very first version from Lab 7–8, just a glowing sphere in a dark space to practice glow and falloff:
- This helped me understand glow, soft lighting, and fade-to-black falloff.
- No chest, no geometry — just the basic lighting foundation.
Inspiration for the Final Look
These reference images guided how I wanted the final chest to look.
Realistic glowing chest reference:
- Bright interior glow.
- Light spilling onto the floor.
- Soft fog-like bloom.
Chest shape reference:
- Used for lid shape, hinge behavior, and front-panel layout.
- Helped me build a simple but recognizable chest shape.
How the Ray Tracer Works
- The camera shoots rays through each pixel.
- Each ray checks for intersections with:
- Chest base
- Chest lid
- Floor plane
- Shading uses ambient + diffuse + specular terms.
- The inside glow uses ray marching to make it soft instead of a hard cutoff.
Scene Breakdown
- Chest Base: Rectangular object with wood-like colors.
- Lid: Separate piece that rotates open over time.
- Light Source: A bright point inside the chest.
- Floor: Captures glow and falloff.
Animation
- The lid opens smoothly from frame to frame.
- Glow intensifies as the lid opens wider.
- Rendered as a sequence of PPM images, then converted into an MP4 animation.
Techniques Used
- Ray Tracing: Pixel-by-pixel ray casting, object intersections, normals.
- Ray Marching: Used to create the soft glowing interior of the chest.
- Phong Lighting: Ambient, diffuse, and specular shading.
- Falloff Lighting: Smooth fade into darkness, avoiding hard edges.
- Model Construction: Chest created from simple geometric primitives (boxes, panels, lid).
- Animation: Lid rotation and glow changes rendered frame-by-frame.