USC Gamepipe Game Engine
The USC Gamepipe Game Engine (GGE) is a generic game engine collective created by USC students. It integrates modules from Ogre, Havok, FMod, RakNet and many other sources. I contributed to the project by working on the Havok Physics and Animation module:
- Added support for Single Instruction Multiple Data (SIMD).
- Added support for multithreading.
- Optimized the use of Havok memory system, specialized allocation to fit purposes.
- Implemented data alignment auxiliary.
- Integrated Havok animation playback into GGE Live Editor, the map editor of GGE which connects to the engine real-time using TCP.
Soft Body Simulation
This is a mass spring system I implemented to simulate the motion of a deformable jello cube. Three types of springs included: Structural, Sheer and Bend. Each spring receives force from external, elasticity and damping. Integration solved with RK4 method. Collision response implemented with penalty method. Rendered in OpenGL. Limits: volume not preserved, cannot restore from severe deformation.
GzRender is a Win32 renderer I implemented from scratch in C. It does not depend on any API like OpenGL or DirectX. I wrote everything bottom up from scan-line rasterization, transformation, Phong shading, texture mapping to high level features like anti-aliasing, surface subdivision and simplification.
Surface Subdivision is a method to create smooth surfaces from coarser meshes. I used the Loop scheme with a half-edge data structure. The resulting procedure works fast and robust on small models.
Simplification is the reverse of subdivision, reducing the number of polygons in meshes. I used the Edge collapse algorithm for this implementation.
Anti-Aliasing is achieved through a supersampling pre-filter. The two images below show the difference before and after the treatment.
Procedural texture is a way to create realistic surface pattern using algorithms instead of art assets. It is efficient in terms of both space and time. The algorithm I wrote generates a controlled random noise to achieve this effect. This image below is a screenshot of the result, resemble the quality of jade.
Motion Capture Interpolation
This program I wrote takes keyframes from Motion Capture raw data and interpolates them back to animation. Four modes included: linear and Bezier interpolation on Euler angles, SLERP and Bezier SLERP on quaternion. Video player and raw data were from CMU graphics lab. The video below compares the original animation (color) with the Bezier SLERPed animation (color).
This is a constrained particle system I implemented to simulate the motion of a metal chain. I represented the model in maximal coordinates and stabilized the under-constrained problem with Baumgarte method. Linear system solved using GNU Science Library. Rendered with OpenGL.