Friday, April 18, 2014

Studying for the Exam

Hello all,

I really don't have a solid topic to touch on today so I will just briefly go over how I am feeling about the upcoming exam for my graphics class, also possibly touching on how I am studying and what I think are the most important parts of the course in terms of material.

I know you all love pictures, so I will try to put as many in today as I can to make sure you understand what I mean by the terms, even if you have never heard of these things before, I will do my best to make it clear what they each are.


Moving on, I think overall that this course was about graphics and really connecting the computer itself with the game its playing. Really looking at not only how to optimize the graphics we are using but also how to utilize all the tools at our disposal to make anything we create look flashy. Throughout my time here, I have learnt lots of cool things about how to make games and where it is best to save memory space without sacrificing anything the player will actually notice. The world of video games is a give and take world, that was the first lesson I learnt and that was really reinforced this year.


Funnily enough making games is all about hacking your way through effects that will make people awe. But doing those effects in the craziest way possible and the way that will take the least amount of work, space and time on the computer. Just for kicks here is a picture of the graphics pipeline, which is literally the core of my graphics course.

This pipeline represents the processes that a single pixel goes through on its way to the screen. Which if you think about it, is a very long process that happens in less time than it takes you to blink your eye. I bet you that at least most of you just blinked. In any case, the fact of the matter is that there are two spots (that I am currently versed in) that are programmable, if memory serves though in reality you can program 5 or 6 parts of the pipeline using shaders. The point of being able to program the pipeline is so that we can take the control away from the computer which will do every operation the same exact way and we want to be able to make certain pixels, certain items that go through the pipeline be assembled into pixels on your screen in a different way. This is how we achieve things like differed lighting, which is a process of being able to support many lights (way more than normal) in one scene. This is done by literally doing the lighting last, which sounds really weird. But its just a process of capturing the scene without lighting, and then using that and just simply applying lighting after the scene is actually drawn this allows to save the processing power that would have normally been used to calculate normal lighting per pixel, of course its not perfect but it is a good step in the right direction in terms of having lots of lights in the scene!

Moving forward, I feel like in addition to post processing, some questions will be asked in concern to not only differed lighting but also to lighting calculations, motion blur things like this. Its for that reason that I am really studying hard on those certain topics. I got a 90% on the first midterm so I feel pretty confident in my abilities to do those aspects therefore I will now concentrate on only the things I have not done. 

To finish this small little blog post off, I am just going to post some neat pictures of differed lighting for you all!

Differed lighting




Thank you so much for taking this journey with me! I hope that before this semester is over, I can at least do one more blog post for you all, we will see how busy I am in the next few days!

Thank you all again for your support. 


Until next time!
Stephen Krieg





Friday, April 11, 2014

Second Year. What was the most interesting thing I learnt?

POST PROCESSING to answer the question in the title.

As the second year draws to a close I figured that I would send it off with a blog that simply goes over in minor detail all of the things I gathered out of our graphics class, and then maybe even elaborate on how I feel about the year coming up in the future.

First of all, the graphics class was absolutely difficult, some concepts are not only hard to grasp but they are all launched at you in fast succession. Things like FrameBuffer objects, Vertex Buffer objects, the concept of finally depending on the GPU to do things that control graphics, and even the concept that you can use the GPU for much more than that!

Spanning from FrameBuffers comes post processed effects, where you store the normal screen output to a frame buffer, and then use that very frame buffer which in essence is a picture of your normal output to the screen, and change it. The fact that you can literally decide to not send the output of the graphics pipeline directly to the screen and rather to a texture to be manipulated just like any other image is mind blowing. It opens up many avenues for creativity! When you take into consideration that the pixels on your screen are simply data, color data at that. You can then have the concept in your mind that you can make that very same data do whatever you like. You can even output the screen to a frame buffer and then bind that to a character. Which would look very weird yes. But you would be able to see the output of the screen or of a screen on a character. Concepts like that give game development a whole new look. Honestly when I learnt of it I was flaber gasted, as the notion of being able to manipulate the screen image after it was changed by shaders. I do know that I did do a blog on post processed effects (mostly bloom) but I will again post a diagram of what a Frame buffer object or FBO would look like if you visualized it.

This image is perfect for what a frame buffer object actually represents! The eyes are cameras, and on the right side you can see what each frame buffer would look like if saved from those viewpoints.

I will also post some quick pictures of common post processed effects just to get a feel of what can come from a frame buffer and post processed effects.

Bloom
Obviously an example of the bloom effect, look towards the clouds and sky, even off the roof of the shed there is a bit of bloom. In this particular image the blur factor is not repeated enough times to have a smooth blur. I would suspect that these people simply didnt blur many times at decreased resolutions. For example, they should have blured at 1/4 then blurred that at 1/6 then that at 1/8, then they would have a smoother blur. Other than that this is a beautiful example of how the light areas are bloomed.

Edge Detection
In the edge detection image you will notice that the edges are white, why is this? Well its done because of the fact that they are colored white. What the edge detection post processing effect does is check the depth of the image against each pixel, so for example a pixel that was part of the VERY edge of the leaf in this image would have a different depth than the wall pixel behind it. After checking those values the system could tell that there was obviously an edge that the leaf pixel was sitting on, and colored it white. For a really good formula that we even decided to use in our game check this link out!

For sake of length I will give one last example of a neat post processed effect I learnt about.

Toon Shading
Toon shading is more of a neat effect than it is widely used. Basically as the image suggests it takes the normal image, and shape and gives harsh colors to it without any blending. This option for coloring is the opposite of gradient (LINK TO GRADIENT EXAMPLE). Where the image in quesiton is given a harsh color and then when a certain threshold of the normal is met the color then transitions directly to the next.

The last part of Toon Shading that is kind of neat is that the black line around it is an implementation of edge detection to make the image stand out against the background, makes the effect of a cartoon image drawn with a pencil if you will.


Well those are my favorite post processing effects, for now I will leave you with one last part of advice before I hit the books for the next 24 hours. Study hard, stay true to yourself and to school and always check back in for more blogs! I will be more active in the next few weeks.

Stay tuned for my STUDY CRUNCH series, I will be updating my blog hopefully daily and letting everyone in on my study habits and opening the doors for comments on my will to read lecture notes.


Thank you for reading! Stay tuned.
Stephen Krieg