PLATFORM:
Visual Studio
LANGUAGE:
C++
YEAR
2025
EXPERIENCE:
3D ANIMATION
Shark Animation
About
This project is a user-controlled 3D shark animation developed using a custom C++ game engine built with OpenGL, created to explore core concepts in real-time graphics, game engine development, and interactive animation. The primary focus of the project was the procedural generation of a smooth, non-linear route, advanced camera control, and the integration of gameplay, rendering, and lighting systems without relying on external level-creation tools.
The shark travels along a programmatically generated Catmull–Rom spline path with C1 continuity, forming a roller-coaster-style track rendered entirely using OpenGL primitives. The route is fully textured, correctly lit, and visually enhanced through the use of edge highlighting, regularly spaced meshes, and environmental props—demonstrating a strong understanding of mesh construction, normals, and texture coordinate assignment.
Multiple camera systems were implemented to enhance both debugging and presentation, including top-down, third-person, and side-view perspectives. Camera motion and orientation are dynamically driven by the TNB (Tangent, Normal, Binormal) frame along the spline path, ensuring smooth and physically consistent movement relative to the shark’s trajectory.
Beyond routing and camera mechanics, the project incorporates custom-built geometry, imported meshes, lighting modes, gameplay elements, and advanced rendering techniques. These include procedurally defined objects using OpenGL primitives, textured and lit external models, a basic scoring and collision system, a head-up display, and stylized shaders such as toon shading, Perlin noise effects, and atmospheric fog. While initially intended as a complete game, the project ultimately serves as a technically focused interactive animation, designed to reinforce mathematical, graphical, and engine-level programming principles.
Challenges
One of the primary challenges of this project was the creation of the non-linear movement path. Rather than relying on a simple coordinate-based route, the animation required a Catmull–Rom spline with C1 continuity to form a smooth, roller-coaster-style track. Implementing this spline demanded a strong understanding of vector mathematics, interpolation, and differential geometry, particularly when calculating tangents and ensuring smooth transitions along the curve. Additional complexity arose when generating the track mesh programmatically in OpenGL, assigning correct normals and texture coordinates, and successfully wrapping textures along a curved, dynamically generated path without distortion.
Another significant challenge involved the implementation of multiple lighting modes and advanced rendering techniques. Supporting both bright and dark lighting scenarios required careful coordination between directional lights, spotlights, and shader logic. Debugging shader programs proved particularly difficult, as traditional debugging tools are not available for GLSL shader files. As a result, issues related to lighting calculations, color balance, and visual consistency had to be resolved through incremental testing, visual inspection, and parameter tuning.
Further challenges included aligning camera orientation with the spline using the TNB frame, ensuring stable and intuitive camera behavior across multiple viewpoints, and integrating stylized shaders such as toon shading, Perlin noise effects, and atmospheric fog without compromising performance or visual clarity. Overcoming these challenges strengthened the project’s technical foundation and reinforced core concepts in real-time rendering, shader programming, and engine-level development.
Result
The final outcome of the project was a fully functional, user-controlled 3D animation built entirely within a custom C++ OpenGL game engine, successfully meeting all technical and design requirements. The shark moves smoothly along a procedurally generated Catmull–Rom spline path with C1 continuity, demonstrating accurate mathematical implementation and stable frame rate–independent motion.
The route mesh was rendered entirely using OpenGL primitives, with correctly assigned normals and texture coordinates, resulting in consistent lighting, shading, and clear visual definition of the track. Environmental props and repeated meshes were effectively used to enhance depth and readability, while remaining performance-friendly. Multiple camera modes—top-down, third-person, and side view—were implemented and dynamically aligned using the TNB frame, providing smooth transitions and varied perspectives throughout the animation.
Lighting and rendering systems performed as intended across both bright and dark modes, with directional and spotlight-based illumination contributing to atmosphere and visual clarity. Advanced rendering techniques, including toon shading, Perlin noise effects, deep-sea fog, and 3D text rendering, were successfully integrated, enhancing the visual style without compromising stability.
Gameplay elements such as keyboard-controlled movement, boosting, collision detection, scoring, and time tracking functioned reliably, supported by a clear head-up display. Overall, the project achieved its goal of reinforcing core concepts in graphics programming, mathematical modeling, shader development, and engine-level system design, resulting in a polished and technically robust interactive animation.

