What I did:
I learned the basics of Computer Graphics Pipelines and OpenGL over 16 weeks for my Computer Graphics Course. I've included screen-captures from each project I've worked on.
Intractable Curves:
I started by rendering simple points to a screen and arranged them in a figure 8. I then added support for picking these points and moving them with the mouse. Everything took me forever to do, I had to learn how to create and Allocate VAOs and VBOs and create containers to track my lists for vertices and indices. I also implemented multiple types of curves which required me to research the formulas for computation to generate the Bezier points that I would connect with line segments.
Intractable 3D Model
This project, was the hardest thing I had ever done in OpenGL, I created a model in Blender and exported it as (.obj) for compatibility with a native loader.
I then realized that Only the base would appear. I had to create VAOs for each shape in the model and then when I went to add keyboard controls to move/rotate these shapes I noticed that the pivot points were completely wrong. After fixing them I had to create some sort of structure to handle parent-child relations for translations and rotations. I implemented this with a simple list (vector) where I would store relative rotations and would update the model view matrix to reflect changes from the parent to each child. I also added simple lighting with vertex and fragment shader files. UV Texturing and Smoothing (PN-triangles)
my I wanted to be able to texture a model, so I found a low-poly 3D model of a face online and manually created (simple) UV coordinates with Blender. I then had to modify the .obj loader I was using to read and store UV coordinates. I then passed along this information by setting it as the active texture, binding binding it, and setting the texture sampler to use the proper texture unit. I then to apply the colors to my mesh in my fragment shader.
Lessons Learned:
With learning a new library, it was easy for my code to become unorganized or to fall into bad practices. I often had to refactor my code because it was too hard to identify issues when I was first starting. I learned the importance of clean structures such as Scene Graphs, vectors, lists, typedef objects and more.
|
|