
Scotty3D Implementation – Computer Graphics
​
Project Overview:
Scotty3D is a 3D modeling, rendering, and animation package similar to Blender, but designed as an educational framework for implementing core graphics algorithms. As part of my Computer Graphics coursework at Carnegie Mellon University, I worked on completing fundamental components of the pipeline, including rasterization, path-tracing rendering, mesh editing, animation (skeleton kinematics, skinning), and particle simulation.
​​​​
Technical Skills Gained:
-
Computer Graphics Algorithms: Understanding and implementing core graphics techniques such as ray tracing, rasterization, and mesh processing.
-
C++ Shader Programming: Worked extensively with C++ for low-level graphics computations.
-
Linear Algebra & Computational Geometry: Applied matrix transformations, quaternions, and numerical optimization in skeletal animation and mesh editing.
This project deepened my understanding of real-time and offline rendering techniques and gave me hands-on experience with fundamental 3D graphics concepts used in game engines and animation software.
​







Scene Transformations
Implemented transformation functions to convert geometry between object and world space:
​
-
local_to_world() and world_to_local() return 4×4 transformation matrices.
-
Supports scaling, rotation, and translation in matrix composition order.
-
Ensures correct positioning of models in the scene for rasterization.
✅ Enables accurate geometric transformations for all rasterized objects.
Line Rasterization
Implemented line drawing using a pixel-accurate rasterization method:
​​​
-
Used Bresenham’s algorithm for efficient line stepping.
-
Followed diamond exit rule to match GPU rasterization standards.
✅ Accurately draws wireframes and edge outlines.
Triangle Rasterization
Implemented triangle rasterization using bounding box and top-left rule to determine fragment coverage:
​​​​​
-
Used edge functions to perform point-in-triangle tests.
-
Interpolated per-fragment attributes using barycentric coordinates.
-
Supported both screen-space and perspective-correct interpolation for color, depth, and texture coordinates.
✅ Produces accurate fragment coverage and supports correct texture mapping under perspective.
Depth Testing and Blending
Added support for visibility and transparency:
​​​​​
-
Depth testing with a Depth_Less() function to discard occluded fragments.
-
Alpha blending via Blend_Add() and Blend_Over() to support semi-transparent surfaces.
✅ Enables multi-layer composition and realistic object overlap.
Mipmap & Texture Sampling
Implemented mipmap generation and multilevel texture sampling:
​
-
Calculated texture LOD based on screen-space derivatives.
-
Used nearest and bilinear filtering for magnification.
-
Used trilinear sampling for smooth minification across mip levels.
✅ Prevents aliasing and preserves detail across zoom levels.
Supersampling Anti-Aliasing (SSAA)
Implemented 8×8 supersampling for anti-aliasing:
​​​
-
Generated multiple subpixel samples per pixel.
-
Averaged results into a single final pixel color.
✅ Smooths jagged edges and improves overall image quality.