Marcos Rogelio De la Hoz
Hello Traveller, welcome to Pancar, this is where I live and where I make my art.
Come, I will show you what I have done so far.
A0 - Adrift in the Cosmos
This was my first task and the introduction to the world of computer graphics.
First, I had to introduce my human student self, explaining what I like about
this world and what I expect to learn in this journey.
After that, I shared two images of my real face and then completed a tricky
mathematical quest to warm up my graphical cores.
Finally, I introduced who I am, I am Marcos Rogelio De la Hoz, by the way,
I talked about my home and my powers, and begin this well-trodden path.
Laboratory 0
Our first time in the laboratory we learned how to create the most basic images
with OpenGL in C++. We had to install some libraries (glm, openGL, glad, GLFW)
and then start working on the vertices and colors, moving the data from the CPU
to the GPU and then drawing the figure on the screen.
First part:
We created a triforce using golden triangles and then we experimented with our
first transformations, in this case tranlation. We moved the triforce and created
a duplicate on the screen.
Second part:
This part was more artistic, it was called Bob Ross section. We had the chance to
create a painting of our world, in my case, the wonderful land of Pancar. This task
was not dificult but time consuming, it took me a while to create all those figures
and colors to represent just an idea of how beautiful my home is.
A1 - The Metal Shop
This new task began with some more challenging obstacles. We were presented with
a 2D space to start creating figures, using vertices and colors, we were able to create
triangles, squares, rectangles and other sorts of geometric figures.
We applied very simple functions from glm, openGL and the CSCI441 library, but the
work was tedious and creating those figures one by one took a long time.
We were assigned two major missions:
- Creating our own banner that could show our name to other travellers.
- Creating this space you are seeing right know, which is still in development,
I know it is not very cozy in here.
Laboratory 1
In this laboratory we started experimenting with animation and interaction inside our program.
We learned the concept of callback and how we could program an action triggered by a user event,
like pressing and realeasing keys, clicking the mouse or moving the cursor.
- We made the ECS key functional by closing the window and stoping the program when pressed.
- With the same triforce we had on the previous lab, we learned how to make it rotate,
creating an animation.
- Pressing the letter C and clicking with the mouse we changed the color of the triforce from
gold to red and viceversa.
- Finally, moving the cursor we made the triforce follow it so we could move it all over
the screen, allowing for a very interesting interaction.
A2 - The Grand Bazaar
This assignment explored animation and interaction in OpenGL.
We created our character using openGL primitives, which took a long time. Then we had to establish a constant animation
that would would be executing in each drawing loop iteration, like blinking eyes.
A keyboard callback to allow the user to move the character using WASD across the screen,
bounding the position in X and Y so that the character did not disappear.
A mouse callback creating a cool interaction depending on the mouse cursor position. As well
as combinations of both keyboard and mouse.
This was about getting creative, and that is what I did with my time, I had a lot of fun
creating it.
Although the process of drawing in 2D and creating each vertex and color is quite tedious,
creating animations and making them interact with the peripherals is very interesting and
fun to experiment.
Laboratory 2
The main purpose of this lab was creating a free cam implementation in OpenGL.
First we created a grid with a bunch of random colored buildings (prims of different heights)
using some loops and matrices. And then after figuring out the conversion from Spherical to
Cartesian coordinates, we created methods to manipulate the direction, position and orientation
of our camera.
- We created forward and backward methods changing both the camera position and look-at point.
- A mouse callback to change theta to turn the camera left and right, and phi to turn the camera
up and down.
With those apparently easy methods (not easy at all) we could fly around the city with our free camera.
We really became pilots, pilots of aeroplano.
Laboratory 3
In this laboratory we mainly focused and the more complex and core logic of the 3D rendering.
We used vertex array objects (VAOs), vertex buffer objects (VBOs) and index buffer objects (IBOs)
to render a model, a grid and some textures.
For this program we had a hellknight model with all its wireframe, skeleton and mesh. We were able to toggle
this layers, and also get to see the model animated. We used the MD5 model for the character and animations,
but we did not implement that part, it was given with this lab. Most of the work consisted in following all
the steps required to make that model render in our 3D world.
The process of creating 3D objects this way is somehow tedious, because it takes a lot a different and
specific steps that you cannot skip, and if you do, it will not work. Despite the complexity of the technique,
I think it was a great way to appreciate all the work that is behind many things we have been using for
years.
Laboratory 4
Shaders are a whole other world inside the graphical universe, and in this lab we learned how to set up
basic shaders for a couple of 3D models. Using openGL and GLSL in conjuction we used uniforms, attributes
and varying to move data from the engine to the shader, and from the vertex shader to the fragment shader.
Apart from the classic teapot, a cube, sphere and some other shapes, we rendered Suzanne, a cool monkey model
and we see using a free cam around the 3D space. After setting up the uniforms with locations, the attributes
and moving the data correctly from one shader to the other, we could see the models all in a white shade.
After that we added colors to all models, inclusing Suzanne, and finally we animated the models by making a
small region of the mesh to pulse in and out.
We learned some important things thanks to the questions and requirements of this lab. We used GLSL for the first
time, learned how uniforms, attributes and varyings work, and how they move the information. This lab stablished the
foundation of our shader development, so now we can improve, extend and create better looking and more complex shaders
in the future.
Laboratory 5
Light is able to change how we see things, and that makes it very important. In this laboratory we implemented
illumination into the GLSL shaders so colors don't look plain, sad and boring.
In our city of random buildings a using a plane model with a free camera to fly around we set up the shaders.
As part of the Phong Illumination model, we only implemented the lambertian diffuse ilumination in the vertex shader,
so we had a directional light which lid up one face of the city, and the other side was darker.
The math behind this lighting is very intersting, but also enough complex to make it long to implement, specially
if you wanted to create the full illumination model.
I think with this lab we are now able to setup our own lights for our world, and using more techniques, we can even
use different styles to create awesome and detailed projects.
Laboratory 6
Sometimes colors are not enough to create graphics, we need textures. In this lab we started using
simple texture for some objects and models in a 3D grid.
First we setted up the vertex and fragment shaders, to map the texture coordinate and color. We connected with
the shader from the engine, and loaded the textures from image files. Generated a texture handle, binding it, setting
the mag and min filters, setting the S and T coordinate wrapping and sending the data to the GPU.
We used more technical skills to apply actual textures in a form of images to 3D models and figures, such as the cube,
teapot and the hellknight. We textured the grid with a metal material image, and also added the Mines logo to some of
the figures. Maping and coordinates are key here for textures, otherwise your models end up looking like very ugly
wrapped presents.
Definitely something very useful and fun to implement in a 3D world to give more detail and realism to what we
want to create.
A3 - Begin the Transformation
We created our first 3D model and world in openGL
After many labs learning all the necessary skills we finally were able to create our own piece of art.
The things we created are the following :
- A 3D model using the course library with colors, shaders and illumination.
- An arc-ball camera to move around our hero, zooming in and out and using the mouse.
- The full Phong Illlumination model including diffuse, specular and ambient.
- Animation of our choice for our hero.
- Interaction with the user, keyboard, cursor and mouse.
- Finally, our world, flat and lonely, but it is our lovely world.
Apart from the skills we had to demonstrate for this assigment, I think we also had the opportunity to show our
creative side as programmers and create fun, intereting and cool features.
From now on, I really feel like I could implement and create many other things with what I have learned,
things that I had no idea I could be doing now.
Laboratory 8
Polygons and cubic objects are not the only thing you can draw in openGL. We can definitely import very cool models, but we
can also create our own curves and design our own models.
In this lab we began rendering some curves, specifically Bézier curves. First we designed the function that calculates
the curve using the formulas by Paul de Casteljau. Asking the user for the curve resolution, we created an algorithm
that iterated over the number of curves and setting the control points of each piece of the curve, generated the
entire Bézier curve, based on the resolution.
The pieces of the curve would then be inserted in a vector and drawn interating over it to represent the curve between
the points on the 3D scene. After that, we set a small value to be updated every frame, and drew a sphere that would
be animated to move along the curve over and over. We did this for four and seven points on the grid.
Although it might not sound as fun and interesting as other labs and projects, this makes a different in the process of
drawing in 3D. It is definitely not easy, but it opens up infinite possibilities to create graphics.
Mid-Term Project
This was our first big project as a team on Computer Graphics. We were able to create teams depending on our metal
chosen at the beginning of this journey, but it was not easy task.
After finding a team a bit late, we were tasked to create our own and detailed 3D world, with our hero characters,
objects, animations, illumination, shaders and textures. As this was more like an assignment than a laboratory, we did
not have actual instructions, but only requirements.
Starting from an empty 3D world, we created an interface to adapt and draw all hero characters. This way all models
would be compatible and could be drawn with their own animations. With the heroes drawn and animated it was time to
make this world look better, so we added some interesting yet simple objects.
We created animated random grass around the grid of the world, made tall pine trees to create forests and also
made elevation possible, allowing to draw mountains. After the heroes and objects, we had to implement more technical
features for this world. Three different cameras were available: arc-ball camera around each hero, meaning each of them
could controlled by the player. A free camera to explore and move around the entire world, and also a picture-in-picture
first person camera view that could be seen along with the other cameras.
All heroes and objects were drawn using VAO, VBO and IBO with the help of the course library. Custom shaders were made
for the colors and lighting of the world using GLSL. The full phong illumination with diffuse, specular and ambient lighting
using all three types of lights: directional (creating even lights), point (the sun in the world) and spotlight (over the hero).
Finally some textures were added to this plain but detailed world to make it even more fun and realistic.
In my opinion, this project was about demonstrating what each of us were capable of doing after everything we have
learned so far, and it can very surprising. If you push further, if you research and read, go back to your lab files
and ask questions, you can be able to make things you never thought were possible.
Hey! You reached the bottom, you can click that small arrow to go up :-)
|