top of page

Scotty 3D

3D graphics software package

Scotty3D is the coursework project for 15-462/662(Computer Graphics) at Carnegie Mellon University. It is a 3D graphics software package including components for interactive rasterization renderingmesh editing, realistic path tracing, and dynamic animation. 

Demo Video

Project Info

  • Platform: Windows

  • Date of Completion: 2023.05

  • Course: CMU 15-442/662

  • Category: 3D Graphics Software

  • Contribution: Individual Project

Rasterization rendering

The first component of the project involves rasterized rendering. During this phase, I focused on developing various features that encompassed MVP transformation, line rendering, triangle rendering, mip-mapping, supersampling, and more. This intricate process allowed me to gain a comprehensive understanding of how graphics are rendered on a computer.

A1T5-cubes-after.png

Mesh Editing

MeshEdit serves as the primary component of Scotty3D, enabling 3D modeling, subdivision, and mesh processing. This powerful tool empowers users to transform simple cube models into stunning, organic 3D surfaces represented by high-quality polygon meshes. Moreover, MeshEdit facilitates the import, modification, and export of industry-standard COLLADA files, enabling seamless integration with other computer graphics software.

​

During the development process, I implemented a significant portion of the local mesh operations supported by Scotty3D. These operations include EdgeFlip, EdgeCollapse, VertexExtrude, FaceBevel, and more. Implementing these operations provided me with a comprehensive understanding of the Halfedge data structure, which acts as the "glue" connecting various elements such as vertices, edges, and faces within the mesh.

​

Half Edge.webp

Furthermore, I incorporated several global remeshing algorithms into the system, such as Catmull-Clark Subdivision, Loop Subdivision, and Simplification. These algorithms allow for flexible modification and optimization of models, mirroring the capabilities found in well-known 3D software.

​

Through these implementations, I have gained valuable experience in working with complex mesh operations and have deepened my understanding of advanced modeling techniques and algorithms commonly employed in the 3D graphics industry.

global-catmark-subdivide.png

Path Tracing

PathTracer is (as the name suggests) a simple path tracer that can render scenes with global illumination. I implemented the BVH(Bounding Volume Hierarchy) algorithm as the data structure to store the mesh information and accelerate the frequent ray intersection query that path tracing requires. 

​

The images below show the visualization of the bounding box hierarchy of a bunny model. The image from left to right indicates the bounding box at level 4, 7, and 10.

bvh.jpg

Also, the efficient BVH structure accelerates the visibility query for the bunny model from 2 minutes to less than 0.5 seconds on an RTX 3070 machine.

​

Later on, I implemented the global illumination algorithm using path tracing. I also applied BSDF for Lambertian, mirror, and glass material to test the correctness and efficiency of my algorithm.

To optimize the path tracing algorithm even more, I implemented a basic importance sampling strategy - light sampling. The basic idea behind importance sampling is that for each point the algorithm prefers to shoot rays in the direction that has light sources because these are the samples that actually contribute to the final rendering result and therefore have better rendering quality even with fewer samples.

cbox_importance.jpg

Lastly, I implemented Environment Lighting, which is a new type of light source: an infinite environment light. An environment light is a light that supplies incident radiance from all directions on the sphere. The intensity of incoming light from each direction is defined by a texture map parameterized by phi and theta.

​

Pixels with higher luminance in the texture map will have a higher probability to be sampled from. For this purpose, I implemented an inversion sampling algorithm by calculating the luminance PDF and CDF of the texture map and then sampling pixels based on the CDF.

render.png

Animation

Animation is the final module of the project. I utilized the Spline Interpolation algorithm to calculate the interpolation values, enabling the implementation of keyframe animation. In terms of Skeleton Kinematics, I employed the Gradient Descent algorithm to compute partial derivatives, allowing for the implementation of both Forward Kinematics (FK) and Inverse Kinematics (IK) motion models.

​

For Skinning, I employed the Linear Blend Skinning algorithm, utilizing the Halfedge data structure mentioned earlier to control the positioning of the points.

​

Lastly, I implemented a particle system that simulates various aspects, including physical collisions, particle lifetimes, and more.

What I Learned

Throughout my exploration of computer graphics, I have gained valuable knowledge and skills in various aspects of the field. I have learned about rasterized rendering techniques, including MVP transformation, triangle rendering, mip-mapping, and supersampling. Additionally, I have delved into 3D modeling and mesh processing, mastering mesh editing, subdivision, and global remeshing algorithms. Lastly, I have acquired expertise in creating realistic visual effects through the implementation of global illumination algorithms, such as path tracing, and utilizing data structures like BVH for efficient ray intersection calculations. Overall, this experience has equipped me with the tools to create visually compelling digital environments.

bottom of page